From 22f10a9edd8b6d3f484cdc2803a9f1f4bedd4273 Mon Sep 17 00:00:00 2001 From: Rachit Bhargava Date: Wed, 27 Dec 2023 20:55:58 +0000 Subject: [PATCH] Merged in release/release-1.09 (pull request #10) Release/release 1.09 * Install missing plugins * rs set to 1 * rebase pantheon for aws * rebase pantheon for aws * prod config change * prod config change * fix campaing issue * revert Approved-by: Jay Sharma --- build/prod/deployment.tpl | 4 +- build/prod/web-default-conf-cm.yaml | 18 +- build/prod/web-hpa.yml | 2 +- build/stage/deployment.tpl | 6 +- build/stage/web-default-conf-cm.yaml | 21 +- build/stage/web-hpa.yml | 2 +- release | 2 +- wp-config.php | 70 - wp/pantheon.upstream.yml | 2 +- wp/pantheon.yml | 1 + wp/wp-admin/about.php | 31 +- wp/wp-admin/css/about-rtl.css | 6 +- wp/wp-admin/css/about-rtl.min.css | 2 +- wp/wp-admin/css/about.css | 6 +- wp/wp-admin/css/about.min.css | 2 +- .../contact-form-7/includes/formatting.php | 11 - .../includes/swv/rules/file.php | 2 +- .../plugins/contact-form-7/readme.txt | 6 +- .../contact-form-7/wp-contact-form-7.php | 4 +- wp/wp-content/plugins/divifilter/df-script.js | 1 - wp/wp-content/plugins/divifilter/df-style.css | 60 - .../plugins/divifilter/divifilter.php | 226 - .../plugin-update-checker/.editorconfig | 15 - .../plugin-update-checker/.gitignore | 40 - .../plugin-update-checker/Puc/v4/Factory.php | 6 - .../Puc/v4p11/Autoloader.php | 63 - .../Puc/v4p11/DebugBar/Extension.php | 190 - .../Puc/v4p11/DebugBar/Panel.php | 165 - .../Puc/v4p11/DebugBar/PluginExtension.php | 33 - .../Puc/v4p11/DebugBar/PluginPanel.php | 38 - .../Puc/v4p11/DebugBar/ThemePanel.php | 21 - .../Puc/v4p11/Factory.php | 365 - .../Puc/v4p11/InstalledPackage.php | 103 - .../Puc/v4p11/Metadata.php | 132 - .../Puc/v4p11/OAuthSignature.php | 100 - .../Puc/v4p11/Plugin/Info.php | 132 - .../Puc/v4p11/Plugin/Package.php | 184 - .../Puc/v4p11/Plugin/Ui.php | 278 - .../Puc/v4p11/Plugin/Update.php | 112 - .../Puc/v4p11/Plugin/UpdateChecker.php | 414 - .../Puc/v4p11/Scheduler.php | 266 - .../Puc/v4p11/StateStore.php | 207 - .../Puc/v4p11/Theme/Package.php | 65 - .../Puc/v4p11/Theme/Update.php | 84 - .../Puc/v4p11/Theme/UpdateChecker.php | 152 - .../Puc/v4p11/Update.php | 34 - .../Puc/v4p11/UpdateChecker.php | 997 --- .../Puc/v4p11/UpgraderStatus.php | 199 - .../plugin-update-checker/Puc/v4p11/Utils.php | 69 - .../Puc/v4p11/Vcs/Api.php | 302 - .../Puc/v4p11/Vcs/BaseChecker.php | 27 - .../Puc/v4p11/Vcs/BitBucketApi.php | 273 - .../Puc/v4p11/Vcs/GitHubApi.php | 441 - .../Puc/v4p11/Vcs/GitLabApi.php | 400 - .../Puc/v4p11/Vcs/PluginUpdateChecker.php | 293 - .../Puc/v4p11/Vcs/Reference.php | 49 - .../Puc/v4p11/Vcs/ThemeUpdateChecker.php | 118 - .../plugin-update-checker/README.md | 326 - .../plugin-update-checker/composer.json | 23 - .../css/puc-debug-bar.css | 70 - .../examples/plugin.json | 52 - .../plugin-update-checker/examples/theme.json | 5 - .../plugin-update-checker/js/debug-bar.js | 52 - .../languages/plugin-update-checker-ca.mo | Bin 1186 -> 0 bytes .../languages/plugin-update-checker-ca.po | 48 - .../languages/plugin-update-checker-cs_CZ.mo | Bin 1077 -> 0 bytes .../languages/plugin-update-checker-cs_CZ.po | 45 - .../languages/plugin-update-checker-da_DK.mo | Bin 1010 -> 0 bytes .../languages/plugin-update-checker-da_DK.po | 42 - .../languages/plugin-update-checker-de_DE.mo | Bin 980 -> 0 bytes .../languages/plugin-update-checker-de_DE.po | 38 - .../languages/plugin-update-checker-es_AR.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_AR.po | 48 - .../languages/plugin-update-checker-es_CL.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_CL.po | 48 - .../languages/plugin-update-checker-es_CO.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_CO.po | 48 - .../languages/plugin-update-checker-es_CR.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_CR.po | 48 - .../languages/plugin-update-checker-es_DO.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_DO.po | 48 - .../languages/plugin-update-checker-es_ES.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_ES.po | 48 - .../languages/plugin-update-checker-es_GT.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_GT.po | 48 - .../languages/plugin-update-checker-es_HN.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_HN.po | 48 - .../languages/plugin-update-checker-es_MX.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_MX.po | 48 - .../languages/plugin-update-checker-es_PE.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_PE.po | 48 - .../languages/plugin-update-checker-es_PR.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_PR.po | 48 - .../languages/plugin-update-checker-es_UY.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_UY.po | 48 - .../languages/plugin-update-checker-es_VE.mo | Bin 1140 -> 0 bytes .../languages/plugin-update-checker-es_VE.po | 48 - .../languages/plugin-update-checker-fa_IR.mo | Bin 1128 -> 0 bytes .../languages/plugin-update-checker-fa_IR.po | 38 - .../languages/plugin-update-checker-fr_CA.mo | Bin 1208 -> 0 bytes .../languages/plugin-update-checker-fr_CA.po | 48 - .../languages/plugin-update-checker-fr_FR.mo | Bin 1066 -> 0 bytes .../languages/plugin-update-checker-fr_FR.po | 42 - .../languages/plugin-update-checker-hu_HU.mo | Bin 982 -> 0 bytes .../languages/plugin-update-checker-hu_HU.po | 41 - .../languages/plugin-update-checker-it_IT.mo | Bin 1135 -> 0 bytes .../languages/plugin-update-checker-it_IT.po | 48 - .../languages/plugin-update-checker-ja.mo | Bin 1454 -> 0 bytes .../languages/plugin-update-checker-ja.po | 57 - .../languages/plugin-update-checker-nl_BE.mo | Bin 1211 -> 0 bytes .../languages/plugin-update-checker-nl_BE.po | 48 - .../languages/plugin-update-checker-nl_NL.mo | Bin 1211 -> 0 bytes .../languages/plugin-update-checker-nl_NL.po | 48 - .../languages/plugin-update-checker-pt_BR.mo | Bin 1014 -> 0 bytes .../languages/plugin-update-checker-pt_BR.po | 48 - .../languages/plugin-update-checker-ru_RU.mo | Bin 1337 -> 0 bytes .../languages/plugin-update-checker-ru_RU.po | 48 - .../languages/plugin-update-checker-sl_SI.mo | Bin 1203 -> 0 bytes .../languages/plugin-update-checker-sl_SI.po | 48 - .../languages/plugin-update-checker-sv_SE.mo | Bin 1006 -> 0 bytes .../languages/plugin-update-checker-sv_SE.po | 42 - .../languages/plugin-update-checker-tr_TR.mo | Bin 1118 -> 0 bytes .../languages/plugin-update-checker-tr_TR.po | 48 - .../languages/plugin-update-checker-uk_UA.mo | Bin 1309 -> 0 bytes .../languages/plugin-update-checker-uk_UA.po | 48 - .../languages/plugin-update-checker-zh_CN.mo | Bin 1174 -> 0 bytes .../languages/plugin-update-checker-zh_CN.po | 57 - .../languages/plugin-update-checker.pot | 49 - .../plugin-update-checker/license.txt | 7 - .../plugin-update-checker/load-v4p11.php | 28 - .../plugin-update-checker.php | 10 - .../vendor/Parsedown.php | 9 - .../vendor/ParsedownLegacy.php | 1535 ---- .../vendor/ParsedownModern.php | 1538 ---- .../vendor/PucReadmeParser.php | 348 - wp/wp-content/plugins/divifilter/readme.txt | 155 - wp/wp-content/plugins/facetwp/.gitignore | 3 - .../plugins/facetwp/assets/css/admin.css | 1110 --- .../plugins/facetwp/assets/css/front.css | 327 - .../facetwp/assets/images/checkbox-on.png | Bin 128 -> 0 bytes .../facetwp/assets/images/checkbox.png | Bin 272 -> 0 bytes .../facetwp/assets/images/icon-close.png | Bin 2156 -> 0 bytes .../facetwp/assets/images/icon-locate.png | Bin 5003 -> 0 bytes .../facetwp/assets/images/icon-search.png | Bin 4232 -> 0 bytes .../plugins/facetwp/assets/images/loading.png | Bin 4337 -> 0 bytes .../plugins/facetwp/assets/images/logo.svg | 5 - .../assets/images/powered-by-google.png | Bin 6898 -> 0 bytes .../facetwp/assets/images/radio-on.png | Bin 1127 -> 0 bytes .../plugins/facetwp/assets/images/radio.png | Bin 957 -> 0 bytes .../facetwp/assets/js/dist/admin.min.js | 1684 ---- .../facetwp/assets/js/dist/front.min.js | 1 - .../facetwp/assets/js/src/accessibility.js | 104 - .../plugins/facetwp/assets/js/src/admin.js | 2189 ----- .../facetwp/assets/js/src/deprecated.js | 10 - .../facetwp/assets/js/src/event-manager.js | 6 - .../facetwp/assets/js/src/front-facets.js | 1013 --- .../plugins/facetwp/assets/js/src/front.js | 659 -- .../plugins/facetwp/assets/js/src/sample.json | 1 - .../assets/vendor/fComplete/fComplete.css | 29 - .../assets/vendor/fComplete/fComplete.js | 283 - .../facetwp/assets/vendor/fDate/LICENSE.md | 7 - .../facetwp/assets/vendor/fDate/fDate.css | 87 - .../facetwp/assets/vendor/fDate/fDate.js | 679 -- .../facetwp/assets/vendor/fDate/fDate.min.js | 1 - .../facetwp/assets/vendor/fSelect/fSelect.css | 147 - .../facetwp/assets/vendor/fSelect/fSelect.js | 420 - .../facetwp/assets/vendor/fTip/fTip.css | 18 - .../facetwp/assets/vendor/fTip/fTip.js | 100 - .../facetwp/assets/vendor/fUtil/LICENSE.md | 7 - .../facetwp/assets/vendor/fUtil/fUtil.js | 451 - .../assets/vendor/noUiSlider/nouislider.css | 150 - .../vendor/noUiSlider/nouislider.min.js | 2 - .../facetwp/assets/vendor/nummy/nummy.js | 87 - .../facetwp/assets/vendor/nummy/nummy.min.js | 1 - .../vanilla-picker-mini.min.js | 8 - .../facetwp/assets/vendor/vue/Sortable.min.js | 2 - .../vendor/vue/vue-select/vue-select.css | 1 - .../vendor/vue/vue-select/vue-select.js | 2 - .../facetwp/assets/vendor/vue/vue.min.js | 6 - .../assets/vendor/vue/vuedraggable.min.js | 2 - .../plugins/facetwp/includes/api/fetch.php | 180 - .../plugins/facetwp/includes/api/refresh.php | 27 - .../plugins/facetwp/includes/class-ajax.php | 321 - .../facetwp/includes/class-builder.php | 839 -- .../plugins/facetwp/includes/class-diff.php | 73 - .../facetwp/includes/class-display.php | 244 - .../plugins/facetwp/includes/class-helper.php | 600 -- .../facetwp/includes/class-indexer.php | 691 -- .../plugins/facetwp/includes/class-init.php | 157 - .../facetwp/includes/class-overrides.php | 103 - .../facetwp/includes/class-renderer.php | 662 -- .../facetwp/includes/class-request.php | 379 - .../facetwp/includes/class-settings.php | 646 -- .../facetwp/includes/class-updater.php | 183 - .../facetwp/includes/class-upgrade.php | 106 - .../facetwp/includes/facets/autocomplete.php | 163 - .../plugins/facetwp/includes/facets/base.php | 106 - .../facetwp/includes/facets/checkboxes.php | 258 - .../facetwp/includes/facets/date_range.php | 292 - .../facetwp/includes/facets/dropdown.php | 73 - .../facetwp/includes/facets/fselect.php | 100 - .../facetwp/includes/facets/hierarchy.php | 179 - .../facetwp/includes/facets/number_range.php | 137 - .../plugins/facetwp/includes/facets/pager.php | 277 - .../facetwp/includes/facets/proximity.php | 354 - .../plugins/facetwp/includes/facets/radio.php | 64 - .../facetwp/includes/facets/rating.php | 114 - .../plugins/facetwp/includes/facets/reset.php | 85 - .../facetwp/includes/facets/search.php | 89 - .../facetwp/includes/facets/slider.php | 160 - .../plugins/facetwp/includes/facets/sort.php | 226 - .../plugins/facetwp/includes/functions.php | 43 - .../facetwp/includes/integrations/acf/acf.php | 517 -- .../facetwp/includes/integrations/edd/edd.js | 6 - .../facetwp/includes/integrations/edd/edd.php | 51 - .../integrations/searchwp/searchwp.php | 215 - .../integrations/woocommerce/taxonomy.php | 85 - .../integrations/woocommerce/woocommerce.js | 34 - .../integrations/woocommerce/woocommerce.php | 570 -- .../includes/integrations/wp-cli/wp-cli.php | 150 - .../integrations/wp-rocket/wp-rocket.php | 24 - wp/wp-content/plugins/facetwp/index.php | 78 - .../plugins/facetwp/languages/fwp-front-ca.mo | Bin 1837 -> 0 bytes .../plugins/facetwp/languages/fwp-front-ca.po | 185 - .../facetwp/languages/fwp-front-da_DK.mo | Bin 1771 -> 0 bytes .../facetwp/languages/fwp-front-da_DK.po | 185 - .../facetwp/languages/fwp-front-de_DE.mo | Bin 1834 -> 0 bytes .../facetwp/languages/fwp-front-de_DE.po | 185 - .../facetwp/languages/fwp-front-es_AR.mo | Bin 1866 -> 0 bytes .../facetwp/languages/fwp-front-es_AR.po | 185 - .../facetwp/languages/fwp-front-es_ES.mo | Bin 1851 -> 0 bytes .../facetwp/languages/fwp-front-es_ES.po | 185 - .../facetwp/languages/fwp-front-fr_FR.mo | Bin 1839 -> 0 bytes .../facetwp/languages/fwp-front-fr_FR.po | 185 - .../facetwp/languages/fwp-front-it_IT.mo | Bin 1833 -> 0 bytes .../facetwp/languages/fwp-front-it_IT.po | 185 - .../facetwp/languages/fwp-front-nb_NO.mo | Bin 1763 -> 0 bytes .../facetwp/languages/fwp-front-nb_NO.po | 182 - .../facetwp/languages/fwp-front-nl_NL.mo | Bin 1796 -> 0 bytes .../facetwp/languages/fwp-front-nl_NL.po | 185 - .../facetwp/languages/fwp-front-pl_PL.mo | Bin 1914 -> 0 bytes .../facetwp/languages/fwp-front-pl_PL.po | 186 - .../facetwp/languages/fwp-front-pt_BR.mo | Bin 1841 -> 0 bytes .../facetwp/languages/fwp-front-pt_BR.po | 185 - .../facetwp/languages/fwp-front-ro_RO.mo | Bin 1921 -> 0 bytes .../facetwp/languages/fwp-front-ro_RO.po | 186 - .../facetwp/languages/fwp-front-ru_RU.mo | Bin 2236 -> 0 bytes .../facetwp/languages/fwp-front-ru_RU.po | 186 - .../facetwp/languages/fwp-front-sv_SE.mo | Bin 1752 -> 0 bytes .../facetwp/languages/fwp-front-sv_SE.po | 185 - .../plugins/facetwp/languages/fwp-front.pot | 185 - .../plugins/facetwp/languages/fwp.pot | 1032 --- wp/wp-content/plugins/facetwp/package.json | 14 - .../plugins/facetwp/rollup.config.js | 52 - .../facetwp/templates/page-settings.php | 240 - .../facetwp/templates/page-support.php | 67 - .../plugins/iper-medical/admin-cron.php | 2 +- .../relevanssi-premium/build/index.asset.php | 1 - .../plugins/relevanssi-premium/build/index.js | 1 - .../relevanssi-premium/build/index.js.map | 1 - .../plugins/relevanssi-premium/changelog.txt | 1564 ---- .../languages/relevanssi-cs_CZ.mo | Bin 86696 -> 0 bytes .../languages/relevanssi-cs_CZ.po | 3001 ------- .../languages/relevanssi-de_DE.mo | Bin 39004 -> 0 bytes .../languages/relevanssi-de_DE.po | 1010 --- .../relevanssi-fi-relevanssi-sidebar.json | 99 - .../languages/relevanssi-fi.mo | Bin 136967 -> 0 bytes .../languages/relevanssi-fi.po | 6886 --------------- .../languages/relevanssi-fr_CA.mo | Bin 42546 -> 0 bytes .../languages/relevanssi-fr_CA.po | 1589 ---- .../languages/relevanssi-fr_FR.mo | Bin 44977 -> 0 bytes .../languages/relevanssi-fr_FR.po | 1670 ---- .../languages/relevanssi-it_IT.mo | Bin 12935 -> 0 bytes .../languages/relevanssi-it_IT.po | 321 - .../languages/relevanssi-pl_PL.mo | Bin 42153 -> 0 bytes .../languages/relevanssi-pl_PL.po | 1452 --- .../languages/relevanssi-pt_BR.mo | Bin 20931 -> 0 bytes .../languages/relevanssi-pt_BR.po | 578 -- .../languages/relevanssi-ru_RU.mo | Bin 36752 -> 0 bytes .../languages/relevanssi-ru_RU.po | 1371 --- .../languages/relevanssi-sidebar-fi.mo | Bin 3523 -> 0 bytes .../languages/relevanssi-sidebar-fi.po | 148 - .../languages/relevanssi-sidebar.pot | 141 - .../relevanssi-premium/lib/admin-ajax.php | 457 - .../relevanssi-premium/lib/admin_scripts.js | 525 -- .../lib/admin_scripts_free.js | 53 - .../relevanssi-premium/lib/admin_styles.css | 118 - .../lib/class-relevanssi-taxonomy-walker.php | 74 - .../plugins/relevanssi-premium/lib/common.php | 1899 ---- .../lib/compatibility/acf.php | 278 - .../lib/compatibility/aioseo.php | 108 - .../lib/compatibility/avada.php | 19 - .../lib/compatibility/bricks.php | 98 - .../lib/compatibility/elementor.php | 28 - .../lib/compatibility/fibosearch.php | 27 - .../lib/compatibility/groups.php | 36 - .../lib/compatibility/gutenberg.php | 174 - .../lib/compatibility/jetsmartfilters.php | 47 - .../lib/compatibility/memberpress.php | 31 - .../lib/compatibility/members.php | 37 - .../lib/compatibility/ninjatables.php | 94 - .../lib/compatibility/oxygen.php | 259 - .../lib/compatibility/paidmembershippro.php | 38 - .../lib/compatibility/polylang.php | 205 - .../lib/compatibility/pretty-links.php | 30 - ...duct-gtin-ean-upc-isbn-for-woocommerce.php | 64 - .../lib/compatibility/rankmath.php | 100 - .../lib/compatibility/restrictcontentpro.php | 32 - .../lib/compatibility/seoframework.php | 96 - .../lib/compatibility/seopress.php | 102 - .../lib/compatibility/simplemembership.php | 30 - .../lib/compatibility/tablepress.php | 48 - .../lib/compatibility/useraccessmanager.php | 38 - .../lib/compatibility/woocommerce.php | 282 - .../lib/compatibility/wp-file-download.php | 58 - .../lib/compatibility/wp-members.php | 46 - .../lib/compatibility/wp-search-suggest.php | 25 - .../compatibility/wpjvpostreadinggroups.php | 28 - .../lib/compatibility/wpml.php | 149 - .../lib/compatibility/yoast-seo.php | 102 - .../lib/contextual-help.php | 227 - .../plugins/relevanssi-premium/lib/debug.php | 161 - .../relevanssi-premium/lib/didyoumean.php | 221 - .../lib/excerpts-highlights.php | 1594 ---- .../relevanssi-premium/lib/indexing.php | 1744 ---- .../plugins/relevanssi-premium/lib/init.php | 541 -- .../relevanssi-premium/lib/install.php | 148 - .../relevanssi-premium/lib/interface.php | 523 -- .../plugins/relevanssi-premium/lib/log.php | 366 - .../relevanssi-premium/lib/options.php | 393 - .../relevanssi-premium/lib/phrases.php | 290 - .../relevanssi-premium/lib/privacy.php | 146 - .../lib/search-query-restrictions.php | 644 -- .../lib/search-tax-query.php | 408 - .../plugins/relevanssi-premium/lib/search.php | 1989 ----- .../relevanssi-premium/lib/shortcodes.php | 207 - .../relevanssi-premium/lib/sorting.php | 451 - .../relevanssi-premium/lib/stopwords.php | 420 - .../lib/tabs/attachments-tab.php | 24 - .../lib/tabs/debugging-tab.php | 166 - .../lib/tabs/excerpts-tab.php | 428 - .../lib/tabs/indexing-tab.php | 529 -- .../lib/tabs/logging-tab.php | 126 - .../lib/tabs/overview-tab.php | 131 - .../lib/tabs/redirects-tab.php | 24 - .../lib/tabs/search-page.php | 97 - .../lib/tabs/searching-tab.php | 412 - .../lib/tabs/stopwords-tab.php | 149 - .../lib/tabs/synonyms-tab.php | 102 - .../relevanssi-premium/lib/uninstall.php | 154 - .../relevanssi-premium/lib/user-searches.php | 385 - .../plugins/relevanssi-premium/lib/utils.php | 1626 ---- .../relevanssi-premium/premium/admin-ajax.php | 742 -- .../premium/admin_metabox_scripts.js | 71 - .../premium/admin_pdf_scripts.js | 49 - .../premium/admin_scripts_premium.js | 540 -- .../premium/body-stopwords.php | 388 - .../class-relevanssi-language-packs.php | 190 - .../class-relevanssi-spellcorrector.php | 221 - .../class-relevanssi-wp-auto-update.php | 243 - .../class-relevanssi-wp-cli-command.php | 732 -- .../premium/click-tracking.php | 1006 --- .../relevanssi-premium/premium/common.php | 1230 --- .../premium/contextual-help.php | 103 - .../premium/excerpts-highlights.php | 206 - .../premium/gutenberg-sidebar.php | 393 - .../premium/gutenberg-sidebar/index.asset.php | 1 - .../premium/gutenberg-sidebar/index.js | 1 - .../premium/gutenberg-sidebar/index.js.map | 1 - .../relevanssi-premium/premium/indexing.php | 1813 ---- .../relevanssi-premium/premium/interface.php | 1574 ---- .../premium/metabox_styles.css | 11 - .../premium/network-options.php | 186 - .../relevanssi-premium/premium/pdf-upload.php | 851 -- .../relevanssi-premium/premium/pinning.php | 229 - .../premium/post-metabox.php | 590 -- .../relevanssi-premium/premium/proximity.php | 181 - .../relevanssi-premium/premium/redirects.php | 216 - .../relevanssi-premium/premium/related.php | 763 -- .../premium/search-multi.php | 514 -- .../relevanssi-premium/premium/search.php | 242 - .../relevanssi-premium/premium/spamblock.php | 139 - .../premium/tabs/attachments-tab.php | 190 - .../premium/tabs/import-export-tab.php | 167 - .../premium/tabs/redirects-tab.php | 157 - .../premium/tabs/related-tab.php | 516 -- .../premium/tabs/spamblock-tab.php | 132 - .../premium/tabs/support-tab.php | 121 - .../premium/templates/relevanssi-related.php | 122 - .../relevanssi-premium/premium/uninstall.php | 157 - .../plugins/relevanssi-premium/readme.txt | 368 - .../plugins/relevanssi-premium/relevanssi.php | 148 - .../plugins/relevanssi-premium/relevanssi.po | 4435 ---------- .../stopwords/stopwords.cs_CZ | 327 - .../stopwords/stopwords.de_DE | 1037 --- .../stopwords/stopwords.en_CA | 323 - .../stopwords/stopwords.en_GB | 323 - .../stopwords/stopwords.en_US | 323 - .../stopwords/stopwords.es_ES | 386 - .../relevanssi-premium/stopwords/stopwords.fi | 365 - .../stopwords/stopwords.fr_FR | 72 - .../stopwords/stopwords.it_IT | 666 -- .../stopwords/stopwords.pl_PL | 210 - .../stopwords/stopwords.pt_BR | 173 - .../stopwords/stopwords.pt_PT | 173 - .../stopwords/stopwords.ru_RU | 427 - .../stopwords/stopwords.zh_TW | 769 -- .../plugins/relevanssi-premium/uninstall.php | 32 - .../plugins/search-filter-divi/README.txt | 72 - .../search-filter-divi/includes/loader.php | 14 - .../modules/SearchForm/SearchForm.php | 82 - .../modules/SimpleHeader/SimpleHeader.php | 20 - .../includes/search-filter-divi-extension.php | 47 - .../includes/search-filter-divi-query.php | 356 - .../scripts/builder-bundle.min.js | 1 - .../scripts/frontend-bundle.min.js | 1 - .../scripts/search-filter-divi.js | 40 - .../search-filter-divi-plugin-updater.php | 572 -- .../search-filter-divi/search-filter-divi.php | 118 - .../styles/style-dbp.min.css | 0 .../search-filter-divi/styles/style.min.css | 0 .../plugins/search-filter-pro/README.txt | 685 -- .../admin/assets/css/admin.css | 1538 ---- .../admin/assets/css/index.php | 1 - .../admin/assets/img/icon.png | Bin 1350 -> 0 bytes .../admin/assets/img/move-ico.svg | 8 - .../admin/assets/js/admin-posts.js | 2695 ------ .../admin/assets/js/admin.js | 366 - .../admin/assets/js/index.php | 1 - .../admin/class-search-filter-admin.php | 1236 --- .../admin/includes/EDD_SL_Plugin_Updater.php | 618 -- .../class-search-filter-admin-notices.php | 586 -- ...ass-search-filter-post-data-validation.php | 670 -- .../class-search-filter-posts-admin.php | 1308 --- .../class-search-filter-widgets-admin.php | 48 - .../admin/includes/index.php | 1 - .../plugins/search-filter-pro/admin/index.php | 1 - .../views/admin-available-fields-metabox.php | 40 - .../admin/views/admin-cache.php | 200 - .../admin/views/admin-help.php | 24 - .../admin/views/admin-layout.php | 123 - .../admin/views/admin-license-settings.php | 121 - .../views/admin-search-form-cache-metabox.php | 157 - .../admin/views/admin-search-form-metabox.php | 40 - .../admin-search-form-settings-metabox.php | 1063 --- .../admin-search-form-shortcode-metabox.php | 50 - .../admin/views/admin-settings.php | 223 - .../admin/views/admin-system-status.php | 719 -- .../admin/views/admin-widgets.php | 190 - .../admin-woocommerce-fields-metabox.php | 71 - .../search-filter-pro/admin/views/admin.php | 24 - .../admin/views/fields/author.php | 149 - .../admin/views/fields/category.php | 162 - .../admin/views/fields/meta-option.php | 33 - .../admin/views/fields/post-date.php | 150 - .../admin/views/fields/post-meta.php | 72 - .../admin/views/fields/post-meta/choice.php | 179 - .../admin/views/fields/post-meta/date.php | 210 - .../admin/views/fields/post-meta/number.php | 254 - .../admin/views/fields/post-type.php | 136 - .../admin/views/fields/posts-per-page.php | 102 - .../admin/views/fields/reset.php | 65 - .../admin/views/fields/search.php | 53 - .../admin/views/fields/sort-order-option.php | 105 - .../admin/views/fields/sort-order.php | 117 - .../admin/views/fields/submit.php | 48 - .../admin/views/fields/tag.php | 160 - .../admin/views/fields/taxonomy.php | 224 - .../search-filter-pro/admin/views/index.php | 1 - .../views/settings-metabox/meta-option.php | 120 - .../class-search-filter-activator.php | 108 - .../class-search-filter-deactivator.php | 31 - .../includes/class-search-filter-helper.php | 289 - .../class-search-filter-post-cache.php | 1956 ---- .../class-search-filter-register-widget.php | 125 - .../includes/class-search-filter-shared.php | 152 - .../class-search-filter-third-party.php | 746 -- .../includes/class-search-filter-wp-cache.php | 133 - .../includes/class-search-filter-wp-data.php | 217 - .../search-filter-pro/includes/index.php | 1 - .../class-search-filter-woocommerce.php | 1010 --- .../plugins/search-filter-pro/index.php | 1 - .../search-filter-pro/languages/index.php | 1 - .../languages/search-filter.pot | 31 - .../public/assets/css/chosen-sprite.png | Bin 646 -> 0 bytes .../public/assets/css/chosen-sprite@2x.png | Bin 872 -> 0 bytes .../public/assets/css/index.php | 1 - .../public/assets/css/search-filter.css | 1975 ----- .../public/assets/css/search-filter.min.css | 11 - .../assets/img/ui-icons_ffffff_256x240.png | Bin 6299 -> 0 bytes .../search-filter-pro/public/assets/index.php | 1 - .../public/assets/js/chosen.jquery.js | 1359 --- .../public/assets/js/chosen.jquery.min.js | 3 - .../public/assets/js/i18n/ar.js | 3 - .../public/assets/js/i18n/az.js | 3 - .../public/assets/js/i18n/bg.js | 3 - .../public/assets/js/i18n/ca.js | 3 - .../public/assets/js/i18n/cs.js | 3 - .../public/assets/js/i18n/da.js | 3 - .../public/assets/js/i18n/de.js | 3 - .../public/assets/js/i18n/en.js | 3 - .../public/assets/js/i18n/es.js | 3 - .../public/assets/js/i18n/et.js | 3 - .../public/assets/js/i18n/eu.js | 3 - .../public/assets/js/i18n/fa.js | 3 - .../public/assets/js/i18n/fi.js | 3 - .../public/assets/js/i18n/fr.js | 3 - .../public/assets/js/i18n/gl.js | 3 - .../public/assets/js/i18n/he.js | 3 - .../public/assets/js/i18n/hi.js | 3 - .../public/assets/js/i18n/hr.js | 3 - .../public/assets/js/i18n/hu.js | 3 - .../public/assets/js/i18n/id.js | 3 - .../public/assets/js/i18n/is.js | 3 - .../public/assets/js/i18n/it.js | 3 - .../public/assets/js/i18n/ja.js | 3 - .../public/assets/js/i18n/ko.js | 3 - .../public/assets/js/i18n/lt.js | 3 - .../public/assets/js/i18n/lv.js | 3 - .../public/assets/js/i18n/mk.js | 3 - .../public/assets/js/i18n/ms.js | 3 - .../public/assets/js/i18n/nb.js | 3 - .../public/assets/js/i18n/nl.js | 3 - .../public/assets/js/i18n/pl.js | 3 - .../public/assets/js/i18n/pt-BR.js | 3 - .../public/assets/js/i18n/pt.js | 3 - .../public/assets/js/i18n/ro.js | 3 - .../public/assets/js/i18n/ru.js | 3 - .../public/assets/js/i18n/sk.js | 3 - .../public/assets/js/i18n/sr-Cyrl.js | 3 - .../public/assets/js/i18n/sr.js | 3 - .../public/assets/js/i18n/sv.js | 3 - .../public/assets/js/i18n/th.js | 3 - .../public/assets/js/i18n/tr.js | 3 - .../public/assets/js/i18n/uk.js | 3 - .../public/assets/js/i18n/vi.js | 3 - .../public/assets/js/i18n/zh-CN.js | 3 - .../public/assets/js/i18n/zh-TW.js | 3 - .../public/assets/js/search-filter-build.js | 5914 ------------- .../assets/js/search-filter-build.min.js | 3 - .../public/assets/js/select2.js | 6108 ------------- .../public/assets/js/select2.min.js | 2 - .../public/class-search-filter.php | 716 -- .../class-search-filter-active-query.php | 908 -- ...ass-search-filter-author-object-walker.php | 157 - .../includes/class-search-filter-cache.php | 1930 ---- .../includes/class-search-filter-config.php | 251 - .../class-search-filter-display-results.php | 58 - .../class-search-filter-display-shortcode.php | 1011 --- .../includes/class-search-filter-fields.php | 114 - .../class-search-filter-generate-input.php | 913 -- .../includes/class-search-filter-global.php | 173 - .../includes/class-search-filter-query.php | 1480 ---- ...s-search-filter-taxonomy-object-walker.php | 215 - .../public/includes/fields/author.php | 176 - .../public/includes/fields/base.php | 63 - .../public/includes/fields/post_date.php | 188 - .../public/includes/fields/post_meta.php | 110 - .../includes/fields/post_meta_choice.php | 523 -- .../public/includes/fields/post_meta_date.php | 193 - .../includes/fields/post_meta_number.php | 490 -- .../public/includes/fields/post_type.php | 166 - .../public/includes/fields/posts_per_page.php | 154 - .../public/includes/fields/reset.php | 44 - .../public/includes/fields/search.php | 58 - .../public/includes/fields/sort_order.php | 174 - .../public/includes/fields/submit.php | 37 - .../public/includes/fields/taxonomy.php | 390 - .../public/includes/index.php | 1 - .../search-filter-pro/public/index.php | 1 - .../search-filter-pro/public/views/index.php | 1 - .../search-filter-pro/public/views/public.php | 22 - .../search-filter-pro/search-filter-pro.php | 137 - .../templates/results-infinite-scroll.php | 69 - .../search-filter-pro/templates/results.php | 91 - .../plugins/search-filter-pro/uninstall.php | 106 - .../plugins/search-filter-pro/wpml-config.xml | 45 - .../assets/client/admin/app/index.asset.php | 2 +- .../assets/client/admin/app/index.js | 2 +- .../assets/client/admin/app/style-rtl.css | 2 +- .../assets/client/admin/app/style.css | 2 +- .../admin/block-templates/index.asset.php | 2 +- .../client/admin/block-templates/index.js | 2 +- .../assets/client/admin/chunks/3307.style.css | 2 +- .../assets/client/admin/chunks/4891.js | 2 +- .../assets/client/admin/chunks/4894.js | 2 - .../client/admin/chunks/4894.js.LICENSE.txt | 6 - .../assets/client/admin/chunks/5792.js | 2 +- .../assets/client/admin/chunks/71.js | 2 +- .../assets/client/admin/chunks/71.style.css | 2 +- .../assets/client/admin/chunks/925.style.css | 2 +- .../assets/client/admin/chunks/9669.style.css | 2 +- .../admin/chunks/activity-panels-help.js | 2 +- .../admin/chunks/activity-panels-setup.js | 2 +- .../admin/chunks/analytics-report-orders.js | 2 +- .../client/admin/chunks/analytics-settings.js | 2 +- .../client/admin/chunks/core-profiler.js | 2 +- .../client/admin/chunks/customize-store.js | 2 +- .../client/admin/chunks/edit-product-page.js | 2 +- .../assets/client/admin/chunks/homescreen.js | 2 +- .../assets/client/admin/chunks/marketplace.js | 2 +- .../admin/chunks/multichannel-marketing.js | 2 +- .../admin/chunks/payment-recommendations.js | 2 +- .../client/admin/chunks/profile-wizard.js | 2 +- .../admin/chunks/shipping-recommendations.js | 2 +- .../chunks/wcpay-payment-welcome-page.js | 2 +- .../client/admin/components/index.asset.php | 2 +- .../assets/client/admin/components/index.js | 2 +- .../client/admin/components/style-rtl.css | 2 +- .../assets/client/admin/components/style.css | 2 +- .../client/admin/csv-export/index.asset.php | 2 +- .../assets/client/admin/csv-export/index.js | 2 +- .../admin/customize-store/style-rtl.css | 2 +- .../assets/client/admin/data/index.asset.php | 2 +- .../assets/client/admin/data/index.js | 2 +- .../admin/edit-product-page/style-rtl.css | 2 +- .../client/admin/ef66842cc5fb22e3c7ca.svg | 47 - .../admin/marketing-coupons/style-rtl.css | 2 +- .../client/admin/marketing-coupons/style.css | 2 +- .../client/admin/marketplace/style-rtl.css | 2 +- .../client/admin/number/index.asset.php | 2 +- .../assets/client/admin/number/index.js | 2 +- .../client/admin/onboarding/index.asset.php | 2 +- .../assets/client/admin/onboarding/index.js | 2 +- .../blocks/generic/checkbox/edit.js | 2 +- .../blocks/generic/number/block.json | 7 - .../blocks/generic/number/edit.js | 2 +- .../blocks/generic/pricing/edit.js | 2 +- .../generic/product-number-field/block.json | 7 - .../product-pricing-field/editor-rtl.css | 1 - .../generic/product-pricing-field/editor.css | 1 - .../generic/product-section/editor-rtl.css | 10 +- .../blocks/generic/product-section/editor.css | 10 +- .../generic/product-text-field/block.json | 37 +- .../generic/product-text-field/editor-rtl.css | 8 - .../generic/product-text-field/editor.css | 8 - .../generic/product-toggle-field/block.json | 9 - .../blocks/generic/section/edit.js | 2 +- .../blocks/generic/taxonomy/edit.js | 2 +- .../blocks/generic/text/block.json | 37 +- .../blocks/generic/text/edit.js | 2 +- .../blocks/generic/toggle/block.json | 9 - .../blocks/generic/toggle/edit.js | 2 +- .../blocks/product-fields/description/edit.js | 2 +- .../downloads-menu/downloads-menu.js | 2 +- .../edit-downloads-modal.js | 2 +- .../images/downloads-custom-image.js | 1 - .../edit-downloads-modal/images/union-icon.js | 1 - .../blocks/product-fields/downloads/edit.js | 2 +- .../insert-url-menu-item.js | 2 +- .../media-library-menu-item.js | 2 +- .../downloads/media-library/index.js | 1 - .../downloads/media-library/media-library.js | 1 - .../downloads/media-library/types.js | 1 - .../blocks/product-fields/images/edit.js | 2 +- .../images/place-holder/imgs/close-up.js | 1 - .../images/place-holder/imgs/front-side.js | 1 - .../place-holder/imgs/lifestyle-scene.js | 1 - .../images/place-holder/imgs/variants.js | 1 - .../images/place-holder/index.js | 1 - .../images/place-holder/place-holder.js | 1 - .../blocks/product-fields/name/edit.js | 2 +- .../product-downloads-field/editor-rtl.css | 33 - .../product-downloads-field/editor.css | 33 - .../product-images-field/editor-rtl.css | 43 +- .../product-images-field/editor.css | 43 +- .../product-name-field/editor-rtl.css | 4 + .../product-name-field/editor.css | 4 + .../editor-rtl.css | 1 - .../product-regular-price-field/editor.css | 1 - .../product-sale-price-field/editor-rtl.css | 1 - .../product-sale-price-field/editor.css | 1 - .../editor-rtl.css | 10 - .../product-variation-items-field/editor.css | 10 - .../product-fields/variation-items/edit.js | 2 +- .../variation-items/variable-product-tour.js | 2 +- .../product-fields/variation-options/edit.js | 2 +- .../admin/product-editor/index.asset.php | 2 +- .../client/admin/product-editor/index.js | 2 +- .../client/admin/product-editor/style-rtl.css | 531 +- .../client/admin/product-editor/style.css | 531 +- .../client/admin/undefined/style-rtl.css | 2 +- .../beta-features-tracking-modal.asset.php | 2 +- .../beta-features-tracking-modal.js | 2 +- .../marketing-coupons.asset.php | 2 +- .../wp-admin-scripts/marketing-coupons.js | 2 +- .../payment-method-promotions.asset.php | 2 +- .../payment-method-promotions.js | 2 +- .../print-shipping-label-banner.asset.php | 2 +- .../print-shipping-label-banner.js | 2 +- .../shipping-settings-region-picker.asset.php | 1 - .../shipping-settings-region-picker.js | 1 - .../wp-admin-scripts/wc-addons-tour.asset.php | 2 +- .../admin/wp-admin-scripts/wc-addons-tour.js | 2 +- .../woocommerce/assets/css/admin-rtl.css | 2 +- .../plugins/woocommerce/assets/css/admin.css | 2 +- .../plugins/woocommerce/assets/css/admin.scss | 770 +- .../assets/css/twenty-twenty-three-rtl.css | 2 +- .../assets/css/twenty-twenty-three.css | 2 +- .../assets/css/twenty-twenty-three.scss | 7 + .../assets/css/twenty-twenty-two-rtl.css | 2 +- .../assets/css/twenty-twenty-two.css | 2 +- .../assets/css/twenty-twenty-two.scss | 5 + .../assets/css/woocommerce-layout-rtl.css | 2 +- .../assets/css/woocommerce-layout.css | 2 +- .../assets/css/woocommerce-layout.scss | 6 - .../assets/css/woocommerce-rtl.css | 2 +- .../woocommerce/assets/css/woocommerce.css | 2 +- .../woocommerce/assets/css/woocommerce.scss | 64 +- .../assets/images/icons/move-icon.svg | 1 - .../assets/js/admin/backbone-modal.js | 32 +- .../assets/js/admin/backbone-modal.min.js | 2 +- .../assets/js/admin/wc-shipping-classes.js | 234 +- .../js/admin/wc-shipping-classes.min.js | 2 +- .../js/admin/wc-shipping-zone-methods.js | 281 +- .../js/admin/wc-shipping-zone-methods.min.js | 2 +- .../woocommerce/client/admin/config/core.json | 2 +- .../i18n/languages/woocommerce.pot | 7831 ++++++++--------- .../plugins/woocommerce/i18n/states.php | 5 +- .../includes/abstracts/abstract-wc-order.php | 45 +- .../abstracts/abstract-wc-shipping-method.php | 2 +- .../includes/admin/class-wc-admin-addons.php | 12 +- .../includes/admin/class-wc-admin-assets.php | 2 +- .../includes/admin/class-wc-admin-help.php | 14 +- .../admin/class-wc-admin-importers.php | 13 +- .../includes/admin/class-wc-admin-menus.php | 23 +- .../includes/admin/class-wc-admin-notices.php | 8 +- .../admin/class-wc-admin-post-types.php | 14 +- .../admin/class-wc-admin-settings.php | 14 +- .../admin/class-wc-admin-setup-wizard.php | 36 +- .../includes/admin/class-wc-admin-status.php | 11 +- .../admin/helper/class-wc-helper-admin.php | 47 +- .../admin/helper/class-wc-helper-api.php | 2 +- .../helper/class-wc-helper-plugin-info.php | 32 +- .../class-wc-helper-subscriptions-api.php | 262 - .../admin/helper/class-wc-helper-updater.php | 8 +- .../includes/admin/helper/class-wc-helper.php | 554 +- .../includes/admin/helper/views/html-main.php | 10 +- .../admin/helper/views/html-oauth-start.php | 4 +- .../helper/views/html-section-account.php | 8 +- .../admin/helper/views/html-section-nav.php | 2 +- .../class-wc-admin-list-table-coupons.php | 2 +- .../html-product-data-extensions.php | 4 +- .../class-wc-meta-box-coupon-data.php | 3 +- .../class-wc-meta-box-product-categories.php | 2 +- .../class-wc-meta-box-product-data.php | 2 +- .../views/html-product-data-general.php | 2 +- .../views/html-product-data-inventory.php | 2 +- .../views/html-product-data-variations.php | 2 +- .../meta-boxes/views/html-variation-admin.php | 2 +- .../notes/class-wc-notes-run-db-update.php | 2 +- .../html-notice-untested-extensions-modal.php | 2 +- .../settings/class-wc-settings-advanced.php | 12 +- .../settings/class-wc-settings-emails.php | 2 +- .../class-wc-settings-payment-gateways.php | 2 +- .../settings/class-wc-settings-products.php | 6 +- .../settings/class-wc-settings-shipping.php | 91 +- .../html-admin-page-shipping-classes.php | 124 +- .../html-admin-page-shipping-zone-methods.php | 128 +- .../views/html-admin-page-shipping-zones.php | 75 +- .../admin/views/html-admin-page-addons.php | 18 +- .../admin/views/html-admin-page-reports.php | 2 +- .../views/html-admin-page-status-report.php | 12 +- ...html-notice-download-dir-sync-complete.php | 2 +- .../views/html-notice-legacy-shipping.php | 2 +- .../views/html-notice-no-shipping-methods.php | 2 +- .../views/html-notice-secure-connection.php | 2 +- .../views/html-notice-template-check.php | 2 +- .../admin/views/html-notice-update.php | 2 +- ...otice-uploads-directory-is-unprotected.php | 2 +- ...tml-notice-wp-php-minimum-requirements.php | 2 +- .../woocommerce/includes/class-wc-cart.php | 24 +- .../includes/class-wc-checkout.php | 5 +- .../includes/class-wc-countries.php | 4 +- .../includes/class-wc-discounts.php | 3 +- .../woocommerce/includes/class-wc-emails.php | 4 +- .../woocommerce/includes/class-wc-install.php | 32 +- .../includes/class-wc-log-levels.php | 17 - .../woocommerce/includes/class-wc-order.php | 18 +- .../includes/class-wc-product-download.php | 2 +- .../includes/class-wc-product-simple.php | 2 +- .../woocommerce/includes/class-wc-tracker.php | 7 +- .../includes/class-woocommerce.php | 10 +- .../includes/cli/class-wc-cli-com-command.php | 16 +- .../class-wc-cli-com-extension-command.php | 4 +- .../class-wc-coupon-data-store-cpt.php | 21 +- .../emails/class-wc-email-failed-order.php | 2 +- .../export/abstract-wc-csv-exporter.php | 6 +- ...ass-wc-integration-maxmind-geolocation.php | 2 +- .../includes/react-admin/feature-config.php | 2 +- .../class-wc-rest-products-v2-controller.php | 3 - ...ss-wc-rest-system-status-v2-controller.php | 11 +- ...-wc-rest-product-variations-controller.php | 34 +- .../flat-rate/class-wc-shipping-flat-rate.php | 2 +- .../flat-rate/includes/settings-flat-rate.php | 24 +- .../class-wc-shipping-free-shipping.php | 47 +- .../class-wc-shipping-local-pickup.php | 39 +- .../class-wc-shortcode-checkout.php | 13 +- .../includes/tracks/class-wc-tracks.php | 1 - .../includes/wc-notice-functions.php | 11 +- .../includes/wc-product-functions.php | 2 +- .../includes/wc-template-functions.php | 7 +- ...ccom-site-installer-requirements-check.php | 2 +- .../class-wc-wccom-site-installer.php | 10 +- .../wccom-site/class-wc-wccom-site.php | 8 +- ...ite-installation-step-get-product-info.php | 2 +- ...-rest-wccom-site-installer-error-codes.php | 6 +- ...est-wccom-site-installer-controller-v2.php | 2 +- ...c-rest-wccom-site-installer-controller.php | 2 +- ...lass-wc-rest-wccom-site-ssr-controller.php | 2 +- .../action-scheduler/action-scheduler.php | 16 +- .../packages/action-scheduler/changelog.txt | 16 +- .../classes/ActionScheduler_ActionFactory.php | 23 +- .../ActionScheduler_Abstract_QueueRunner.php | 2 +- .../data-stores/ActionScheduler_DBLogger.php | 2 +- .../schema/ActionScheduler_StoreSchema.php | 5 +- .../packages/action-scheduler/functions.php | 15 +- .../packages/action-scheduler/readme.txt | 20 +- .../assets/css/abstracts/_mixins.scss | 14 +- .../woocommerce-blocks/assets/css/style.scss | 11 +- .../add-to-cart-form/edit.tsx | 31 +- .../add-to-cart-form/editor.scss | 28 +- .../add-to-cart-form/style.scss | 15 +- .../attribute-select-control.tsx | 2 +- .../blocks/product-elements/button/style.scss | 7 +- .../block-registration-strategy.ts | 55 - .../blocks-registration-manager.ts | 182 - .../blocks-with-restriction.ts | 42 - .../blocks-registration-manager/index.ts | 16 - .../template-change-detector.ts | 115 - .../register-block-single-product-template.ts | 2 +- .../button/stories/index.stories.tsx | 49 - .../address-form/address-form.tsx | 5 +- .../cart-line-items-table/style.scss | 5 +- .../cart-checkout/order-summary/index.tsx | 2 +- .../shipping-calculator/index.tsx | 2 +- .../shipping-rates-control-package/index.tsx | 3 +- .../cart-checkout/totals/coupon/index.tsx | 16 +- .../totals/coupon/stories/index.stories.tsx | 65 - .../cart-checkout/totals/discount/index.tsx | 4 +- .../totals/discount/stories/index.stories.tsx | 111 - .../totals/footer-item/index.tsx | 7 +- .../footer-item/stories/index.stories.tsx | 87 - .../cart-checkout/totals/shipping/index.tsx | 4 +- .../totals/shipping/shipping-address.tsx | 15 +- .../totals/shipping/test/index.tsx | 61 +- .../js/base/components/combobox/index.tsx | 24 +- .../country-input/stories/index.stories.tsx | 67 - .../stories/index.stories.tsx | 41 - .../assets/js/base/components/index.ts | 4 + .../components/notice-banner/docs/docs.mdx | 112 - .../base/components/notice-banner/index.tsx | 25 +- .../notice-banner/stories/index.stories.tsx | 109 - .../js/base/components/pagination/style.scss | 4 - .../price-slider/stories/index.stories.tsx | 60 - .../product-sort-select/index.tsx | 3 +- .../product-name/stories/index.stories.tsx | 32 - .../base/components/product-price/index.tsx | 2 +- .../product-price/stories/index.stories.tsx | 56 - .../stories/index.stories.tsx | 38 - .../read-more/stories/index.stories.tsx | 70 - .../reviews/review-sort-select/index.tsx | 4 +- .../components/snackbar-list/docs/docs.mdx | 90 - .../components/snackbar-list/snackbar.tsx | 18 +- .../snackbar-list/stories/index.stories.tsx | 84 - .../stories/snackbar.stories.tsx | 97 - .../base/components/snackbar-list/style.scss | 39 +- .../components/state-input/state-input.tsx | 2 +- .../components/tabs/stories/index.stories.tsx | 54 - .../use-payment-method-interface.ts | 2 +- .../context/hooks/use-checkout-address.ts | 25 +- .../assets/js/base/utils/test/errors.js | 10 +- .../express-payment/cart-express-payment.js | 2 +- .../checkout-express-payment.js | 3 +- .../payment-method-error-boundary.tsx | 2 +- .../assets/js/blocks/cart/block.js | 6 +- .../cart-order-summary-coupon-form/block.tsx | 2 +- .../cart-order-summary-discount/block.tsx | 6 +- .../cart-order-summary-fee/block.tsx | 2 +- .../cart-order-summary-shipping/block.tsx | 2 +- .../cart-order-summary-subtotal/block.tsx | 2 +- .../cart-order-summary-taxes/block.tsx | 2 +- .../assets/js/blocks/cart/style.scss | 3 - .../js/blocks/checkout/address-card/index.tsx | 9 +- .../assets/js/blocks/checkout/block.tsx | 6 +- .../checkout/form-step/form-step-heading.tsx | 2 +- .../checkout-actions-block/block.tsx | 6 +- .../checkout-billing-address-block/block.tsx | 37 +- .../customer-address.tsx | 50 +- .../frontend.tsx | 19 +- .../block.tsx | 10 +- .../checkout-fields-block/frontend.tsx | 10 - .../checkout-fields-block/style.scss | 7 +- .../block.tsx | 2 +- .../block.tsx | 2 +- .../checkout-order-summary-discount/block.tsx | 6 +- .../checkout-order-summary-fee/block.tsx | 2 +- .../checkout-order-summary-subtotal/block.tsx | 2 +- .../checkout-order-summary-taxes/block.tsx | 2 +- .../checkout-payment-block/frontend.tsx | 6 +- .../checkout-pickup-options-block/style.scss | 116 +- .../checkout-shipping-address-block/block.tsx | 48 +- .../customer-address.tsx | 81 +- .../checkout-shipping-methods-block/block.tsx | 6 +- .../checkout-totals-block/frontend.tsx | 2 +- .../js/blocks/checkout/order-notes/index.tsx | 2 +- .../js/blocks/checkout/phone-number/index.tsx | 2 +- .../js/blocks/collection-filters/block.json | 22 +- .../js/blocks/collection-filters/edit.tsx | 31 +- .../inner-blocks/price-filter/block.json | 14 +- .../price-filter/components/inspector.tsx | 77 - .../price-filter/components/price-slider.tsx | 67 - .../inner-blocks/price-filter/edit.tsx | 32 +- .../inner-blocks/price-filter/frontend.ts | 13 +- .../inner-blocks/price-filter/style.scss | 215 +- .../inner-blocks/price-filter/types.ts | 29 +- .../inner-blocks/price-filter/utils.ts | 12 +- .../inner-blocks/stock-filter/block.json | 46 - .../stock-filter/components/inspector.tsx | 96 - .../inner-blocks/stock-filter/edit.tsx | 131 - .../inner-blocks/stock-filter/frontend.ts | 79 - .../inner-blocks/stock-filter/index.tsx | 27 - .../inner-blocks/stock-filter/preview.tsx | 25 - .../inner-blocks/stock-filter/style.scss | 181 - .../inner-blocks/stock-filter/types.ts | 27 - .../blocks/collection-filters/test/utils.ts | 71 - .../js/blocks/collection-filters/type.ts | 15 - .../js/blocks/collection-filters/utils.ts | 89 - .../frontend.tsx | 2 +- .../mini-cart-footer-block/block.tsx | 2 +- .../mini-cart-footer-block/edit.tsx | 2 +- .../js/blocks/product-collection/constants.ts | 5 +- .../js/blocks/product-collection/edit.tsx | 2 +- .../inner-blocks/no-results/block.json | 35 - .../inner-blocks/no-results/edit.tsx | 65 - .../inner-blocks/no-results/index.tsx | 21 - .../inner-blocks/no-results/save.tsx | 9 - .../inspector-controls/created-control.tsx | 114 - .../featured-products-control.tsx | 52 - .../inspector-controls/index.tsx | 6 +- .../js/blocks/product-collection/types.ts | 16 +- .../product-gallery/block-settings/index.tsx | 1 - .../js/blocks/product-gallery/block.json | 4 +- .../js/blocks/product-gallery/frontend.tsx | 92 +- .../js/blocks/product-gallery/index.tsx | 10 +- .../block.json | 2 +- .../product-gallery-large-image/block.json | 2 +- .../product-gallery-large-image/frontend.tsx | 45 +- .../product-gallery-pager/editor.scss | 2 - .../product-gallery-thumbnails/block.json | 2 +- .../js/blocks/product-gallery/settings.ts | 12 - .../js/blocks/product-gallery/style.scss | 31 - .../assets/js/blocks/product-new/index.tsx | 3 +- .../variations/related-products.tsx | 1 - .../js/blocks/product-template/edit.tsx | 5 + .../js/blocks/products/all-products/block.tsx | 2 +- .../js/blocks/reviews/frontend-block.tsx | 1 + .../reviews/test/frontend-block.test.tsx | 4 +- .../error-placeholder/index.tsx | 4 +- .../stories/error-message.stories.tsx | 27 - .../stories/error-placeholder.stories.tsx | 74 - .../stories/index.stories.tsx | 26 - .../feedback-prompt/index.tsx | 16 +- .../feedback-prompt/style.scss | 2 +- .../incompatible-extension-notice/modal.tsx | 4 +- .../search-list-control.tsx | 2 +- .../search-list-control/style.scss | 7 - .../test/__snapshots__/index.js.snap | 520 +- .../assets/js/editor-components/tag/index.tsx | 1 - .../js/extensions/google-analytics/index.ts | 13 +- .../assets/js/icons/docs/iconography.mdx | 25 - .../assets/js/icons/index.js | 3 +- .../assets/js/icons/library/sparkles.tsx | 15 - .../woocommerce-blocks/assets/js/index.js | 1 - .../assets/js/interactivity/directives.js | 68 +- .../assets/js/settings/blocks/constants.ts | 18 +- .../settings/shared/default-address-fields.ts | 12 - .../assets/js/types/type-defs/cart.ts | 1 - .../type-defs/payment-method-interface.ts | 2 +- .../woocommerce-blocks/build/3810-frontend.js | 2 +- .../woocommerce-blocks/build/4124-frontend.js | 2 +- .../woocommerce-blocks/build/8280-frontend.js | 2 +- .../build/active-filters-frontend.asset.php | 2 +- .../build/active-filters-frontend.js | 12 +- .../build/active-filters-rtl.css | 2 +- .../build/active-filters-style.asset.php | 2 +- .../build/active-filters-wrapper-frontend.js | 6 +- .../build/active-filters-wrapper-rtl.css | 2 +- .../build/active-filters-wrapper.css | 2 +- .../build/active-filters.asset.php | 2 +- .../build/active-filters.css | 2 +- .../build/active-filters.js | 4 +- .../build/add-to-cart-form-rtl.css | 2 +- .../build/add-to-cart-form-style.asset.php | 2 +- .../build/add-to-cart-form.css | 2 +- .../build/all-products-frontend.asset.php | 2 +- .../build/all-products-frontend.js | 6 +- .../build/all-products-rtl.css | 7 +- .../build/all-products-style.asset.php | 2 +- .../build/all-products.asset.php | 2 +- .../woocommerce-blocks/build/all-products.css | 7 +- .../woocommerce-blocks/build/all-products.js | 22 +- .../build/all-reviews-rtl.css | 1 + .../build/all-reviews-style.asset.php | 2 +- .../build/all-reviews.asset.php | 2 +- .../woocommerce-blocks/build/all-reviews.css | 1 + .../woocommerce-blocks/build/all-reviews.js | 10 +- .../build/attribute-filter-frontend.asset.php | 2 +- .../build/attribute-filter-frontend.js | 16 +- .../build/attribute-filter-rtl.css | 2 +- .../build/attribute-filter-style.asset.php | 2 +- .../attribute-filter-wrapper-frontend.js | 2 +- .../build/attribute-filter-wrapper-rtl.css | 3 - .../build/attribute-filter-wrapper.css | 3 - .../build/attribute-filter.asset.php | 2 +- .../build/attribute-filter.css | 2 +- .../build/attribute-filter.js | 14 +- .../build/blocks-checkout.asset.php | 2 +- .../build/blocks-checkout.js | 8 +- .../build/blocks-components.asset.php | 2 +- .../build/blocks-components.js | 11 +- .../build/breadcrumbs-style.asset.php | 2 +- .../build/breadcrumbs.asset.php | 2 +- .../woocommerce-blocks/build/breadcrumbs.js | 2 +- .../cart-cross-sells-products-frontend.js | 2 +- .../cart-express-payment-frontend.js | 2 +- .../cart-blocks/cart-line-items-frontend.js | 2 +- .../cart-order-summary-frontend.js | 14 +- .../order-summary-coupon-form-frontend.js | 16 +- .../order-summary-discount-frontend.js | 26 +- .../cart-blocks/order-summary-fee-frontend.js | 2 +- .../order-summary-shipping-frontend.js | 14 +- .../order-summary-subtotal-frontend.js | 2 +- .../order-summary-taxes-frontend.js | 2 +- .../build/cart-frontend.asset.php | 2 +- .../woocommerce-blocks/build/cart-frontend.js | 4 +- .../woocommerce-blocks/build/cart-rtl.css | 6 +- .../build/cart-style.asset.php | 2 +- .../woocommerce-blocks/build/cart.asset.php | 2 +- .../woocommerce-blocks/build/cart.css | 6 +- .../packages/woocommerce-blocks/build/cart.js | 50 +- .../build/catalog-sorting-style.asset.php | 2 +- .../build/checkout-blocks/actions-frontend.js | 2 +- .../build/checkout-blocks/actions-style.js | 2 +- .../billing-address-frontend.js | 4 +- .../checkout-blocks/billing-address-style.js | 2 +- .../contact-information-frontend.js | 2 +- .../express-payment-frontend.js | 6 +- .../build/checkout-blocks/fields-frontend.js | 2 +- .../build/checkout-blocks/fields-style.js | 2 +- .../checkout-blocks/order-note-frontend.js | 2 +- .../order-summary-cart-items-frontend.js | 10 +- .../order-summary-coupon-form-frontend.js | 16 +- .../order-summary-discount-frontend.js | 16 +- .../order-summary-fee-frontend.js | 2 +- .../checkout-blocks/order-summary-frontend.js | 14 +- .../order-summary-shipping-frontend.js | 14 +- .../order-summary-subtotal-frontend.js | 2 +- .../order-summary-taxes-frontend.js | 2 +- .../build/checkout-blocks/payment-frontend.js | 10 +- .../build/checkout-blocks/payment-style.js | 2 +- .../pickup-options-frontend.js | 4 +- .../shipping-address-frontend.js | 4 +- .../shipping-methods-frontend.js | 6 +- .../build/checkout-blocks/totals-frontend.js | 2 +- .../build/checkout-blocks/totals-style.js | 2 +- .../build/checkout-frontend.asset.php | 2 +- .../build/checkout-frontend.js | 4 +- .../woocommerce-blocks/build/checkout-rtl.css | 6 +- .../build/checkout-style.asset.php | 2 +- .../build/checkout.asset.php | 2 +- .../woocommerce-blocks/build/checkout.css | 6 +- .../woocommerce-blocks/build/checkout.js | 46 +- .../build/classic-shortcode-style.asset.php | 2 +- .../build/collection-filters-style.asset.php | 2 +- .../build/collection-filters.asset.php | 2 +- .../build/collection-filters.js | 2 +- .../build/collection-filters/block.json | 22 +- ...collection-price-filter-frontend.asset.php | 2 +- .../build/collection-price-filter-frontend.js | 2 +- .../build/collection-price-filter-rtl.css | 4 +- .../collection-price-filter-style.asset.php | 2 +- .../build/collection-price-filter.asset.php | 2 +- .../build/collection-price-filter.css | 4 +- .../build/collection-price-filter.js | 4 +- .../build/collection-price-filter/block.json | 14 +- ...collection-stock-filter-frontend.asset.php | 1 - .../build/collection-stock-filter-frontend.js | 1 - .../build/collection-stock-filter-rtl.css | 3 - .../collection-stock-filter-style.asset.php | 1 - ...llection-stock-filter-style.js.LICENSE.txt | 5 - .../build/collection-stock-filter.asset.php | 1 - .../build/collection-stock-filter.css | 3 - .../build/collection-stock-filter.js | 2 - .../build/collection-stock-filter/block.json | 46 - .../build/customer-account-style.asset.php | 2 +- .../build/featured-category-style.asset.php | 2 +- .../build/featured-category.asset.php | 2 +- .../build/featured-category.js | 24 +- .../build/featured-product-style.asset.php | 2 +- .../build/featured-product.asset.php | 2 +- .../build/featured-product.js | 24 +- .../build/filter-wrapper-frontend.asset.php | 2 +- .../build/filter-wrapper-frontend.js | 2 +- .../build/filter-wrapper-style.asset.php | 2 +- .../build/handpicked-products-style.asset.php | 2 +- .../build/handpicked-products.asset.php | 2 +- .../build/handpicked-products.js | 4 +- .../build/legacy-template-style.asset.php | 2 +- .../build/legacy-template.asset.php | 2 +- .../build/legacy-template.js | 14 +- .../mini-cart-component-frontend.asset.php | 2 +- .../build/mini-cart-component-frontend.js | 2 +- .../filled-cart-frontend.js | 2 +- .../filled-cart-style.js | 2 +- .../footer-frontend.js | 2 +- .../mini-cart-contents-block/footer-style.js | 2 +- .../products-table-frontend.js | 2 +- .../build/mini-cart-contents-rtl.css | 2 +- .../build/mini-cart-contents-style.asset.php | 2 +- .../build/mini-cart-contents.asset.php | 2 +- .../build/mini-cart-contents.css | 2 +- .../build/mini-cart-contents.js | 22 +- .../build/mini-cart-style.asset.php | 2 +- .../build/mini-cart.asset.php | 2 +- .../woocommerce-blocks/build/mini-cart.js | 2 +- ...ion-additional-information-style.asset.php | 2 +- ...nfirmation-billing-address-style.asset.php | 2 +- ...nfirmation-billing-wrapper-style.asset.php | 2 +- ...der-confirmation-downloads-style.asset.php | 2 +- ...irmation-downloads-wrapper-style.asset.php | 2 +- ...firmation-shipping-address-style.asset.php | 2 +- ...firmation-shipping-wrapper-style.asset.php | 2 +- .../order-confirmation-status-style.asset.php | 2 +- ...order-confirmation-summary-style.asset.php | 2 +- .../order-confirmation-totals-style.asset.php | 2 +- ...onfirmation-totals-wrapper-style.asset.php | 2 +- .../build/packages-style-rtl.css | 12 +- .../build/packages-style-style.asset.php | 2 +- .../build/packages-style.css | 12 +- .../page-content-wrapper-style.asset.php | 2 +- .../build/page-content-wrapper.asset.php | 2 +- .../build/page-content-wrapper.js | 2 +- .../build/price-filter-frontend.asset.php | 2 +- .../build/price-filter-frontend.js | 6 +- .../build/price-filter-rtl.css | 2 +- .../build/price-filter-style.asset.php | 2 +- .../build/price-filter-wrapper-rtl.css | 2 +- .../build/price-filter-wrapper.css | 2 +- .../build/price-filter.asset.php | 2 +- .../woocommerce-blocks/build/price-filter.css | 2 +- .../woocommerce-blocks/build/price-filter.js | 6 +- .../build/product-add-to-cart-frontend.js | 2 +- .../build/product-add-to-cart.js | 2 +- .../product-best-sellers-style.asset.php | 2 +- .../build/product-best-sellers.asset.php | 2 +- .../build/product-best-sellers.js | 2 +- ...ct-button-interactivity-frontend.asset.php | 2 +- .../product-button-interactivity-frontend.js | 2 +- .../build/product-button-rtl.css | 2 +- .../build/product-button.css | 2 +- .../build/product-categories-style.asset.php | 2 +- .../build/product-category-style.asset.php | 2 +- .../build/product-category.asset.php | 2 +- .../build/product-category.js | 2 +- ...duct-collection-no-results-style.asset.php | 1 - .../product-collection-no-results.asset.php | 1 - .../build/product-collection-no-results.js | 1 - .../product-collection-no-results/block.json | 35 - .../build/product-collection-style.asset.php | 2 +- .../build/product-collection.asset.php | 2 +- .../build/product-collection.js | 12 +- .../build/product-details-style.asset.php | 2 +- .../build/product-gallery-frontend.asset.php | 2 +- .../build/product-gallery-frontend.js | 2 +- ...uct-gallery-large-image-frontend.asset.php | 2 +- .../product-gallery-large-image-frontend.js | 2 +- ...-large-image-next-previous-style.asset.php | 2 +- ...allery-large-image-next-previous.asset.php | 2 +- ...oduct-gallery-large-image-next-previous.js | 2 +- .../block.json | 2 +- ...roduct-gallery-large-image-style.asset.php | 2 +- .../product-gallery-large-image.asset.php | 2 +- .../build/product-gallery-large-image.js | 2 +- .../product-gallery-large-image/block.json | 2 +- .../product-gallery-pager-style.asset.php | 2 +- .../build/product-gallery-pager.asset.php | 2 +- .../build/product-gallery-pager.js | 2 +- .../build/product-gallery-rtl.css | 2 +- .../build/product-gallery-style.asset.php | 2 +- ...product-gallery-thumbnails-style.asset.php | 2 +- .../product-gallery-thumbnails.asset.php | 2 +- .../build/product-gallery-thumbnails.js | 2 +- .../product-gallery-thumbnails/block.json | 2 +- .../build/product-gallery.asset.php | 2 +- .../build/product-gallery.css | 2 +- .../build/product-gallery.js | 2 +- .../build/product-gallery/block.json | 4 +- .../product-image-gallery-style.asset.php | 2 +- .../build/product-new-style.asset.php | 2 +- .../build/product-new.asset.php | 2 +- .../woocommerce-blocks/build/product-new.js | 18 +- .../build/product-on-sale-style.asset.php | 2 +- .../build/product-on-sale.asset.php | 2 +- .../build/product-on-sale.js | 2 +- .../build/product-price-frontend.js | 2 +- .../woocommerce-blocks/build/product-price.js | 2 +- .../build/product-query-style.asset.php | 2 +- .../build/product-query.asset.php | 2 +- .../woocommerce-blocks/build/product-query.js | 10 +- .../product-results-count-style.asset.php | 2 +- .../build/product-reviews-style.asset.php | 2 +- .../build/product-search-style.asset.php | 2 +- .../build/product-stock-indicator-frontend.js | 4 +- .../build/product-tag-style.asset.php | 2 +- .../build/product-tag.asset.php | 2 +- .../woocommerce-blocks/build/product-tag.js | 2 +- .../build/product-template-style.asset.php | 2 +- .../build/product-template.asset.php | 2 +- .../build/product-template.js | 2 +- .../build/product-top-rated-style.asset.php | 2 +- .../build/product-top-rated.asset.php | 2 +- .../build/product-top-rated.js | 2 +- .../products-by-attribute-style.asset.php | 2 +- .../build/products-by-attribute.asset.php | 2 +- .../build/products-by-attribute.js | 12 +- .../build/rating-filter-frontend.asset.php | 2 +- .../build/rating-filter-frontend.js | 16 +- .../build/rating-filter-rtl.css | 2 +- .../build/rating-filter-style.asset.php | 2 +- .../build/rating-filter-wrapper-frontend.js | 2 +- .../build/rating-filter-wrapper-rtl.css | 3 - .../build/rating-filter-wrapper.css | 3 - .../build/rating-filter.css | 2 +- .../build/reviews-by-category-rtl.css | 1 + .../build/reviews-by-category-style.asset.php | 2 +- .../build/reviews-by-category.asset.php | 2 +- .../build/reviews-by-category.css | 1 + .../build/reviews-by-category.js | 18 +- .../build/reviews-by-product-rtl.css | 1 + .../build/reviews-by-product-style.asset.php | 2 +- .../build/reviews-by-product.asset.php | 2 +- .../build/reviews-by-product.css | 1 + .../build/reviews-by-product.js | 18 +- .../build/reviews-frontend.asset.php | 2 +- .../build/reviews-frontend.js | 6 +- .../build/single-product-style.asset.php | 2 +- .../build/single-product.asset.php | 2 +- .../build/single-product.js | 10 +- .../build/stock-filter-frontend.asset.php | 2 +- .../build/stock-filter-frontend.js | 16 +- .../build/stock-filter-rtl.css | 2 +- .../build/stock-filter-style.asset.php | 2 +- .../build/stock-filter-wrapper-frontend.js | 2 +- .../build/stock-filter-wrapper-rtl.css | 3 - .../build/stock-filter-wrapper.css | 3 - .../build/stock-filter.asset.php | 2 +- .../woocommerce-blocks/build/stock-filter.css | 2 +- .../woocommerce-blocks/build/stock-filter.js | 4 +- .../build/store-notices-style.asset.php | 2 +- .../build/wc-blocks-data.asset.php | 2 +- .../build/wc-blocks-data.js | 16 +- .../build/wc-blocks-editor-style-rtl.css | 8 +- .../build/wc-blocks-editor-style.css | 8 +- .../wc-blocks-google-analytics.asset.php | 2 +- .../build/wc-blocks-google-analytics.js | 2 +- .../build/wc-blocks-rtl.css | 2 +- .../build/wc-blocks-style.asset.php | 2 +- .../build/wc-blocks-vendors.asset.php | 2 +- .../build/wc-blocks-vendors.js | 6 +- .../build/wc-blocks.asset.php | 2 +- .../woocommerce-blocks/build/wc-blocks.css | 2 +- .../woocommerce-blocks/build/wc-blocks.js | 2 +- .../build/wc-interactivity-dropdown.asset.php | 1 - .../build/wc-interactivity-dropdown.js | 1 - .../build/wc-interactivity.asset.php | 2 +- .../build/wc-interactivity.js | 2 +- .../build/wc-settings.asset.php | 2 +- .../woocommerce-blocks/build/wc-settings.js | 2 +- ...-shipping-method-pickup-location.asset.php | 2 +- .../wc-shipping-method-pickup-location.js | 26 +- .../stories/index.stories.tsx | 25 - .../components/discounts-meta/index.js | 2 +- .../packages/checkout/components/index.ts | 20 +- .../checkout/components/order-meta/index.js | 2 +- .../checkout/components/text-input/index.tsx | 2 - .../validation-input-error/index.tsx | 47 +- .../packages/components/button/index.ts | 6 - .../components/checkbox-list/index.tsx | 7 +- .../checkbox-list/stories/index.stories.tsx | 118 - .../packages/components/chip/chip.tsx | 1 + .../components/chip/removable-chip.tsx | 11 +- .../components/chip/stories/chip.stories.tsx | 2 +- .../chip/stories/removable-chip.stories.tsx | 2 +- .../packages/components/form-step/index.tsx | 4 +- .../form-step/stories/index.stories.tsx | 126 - .../formatted-monetary-amount/index.tsx | 8 +- .../stories/index.stories.tsx | 121 - .../packages/components/index.ts | 19 +- .../packages/components/label/index.tsx | 6 +- .../label/stories/index.stories.tsx | 51 - .../packages/components/panel/index.tsx | 62 - .../packages/components/panel/style.scss | 76 - .../radio-control-accordion/index.tsx | 2 +- .../stories/index.stories.tsx | 104 - .../radio-control/stories/index.stories.tsx | 90 - .../packages/components/sort-select/index.tsx | 105 - .../sort-select/stories/index.stories.tsx | 132 - .../components/sort-select/style.scss | 14 - .../spinner/stories/index.stories.tsx | 20 - .../components/store-notice/index.tsx | 29 - .../store-notices-container/index.tsx | 107 - .../snackbar-notices.tsx | 38 - .../store-notices-container/store-notices.tsx | 170 - .../store-notices-container/style.scss | 80 - .../store-notices-container/test/index.tsx | 218 - .../store-notices-container/types.ts | 11 - .../text-input/stories/text-input.stories.tsx | 179 - .../stories/validated-text-input.stories.tsx | 249 - .../packages/components/text-input/style.scss | 128 - .../text-input/test/validated-text-input.tsx | 307 - .../components/text-input/text-input.tsx | 117 - .../packages/components/text-input/types.ts | 43 - .../text-input/validated-text-input.tsx | 268 - .../packages/components/textarea/index.tsx | 38 - .../textarea/stories/index.stories.tsx | 77 - .../packages/components/textarea/style.scss | 30 - .../packages/components/title/index.tsx | 40 - .../title/stories/index.stories.tsx | 59 - .../packages/components/title/style.scss | 22 - .../components/totals-wrapper/docs/docs.mdx | 15 - .../components/totals-wrapper/index.tsx | 40 - .../totals-wrapper/stories/index.stories.tsx | 52 - .../components/totals-wrapper/style.scss | 41 - .../packages/components/totals/fees/index.tsx | 72 - .../totals/fees/stories/index.stories.tsx | 68 - .../packages/components/totals/index.js | 4 - .../packages/components/totals/item/index.tsx | 70 - .../totals/item/stories/index.stories.tsx | 32 - .../components/totals/item/style.scss | 20 - .../components/totals/subtotal/index.tsx | 48 - .../totals/subtotal/stories/index.stories.tsx | 44 - .../components/totals/taxes/index.tsx | 88 - .../totals/taxes/stories/index.stories.tsx | 40 - .../validation-input-error/index.tsx | 46 - .../stories/index.stories.tsx | 54 - .../validation-input-error/style.scss | 19 - .../dropdown/index.ts | 95 - .../woocommerce-blocks/patterns/banner.php | 2 + .../patterns/discount-banner-with-image.php | 6 +- .../patterns/discount-banner.php | 7 +- .../featured-category-cover-image.php | 2 + .../patterns/featured-category-focus.php | 2 + .../patterns/featured-category-triple.php | 2 + .../featured-products-fresh-and-tasty.php | 5 +- .../patterns/footer-with-2-menus-dark.php | 2 +- .../patterns/footer-with-3-menus.php | 4 +- .../patterns/header-centered-pattern.php | 52 - .../patterns/header-large.php | 6 +- .../patterns/hero-product-3-split.php | 14 +- .../patterns/hero-product-chessboard.php | 81 +- .../patterns/hero-product-split.php | 2 + .../patterns/just-arrived-full-hero.php | 3 + .../patterns/product-collection-3-columns.php | 4 +- .../patterns/product-collection-4-columns.php | 4 +- .../patterns/product-collection-5-columns.php | 4 +- .../patterns/product-collection-banner.php | 9 +- ...collection-featured-products-5-columns.php | 5 +- .../patterns/product-collection-full-grid.php | 2 +- .../patterns/product-collection-grid.php | 2 +- .../patterns/product-collection-rows.php | 2 +- .../product-collection-simple-grid.php | 2 +- ...roduct-collections-featured-collection.php | 1 + ...oduct-collections-featured-collections.php | 2 + .../product-collections-newest-arrivals.php | 1 + .../patterns/product-featured-2-columns.php | 2 + .../patterns/product-hero-2-col-2-row.php | 3 + .../product-query-product-gallery.php | 5 +- .../patterns/related-products.php | 37 - .../patterns/shop-by-price.php | 1 + .../small-discount-banner-with-image.php | 2 + .../social-follow-us-in-social-media.php | 2 + .../store-info-alt-image-and-text.php | 2 + .../patterns/testimonials-3-columns.php | 2 + .../patterns/testimonials-single.php | 2 + .../packages/woocommerce-blocks/readme.txt | 149 +- .../src/AssetsController.php | 3 - .../woocommerce-blocks/src/BlockPatterns.php | 61 +- .../src/BlockTemplatesController.php | 18 +- .../src/BlockTypes/AddToCartForm.php | 2 +- .../src/BlockTypes/ClassicShortcode.php | 2 +- .../src/BlockTypes/CollectionFilters.php | 161 +- .../src/BlockTypes/CollectionPriceFilter.php | 86 +- .../src/BlockTypes/CollectionStockFilter.php | 172 - .../src/BlockTypes/MiniCart.php | 6 +- .../BlockTypes/OrderConfirmation/Status.php | 2 +- .../src/BlockTypes/ProductButton.php | 30 +- .../src/BlockTypes/ProductCollection.php | 85 +- .../BlockTypes/ProductCollectionNoResults.php | 150 - .../src/BlockTypes/ProductGallery.php | 18 +- .../BlockTypes/ProductGalleryLargeImage.php | 7 +- .../ProductGalleryLargeImageNextPrevious.php | 8 - .../BlockTypes/ProductGalleryThumbnails.php | 97 +- .../src/BlockTypes/ProductQuery.php | 1 - .../src/BlockTypes/ProductTemplate.php | 16 +- .../src/BlockTypesController.php | 42 - .../src/Domain/Bootstrap.php | 11 + .../src/InteractivityComponents/Dropdown.php | 85 - .../woocommerce-blocks/src/Package.php | 2 +- .../src/Patterns/PatternUpdater.php | 13 +- .../src/Patterns/PatternsHelper.php | 50 +- .../src/Patterns/ProductUpdater.php | 105 +- .../src/Patterns/dictionary.json | 28 +- .../src/Shipping/ShippingController.php | 46 - .../Routes/V1/AI/BusinessDescription.php | 89 - .../src/StoreApi/Routes/V1/AI/Images.php | 118 - .../src/StoreApi/Routes/V1/AI/Middleware.php | 50 - .../src/StoreApi/Routes/V1/AI/Patterns.php | 94 - .../src/StoreApi/Routes/V1/AI/Product.php | 111 - .../src/StoreApi/Routes/V1/AI/Products.php | 141 - .../src/StoreApi/Routes/V1/Checkout.php | 2 +- .../src/StoreApi/RoutesController.php | 13 +- .../src/StoreApi/SchemaController.php | 6 +- .../V1/AI/BusinessDescriptionSchema.php | 47 - .../StoreApi/Schemas/V1/AI/ImagesSchema.php | 45 - .../StoreApi/Schemas/V1/AI/PatternsSchema.php | 47 - .../StoreApi/Schemas/V1/AI/ProductSchema.php | 47 - .../StoreApi/Schemas/V1/AI/ProductsSchema.php | 48 - .../StoreApi/Schemas/V1/AbstractSchema.php | 8 +- .../src/StoreApi/Schemas/V1/OrderSchema.php | 2 +- .../Schemas/V1/ProductReviewSchema.php | 13 +- .../StoreApi/Utilities/OrderController.php | 126 +- .../SingleProductTemplateCompatibility.php | 2 +- .../src/Utils/BlockTemplateUtils.php | 15 +- .../src/Utils/ProductCollectionUtils.php | 34 - .../src/Utils/ProductGalleryUtils.php | 53 +- .../templates/notices/error.php | 2 +- .../templates/parts/checkout-header.html | 6 +- .../templates/parts/product-gallery.html | 6 +- .../templates/blockified/single-product.html | 22 +- .../woocommerce-blocks/vendor/autoload.php | 2 +- .../vendor/autoload_packages.php | 2 +- .../jetpack-admin-ui/src/class-admin-menu.php | 4 +- .../dist/tracks-callables.asset.php | 2 +- .../dist/tracks-callables.js | 2 +- .../jetpack-connection/src/class-manager.php | 15 - .../src/class-package-version.php | 2 +- .../jetpack-connection/src/class-urls.php | 8 +- .../jetpack-status/src/class-host.php | 15 - .../vendor/composer/autoload_real.php | 10 +- .../vendor/composer/autoload_static.php | 8 +- .../vendor/composer/installed.json | 54 +- .../vendor/composer/installed.php | 26 +- .../composer/jetpack_autoload_classmap.php | 86 +- .../composer/jetpack_autoload_filemap.php | 4 +- .../vendor/composer/jetpack_autoload_psr4.php | 6 +- .../class-autoloader-handler.php | 2 +- .../class-autoloader-locator.php | 2 +- .../jetpack-autoloader/class-autoloader.php | 2 +- .../jetpack-autoloader/class-container.php | 2 +- .../jetpack-autoloader/class-hook-manager.php | 2 +- .../class-latest-autoloader-guard.php | 2 +- .../class-manifest-reader.php | 2 +- .../class-path-processor.php | 2 +- .../class-php-autoloader.php | 2 +- .../class-plugin-locator.php | 2 +- .../class-plugins-handler.php | 2 +- .../class-shutdown-handler.php | 2 +- .../class-version-loader.php | 2 +- .../class-version-selector.php | 2 +- .../woocommerce-gutenberg-products-block.php | 10 +- wp/wp-content/plugins/woocommerce/readme.txt | 392 +- ...experimental_fashion_sample_9_products.csv | 18 +- .../sample-data/sample_products.xml | 2 +- .../Admin/API/OnboardingFreeExtensions.php | 2 +- .../src/Admin/API/OnboardingProfile.php | 4 +- .../src/Admin/API/OnboardingThemes.php | 23 +- .../woocommerce/src/Admin/API/Options.php | 1 - .../woocommerce/src/Admin/API/Plugins.php | 18 +- .../src/Admin/API/ProductsLowInStock.php | 199 +- .../Admin/BlockTemplates/BlockInterface.php | 28 - .../OnboardingTasks/Tasks/CustomizeStore.php | 55 +- .../DefaultPaymentGateways.php | 2 +- .../ProductBlockEditor/BlockRegistry.php | 46 +- .../Features/ProductBlockEditor/Init.php | 92 +- .../ProductFormTemplateInterface.php | 2 +- .../DefaultShippingPartners.php | 4 +- .../Admin/Marketing/InstalledExtensions.php | 16 +- .../GetRuleProcessor.php | 2 - .../IsWooExpressRuleProcessor.php | 69 - .../plugins/woocommerce/src/Container.php | 2 - .../Migrations/CustomOrderTable/CLIRunner.php | 3 +- .../Admin/BlockTemplates/AbstractBlock.php | 85 +- .../BlockTemplates/BlockContainerTrait.php | 108 +- .../BlockFormattedTemplateTrait.php | 45 +- .../BlockTemplates/BlockTemplateLogger.php | 377 +- .../src/Internal/Admin/Homescreen.php | 14 +- .../Internal/Admin/Logging/FileV2/File.php | 278 - .../Admin/Logging/FileV2/FileController.php | 315 - .../Admin/Logging/FileV2/ListTable.php | 321 - .../Admin/Logging/LogHandlerFileV2.php | 10 - .../Internal/Admin/Logging/PageController.php | 530 -- .../Admin/Marketing/MarketingSpecs.php | 14 +- .../src/Internal/Admin/Marketplace.php | 90 - .../Internal/Admin/Notes/AddFirstProduct.php | 2 +- .../Internal/Admin/Notes/ChoosingTheme.php | 2 +- .../Admin/Notes/CustomizeStoreWithBlocks.php | 2 +- .../Admin/Notes/CustomizingProductCatalog.php | 2 +- .../src/Internal/Admin/Notes/EUVATNumber.php | 2 +- .../Admin/Notes/EditProductsOnTheMove.php | 2 +- .../Internal/Admin/Notes/LaunchChecklist.php | 2 +- .../Internal/Admin/Notes/MagentoMigration.php | 2 +- .../Admin/Notes/ManageOrdersOnTheGo.php | 2 +- .../Internal/Admin/Notes/MarketingJetpack.php | 2 +- .../Admin/Notes/MigrateFromShopify.php | 2 +- .../src/Internal/Admin/Notes/MobileApp.php | 2 +- .../Admin/Notes/OnboardingPayments.php | 2 +- .../Admin/Notes/OnlineClothingStore.php | 2 +- .../Internal/Admin/Notes/OrderMilestones.php | 4 +- .../Admin/Notes/PaymentsMoreInfoNeeded.php | 2 +- .../Admin/Notes/PerformanceOnMobile.php | 2 +- .../Admin/Notes/RealTimeOrderAlerts.php | 2 +- .../Admin/Notes/SellingOnlineCourses.php | 2 +- .../Internal/Admin/Notes/TrackingOptIn.php | 4 +- .../Admin/Notes/UnsecuredReportFiles.php | 4 +- .../Admin/Notes/WooCommercePayments.php | 2 +- .../Admin/Notes/WooCommerceSubscriptions.php | 2 +- .../Admin/Notes/WooSubscriptionsNotes.php | 16 +- .../Admin/Onboarding/OnboardingSync.php | 4 +- .../Admin/Onboarding/OnboardingThemes.php | 4 +- .../src/Internal/Admin/Orders/Edit.php | 7 - .../src/Internal/Admin/Orders/EditLock.php | 4 +- .../src/Internal/Admin/Orders/ListTable.php | 4 +- .../ReviewsCommentsOverrides.php | 30 +- .../DefaultFreeExtensions.php | 95 +- .../src/Internal/Admin/Settings.php | 5 - .../src/Internal/Admin/WCAdminAssets.php | 5 +- .../src/Internal/Admin/WcPayWelcomePage.php | 73 +- .../Orders/CustomOrdersTableController.php | 119 +- .../Orders/OrdersTableSearchQuery.php | 11 +- .../LoggingServiceProvider.php | 37 - .../Internal/Features/FeaturesController.php | 26 +- .../AbstractProductFormTemplate.php | 68 - .../ProductTemplates/Group.php | 52 - .../ProductTemplates/ProductBlock.php | 27 - .../ProductVariationTemplate.php | 532 -- .../ProductTemplates/Section.php | 45 - .../SimpleProductTemplate.php | 984 --- .../Orders/MobileMessagingHandler.php | 8 +- .../src/Internal/WCCom/ConnectionHelper.php | 6 +- .../woocommerce/templates/archive-product.php | 2 +- .../woocommerce/templates/auth/footer.php | 2 +- .../templates/auth/form-grant-access.php | 2 +- .../woocommerce/templates/auth/form-login.php | 2 +- .../woocommerce/templates/auth/header.php | 2 +- .../woocommerce/templates/cart/cart-empty.php | 2 +- .../templates/cart/cart-item-data.php | 2 +- .../templates/cart/cart-shipping.php | 2 +- .../templates/cart/cart-totals.php | 2 +- .../woocommerce/templates/cart/cart.php | 2 +- .../templates/cart/cross-sells.php | 2 +- .../woocommerce/templates/cart/mini-cart.php | 2 +- .../cart/proceed-to-checkout-button.php | 2 +- .../templates/cart/shipping-calculator.php | 2 +- .../templates/checkout/cart-errors.php | 2 +- .../templates/checkout/form-billing.php | 2 +- .../templates/checkout/form-checkout.php | 2 +- .../templates/checkout/form-coupon.php | 2 +- .../templates/checkout/form-login.php | 2 +- .../templates/checkout/form-pay.php | 2 +- .../templates/checkout/form-shipping.php | 2 +- .../templates/checkout/form-verify-email.php | 2 +- .../templates/checkout/order-receipt.php | 2 +- .../templates/checkout/order-received.php | 2 +- .../templates/checkout/payment-method.php | 2 +- .../templates/checkout/payment.php | 2 +- .../templates/checkout/review-order.php | 2 +- .../templates/checkout/thankyou.php | 2 +- .../templates/content-product-cat.php | 2 +- .../woocommerce/templates/content-product.php | 2 +- .../templates/content-single-product.php | 2 +- .../templates/content-widget-price-filter.php | 2 +- .../templates/content-widget-product.php | 2 +- .../templates/content-widget-reviews.php | 2 +- .../emails/admin-cancelled-order.php | 2 +- .../templates/emails/admin-failed-order.php | 2 +- .../templates/emails/admin-new-order.php | 2 +- .../emails/customer-completed-order.php | 2 +- .../templates/emails/customer-invoice.php | 2 +- .../templates/emails/customer-new-account.php | 2 +- .../templates/emails/customer-note.php | 2 +- .../emails/customer-on-hold-order.php | 2 +- .../emails/customer-processing-order.php | 2 +- .../emails/customer-refunded-order.php | 2 +- .../emails/customer-reset-password.php | 2 +- .../templates/emails/email-addresses.php | 2 +- .../emails/email-customer-details.php | 2 +- .../templates/emails/email-downloads.php | 2 +- .../templates/emails/email-footer.php | 2 +- .../templates/emails/email-header.php | 2 +- .../emails/email-mobile-messaging.php | 2 +- .../templates/emails/email-order-details.php | 2 +- .../templates/emails/email-order-items.php | 2 +- .../templates/emails/email-styles.php | 2 +- .../emails/plain/admin-cancelled-order.php | 2 +- .../emails/plain/admin-failed-order.php | 2 +- .../emails/plain/admin-new-order.php | 2 +- .../emails/plain/customer-completed-order.php | 2 +- .../emails/plain/customer-invoice.php | 2 +- .../emails/plain/customer-new-account.php | 2 +- .../templates/emails/plain/customer-note.php | 2 +- .../emails/plain/customer-on-hold-order.php | 2 +- .../plain/customer-processing-order.php | 2 +- .../emails/plain/customer-refunded-order.php | 2 +- .../emails/plain/customer-reset-password.php | 2 +- .../emails/plain/email-addresses.php | 2 +- .../emails/plain/email-customer-details.php | 2 +- .../emails/plain/email-downloads.php | 2 +- .../emails/plain/email-order-details.php | 2 +- .../emails/plain/email-order-items.php | 2 +- .../templates/global/breadcrumb.php | 2 +- .../templates/global/form-login.php | 2 +- .../templates/global/quantity-input.php | 2 +- .../woocommerce/templates/global/sidebar.php | 2 +- .../templates/global/wrapper-end.php | 2 +- .../templates/global/wrapper-start.php | 2 +- .../templates/loop/add-to-cart.php | 2 +- .../woocommerce/templates/loop/loop-end.php | 2 +- .../woocommerce/templates/loop/loop-start.php | 2 +- .../templates/loop/no-products-found.php | 2 +- .../woocommerce/templates/loop/orderby.php | 2 +- .../woocommerce/templates/loop/pagination.php | 2 +- .../woocommerce/templates/loop/price.php | 2 +- .../woocommerce/templates/loop/rating.php | 2 +- .../templates/loop/result-count.php | 2 +- .../woocommerce/templates/loop/sale-flash.php | 2 +- .../templates/myaccount/dashboard.php | 2 +- .../templates/myaccount/downloads.php | 2 +- .../myaccount/form-add-payment-method.php | 2 +- .../templates/myaccount/form-edit-account.php | 2 +- .../templates/myaccount/form-edit-address.php | 2 +- .../templates/myaccount/form-login.php | 2 +- .../myaccount/form-lost-password.php | 2 +- .../myaccount/form-reset-password.php | 2 +- .../myaccount/lost-password-confirmation.php | 2 +- .../templates/myaccount/my-account.php | 2 +- .../templates/myaccount/my-address.php | 2 +- .../templates/myaccount/my-downloads.php | 2 +- .../templates/myaccount/navigation.php | 2 +- .../templates/myaccount/orders.php | 2 +- .../templates/myaccount/payment-methods.php | 2 +- .../templates/myaccount/view-order.php | 2 +- .../woocommerce/templates/notices/error.php | 2 +- .../woocommerce/templates/notices/notice.php | 2 +- .../woocommerce/templates/notices/success.php | 2 +- .../templates/order/form-tracking.php | 2 +- .../templates/order/order-again.php | 2 +- .../order/order-details-customer.php | 2 +- .../templates/order/order-details-item.php | 2 +- .../templates/order/order-details.php | 2 +- .../templates/order/order-downloads.php | 2 +- .../woocommerce/templates/order/tracking.php | 2 +- .../templates/product-searchform.php | 2 +- .../templates/single-product-reviews.php | 2 +- .../woocommerce/templates/single-product.php | 2 +- .../single-product/add-to-cart/external.php | 2 +- .../single-product/add-to-cart/grouped.php | 2 +- .../single-product/add-to-cart/simple.php | 2 +- .../single-product/add-to-cart/variable.php | 2 +- .../variation-add-to-cart-button.php | 2 +- .../single-product/add-to-cart/variation.php | 2 +- .../templates/single-product/meta.php | 2 +- .../templates/single-product/photoswipe.php | 2 +- .../templates/single-product/price.php | 2 +- .../single-product/product-attributes.php | 2 +- .../single-product/product-image.php | 2 +- .../single-product/product-thumbnails.php | 2 +- .../templates/single-product/rating.php | 2 +- .../templates/single-product/related.php | 2 +- .../templates/single-product/review-meta.php | 2 +- .../single-product/review-rating.php | 2 +- .../templates/single-product/review.php | 2 +- .../templates/single-product/sale-flash.php | 2 +- .../templates/single-product/share.php | 2 +- .../single-product/short-description.php | 2 +- .../templates/single-product/stock.php | 2 +- .../tabs/additional-information.php | 2 +- .../single-product/tabs/description.php | 2 +- .../templates/single-product/tabs/tabs.php | 2 +- .../templates/single-product/title.php | 2 +- .../templates/single-product/up-sells.php | 2 +- .../templates/taxonomy-product-attribute.php | 2 +- .../templates/taxonomy-product-cat.php | 2 +- .../templates/taxonomy-product-tag.php | 2 +- .../plugins/woocommerce/vendor/autoload.php | 2 +- .../woocommerce/vendor/autoload_packages.php | 2 +- .../vendor/composer/autoload_classmap.php | 31 +- .../vendor/composer/autoload_real.php | 10 +- .../vendor/composer/autoload_static.php | 41 +- .../vendor/composer/installed.json | 30 +- .../woocommerce/vendor/composer/installed.php | 20 +- .../composer/jetpack_autoload_classmap.php | 2160 +++-- .../composer/jetpack_autoload_filemap.php | 4 +- .../class-autoloader-handler.php | 2 +- .../class-autoloader-locator.php | 2 +- .../jetpack-autoloader/class-autoloader.php | 2 +- .../jetpack-autoloader/class-container.php | 2 +- .../jetpack-autoloader/class-hook-manager.php | 2 +- .../class-latest-autoloader-guard.php | 2 +- .../class-manifest-reader.php | 2 +- .../class-path-processor.php | 2 +- .../class-php-autoloader.php | 2 +- .../class-plugin-locator.php | 2 +- .../class-plugins-handler.php | 2 +- .../class-shutdown-handler.php | 2 +- .../class-version-loader.php | 2 +- .../class-version-selector.php | 2 +- .../plugins/woocommerce/woocommerce.php | 6 +- .../css/activity-report-widget.1701191857.css | 91 - .../plugins/wordfence/css/diff.1701191857.css | 123 - .../wordfence/css/fullLog.1701191857.css | 21 - .../wordfence/css/iptraf.1701191857.css | 49 - .../jquery-ui-timepicker-addon.1701191857.css | 27 - .../css/jquery-ui.min.1701191857.css | 7 - .../jquery-ui.structure.min.1701191857.css | 5 - .../css/jquery-ui.theme.min.1701191857.css | 5 - .../css/license/care-global.1701191857.css | 1 - .../wordfence/css/license/care.1701191857.css | 1 - .../css/license/free-global.1701191857.css | 1 - .../wordfence/css/license/free.1701191857.css | 1 - .../css/license/premium-global.1701191857.css | 1 - .../css/license/premium.1701191857.css | 1 - .../license/response-global.1701191857.css | 1 - .../license/response-variables.1701191857.css | 0 .../css/license/response.1701191857.css | 1 - .../plugins/wordfence/css/main.1701191857.css | 1 - .../wordfence/css/phpinfo.1701191857.css | 30 - .../wordfence/css/wf-adminbar.1701191857.css | 1 - .../wordfence/css/wf-colorbox.1701191857.css | 1 - .../css/wf-font-awesome.1701191857.css | 4 - .../wordfence/css/wf-global.1701191857.css | 1 - .../wordfence/css/wf-ionicons.1701191857.css | 1 - .../css/wf-onboarding.1701191857.css | 1 - .../css/wf-roboto-font.1701191857.css | 80 - .../css/wfselect2.min.1701191857.css | 1 - .../wordfence/css/wordfenceBox.1701191857.css | 169 - .../plugins/wordfence/js/admin.1701191857.js | 4027 --------- .../js/admin.ajaxWatcher.1701191857.js | 92 - .../js/admin.liveTraffic.1701191857.js | 924 -- .../wordfence/js/chart.umd.1701191857.js | 14 - .../plugins/wordfence/js/date.1701191857.js | 96 - .../jquery-ui-timepicker-addon.1701191857.js | 2291 ----- .../js/jquery.colorbox-min.1701191857.js | 6 - .../js/jquery.colorbox.1701191857.js | 1105 --- .../js/jquery.qrcode.min.1701191857.js | 28 - .../js/jquery.tmpl.min.1701191857.js | 10 - .../wordfence/js/knockout-3.5.1.1701191857.js | 139 - .../wordfence/js/wfdashboard.1701191857.js | 15 - .../wordfence/js/wfdropdown.1701191857.js | 165 - .../wordfence/js/wfglobal.1701191857.js | 276 - .../plugins/wordfence/js/wfi18n.1701191857.js | 225 - .../wordfence/js/wfonboarding.1701191857.js | 150 - .../wordfence/js/wfpopover.1701191857.js | 785 -- .../wordfence/js/wfselect2.min.1701191857.js | 2 - .../plugins/wordfence/languages/wordfence.pot | 1954 ++-- .../wordfence/lib/menu_tools_diagnostic.php | 21 +- .../plugins/wordfence/lib/wfCentralAPI.php | 2 - .../plugins/wordfence/lib/wfConfig.php | 24 +- .../plugins/wordfence/lib/wfDiagnostic.php | 11 +- .../plugins/wordfence/lib/wfScanMonitor.php | 4 +- .../plugins/wordfence/lib/wfUtils.php | 25 +- .../plugins/wordfence/lib/wordfenceClass.php | 90 +- .../css/admin-global.1701191857.css | 1 - .../login-security/css/admin.1701191857.css | 1 - .../css/colorbox.1701191857.css | 1 - .../css/embedded.1701191857.css | 1 - .../css/font-awesome.1701191857.css | 4 - .../css/ionicons.1701191857.css | 1 - .../css/jquery-ui.min.1701191857.css | 5 - .../jquery-ui.structure.min.1701191857.css | 3 - .../css/jquery-ui.theme.min.1701191857.css | 3 - .../login-security/css/login.1701191857.css | 1 - .../css/woocommerce-account.1701191857.css | 1 - .../js/admin-global.1701191857.js | 90 - .../login-security/js/admin.1701191857.js | 932 -- .../login-security/js/chart.umd.1701191857.js | 14 - .../js/jquery.colorbox.1701191857.js | 1105 --- .../js/jquery.colorbox.min.1701191857.js | 1 - .../js/jquery.qrcode.min.1701191857.js | 28 - .../js/jquery.tmpl.min.1701191857.js | 10 - .../login-security/js/login.1701191857.js | 480 - .../wordfence-login-security.php | 2 +- wp/wp-content/plugins/wordfence/readme.txt | 12 +- .../vendor/wordfence/wf-waf/src/cacert.pem | 2220 ++--- .../wf-waf/src/lib/storage/mysql.php | 1 - .../vendor/wordfence/wf-waf/src/lib/waf.php | 38 +- .../views/dashboard/option-howgetips.php | 67 +- .../wordfence/views/diagnostics/text.php | 37 +- .../plugins/wordfence/waf/bootstrap.php | 2 +- wp/wp-content/plugins/wordfence/wordfence.php | 6 +- .../admin/class-admin-asset-manager.php | 1 - .../admin/class-gutenberg-compatibility.php | 4 +- .../admin/class-yoast-notification-center.php | 9 +- .../admin/class-yoast-notification.php | 31 +- .../admin/metabox/class-metabox.php | 4 +- .../admin/taxonomy/class-taxonomy.php | 9 +- .../wordpress-seo/admin/views/redirects.php | 2 +- .../watchers/class-slug-change-watcher.php | 23 +- .../css/dist/academy-2160-rtl.css | 1 - .../wordpress-seo/css/dist/academy-2160.css | 1 - .../css/dist/academy-2170-rtl.css | 1 - .../wordpress-seo/css/dist/academy-2170.css | 1 - .../css/dist/admin-global-2160-rtl.css | 1 - .../css/dist/admin-global-2160.css | 1 - .../css/dist/admin-global-2170-rtl.css | 1 - .../css/dist/admin-global-2170.css | 1 - .../css/dist/adminbar-2160-rtl.css | 1 - .../wordpress-seo/css/dist/adminbar-2160.css | 1 - .../css/dist/adminbar-2170-rtl.css | 1 - .../wordpress-seo/css/dist/adminbar-2170.css | 1 - .../css/dist/ai-generator-2160-rtl.css | 1 - .../css/dist/ai-generator-2160.css | 1 - .../css/dist/ai-generator-2170-rtl.css | 1 - .../css/dist/ai-generator-2170.css | 1 - .../css/dist/alerts-2160-rtl.css | 1 - .../wordpress-seo/css/dist/alerts-2160.css | 1 - .../css/dist/alerts-2170-rtl.css | 1 - .../wordpress-seo/css/dist/alerts-2170.css | 1 - .../css/dist/black-friday-banner-2160-rtl.css | 1 - .../css/dist/black-friday-banner-2160.css | 1 - .../css/dist/black-friday-banner-2170-rtl.css | 1 - .../css/dist/black-friday-banner-2170.css | 1 - .../css/dist/dashboard-2160-rtl.css | 1 - .../wordpress-seo/css/dist/dashboard-2160.css | 1 - .../css/dist/dashboard-2170-rtl.css | 1 - .../wordpress-seo/css/dist/dashboard-2170.css | 1 - .../css/dist/edit-page-2160-rtl.css | 1 - .../wordpress-seo/css/dist/edit-page-2160.css | 1 - .../css/dist/edit-page-2170-rtl.css | 1 - .../wordpress-seo/css/dist/edit-page-2170.css | 1 - .../css/dist/elementor-2160-rtl.css | 1 - .../wordpress-seo/css/dist/elementor-2160.css | 1 - .../css/dist/elementor-2170-rtl.css | 1 - .../wordpress-seo/css/dist/elementor-2170.css | 1 - .../css/dist/featured-image-2160-rtl.css | 1 - .../css/dist/featured-image-2160.css | 1 - .../css/dist/featured-image-2170-rtl.css | 1 - .../css/dist/featured-image-2170.css | 1 - .../css/dist/filter-explanation-2160-rtl.css | 1 - .../css/dist/filter-explanation-2160.css | 1 - .../css/dist/filter-explanation-2170-rtl.css | 1 - .../css/dist/filter-explanation-2170.css | 1 - .../first-time-configuration-2160-rtl.css | 1 - .../dist/first-time-configuration-2160.css | 1 - .../first-time-configuration-2170-rtl.css | 1 - .../dist/first-time-configuration-2170.css | 1 - .../wordpress-seo/css/dist/icons-2160-rtl.css | 1 - .../wordpress-seo/css/dist/icons-2160.css | 1 - .../wordpress-seo/css/dist/icons-2170-rtl.css | 1 - .../wordpress-seo/css/dist/icons-2170.css | 1 - .../css/dist/inside-editor-2160-rtl.css | 1 - .../css/dist/inside-editor-2160.css | 1 - .../css/dist/inside-editor-2170-rtl.css | 1 - .../css/dist/inside-editor-2170.css | 1 - .../css/dist/introductions-2160-rtl.css | 1 - .../css/dist/introductions-2160.css | 1 - .../css/dist/introductions-2170-rtl.css | 1 - .../css/dist/introductions-2170.css | 1 - .../css/dist/metabox-2160-rtl.css | 1 - .../wordpress-seo/css/dist/metabox-2160.css | 3 - .../css/dist/metabox-2170-rtl.css | 1 - .../wordpress-seo/css/dist/metabox-2170.css | 3 - .../metabox-primary-category-2160-rtl.css | 1 - .../dist/metabox-primary-category-2160.css | 1 - .../metabox-primary-category-2170-rtl.css | 1 - .../dist/metabox-primary-category-2170.css | 1 - .../wordpress-seo/css/dist/modal-2160-rtl.css | 1 - .../wordpress-seo/css/dist/modal-2160.css | 1 - .../wordpress-seo/css/dist/modal-2170-rtl.css | 1 - .../wordpress-seo/css/dist/modal-2170.css | 1 - .../css/dist/monorepo-2160-rtl.css | 1 - .../wordpress-seo/css/dist/monorepo-2160.css | 1 - .../css/dist/monorepo-2170-rtl.css | 1 - .../wordpress-seo/css/dist/monorepo-2170.css | 1 - .../css/dist/new-settings-2160-rtl.css | 1 - .../css/dist/new-settings-2160.css | 1 - .../css/dist/new-settings-2170-rtl.css | 1 - .../css/dist/new-settings-2170.css | 1 - .../css/dist/notifications-2160-rtl.css | 1 - .../css/dist/notifications-2160.css | 1 - .../css/dist/notifications-2170-rtl.css | 1 - .../css/dist/notifications-2170.css | 1 - .../css/dist/score_icon-2160-rtl.css | 1 - .../css/dist/score_icon-2160.css | 1 - .../css/dist/score_icon-2170-rtl.css | 1 - .../css/dist/score_icon-2170.css | 1 - .../dist/structured-data-blocks-2160-rtl.css | 1 - .../css/dist/structured-data-blocks-2160.css | 1 - .../dist/structured-data-blocks-2170-rtl.css | 1 - .../css/dist/structured-data-blocks-2170.css | 1 - .../css/dist/support-2160-rtl.css | 1 - .../wordpress-seo/css/dist/support-2160.css | 1 - .../css/dist/support-2170-rtl.css | 1 - .../wordpress-seo/css/dist/support-2170.css | 1 - .../css/dist/tailwind-2160-rtl.css | 1 - .../wordpress-seo/css/dist/tailwind-2160.css | 1 - .../css/dist/tailwind-2170-rtl.css | 1 - .../wordpress-seo/css/dist/tailwind-2170.css | 1 - .../css/dist/toggle-switch-2160-rtl.css | 1 - .../css/dist/toggle-switch-2160.css | 1 - .../css/dist/toggle-switch-2170-rtl.css | 1 - .../css/dist/toggle-switch-2170.css | 1 - .../css/dist/tooltips-2160-rtl.css | 1 - .../wordpress-seo/css/dist/tooltips-2160.css | 1 - .../css/dist/tooltips-2170-rtl.css | 1 - .../wordpress-seo/css/dist/tooltips-2170.css | 1 - .../css/dist/workouts-2160-rtl.css | 1 - .../wordpress-seo/css/dist/workouts-2160.css | 1 - .../css/dist/workouts-2170-rtl.css | 1 - .../wordpress-seo/css/dist/workouts-2170.css | 1 - .../css/dist/wpseo-dismissible-2160-rtl.css | 1 - .../css/dist/wpseo-dismissible-2160.css | 1 - .../css/dist/wpseo-dismissible-2170-rtl.css | 1 - .../css/dist/wpseo-dismissible-2170.css | 1 - .../css/dist/yoast-extensions-2160-rtl.css | 1 - .../css/dist/yoast-extensions-2160.css | 1 - .../css/dist/yoast-extensions-2170-rtl.css | 1 - .../css/dist/yoast-extensions-2170.css | 1 - .../css/dist/yst_plugin_tools-2160-rtl.css | 1 - .../css/dist/yst_plugin_tools-2160.css | 1 - .../css/dist/yst_plugin_tools-2170-rtl.css | 1 - .../css/dist/yst_plugin_tools-2170.css | 1 - .../css/dist/yst_seo_score-2160-rtl.css | 1 - .../css/dist/yst_seo_score-2160.css | 1 - .../css/dist/yst_seo_score-2170-rtl.css | 1 - .../css/dist/yst_seo_score-2170.css | 1 - .../inc/options/class-wpseo-option-wpseo.php | 3 +- .../plugins/wordpress-seo/js/dist/42.js | 2 +- .../plugins/wordpress-seo/js/dist/academy.js | 20 +- .../js/dist/addon-installation.js | 10 +- .../wordpress-seo/js/dist/admin-modules.js | 8 +- .../wordpress-seo/js/dist/block-editor.js | 380 +- .../wordpress-seo/js/dist/bulk-editor.js | 2 +- .../wordpress-seo/js/dist/classic-editor.js | 306 +- .../wordpress-seo/js/dist/crawl-settings.js | 2 +- .../wordpress-seo/js/dist/dashboard-widget.js | 2 +- .../wordpress-seo/js/dist/dynamic-blocks.js | 2 +- .../wordpress-seo/js/dist/edit-page.js | 2 +- .../wordpress-seo/js/dist/editor-modules.js | 355 +- .../wordpress-seo/js/dist/elementor.js | 324 +- .../js/dist/externals-components.js | 161 +- .../js/dist/externals-contexts.js | 2 +- .../wordpress-seo/js/dist/externals-redux.js | 2 +- .../js/dist/externals/analysis.js | 155 +- .../js/dist/externals/analysisReport.js | 4 +- .../js/dist/externals/chart.js.js | 1 - .../js/dist/externals/components.js | 13 +- .../js/dist/externals/componentsNew.js | 23 +- .../js/dist/externals/draftJs.js | 2 +- .../js/dist/externals/featureFlag.js | 2 +- .../js/dist/externals/helpers.js | 24 +- .../wordpress-seo/js/dist/externals/jed.js | 2 +- .../js/dist/externals/propTypes.js | 2 +- .../js/dist/externals/reactHelmet.js | 2 +- .../wordpress-seo/js/dist/externals/redux.js | 2 +- .../js/dist/externals/reduxJsToolkit.js | 2 +- .../externals/replacementVariableEditor.js | 4 +- .../dist/externals/searchMetadataPreviews.js | 19 +- .../js/dist/externals/socialMetadataForms.js | 2 +- .../js/dist/externals/styleGuide.js | 4 +- .../js/dist/externals/styledComponents.js | 2 +- .../js/dist/externals/uiLibrary.js | 2 +- .../js/dist/filter-explanation.js | 2 +- .../js/dist/first-time-configuration.js | 44 +- .../js/dist/frontend-inspector-resources.js | 2 +- .../js/dist/help-scout-beacon.js | 4 +- .../plugins/wordpress-seo/js/dist/import.js | 2 +- .../wordpress-seo/js/dist/indexation.js | 4 +- .../js/dist/installation-success.js | 19 +- .../js/dist/integrations-page.js | 134 +- .../wordpress-seo/js/dist/introductions.js | 31 +- .../wordpress-seo/js/dist/network-admin.js | 2 +- .../wordpress-seo/js/dist/new-settings.js | 323 +- .../wordpress-seo/js/dist/post-edit.js | 47 +- .../js/dist/quick-edit-handler.js | 2 +- .../wordpress-seo/js/dist/react-select.js | 2 +- .../js/dist/redirect-old-features-tab.js | 2 +- .../wordpress-seo/js/dist/reindex-links.js | 2 +- .../plugins/wordpress-seo/js/dist/settings.js | 6 +- .../js/dist/structured-data-blocks.js | 19 +- .../plugins/wordpress-seo/js/dist/support.js | 61 +- .../wordpress-seo/js/dist/term-edit.js | 2 +- .../js/dist/used-keywords-assessment.js | 2 +- .../js/dist/wincher-dashboard-widget.js | 165 +- .../wordpress-seo/js/dist/wordproof-uikit.js | 2 +- .../plugins/wordpress-seo/js/dist/workouts.js | 11 +- .../plugins/wordpress-seo/readme.txt | 63 +- .../wincher/wincher-account-action.php | 26 +- .../wincher/wincher-keyphrases-action.php | 4 +- .../src/builders/indexable-author-builder.php | 50 +- .../builders/indexable-home-page-builder.php | 46 +- .../indexable-post-type-archive-builder.php | 50 +- .../src/builders/indexable-term-builder.php | 68 +- .../src/integrations/third-party/wincher.php | 100 - .../wordproof-integration-toggle.php | 134 - .../src/generated/assets/externals.php | 2 +- .../src/generated/assets/languages.php | 2 +- .../src/generated/assets/plugin.php | 2 +- .../wordpress-seo/src/generated/container.php | 113 +- .../src/generators/schema/person.php | 2 +- .../src/helpers/current-page-helper.php | 8 +- .../integrations/third-party/elementor.php | 3 +- .../woocommerce-beta-editor-watcher.php | 137 - ...s-and-descriptions-introduction-upsell.php | 22 +- .../application/introductions-collector.php | 26 +- .../domain/introduction-interface.php | 10 - .../domain/introduction-item.php | 18 +- .../domain/invalid-user-id-exception.php | 29 - .../introductions-seen-repository.php | 115 - .../wordpress-seo/src/introductions/readme.md | 8 +- .../introductions-integration.php | 2 +- .../introductions-seen-route.php | 146 - .../wistia-embed-permission-route.php | 2 + .../indexable-term-archive-presentation.php | 12 +- .../woocommerce-beta-editor-presenter.php | 60 - .../promotion-manager-interface.php | 2 + .../black-friday-checklist-promotion.php | 2 + .../domain/black-friday-promotion.php | 2 + .../src/routes/wincher-route.php | 5 +- .../user-profiles-additions-ui.php | 43 +- .../plugins/wordpress-seo/vendor/autoload.php | 2 +- .../vendor/composer/autoload_classmap.php | 9 +- .../vendor/composer/autoload_real.php | 8 +- .../vendor/composer/autoload_static.php | 17 +- .../vendor/composer/installed.php | 4 +- .../plugins/wordpress-seo/wp-seo-main.php | 4 +- .../plugins/wordpress-seo/wp-seo.php | 4 +- .../assets/css/smtp-admin.min.css | 2 +- .../wp-mail-smtp/assets/js/smtp-about.js | 3 +- .../wp-mail-smtp/assets/js/smtp-about.min.js | 2 +- .../wp-mail-smtp/assets/js/smtp-admin.js | 32 +- .../wp-mail-smtp/assets/js/smtp-admin.min.js | 2 +- .../assets/languages/wp-mail-smtp-vue.php | 161 +- .../assets/languages/wp-mail-smtp.pot | 1169 ++- .../assets/vue/css/wizard.min.css | 2 +- .../assets/vue/css/wizard.rtl.min.css | 2 +- .../assets/vue/img/gmail-sign-in-btn.svg | 1 - .../wp-mail-smtp/assets/vue/js/wizard.min.js | 2 +- wp/wp-content/plugins/wp-mail-smtp/readme.txt | 13 +- .../wp-mail-smtp/src/Admin/AdminBarMenu.php | 2 +- .../plugins/wp-mail-smtp/src/Admin/Area.php | 35 +- .../src/Admin/ConnectionSettings.php | 86 +- .../src/Admin/DashboardWidget.php | 6 +- .../src/Admin/DebugEvents/DebugEvents.php | 4 +- .../src/Admin/DebugEvents/Table.php | 2 +- .../wp-mail-smtp/src/Admin/Education.php | 2 +- .../wp-mail-smtp/src/Admin/Notifications.php | 4 +- .../wp-mail-smtp/src/Admin/Pages/AboutTab.php | 15 +- .../src/Admin/Pages/SettingsTab.php | 1 + .../src/Admin/PluginsInstallSkin.php | 5 +- .../wp-mail-smtp/src/Admin/SetupWizard.php | 83 +- .../plugins/wp-mail-smtp/src/Connect.php | 15 +- .../plugins/wp-mail-smtp/src/Core.php | 23 +- .../plugins/wp-mail-smtp/src/DBRepair.php | 4 +- .../plugins/wp-mail-smtp/src/Geo.php | 56 - .../wp-mail-smtp/src/Helpers/Helpers.php | 14 - .../plugins/wp-mail-smtp/src/Options.php | 12 +- .../wp-mail-smtp/src/Providers/Gmail/Auth.php | 115 +- .../src/Providers/Gmail/Options.php | 38 +- .../wp-mail-smtp/src/Providers/Loader.php | 2 +- .../plugins/wp-mail-smtp/src/Tasks/Tasks.php | 10 +- .../vendor/composer/autoload_classmap.php | 9 +- .../vendor/composer/autoload_static.php | 9 +- .../vendor/composer/installed.php | 12 +- .../plugins/wp-mail-smtp/wp_mail_smtp.php | 4 +- wp/wp-content/plugins/wp-pagenavi/admin.php | 164 - wp/wp-content/plugins/wp-pagenavi/core.php | 335 - .../plugins/wp-pagenavi/pagenavi-css.css | 24 - wp/wp-content/plugins/wp-pagenavi/readme.txt | 225 - .../plugins/wp-pagenavi/scb/AdminPage.php | 563 -- .../plugins/wp-pagenavi/scb/BoxesPage.php | 341 - .../plugins/wp-pagenavi/scb/Cron.php | 221 - .../plugins/wp-pagenavi/scb/Forms.php | 1052 --- .../plugins/wp-pagenavi/scb/Hooks.php | 119 - .../plugins/wp-pagenavi/scb/Options.php | 197 - .../plugins/wp-pagenavi/scb/PostMetabox.php | 346 - .../plugins/wp-pagenavi/scb/Table.php | 66 - .../plugins/wp-pagenavi/scb/Util.php | 476 - .../plugins/wp-pagenavi/scb/Widget.php | 124 - .../plugins/wp-pagenavi/scb/composer.json | 22 - .../plugins/wp-pagenavi/scb/load-composer.php | 12 - .../plugins/wp-pagenavi/scb/load.php | 105 - wp/wp-content/plugins/wp-pagenavi/test.php | 24 - .../plugins/wp-pagenavi/uninstall.php | 47 - .../plugins/wp-pagenavi/wp-pagenavi.php | 45 - .../class-bsf-analytics-loader.php | 236 +- .../plugins/wp-schema-pro/changelog.txt | 10 - .../class-brainstorm-update-aiosrs-pro.php | 2 +- .../classes/class-bsf-aiosrs-pro-admin.php | 2262 ++--- ...bsf-aiosrs-pro-schema-global-uninstall.php | 184 +- .../class-bsf-aiosrs-pro-schema-template.php | 2002 +++-- .../class-bsf-aiosrs-pro-schema-wizard.php | 954 +- .../classes/class-bsf-aiosrs-pro-schema.php | 103 +- .../class-bsf-aiosrs-pro-setup-wizard.php | 1340 +-- .../lib/class-bsf-custom-post-list-table.php | 1224 +-- .../class-bsf-target-rule-fields.php | 3046 ++++--- .../class-bsf-aiosrs-pro-schema-article.php | 14 +- .../class-bsf-aiosrs-pro-schema-book.php | 16 +- .../class-bsf-aiosrs-pro-schema-course.php | 72 +- .../class-bsf-aiosrs-pro-schema-event.php | 50 +- .../class-bsf-aiosrs-pro-schema-faq.php | 94 +- .../class-bsf-aiosrs-pro-schema-how-to.php | 10 +- ...ss-bsf-aiosrs-pro-schema-image-license.php | 2 +- ...lass-bsf-aiosrs-pro-schema-job-posting.php | 60 +- ...s-bsf-aiosrs-pro-schema-local-business.php | 38 +- .../class-bsf-aiosrs-pro-schema-person.php | 36 +- .../class-bsf-aiosrs-pro-schema-product.php | 36 +- .../class-bsf-aiosrs-pro-schema-recipe.php | 44 +- .../class-bsf-aiosrs-pro-schema-review.php | 194 +- .../class-bsf-aiosrs-pro-schema-service.php | 20 +- ...aiosrs-pro-schema-software-application.php | 14 +- ...ass-bsf-aiosrs-pro-schema-video-object.php | 30 +- ...sf-aiosrs-pro-schema-global-breadcrumb.php | 84 +- .../wp-schema-pro/languages/wp-schema-pro.pot | 2171 +++-- .../lib/astra-notices/class-astra-notices.php | 778 +- .../wp-schema-pro/template/license-form.php | 80 +- .../plugins/wp-schema-pro/uninstall.php | 58 +- .../plugins/wp-schema-pro/wp-schema-pro.php | 4 +- .../classes/class-bsf-sp-admin-helper.php | 336 +- .../classes/class-bsf-sp-block-helper.php | 1096 +-- .../classes/class-bsf-sp-block-js.php | 196 +- .../classes/class-bsf-sp-config.php | 676 +- .../classes/class-bsf-sp-loader.php | 158 +- .../themes/child-theme/functions.php | 36 - wp/wp-content/themes/child-theme/style.css | 56 - wp/wp-content/themes/thbusiness/archive.php | 70 +- wp/wp-content/themes/thbusiness/content.php | 39 +- wp/wp-content/themes/thbusiness/functions.php | 8 - .../layouts/landing-page-bloghome.php | 24 +- wp/wp-content/themes/thbusiness/search.php | 2 +- wp/wp-content/themes/thbusiness/single.php | 4 +- wp/wp-content/themes/thbusiness/style.css | 21 +- wp/wp-content/uploads/wpcf7_uploads/.htaccess | 9 - wp/wp-includes/block-patterns.php | 2 +- wp/wp-includes/block-template-utils.php | 4 +- .../blocks/navigation/view-modal.js | 68 - .../blocks/navigation/view-modal.min.js | 1 - .../html-api/class-wp-html-tag-processor.php | 2 +- .../html-api/class-wp-html-token.php | 9 - wp/wp-includes/ms-blogs.php | 16 +- wp/wp-includes/navigation-fallback.php | 56 - .../rest-api/class-wp-rest-server.php | 7 - wp/wp-includes/theme.php | 95 +- wp/wp-includes/version.php | 2 +- 2154 files changed, 22313 insertions(+), 209875 deletions(-) delete mode 100644 wp-config.php delete mode 100644 wp/wp-content/plugins/divifilter/df-script.js delete mode 100644 wp/wp-content/plugins/divifilter/df-style.css delete mode 100644 wp/wp-content/plugins/divifilter/divifilter.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/.editorconfig delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/.gitignore delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4/Factory.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Autoloader.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Extension.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Panel.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginExtension.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginPanel.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/ThemePanel.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Factory.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/InstalledPackage.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Metadata.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/OAuthSignature.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Info.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Package.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Ui.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Update.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/UpdateChecker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Scheduler.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/StateStore.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Package.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Update.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/UpdateChecker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Update.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpdateChecker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpgraderStatus.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Utils.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Api.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/BaseChecker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/BitBucketApi.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitHubApi.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitLabApi.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/PluginUpdateChecker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Reference.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/ThemeUpdateChecker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/README.md delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/composer.json delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/css/puc-debug-bar.css delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/examples/plugin.json delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/examples/theme.json delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/js/debug-bar.js delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-cs_CZ.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-de_DE.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-de_DE.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_AR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_AR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_CL.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_CL.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_CO.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_CO.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_CR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_CR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_DO.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_DO.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_ES.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_ES.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_GT.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_GT.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_HN.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_HN.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_MX.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_MX.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_PE.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_PE.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_PR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_PR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_UY.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_UY.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_VE.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_VE.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fa_IR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fa_IR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_CA.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_CA.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-hu_HU.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ja.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ja.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sl_SI.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sl_SI.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-zh_CN.mo delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-zh_CN.po delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker.pot delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/license.txt delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/load-v4p11.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/plugin-update-checker.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/Parsedown.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownLegacy.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownModern.php delete mode 100644 wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/PucReadmeParser.php delete mode 100644 wp/wp-content/plugins/divifilter/readme.txt delete mode 100644 wp/wp-content/plugins/facetwp/.gitignore delete mode 100644 wp/wp-content/plugins/facetwp/assets/css/admin.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/css/front.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/checkbox-on.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/checkbox.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/icon-close.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/icon-locate.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/icon-search.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/loading.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/logo.svg delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/powered-by-google.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/radio-on.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/images/radio.png delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/dist/admin.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/dist/front.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/accessibility.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/admin.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/deprecated.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/event-manager.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/front-facets.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/front.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/js/src/sample.json delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fDate/LICENSE.md delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fSelect/fSelect.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fSelect/fSelect.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fUtil/LICENSE.md delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/fUtil/fUtil.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/nummy/nummy.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/nummy/nummy.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/vanilla-picker-mini/vanilla-picker-mini.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/vue/Sortable.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/vue/vue-select/vue-select.css delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/vue/vue-select/vue-select.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/vue/vue.min.js delete mode 100644 wp/wp-content/plugins/facetwp/assets/vendor/vue/vuedraggable.min.js delete mode 100644 wp/wp-content/plugins/facetwp/includes/api/fetch.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/api/refresh.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-ajax.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-builder.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-diff.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-display.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-helper.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-indexer.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-init.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-overrides.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-renderer.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-request.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-settings.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-updater.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/class-upgrade.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/autocomplete.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/base.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/checkboxes.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/date_range.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/dropdown.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/fselect.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/hierarchy.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/number_range.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/pager.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/proximity.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/radio.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/rating.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/reset.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/search.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/slider.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/facets/sort.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/functions.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/acf/acf.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.js delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/searchwp/searchwp.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/taxonomy.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.js delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/wp-cli/wp-cli.php delete mode 100644 wp/wp-content/plugins/facetwp/includes/integrations/wp-rocket/wp-rocket.php delete mode 100644 wp/wp-content/plugins/facetwp/index.php delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-ca.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-ca.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-nl_NL.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-nl_NL.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-pl_PL.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-pl_PL.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-ru_RU.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-ru_RU.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.mo delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.po delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp-front.pot delete mode 100644 wp/wp-content/plugins/facetwp/languages/fwp.pot delete mode 100644 wp/wp-content/plugins/facetwp/package.json delete mode 100644 wp/wp-content/plugins/facetwp/rollup.config.js delete mode 100644 wp/wp-content/plugins/facetwp/templates/page-settings.php delete mode 100644 wp/wp-content/plugins/facetwp/templates/page-support.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/build/index.asset.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/build/index.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/build/index.js.map delete mode 100644 wp/wp-content/plugins/relevanssi-premium/changelog.txt delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-cs_CZ.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-cs_CZ.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-de_DE.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-de_DE.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fi-relevanssi-sidebar.json delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fi.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fi.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fr_CA.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fr_CA.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fr_FR.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-fr_FR.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-it_IT.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-it_IT.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-pl_PL.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-pl_PL.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-pt_BR.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-pt_BR.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-ru_RU.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-ru_RU.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-sidebar-fi.mo delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-sidebar-fi.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/languages/relevanssi-sidebar.pot delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/admin-ajax.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/admin_scripts.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/admin_scripts_free.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/admin_styles.css delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/class-relevanssi-taxonomy-walker.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/common.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/acf.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/aioseo.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/avada.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/bricks.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/elementor.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/fibosearch.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/groups.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/gutenberg.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/jetsmartfilters.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/memberpress.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/members.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/ninjatables.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/oxygen.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/paidmembershippro.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/polylang.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/pretty-links.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/product-gtin-ean-upc-isbn-for-woocommerce.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/rankmath.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/restrictcontentpro.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/seoframework.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/seopress.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/simplemembership.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/tablepress.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/useraccessmanager.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/woocommerce.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/wp-file-download.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/wp-members.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/wp-search-suggest.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/wpjvpostreadinggroups.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/wpml.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/compatibility/yoast-seo.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/contextual-help.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/debug.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/didyoumean.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/excerpts-highlights.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/indexing.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/init.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/install.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/interface.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/log.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/options.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/phrases.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/privacy.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/search-query-restrictions.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/search-tax-query.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/search.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/shortcodes.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/sorting.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/stopwords.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/attachments-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/debugging-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/excerpts-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/indexing-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/logging-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/overview-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/redirects-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/search-page.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/searching-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/stopwords-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/tabs/synonyms-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/uninstall.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/user-searches.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/lib/utils.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/admin-ajax.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/admin_metabox_scripts.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/admin_pdf_scripts.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/admin_scripts_premium.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/body-stopwords.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-language-packs.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-spellcorrector.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-auto-update.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-cli-command.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/click-tracking.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/common.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/contextual-help.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/excerpts-highlights.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.asset.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.js delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.js.map delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/indexing.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/interface.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/metabox_styles.css delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/network-options.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/pdf-upload.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/pinning.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/post-metabox.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/proximity.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/redirects.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/related.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/search-multi.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/search.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/spamblock.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/tabs/attachments-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/tabs/import-export-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/tabs/redirects-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/tabs/related-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/tabs/spamblock-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/tabs/support-tab.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/templates/relevanssi-related.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/premium/uninstall.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/readme.txt delete mode 100644 wp/wp-content/plugins/relevanssi-premium/relevanssi.php delete mode 100644 wp/wp-content/plugins/relevanssi-premium/relevanssi.po delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.cs_CZ delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.de_DE delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_CA delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_GB delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_US delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.es_ES delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fi delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fr_FR delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.it_IT delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.pl_PL delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.pt_BR delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.pt_PT delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.ru_RU delete mode 100644 wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.zh_TW delete mode 100644 wp/wp-content/plugins/relevanssi-premium/uninstall.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/README.txt delete mode 100644 wp/wp-content/plugins/search-filter-divi/includes/loader.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/includes/modules/SearchForm/SearchForm.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/includes/modules/SimpleHeader/SimpleHeader.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-extension.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-query.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/scripts/builder-bundle.min.js delete mode 100644 wp/wp-content/plugins/search-filter-divi/scripts/frontend-bundle.min.js delete mode 100644 wp/wp-content/plugins/search-filter-divi/scripts/search-filter-divi.js delete mode 100644 wp/wp-content/plugins/search-filter-divi/search-filter-divi-plugin-updater.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/search-filter-divi.php delete mode 100644 wp/wp-content/plugins/search-filter-divi/styles/style-dbp.min.css delete mode 100644 wp/wp-content/plugins/search-filter-divi/styles/style.min.css delete mode 100644 wp/wp-content/plugins/search-filter-pro/README.txt delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/css/admin.css delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/css/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/img/icon.png delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/img/move-ico.svg delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin-posts.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/assets/js/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/class-search-filter-admin.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/includes/EDD_SL_Plugin_Updater.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-admin-notices.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-post-data-validation.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-posts-admin.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-widgets-admin.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/includes/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-available-fields-metabox.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-cache.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-help.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-layout.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-license-settings.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-cache-metabox.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-metabox.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-settings-metabox.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-shortcode-metabox.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-settings.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-system-status.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-widgets.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin-woocommerce-fields-metabox.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/admin.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/author.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/category.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/meta-option.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-date.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/choice.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/date.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/number.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-type.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/posts-per-page.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/reset.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/search.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order-option.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/submit.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/tag.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/fields/taxonomy.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/admin/views/settings-metabox/meta-option.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-activator.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-deactivator.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-helper.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-register-widget.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-shared.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-third-party.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-wp-cache.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-wp-data.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/includes/third-party/class-search-filter-woocommerce.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/languages/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/languages/search-filter.pot delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/css/chosen-sprite.png delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/css/chosen-sprite@2x.png delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/css/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/css/search-filter.css delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/css/search-filter.min.css delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/img/ui-icons_ffffff_256x240.png delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/chosen.jquery.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/chosen.jquery.min.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ar.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/az.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/bg.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ca.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/cs.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/da.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/de.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/en.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/es.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/et.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/eu.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/fa.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/fi.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/fr.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/gl.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/he.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/hi.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/hr.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/hu.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/id.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/is.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/it.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ja.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ko.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/lt.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/lv.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/mk.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ms.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/nb.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/nl.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/pl.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/pt-BR.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/pt.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ro.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/ru.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/sk.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/sr-Cyrl.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/sr.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/sv.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/th.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/tr.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/uk.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/vi.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/zh-CN.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/i18n/zh-TW.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.min.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/select2.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/assets/js/select2.min.js delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/class-search-filter.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-active-query.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-author-object-walker.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-cache.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-config.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-display-results.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-display-shortcode.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-fields.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-generate-input.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-global.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-query.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/class-search-filter-taxonomy-object-walker.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/author.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/base.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/post_date.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/post_meta.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/post_meta_choice.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/post_meta_date.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/post_meta_number.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/post_type.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/posts_per_page.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/reset.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/search.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/sort_order.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/submit.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/fields/taxonomy.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/includes/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/views/index.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/public/views/public.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/search-filter-pro.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/templates/results-infinite-scroll.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/templates/results.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/uninstall.php delete mode 100644 wp/wp-content/plugins/search-filter-pro/wpml-config.xml delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/chunks/4894.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/chunks/4894.js.LICENSE.txt delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/ef66842cc5fb22e3c7ca.svg delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/downloads/edit-downloads-modal/images/downloads-custom-image.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/downloads/edit-downloads-modal/images/union-icon.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/downloads/media-library/index.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/downloads/media-library/media-library.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/downloads/media-library/types.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/images/place-holder/imgs/close-up.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/images/place-holder/imgs/front-side.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/images/place-holder/imgs/lifestyle-scene.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/images/place-holder/imgs/variants.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/images/place-holder/index.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/product-fields/images/place-holder/place-holder.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/wp-admin-scripts/shipping-settings-region-picker.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/assets/client/admin/wp-admin-scripts/shipping-settings-region-picker.js delete mode 100644 wp/wp-content/plugins/woocommerce/assets/images/icons/move-icon.svg delete mode 100644 wp/wp-content/plugins/woocommerce/includes/admin/helper/class-wc-helper-subscriptions-api.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/blocks-registration-manager/block-registration-strategy.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/blocks-registration-manager/blocks-registration-manager.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/blocks-registration-manager/blocks-with-restriction.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/blocks-registration-manager/index.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/blocks-registration-manager/template-change-detector.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/button/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/coupon/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/discount/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/cart-checkout/totals/footer-item/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/country-input/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/form-token-field/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/notice-banner/docs/docs.mdx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/notice-banner/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/price-slider/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/product-name/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/product-price/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/quantity-selector/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/read-more/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/snackbar-list/docs/docs.mdx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/snackbar-list/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/snackbar-list/stories/snackbar.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/tabs/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/price-filter/components/inspector.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/price-filter/components/price-slider.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/block.json delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/components/inspector.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/edit.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/frontend.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/preview.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/inner-blocks/stock-filter/types.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/test/utils.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/type.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/collection-filters/utils.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-collection/inner-blocks/no-results/block.json delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-collection/inner-blocks/no-results/edit.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-collection/inner-blocks/no-results/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-collection/inner-blocks/no-results/save.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-collection/inspector-controls/created-control.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-collection/inspector-controls/featured-products-control.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/product-gallery/settings.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/editor-components/error-placeholder/stories/error-message.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/editor-components/error-placeholder/stories/error-placeholder.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/editor-components/external-link-card/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/icons/docs/iconography.mdx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/icons/library/sparkles.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter-frontend.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter-frontend.js delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter-rtl.css delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter-style.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter-style.js.LICENSE.txt delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter.css delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter.js delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/collection-stock-filter/block.json delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/product-collection-no-results-style.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/product-collection-no-results.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/product-collection-no-results.js delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/product-collection-no-results/block.json delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/wc-interactivity-dropdown.asset.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/wc-interactivity-dropdown.js delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/checkout/components/checkbox-control/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/checkout/components/text-input/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/button/index.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/checkbox-list/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/form-step/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/formatted-monetary-amount/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/label/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/panel/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/panel/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/radio-control-accordion/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/radio-control/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/sort-select/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/sort-select/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/sort-select/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/spinner/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notice/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notices-container/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notices-container/snackbar-notices.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notices-container/store-notices.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notices-container/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notices-container/test/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/store-notices-container/types.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/stories/text-input.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/stories/validated-text-input.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/test/validated-text-input.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/text-input.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/types.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/text-input/validated-text-input.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/textarea/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/textarea/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/textarea/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/title/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/title/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/title/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals-wrapper/docs/docs.mdx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals-wrapper/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals-wrapper/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals-wrapper/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/fees/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/fees/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/index.js delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/item/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/item/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/item/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/subtotal/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/subtotal/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/taxes/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/totals/taxes/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/validation-input-error/index.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/validation-input-error/stories/index.stories.tsx delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/components/validation-input-error/style.scss delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/packages/interactivity-components/dropdown/index.ts delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/patterns/header-centered-pattern.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/patterns/related-products.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/CollectionStockFilter.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/ProductCollectionNoResults.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/InteractivityComponents/Dropdown.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AI/BusinessDescription.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AI/Images.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AI/Middleware.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AI/Patterns.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AI/Product.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/AI/Products.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AI/BusinessDescriptionSchema.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AI/ImagesSchema.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AI/PatternsSchema.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AI/ProductSchema.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/AI/ProductsSchema.php delete mode 100644 wp/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Utils/ProductCollectionUtils.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Admin/RemoteInboxNotifications/IsWooExpressRuleProcessor.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/File.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/FileController.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/FileV2/ListTable.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/LogHandlerFileV2.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Admin/Logging/PageController.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/LoggingServiceProvider.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/AbstractProductFormTemplate.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/Group.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/ProductBlock.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/ProductVariationTemplate.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/Section.php delete mode 100644 wp/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/SimpleProductTemplate.php delete mode 100644 wp/wp-content/plugins/wordfence/css/activity-report-widget.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/diff.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/fullLog.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/iptraf.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/jquery-ui-timepicker-addon.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/jquery-ui.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/jquery-ui.structure.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/jquery-ui.theme.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/care-global.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/care.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/free-global.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/free.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/premium-global.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/premium.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/response-global.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/response-variables.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/license/response.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/main.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/phpinfo.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-adminbar.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-colorbox.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-font-awesome.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-global.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-ionicons.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-onboarding.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wf-roboto-font.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wfselect2.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/css/wordfenceBox.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/js/admin.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/admin.ajaxWatcher.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/admin.liveTraffic.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/chart.umd.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/date.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/jquery-ui-timepicker-addon.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/jquery.colorbox-min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/jquery.colorbox.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/jquery.qrcode.min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/jquery.tmpl.min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/knockout-3.5.1.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfdashboard.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfdropdown.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfglobal.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfi18n.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfonboarding.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfpopover.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/js/wfselect2.min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/admin-global.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/admin.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/colorbox.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/embedded.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/font-awesome.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/ionicons.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.structure.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/jquery-ui.theme.min.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/login.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/css/woocommerce-account.1701191857.css delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/admin-global.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/admin.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/chart.umd.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.colorbox.min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.qrcode.min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/jquery.tmpl.min.1701191857.js delete mode 100644 wp/wp-content/plugins/wordfence/modules/login-security/js/login.1701191857.js delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/academy-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/academy-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/academy-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/academy-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/admin-global-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/admin-global-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/admin-global-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/admin-global-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/adminbar-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/adminbar-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/adminbar-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/adminbar-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/ai-generator-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/ai-generator-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/ai-generator-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/ai-generator-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/alerts-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/alerts-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/alerts-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/alerts-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/black-friday-banner-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/black-friday-banner-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/black-friday-banner-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/black-friday-banner-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/dashboard-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/dashboard-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/dashboard-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/dashboard-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/edit-page-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/edit-page-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/edit-page-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/edit-page-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/elementor-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/elementor-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/elementor-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/elementor-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/featured-image-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/featured-image-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/featured-image-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/featured-image-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/filter-explanation-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/filter-explanation-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/filter-explanation-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/filter-explanation-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/first-time-configuration-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/first-time-configuration-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/first-time-configuration-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/first-time-configuration-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/icons-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/icons-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/icons-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/icons-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/inside-editor-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/introductions-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/introductions-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/introductions-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/introductions-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/metabox-primary-category-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/modal-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/modal-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/modal-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/modal-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/monorepo-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/monorepo-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/monorepo-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/monorepo-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/new-settings-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/new-settings-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/new-settings-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/new-settings-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/notifications-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/notifications-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/notifications-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/notifications-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/score_icon-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/score_icon-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/score_icon-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/score_icon-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/structured-data-blocks-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/support-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/support-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/support-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/support-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tailwind-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tailwind-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tailwind-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tailwind-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/toggle-switch-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tooltips-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tooltips-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tooltips-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/tooltips-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/workouts-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/workouts-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/workouts-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/workouts-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/wpseo-dismissible-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yoast-extensions-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_plugin_tools-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-2160-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-2160.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-2170-rtl.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/css/dist/yst_seo_score-2170.css delete mode 100644 wp/wp-content/plugins/wordpress-seo/js/dist/externals/chart.js.js delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/third-party/wincher.php delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/deprecated/src/integrations/third-party/wordproof-integration-toggle.php delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/integrations/watchers/woocommerce-beta-editor-watcher.php delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/introductions/domain/invalid-user-id-exception.php delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/introductions/infrastructure/introductions-seen-repository.php delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/introductions/user-interface/introductions-seen-route.php delete mode 100644 wp/wp-content/plugins/wordpress-seo/src/presenters/admin/woocommerce-beta-editor-presenter.php delete mode 100644 wp/wp-content/plugins/wp-mail-smtp/assets/vue/img/gmail-sign-in-btn.svg delete mode 100644 wp/wp-content/plugins/wp-pagenavi/admin.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/core.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/pagenavi-css.css delete mode 100644 wp/wp-content/plugins/wp-pagenavi/readme.txt delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/AdminPage.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/BoxesPage.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Cron.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Forms.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Hooks.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Options.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/PostMetabox.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Table.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Util.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/Widget.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/composer.json delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/load-composer.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/scb/load.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/test.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/uninstall.php delete mode 100644 wp/wp-content/plugins/wp-pagenavi/wp-pagenavi.php delete mode 100644 wp/wp-content/uploads/wpcf7_uploads/.htaccess delete mode 100644 wp/wp-includes/blocks/navigation/view-modal.js delete mode 100644 wp/wp-includes/blocks/navigation/view-modal.min.js delete mode 100644 wp/wp-includes/navigation-fallback.php diff --git a/build/prod/deployment.tpl b/build/prod/deployment.tpl index e8d61ee4..3123309c 100644 --- a/build/prod/deployment.tpl +++ b/build/prod/deployment.tpl @@ -83,8 +83,8 @@ spec: timeoutSeconds: 10 resources: limits: - cpu: 500m - memory: 1024Mi + cpu: 1000m + memory: 3072Mi requests: cpu: 300m memory: 700Mi diff --git a/build/prod/web-default-conf-cm.yaml b/build/prod/web-default-conf-cm.yaml index 90802fc0..3e359bef 100644 --- a/build/prod/web-default-conf-cm.yaml +++ b/build/prod/web-default-conf-cm.yaml @@ -108,8 +108,7 @@ data: fastcgi_param SUBDOMAIN $subdomain; # $_SERVER["SUBDOMAIN"] include fastcgi_params; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -141,8 +140,7 @@ data: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 5m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -151,8 +149,7 @@ data: location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { proxy_set_header X-Forwarded-Proto $scheme; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; proxy_cache_background_update on; proxy_cache_lock on; @@ -228,8 +225,7 @@ data: fastcgi_param SUBDOMAIN www; # $_SERVER["SUBDOMAIN"] include fastcgi_params; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 5m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -261,8 +257,7 @@ data: fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SUBDOMAIN www; # $_SERVER["SUBDOMAIN"] fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -272,8 +267,7 @@ data: expires 7d; proxy_set_header X-Forwarded-Proto $scheme; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; proxy_cache_background_update on; proxy_cache_lock on; diff --git a/build/prod/web-hpa.yml b/build/prod/web-hpa.yml index 8a701a9e..88c0a7b3 100644 --- a/build/prod/web-hpa.yml +++ b/build/prod/web-hpa.yml @@ -8,6 +8,6 @@ spec: apiVersion: apps/v1 kind: Deployment name: medicalalert-web - minReplicas: 3 + minReplicas: 1 maxReplicas: 6 targetCPUUtilizationPercentage: 70 diff --git a/build/stage/deployment.tpl b/build/stage/deployment.tpl index e8d61ee4..50d2e584 100644 --- a/build/stage/deployment.tpl +++ b/build/stage/deployment.tpl @@ -9,7 +9,7 @@ metadata: namespace: medicalalert-web spec: progressDeadlineSeconds: 600 - replicas: 3 + replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: @@ -83,8 +83,8 @@ spec: timeoutSeconds: 10 resources: limits: - cpu: 500m - memory: 1024Mi + cpu: 1000m + memory: 3072Mi requests: cpu: 300m memory: 700Mi diff --git a/build/stage/web-default-conf-cm.yaml b/build/stage/web-default-conf-cm.yaml index a1722f99..7568640f 100644 --- a/build/stage/web-default-conf-cm.yaml +++ b/build/stage/web-default-conf-cm.yaml @@ -46,7 +46,7 @@ data: listen 80; listen [::]:80; - server_name ~^(?.+)\.stage-medicalalert\.com$; + server_name ~^(?.+)\.medicalalert\.com$; if ($http_x_forwarded_proto != 'https') { return 301 https://$host$request_uri; @@ -108,8 +108,7 @@ data: fastcgi_param SUBDOMAIN $subdomain; # $_SERVER["SUBDOMAIN"] include fastcgi_params; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -141,8 +140,7 @@ data: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 5m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -151,8 +149,7 @@ data: location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { proxy_set_header X-Forwarded-Proto $scheme; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; proxy_cache_background_update on; proxy_cache_lock on; @@ -228,8 +225,7 @@ data: fastcgi_param SUBDOMAIN www; # $_SERVER["SUBDOMAIN"] include fastcgi_params; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 5m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -261,8 +257,7 @@ data: fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SUBDOMAIN www; # $_SERVER["SUBDOMAIN"] fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; fastcgi_cache_bypass $no_cache; fastcgi_no_cache $no_cache; @@ -272,8 +267,7 @@ data: expires 7d; proxy_set_header X-Forwarded-Proto $scheme; fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 60m; - fastcgi_cache_valid 301 1h; + fastcgi_cache_valid 200 60m; fastcgi_cache_valid any 1m; proxy_cache_background_update on; proxy_cache_lock on; @@ -285,7 +279,6 @@ data: log_not_found off; deny all; } - location ~ ^/(status|ping)$ { access_log off; allow 127.0.0.1; diff --git a/build/stage/web-hpa.yml b/build/stage/web-hpa.yml index 8a701a9e..88c0a7b3 100644 --- a/build/stage/web-hpa.yml +++ b/build/stage/web-hpa.yml @@ -8,6 +8,6 @@ spec: apiVersion: apps/v1 kind: Deployment name: medicalalert-web - minReplicas: 3 + minReplicas: 1 maxReplicas: 6 targetCPUUtilizationPercentage: 70 diff --git a/release b/release index 7438e81a..b937b5fc 100644 --- a/release +++ b/release @@ -1 +1 @@ -RELEASE=release-1.06 \ No newline at end of file +RELEASE=release-1.09 \ No newline at end of file diff --git a/wp-config.php b/wp-config.php deleted file mode 100644 index 751931c0..00000000 --- a/wp-config.php +++ /dev/null @@ -1,70 +0,0 @@ -
-

+

Version %1$s addressed %2$s bug.', 'Version %1$s addressed %2$s bugs.', - 4 + 10 ), '6.4.1', '4' @@ -71,31 +71,6 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ); ?>

-

- Version %1$s addressed a security issue and fixed %2$s bug.', - 'Version %1$s addressed a security issue and fixed %2$s bugs.', - 7 - ), - '6.4.2', - '7' - ); - ?> - the release notes.' ), - sprintf( - /* translators: %s: WordPress version. */ - esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ), - sanitize_title( '6.4.2' ) - ) - ); - ?> -

@@ -297,7 +272,7 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

WordPress %2$s Field Guide. Learn about the changes in this release with detailed developer notes to help you build with WordPress.' ), __( 'https://make.wordpress.org/core/2023/10/23/wordpress-6-4-field-guide/' ), '6.4' diff --git a/wp/wp-admin/css/about-rtl.css b/wp/wp-admin/css/about-rtl.css index 1f2f828c..7de2eab5 100644 --- a/wp/wp-admin/css/about-rtl.css +++ b/wp/wp-admin/css/about-rtl.css @@ -535,8 +535,8 @@ position: relative; display: flex; flex-direction: column; - align-items: flex-start; - justify-content: flex-end; + align-items: start; + justify-content: end; box-sizing: border-box; padding: var(--gap) 0; height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem); @@ -1127,7 +1127,7 @@ } .about-wrap .is-vertically-aligned-top { - align-self: flex-start; + align-self: start; } .about-wrap .is-vertically-aligned-center { diff --git a/wp/wp-admin/css/about-rtl.min.css b/wp/wp-admin/css/about-rtl.min.css index e779df6b..1dbac49e 100644 --- a/wp/wp-admin/css/about-rtl.min.css +++ b/wp/wp-admin/css/about-rtl.min.css @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -.about__container{--background:#EAE9E7;--subtle-background:#EAE9E7;--text:#1e1e1e;--text-light:#fff;--accent-1:#C94C26;--accent-2:#CFCABE;--accent-3:#f0f0f1;--accent-4:#B1C5A4;--nav-background:#fff;--nav-border:transparent;--nav-color:var(--text);--nav-current:var(--accent-1);--gap:2rem}.about-php,.contribute-php,.credits-php,.freedoms-php,.privacy-php{background:#fff}.about-php #wpcontent,.contribute-php #wpcontent,.credits-php #wpcontent,.freedoms-php #wpcontent,.privacy-php #wpcontent{background:#fff;padding:0 24px}@media screen and (max-width:782px){.about-php.auto-fold #wpcontent,.contribute-php.auto-fold #wpcontent,.credits-php.auto-fold #wpcontent,.freedoms-php.auto-fold #wpcontent,.privacy-php.auto-fold #wpcontent{padding-right:24px}}.about__container{max-width:1000px;margin:24px auto;clear:both}.about__container .alignleft{float:right}.about__container .alignright{float:left}.about__container .aligncenter{text-align:center}.about__container .is-vertically-aligned-top{align-self:start}.about__container .is-vertically-aligned-center{align-self:center}.about__container .is-vertically-aligned-bottom{align-self:end}.about__section{background:0 0;clear:both}.about__container .has-accent-background-color{background-color:var(--accent-2)}.about__container .has-accent-4-background-color{background-color:var(--accent-4)}.about__container .has-transparent-background-color{background-color:transparent}.about__container .has-accent-color{color:var(--accent-2)}.about__container .has-border{border:3px solid currentColor}.about__container .has-subtle-background-color{background-color:var(--subtle-background)}.about__container .has-background-image{background-size:contain;background-repeat:no-repeat;background-position:center}.about__section{margin:0}.about__section .column:not(.is-edge-to-edge){padding:var(--gap)}.about__section+.about__section .is-section-header{padding-bottom:var(--gap)}.about__section .column.has-border:not(.is-edge-to-edge),.about__section .column[class*=background-color]:not(.is-edge-to-edge),.about__section:where([class*=background-color]) .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section .column p:first-of-type{margin-top:0}.about__section .column p:last-of-type{margin-bottom:0}.about__section .has-text-columns{columns:2;column-gap:calc(var(--gap) * 2)}.about__section .is-section-header{margin-bottom:0;padding:var(--gap) var(--gap) 0}.about__section .is-section-header p:last-child{margin-bottom:0}.about__section .is-section-header:first-child:last-child{padding:0}.about__section.is-feature{padding:var(--gap)}.about__section.is-feature p{margin:0}.about__section.is-feature p+p{margin-top:calc(var(--gap)/ 2)}.about__section.has-1-column{margin-right:auto;margin-left:auto;max-width:36em}.about__section.has-2-columns,.about__section.has-3-columns,.about__section.has-4-columns,.about__section.has-overlap-style{display:grid}.about__section.has-gutters{gap:var(--gap);margin-bottom:var(--gap)}.about__section.has-2-columns{grid-template-columns:1fr 1fr}.about__section.has-2-columns.is-wider-right{grid-template-columns:2fr 3fr}.about__section.has-2-columns.is-wider-left{grid-template-columns:3fr 2fr}.about__section .is-section-header{grid-column-start:1;grid-column-end:-1}.about__section.has-3-columns{grid-template-columns:repeat(3,1fr)}.about__section.has-4-columns{grid-template-columns:repeat(4,1fr)}.about__section.has-overlap-style{grid-template-columns:repeat(7,1fr)}.about__section.has-overlap-style .column{grid-row-start:1}.about__section.has-overlap-style .column:nth-of-type(odd){grid-column-start:2;grid-column-end:span 3}.about__section.has-overlap-style .column:nth-of-type(2n){grid-column-start:4;grid-column-end:span 3}.about__section.has-overlap-style .column.is-top-layer{z-index:1}@media screen and (max-width:782px){.about__section.has-2-columns.is-wider-left,.about__section.has-2-columns.is-wider-right,.about__section.has-3-columns{display:block;margin-bottom:calc(var(--gap)/ 2)}.about__section .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section.has-2-columns.has-gutters.is-wider-left,.about__section.has-2-columns.has-gutters.is-wider-right,.about__section.has-3-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column,.about__section.has-3-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child,.about__section.has-3-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-3-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns{grid-template-columns:repeat(2,1fr)}.about__section.has-overlap-style{grid-template-columns:1fr}.about__section.has-overlap-style .column.column{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:2}}@media screen and (max-width:600px){.about__section.has-2-columns{display:block;margin-bottom:var(--gap)}.about__section.has-2-columns:not(.has-gutters) .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-2-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child{margin-bottom:0}}@media screen and (max-width:480px){.about__section.is-feature .column{padding:0}.about__section.has-4-columns{display:block;padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column{margin-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-4-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}}.about__container{line-height:1.4;color:var(--text)}.about__container h1{padding:0}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{margin-top:0;margin-bottom:.5em;font-size:2rem;font-weight:700;line-height:1.16}.about__container h1.is-smaller-heading,.about__container h2.is-smaller-heading,.about__container h3{margin-top:0;font-size:1.625rem;font-weight:700;line-height:1.4}.about__container h3.is-smaller-heading,.about__container h4{margin-top:0;font-size:1.125rem;font-weight:600;line-height:1.6}.about__container p{font-size:inherit;line-height:inherit}.about__container p.is-subheading{margin-top:0;font-size:1.5rem;font-weight:300;line-height:160%}.about__section a{color:var(--text);text-decoration:underline}.about__section a:active,.about__section a:focus,.about__section a:hover{color:var(--text);text-decoration:none}.wp-credits-list a{text-decoration:none}.wp-credits-list a:active,.wp-credits-list a:focus,.wp-credits-list a:hover{text-decoration:underline}.about__container ul{list-style:disc;margin-right:calc(var(--gap)/ 2)}.about__container li{margin-bottom:.5rem}.about__container img{margin:0;max-width:100%;vertical-align:middle}.about__container .about__image{margin:0}.about__container .about__image img{max-width:100%;width:100%;height:auto}.about__container .about__image figcaption{margin-top:.5em;text-align:center}.about__container .about__image .wp-video{margin-right:auto;margin-left:auto}.about__container .about__image svg{vertical-align:middle}.about__container .about__image+h3{margin-top:1.5em}.about__container hr{margin:calc(var(--gap)/ 2) var(--gap);height:0;border:none;border-top:4px solid var(--accent-3)}.about__container hr.is-small{margin-top:0;margin-bottom:0}.about__container hr.is-large{margin:var(--gap) auto}.about__container .notice,.about__container div.error,.about__container div.updated{display:none!important}.about__section{font-size:1.125rem;line-height:1.55}.about__section.is-feature{font-size:1.6em}.about__section.has-3-columns,.about__section.has-4-columns{font-size:1rem}@media screen and (max-width:480px){.about__section.is-feature{font-size:1.4em}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{font-size:2em}}.about__header{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;box-sizing:border-box;padding:var(--gap) 0;height:clamp(12.5rem,-1.25rem + 36.67vw,26.25rem);color:var(--text-light);background-image:url('../images/about-header-about.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4');background-size:auto 70%,cover;border-radius:5px;background-repeat:no-repeat;background-position:left 7% center,top right;background-color:var(--background)}.credits-php .about__header{background-image:url('../images/about-header-credits.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.freedoms-php .about__header{background-image:url('../images/about-header-freedoms.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.privacy-php .about__header{background-image:url('../images/about-header-privacy.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.contribute-php .about__header{background-image:url('../images/about-header-contribute.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.about__header-image{margin:0 var(--gap) 3em}.about__header-title{box-sizing:border-box;margin:0 calc(var(--gap) + 2rem);padding:0;max-width:55%}.about__header-title h1{margin:0 0 1rem;padding:0;font-size:clamp(2rem, 20vw - 9rem, 4rem);line-height:1;font-weight:600}.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(2rem, 10vw - 3rem, 4rem)}.about__header-text{box-sizing:border-box;max-width:26em;margin:0 auto;padding:0;font-size:1.6rem;line-height:1.15;text-align:center}.about__header-navigation{position:relative;z-index:1;display:flex;justify-content:center;padding-top:0;margin-bottom:var(--gap);background:var(--nav-background);color:var(--nav-color);border-bottom:3px solid var(--nav-border)}.about__header-navigation .nav-tab{margin-right:0;padding:calc(var(--gap) * .75) var(--gap);float:none;font-size:1.4em;line-height:1;border-width:0 0 3px;border-style:solid;border-color:transparent;background:0 0;color:inherit}.about__header-navigation .nav-tab:active,.about__header-navigation .nav-tab:hover{background-color:var(--nav-current);color:var(--text-light)}.about__header-navigation .nav-tab-active{margin-bottom:-3px;color:var(--nav-current);border-width:0 0 6px;border-color:var(--nav-current)}.about__header-navigation .nav-tab-active:active,.about__header-navigation .nav-tab-active:hover{background-color:var(--nav-current);color:var(--text-light);border-color:var(--nav-current)}@media screen and (max-width:960px){.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(3rem, 6.67vw - .5rem, 4.5rem)}.about__header-navigation .nav-tab{padding:calc(var(--gap) * .75) calc(var(--gap) * .5)}}@media screen and (max-width:782px){.about__container .about__header-text{font-size:1.4em}.about__header-container{display:block}.about__header-image,.about__header-title{margin-right:calc(var(--gap)/ 2);margin-left:calc(var(--gap)/ 2)}.about__header-text{margin-top:0}.about__header-navigation .nav-tab{margin-top:0;margin-left:0;padding-right:calc(var(--gap)/ 2);padding-left:calc(var(--gap)/ 2)}}@media screen and (max-width:600px){.about__header{min-height:auto}.about__header,.contribute-php .about__header,.credits-php .about__header,.freedoms-php .about__header,.privacy-php .about__header{background-image:none}.about__header-title p{font-size:2.4em}.about__header-text{margin-right:calc(var(--gap)/ 2);margin-left:calc(var(--gap)/ 2)}.about__header-navigation{display:block}.about__header-navigation .nav-tab{display:block;margin-bottom:0;padding:calc(var(--gap)/ 2);border-right-width:6px;border-bottom:none}.about__header-navigation .nav-tab-active{border-bottom:none;border-right-width:6px}}.about__section .wp-people-group-title{margin-bottom:calc(var(--gap) * 2 - 10px);text-align:center}.about__section .wp-people-group{margin:0;display:flex;flex-wrap:wrap}.about__section .wp-person{display:inline-block;vertical-align:top;box-sizing:border-box;margin-bottom:calc(var(--gap) - 10px);width:25%;text-align:center}.about__section .compact .wp-person{height:auto;width:20%}.about__section .wp-person-avatar{display:block;margin:0 auto calc(var(--gap)/ 2);width:140px;height:140px;border-radius:100%;overflow:hidden}.about__section .wp-person .gravatar{width:140px;height:140px;filter:grayscale(100%)}.about__section .compact .wp-person .gravatar,.about__section .compact .wp-person-avatar{width:80px;height:80px}.about__section .wp-person .web{display:block;font-size:1.4em;font-weight:600;padding:10px 10px 0;text-decoration:none}.about__section .wp-person .web:hover{text-decoration:underline}.about__section .compact .wp-person .web{font-size:1.2em}.about__section .wp-person .title{display:block;margin-top:.5em}@media screen and (max-width:782px){.about__section .wp-person{width:33%}.about__section .compact .wp-person{width:25%}.about__section .wp-person .gravatar,.about__section .wp-person-avatar{width:120px;height:120px}}@media screen and (max-width:600px){.about__section .wp-person{width:50%}.about__section .compact .wp-person{width:33%}.about__section .wp-person .web{font-size:1.2em}}@media screen and (max-width:480px){.about__section .wp-person{min-width:100%}.about__section .wp-person .web{font-size:1em}.about__section .compact .wp-person .web{font-size:1em}}.about__section .column .freedom-image{margin-bottom:var(--gap);max-height:180px}.about__section .column .privacy-image{display:block;margin-right:auto;margin-left:auto;max-width:25rem}.about-wrap{position:relative;margin:25px 20px 0 40px;max-width:1050px;font-size:15px}.about-wrap.full-width-layout{max-width:1200px}.about-wrap-content{max-width:1050px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:3em 0 0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;width:100%;height:auto;vertical-align:middle}.about-wrap .inline-svg img{max-width:100%;width:auto;height:auto}.about-wrap video{margin:1.5em auto}.wp-badge{background:#0073aa url(../images/w-logo-white.png?ver=20160308) no-repeat;background-position:center 25px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;left:0}.about-wrap .nav-tab{padding-left:15px;padding-right:15px;font-size:18px;line-height:1.33333333}.about-wrap h1{margin:.2em 0 0 200px;padding:0;color:#32373c;line-height:1.2;font-size:2.8em;font-weight:400}.about-wrap h2{margin:40px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.about-wrap h4{font-size:16px;color:#23282d}.about-wrap p{line-height:1.5;font-size:16px}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap figcaption{font-size:13px;text-align:center;color:#fff;text-overflow:ellipsis}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6;font-size:19px}.about-wrap .about-text{margin:1em 0 1em 200px;color:#555d66}.about-wrap .has-1-columns,.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:grid;max-width:800px;margin-top:40px;margin-right:auto;margin-left:auto}.about-wrap .column{margin-left:20px;margin-right:20px}.about-wrap .is-wide{max-width:760px}.about-wrap .is-fullwidth{max-width:100%}.about-wrap .has-1-columns{display:block;max-width:680px;margin:0 auto 40px}.about-wrap .has-2-columns{grid-template-columns:1fr 1fr}.about-wrap .has-2-columns .column:nth-of-type(odd){grid-column-start:1}.about-wrap .has-2-columns .column:nth-of-type(2n){grid-column-start:2}.about-wrap .has-2-columns.is-wider-right{grid-template-columns:1fr 2fr}.about-wrap .has-2-columns.is-wider-left{grid-template-columns:2fr 1fr}.about-wrap .has-3-columns{grid-template-columns:repeat(3,1fr)}.about-wrap .has-3-columns .column:nth-of-type(3n+1){grid-column-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2){grid-column-start:2}.about-wrap .has-3-columns .column:nth-of-type(3n){grid-column-start:3}.about-wrap .has-4-columns{grid-template-columns:repeat(4,1fr)}.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1}.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:3}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:4}.about-wrap .column :first-child{margin-top:0}.about-wrap .aligncenter{text-align:center}.about-wrap .alignleft{float:right;margin-left:40px}.about-wrap .alignright{float:left;margin-right:40px}.about-wrap .is-vertically-aligned-top{align-self:flex-start}.about-wrap .is-vertically-aligned-center{align-self:center}.about-wrap .is-vertically-aligned-bottom{align-self:end}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog{margin-bottom:40px}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .changelog.feature-section .col{margin-top:40px}.about-wrap .lead-description{font-size:1.5em;text-align:center}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .headline-feature{margin:0 auto 40px;max-width:680px}.about-wrap .headline-feature h2{margin:50px 0 0}.about-wrap .headline-feature img{max-width:600px;width:100%}.about-wrap .return-to-dashboard{margin:30px -5px 0 0;font-size:14px;font-weight:600}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h2.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit;font-weight:600;text-align:right}.about-wrap .wp-people-group{padding:0 5px;margin:0 -5px 0 -15px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-left:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:right;margin:0 0 10px 10px;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:600}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}.freedoms-php .column .freedoms-image{background-image:url('../images/freedoms.png');background-size:100%;padding-top:100%}.freedoms-php .column:nth-of-type(2) .freedoms-image{background-position:100% 34%}.freedoms-php .column:nth-of-type(3) .freedoms-image{background-position:100% 66%}.freedoms-php .column:nth-of-type(4) .freedoms-image{background-position:100% 100%}@media screen and (max-width:782px){.about-wrap .has-3-columns,.about-wrap .has-4-columns{grid-template-columns:1fr 1fr}.about-wrap .has-3-columns .column:nth-of-type(3n+1),.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2),.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n),.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:1;grid-row-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:2;grid-row-start:2}}@media screen and (max-width:600px){.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:block}.about-wrap :not(.is-wider-right):not(.is-wider-left) .column{margin-left:0;margin-right:0}.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:grid}}@media only screen and (max-width:500px){.about-wrap{margin-left:20px;margin-right:10px}.about-wrap .about-text,.about-wrap h1{margin-left:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}}@media only screen and (max-width:480px){.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:block}.about-wrap .column{margin-left:0;margin-right:0}.about-wrap .has-2-columns.is-wider-left img,.about-wrap .has-2-columns.is-wider-right img{max-width:160px}} \ No newline at end of file +.about__container{--background:#EAE9E7;--subtle-background:#EAE9E7;--text:#1e1e1e;--text-light:#fff;--accent-1:#C94C26;--accent-2:#CFCABE;--accent-3:#f0f0f1;--accent-4:#B1C5A4;--nav-background:#fff;--nav-border:transparent;--nav-color:var(--text);--nav-current:var(--accent-1);--gap:2rem}.about-php,.contribute-php,.credits-php,.freedoms-php,.privacy-php{background:#fff}.about-php #wpcontent,.contribute-php #wpcontent,.credits-php #wpcontent,.freedoms-php #wpcontent,.privacy-php #wpcontent{background:#fff;padding:0 24px}@media screen and (max-width:782px){.about-php.auto-fold #wpcontent,.contribute-php.auto-fold #wpcontent,.credits-php.auto-fold #wpcontent,.freedoms-php.auto-fold #wpcontent,.privacy-php.auto-fold #wpcontent{padding-right:24px}}.about__container{max-width:1000px;margin:24px auto;clear:both}.about__container .alignleft{float:right}.about__container .alignright{float:left}.about__container .aligncenter{text-align:center}.about__container .is-vertically-aligned-top{align-self:start}.about__container .is-vertically-aligned-center{align-self:center}.about__container .is-vertically-aligned-bottom{align-self:end}.about__section{background:0 0;clear:both}.about__container .has-accent-background-color{background-color:var(--accent-2)}.about__container .has-accent-4-background-color{background-color:var(--accent-4)}.about__container .has-transparent-background-color{background-color:transparent}.about__container .has-accent-color{color:var(--accent-2)}.about__container .has-border{border:3px solid currentColor}.about__container .has-subtle-background-color{background-color:var(--subtle-background)}.about__container .has-background-image{background-size:contain;background-repeat:no-repeat;background-position:center}.about__section{margin:0}.about__section .column:not(.is-edge-to-edge){padding:var(--gap)}.about__section+.about__section .is-section-header{padding-bottom:var(--gap)}.about__section .column.has-border:not(.is-edge-to-edge),.about__section .column[class*=background-color]:not(.is-edge-to-edge),.about__section:where([class*=background-color]) .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section .column p:first-of-type{margin-top:0}.about__section .column p:last-of-type{margin-bottom:0}.about__section .has-text-columns{columns:2;column-gap:calc(var(--gap) * 2)}.about__section .is-section-header{margin-bottom:0;padding:var(--gap) var(--gap) 0}.about__section .is-section-header p:last-child{margin-bottom:0}.about__section .is-section-header:first-child:last-child{padding:0}.about__section.is-feature{padding:var(--gap)}.about__section.is-feature p{margin:0}.about__section.is-feature p+p{margin-top:calc(var(--gap)/ 2)}.about__section.has-1-column{margin-right:auto;margin-left:auto;max-width:36em}.about__section.has-2-columns,.about__section.has-3-columns,.about__section.has-4-columns,.about__section.has-overlap-style{display:grid}.about__section.has-gutters{gap:var(--gap);margin-bottom:var(--gap)}.about__section.has-2-columns{grid-template-columns:1fr 1fr}.about__section.has-2-columns.is-wider-right{grid-template-columns:2fr 3fr}.about__section.has-2-columns.is-wider-left{grid-template-columns:3fr 2fr}.about__section .is-section-header{grid-column-start:1;grid-column-end:-1}.about__section.has-3-columns{grid-template-columns:repeat(3,1fr)}.about__section.has-4-columns{grid-template-columns:repeat(4,1fr)}.about__section.has-overlap-style{grid-template-columns:repeat(7,1fr)}.about__section.has-overlap-style .column{grid-row-start:1}.about__section.has-overlap-style .column:nth-of-type(odd){grid-column-start:2;grid-column-end:span 3}.about__section.has-overlap-style .column:nth-of-type(2n){grid-column-start:4;grid-column-end:span 3}.about__section.has-overlap-style .column.is-top-layer{z-index:1}@media screen and (max-width:782px){.about__section.has-2-columns.is-wider-left,.about__section.has-2-columns.is-wider-right,.about__section.has-3-columns{display:block;margin-bottom:calc(var(--gap)/ 2)}.about__section .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section.has-2-columns.has-gutters.is-wider-left,.about__section.has-2-columns.has-gutters.is-wider-right,.about__section.has-3-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column,.about__section.has-3-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child,.about__section.has-3-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-3-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns{grid-template-columns:repeat(2,1fr)}.about__section.has-overlap-style{grid-template-columns:1fr}.about__section.has-overlap-style .column.column{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:2}}@media screen and (max-width:600px){.about__section.has-2-columns{display:block;margin-bottom:var(--gap)}.about__section.has-2-columns:not(.has-gutters) .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-2-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child{margin-bottom:0}}@media screen and (max-width:480px){.about__section.is-feature .column{padding:0}.about__section.has-4-columns{display:block;padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column{margin-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-4-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}}.about__container{line-height:1.4;color:var(--text)}.about__container h1{padding:0}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{margin-top:0;margin-bottom:.5em;font-size:2rem;font-weight:700;line-height:1.16}.about__container h1.is-smaller-heading,.about__container h2.is-smaller-heading,.about__container h3{margin-top:0;font-size:1.625rem;font-weight:700;line-height:1.4}.about__container h3.is-smaller-heading,.about__container h4{margin-top:0;font-size:1.125rem;font-weight:600;line-height:1.6}.about__container p{font-size:inherit;line-height:inherit}.about__container p.is-subheading{margin-top:0;font-size:1.5rem;font-weight:300;line-height:160%}.about__section a{color:var(--text);text-decoration:underline}.about__section a:active,.about__section a:focus,.about__section a:hover{color:var(--text);text-decoration:none}.wp-credits-list a{text-decoration:none}.wp-credits-list a:active,.wp-credits-list a:focus,.wp-credits-list a:hover{text-decoration:underline}.about__container ul{list-style:disc;margin-right:calc(var(--gap)/ 2)}.about__container li{margin-bottom:.5rem}.about__container img{margin:0;max-width:100%;vertical-align:middle}.about__container .about__image{margin:0}.about__container .about__image img{max-width:100%;width:100%;height:auto}.about__container .about__image figcaption{margin-top:.5em;text-align:center}.about__container .about__image .wp-video{margin-right:auto;margin-left:auto}.about__container .about__image svg{vertical-align:middle}.about__container .about__image+h3{margin-top:1.5em}.about__container hr{margin:calc(var(--gap)/ 2) var(--gap);height:0;border:none;border-top:4px solid var(--accent-3)}.about__container hr.is-small{margin-top:0;margin-bottom:0}.about__container hr.is-large{margin:var(--gap) auto}.about__container .notice,.about__container div.error,.about__container div.updated{display:none!important}.about__section{font-size:1.125rem;line-height:1.55}.about__section.is-feature{font-size:1.6em}.about__section.has-3-columns,.about__section.has-4-columns{font-size:1rem}@media screen and (max-width:480px){.about__section.is-feature{font-size:1.4em}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{font-size:2em}}.about__header{position:relative;display:flex;flex-direction:column;align-items:start;justify-content:end;box-sizing:border-box;padding:var(--gap) 0;height:clamp(12.5rem,-1.25rem + 36.67vw,26.25rem);color:var(--text-light);background-image:url('../images/about-header-about.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4');background-size:auto 70%,cover;border-radius:5px;background-repeat:no-repeat;background-position:left 7% center,top right;background-color:var(--background)}.credits-php .about__header{background-image:url('../images/about-header-credits.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.freedoms-php .about__header{background-image:url('../images/about-header-freedoms.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.privacy-php .about__header{background-image:url('../images/about-header-privacy.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.contribute-php .about__header{background-image:url('../images/about-header-contribute.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.about__header-image{margin:0 var(--gap) 3em}.about__header-title{box-sizing:border-box;margin:0 calc(var(--gap) + 2rem);padding:0;max-width:55%}.about__header-title h1{margin:0 0 1rem;padding:0;font-size:clamp(2rem, 20vw - 9rem, 4rem);line-height:1;font-weight:600}.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(2rem, 10vw - 3rem, 4rem)}.about__header-text{box-sizing:border-box;max-width:26em;margin:0 auto;padding:0;font-size:1.6rem;line-height:1.15;text-align:center}.about__header-navigation{position:relative;z-index:1;display:flex;justify-content:center;padding-top:0;margin-bottom:var(--gap);background:var(--nav-background);color:var(--nav-color);border-bottom:3px solid var(--nav-border)}.about__header-navigation .nav-tab{margin-right:0;padding:calc(var(--gap) * .75) var(--gap);float:none;font-size:1.4em;line-height:1;border-width:0 0 3px;border-style:solid;border-color:transparent;background:0 0;color:inherit}.about__header-navigation .nav-tab:active,.about__header-navigation .nav-tab:hover{background-color:var(--nav-current);color:var(--text-light)}.about__header-navigation .nav-tab-active{margin-bottom:-3px;color:var(--nav-current);border-width:0 0 6px;border-color:var(--nav-current)}.about__header-navigation .nav-tab-active:active,.about__header-navigation .nav-tab-active:hover{background-color:var(--nav-current);color:var(--text-light);border-color:var(--nav-current)}@media screen and (max-width:960px){.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(3rem, 6.67vw - .5rem, 4.5rem)}.about__header-navigation .nav-tab{padding:calc(var(--gap) * .75) calc(var(--gap) * .5)}}@media screen and (max-width:782px){.about__container .about__header-text{font-size:1.4em}.about__header-container{display:block}.about__header-image,.about__header-title{margin-right:calc(var(--gap)/ 2);margin-left:calc(var(--gap)/ 2)}.about__header-text{margin-top:0}.about__header-navigation .nav-tab{margin-top:0;margin-left:0;padding-right:calc(var(--gap)/ 2);padding-left:calc(var(--gap)/ 2)}}@media screen and (max-width:600px){.about__header{min-height:auto}.about__header,.contribute-php .about__header,.credits-php .about__header,.freedoms-php .about__header,.privacy-php .about__header{background-image:none}.about__header-title p{font-size:2.4em}.about__header-text{margin-right:calc(var(--gap)/ 2);margin-left:calc(var(--gap)/ 2)}.about__header-navigation{display:block}.about__header-navigation .nav-tab{display:block;margin-bottom:0;padding:calc(var(--gap)/ 2);border-right-width:6px;border-bottom:none}.about__header-navigation .nav-tab-active{border-bottom:none;border-right-width:6px}}.about__section .wp-people-group-title{margin-bottom:calc(var(--gap) * 2 - 10px);text-align:center}.about__section .wp-people-group{margin:0;display:flex;flex-wrap:wrap}.about__section .wp-person{display:inline-block;vertical-align:top;box-sizing:border-box;margin-bottom:calc(var(--gap) - 10px);width:25%;text-align:center}.about__section .compact .wp-person{height:auto;width:20%}.about__section .wp-person-avatar{display:block;margin:0 auto calc(var(--gap)/ 2);width:140px;height:140px;border-radius:100%;overflow:hidden}.about__section .wp-person .gravatar{width:140px;height:140px;filter:grayscale(100%)}.about__section .compact .wp-person .gravatar,.about__section .compact .wp-person-avatar{width:80px;height:80px}.about__section .wp-person .web{display:block;font-size:1.4em;font-weight:600;padding:10px 10px 0;text-decoration:none}.about__section .wp-person .web:hover{text-decoration:underline}.about__section .compact .wp-person .web{font-size:1.2em}.about__section .wp-person .title{display:block;margin-top:.5em}@media screen and (max-width:782px){.about__section .wp-person{width:33%}.about__section .compact .wp-person{width:25%}.about__section .wp-person .gravatar,.about__section .wp-person-avatar{width:120px;height:120px}}@media screen and (max-width:600px){.about__section .wp-person{width:50%}.about__section .compact .wp-person{width:33%}.about__section .wp-person .web{font-size:1.2em}}@media screen and (max-width:480px){.about__section .wp-person{min-width:100%}.about__section .wp-person .web{font-size:1em}.about__section .compact .wp-person .web{font-size:1em}}.about__section .column .freedom-image{margin-bottom:var(--gap);max-height:180px}.about__section .column .privacy-image{display:block;margin-right:auto;margin-left:auto;max-width:25rem}.about-wrap{position:relative;margin:25px 20px 0 40px;max-width:1050px;font-size:15px}.about-wrap.full-width-layout{max-width:1200px}.about-wrap-content{max-width:1050px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:3em 0 0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;width:100%;height:auto;vertical-align:middle}.about-wrap .inline-svg img{max-width:100%;width:auto;height:auto}.about-wrap video{margin:1.5em auto}.wp-badge{background:#0073aa url(../images/w-logo-white.png?ver=20160308) no-repeat;background-position:center 25px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;left:0}.about-wrap .nav-tab{padding-left:15px;padding-right:15px;font-size:18px;line-height:1.33333333}.about-wrap h1{margin:.2em 0 0 200px;padding:0;color:#32373c;line-height:1.2;font-size:2.8em;font-weight:400}.about-wrap h2{margin:40px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.about-wrap h4{font-size:16px;color:#23282d}.about-wrap p{line-height:1.5;font-size:16px}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap figcaption{font-size:13px;text-align:center;color:#fff;text-overflow:ellipsis}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6;font-size:19px}.about-wrap .about-text{margin:1em 0 1em 200px;color:#555d66}.about-wrap .has-1-columns,.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:grid;max-width:800px;margin-top:40px;margin-right:auto;margin-left:auto}.about-wrap .column{margin-left:20px;margin-right:20px}.about-wrap .is-wide{max-width:760px}.about-wrap .is-fullwidth{max-width:100%}.about-wrap .has-1-columns{display:block;max-width:680px;margin:0 auto 40px}.about-wrap .has-2-columns{grid-template-columns:1fr 1fr}.about-wrap .has-2-columns .column:nth-of-type(odd){grid-column-start:1}.about-wrap .has-2-columns .column:nth-of-type(2n){grid-column-start:2}.about-wrap .has-2-columns.is-wider-right{grid-template-columns:1fr 2fr}.about-wrap .has-2-columns.is-wider-left{grid-template-columns:2fr 1fr}.about-wrap .has-3-columns{grid-template-columns:repeat(3,1fr)}.about-wrap .has-3-columns .column:nth-of-type(3n+1){grid-column-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2){grid-column-start:2}.about-wrap .has-3-columns .column:nth-of-type(3n){grid-column-start:3}.about-wrap .has-4-columns{grid-template-columns:repeat(4,1fr)}.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1}.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:3}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:4}.about-wrap .column :first-child{margin-top:0}.about-wrap .aligncenter{text-align:center}.about-wrap .alignleft{float:right;margin-left:40px}.about-wrap .alignright{float:left;margin-right:40px}.about-wrap .is-vertically-aligned-top{align-self:start}.about-wrap .is-vertically-aligned-center{align-self:center}.about-wrap .is-vertically-aligned-bottom{align-self:end}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog{margin-bottom:40px}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .changelog.feature-section .col{margin-top:40px}.about-wrap .lead-description{font-size:1.5em;text-align:center}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .headline-feature{margin:0 auto 40px;max-width:680px}.about-wrap .headline-feature h2{margin:50px 0 0}.about-wrap .headline-feature img{max-width:600px;width:100%}.about-wrap .return-to-dashboard{margin:30px -5px 0 0;font-size:14px;font-weight:600}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h2.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit;font-weight:600;text-align:right}.about-wrap .wp-people-group{padding:0 5px;margin:0 -5px 0 -15px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-left:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:right;margin:0 0 10px 10px;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:600}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}.freedoms-php .column .freedoms-image{background-image:url('../images/freedoms.png');background-size:100%;padding-top:100%}.freedoms-php .column:nth-of-type(2) .freedoms-image{background-position:100% 34%}.freedoms-php .column:nth-of-type(3) .freedoms-image{background-position:100% 66%}.freedoms-php .column:nth-of-type(4) .freedoms-image{background-position:100% 100%}@media screen and (max-width:782px){.about-wrap .has-3-columns,.about-wrap .has-4-columns{grid-template-columns:1fr 1fr}.about-wrap .has-3-columns .column:nth-of-type(3n+1),.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2),.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n),.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:1;grid-row-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:2;grid-row-start:2}}@media screen and (max-width:600px){.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:block}.about-wrap :not(.is-wider-right):not(.is-wider-left) .column{margin-left:0;margin-right:0}.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:grid}}@media only screen and (max-width:500px){.about-wrap{margin-left:20px;margin-right:10px}.about-wrap .about-text,.about-wrap h1{margin-left:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}}@media only screen and (max-width:480px){.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:block}.about-wrap .column{margin-left:0;margin-right:0}.about-wrap .has-2-columns.is-wider-left img,.about-wrap .has-2-columns.is-wider-right img{max-width:160px}} \ No newline at end of file diff --git a/wp/wp-admin/css/about.css b/wp/wp-admin/css/about.css index 1cd4175d..ff140ac5 100644 --- a/wp/wp-admin/css/about.css +++ b/wp/wp-admin/css/about.css @@ -534,8 +534,8 @@ position: relative; display: flex; flex-direction: column; - align-items: flex-start; - justify-content: flex-end; + align-items: start; + justify-content: end; box-sizing: border-box; padding: var(--gap) 0; height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem); @@ -1126,7 +1126,7 @@ } .about-wrap .is-vertically-aligned-top { - align-self: flex-start; + align-self: start; } .about-wrap .is-vertically-aligned-center { diff --git a/wp/wp-admin/css/about.min.css b/wp/wp-admin/css/about.min.css index 1b307c0d..27882757 100644 --- a/wp/wp-admin/css/about.min.css +++ b/wp/wp-admin/css/about.min.css @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -.about__container{--background:#EAE9E7;--subtle-background:#EAE9E7;--text:#1e1e1e;--text-light:#fff;--accent-1:#C94C26;--accent-2:#CFCABE;--accent-3:#f0f0f1;--accent-4:#B1C5A4;--nav-background:#fff;--nav-border:transparent;--nav-color:var(--text);--nav-current:var(--accent-1);--gap:2rem}.about-php,.contribute-php,.credits-php,.freedoms-php,.privacy-php{background:#fff}.about-php #wpcontent,.contribute-php #wpcontent,.credits-php #wpcontent,.freedoms-php #wpcontent,.privacy-php #wpcontent{background:#fff;padding:0 24px}@media screen and (max-width:782px){.about-php.auto-fold #wpcontent,.contribute-php.auto-fold #wpcontent,.credits-php.auto-fold #wpcontent,.freedoms-php.auto-fold #wpcontent,.privacy-php.auto-fold #wpcontent{padding-left:24px}}.about__container{max-width:1000px;margin:24px auto;clear:both}.about__container .alignleft{float:left}.about__container .alignright{float:right}.about__container .aligncenter{text-align:center}.about__container .is-vertically-aligned-top{align-self:start}.about__container .is-vertically-aligned-center{align-self:center}.about__container .is-vertically-aligned-bottom{align-self:end}.about__section{background:0 0;clear:both}.about__container .has-accent-background-color{background-color:var(--accent-2)}.about__container .has-accent-4-background-color{background-color:var(--accent-4)}.about__container .has-transparent-background-color{background-color:transparent}.about__container .has-accent-color{color:var(--accent-2)}.about__container .has-border{border:3px solid currentColor}.about__container .has-subtle-background-color{background-color:var(--subtle-background)}.about__container .has-background-image{background-size:contain;background-repeat:no-repeat;background-position:center}.about__section{margin:0}.about__section .column:not(.is-edge-to-edge){padding:var(--gap)}.about__section+.about__section .is-section-header{padding-bottom:var(--gap)}.about__section .column.has-border:not(.is-edge-to-edge),.about__section .column[class*=background-color]:not(.is-edge-to-edge),.about__section:where([class*=background-color]) .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section .column p:first-of-type{margin-top:0}.about__section .column p:last-of-type{margin-bottom:0}.about__section .has-text-columns{columns:2;column-gap:calc(var(--gap) * 2)}.about__section .is-section-header{margin-bottom:0;padding:var(--gap) var(--gap) 0}.about__section .is-section-header p:last-child{margin-bottom:0}.about__section .is-section-header:first-child:last-child{padding:0}.about__section.is-feature{padding:var(--gap)}.about__section.is-feature p{margin:0}.about__section.is-feature p+p{margin-top:calc(var(--gap)/ 2)}.about__section.has-1-column{margin-left:auto;margin-right:auto;max-width:36em}.about__section.has-2-columns,.about__section.has-3-columns,.about__section.has-4-columns,.about__section.has-overlap-style{display:grid}.about__section.has-gutters{gap:var(--gap);margin-bottom:var(--gap)}.about__section.has-2-columns{grid-template-columns:1fr 1fr}.about__section.has-2-columns.is-wider-right{grid-template-columns:2fr 3fr}.about__section.has-2-columns.is-wider-left{grid-template-columns:3fr 2fr}.about__section .is-section-header{grid-column-start:1;grid-column-end:-1}.about__section.has-3-columns{grid-template-columns:repeat(3,1fr)}.about__section.has-4-columns{grid-template-columns:repeat(4,1fr)}.about__section.has-overlap-style{grid-template-columns:repeat(7,1fr)}.about__section.has-overlap-style .column{grid-row-start:1}.about__section.has-overlap-style .column:nth-of-type(odd){grid-column-start:2;grid-column-end:span 3}.about__section.has-overlap-style .column:nth-of-type(2n){grid-column-start:4;grid-column-end:span 3}.about__section.has-overlap-style .column.is-top-layer{z-index:1}@media screen and (max-width:782px){.about__section.has-2-columns.is-wider-left,.about__section.has-2-columns.is-wider-right,.about__section.has-3-columns{display:block;margin-bottom:calc(var(--gap)/ 2)}.about__section .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section.has-2-columns.has-gutters.is-wider-left,.about__section.has-2-columns.has-gutters.is-wider-right,.about__section.has-3-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column,.about__section.has-3-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child,.about__section.has-3-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-3-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns{grid-template-columns:repeat(2,1fr)}.about__section.has-overlap-style{grid-template-columns:1fr}.about__section.has-overlap-style .column.column{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:2}}@media screen and (max-width:600px){.about__section.has-2-columns{display:block;margin-bottom:var(--gap)}.about__section.has-2-columns:not(.has-gutters) .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-2-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child{margin-bottom:0}}@media screen and (max-width:480px){.about__section.is-feature .column{padding:0}.about__section.has-4-columns{display:block;padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column{margin-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-4-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}}.about__container{line-height:1.4;color:var(--text)}.about__container h1{padding:0}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{margin-top:0;margin-bottom:.5em;font-size:2rem;font-weight:700;line-height:1.16}.about__container h1.is-smaller-heading,.about__container h2.is-smaller-heading,.about__container h3{margin-top:0;font-size:1.625rem;font-weight:700;line-height:1.4}.about__container h3.is-smaller-heading,.about__container h4{margin-top:0;font-size:1.125rem;font-weight:600;line-height:1.6}.about__container p{font-size:inherit;line-height:inherit}.about__container p.is-subheading{margin-top:0;font-size:1.5rem;font-weight:300;line-height:160%}.about__section a{color:var(--text);text-decoration:underline}.about__section a:active,.about__section a:focus,.about__section a:hover{color:var(--text);text-decoration:none}.wp-credits-list a{text-decoration:none}.wp-credits-list a:active,.wp-credits-list a:focus,.wp-credits-list a:hover{text-decoration:underline}.about__container ul{list-style:disc;margin-left:calc(var(--gap)/ 2)}.about__container li{margin-bottom:.5rem}.about__container img{margin:0;max-width:100%;vertical-align:middle}.about__container .about__image{margin:0}.about__container .about__image img{max-width:100%;width:100%;height:auto}.about__container .about__image figcaption{margin-top:.5em;text-align:center}.about__container .about__image .wp-video{margin-left:auto;margin-right:auto}.about__container .about__image svg{vertical-align:middle}.about__container .about__image+h3{margin-top:1.5em}.about__container hr{margin:calc(var(--gap)/ 2) var(--gap);height:0;border:none;border-top:4px solid var(--accent-3)}.about__container hr.is-small{margin-top:0;margin-bottom:0}.about__container hr.is-large{margin:var(--gap) auto}.about__container .notice,.about__container div.error,.about__container div.updated{display:none!important}.about__section{font-size:1.125rem;line-height:1.55}.about__section.is-feature{font-size:1.6em}.about__section.has-3-columns,.about__section.has-4-columns{font-size:1rem}@media screen and (max-width:480px){.about__section.is-feature{font-size:1.4em}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{font-size:2em}}.about__header{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;box-sizing:border-box;padding:var(--gap) 0;height:clamp(12.5rem,-1.25rem + 36.67vw,26.25rem);color:var(--text-light);background-image:url('../images/about-header-about.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4');background-size:auto 70%,cover;border-radius:5px;background-repeat:no-repeat;background-position:right 7% center,top left;background-color:var(--background)}.credits-php .about__header{background-image:url('../images/about-header-credits.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.freedoms-php .about__header{background-image:url('../images/about-header-freedoms.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.privacy-php .about__header{background-image:url('../images/about-header-privacy.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.contribute-php .about__header{background-image:url('../images/about-header-contribute.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.about__header-image{margin:0 var(--gap) 3em}.about__header-title{box-sizing:border-box;margin:0 calc(var(--gap) + 2rem);padding:0;max-width:55%}.about__header-title h1{margin:0 0 1rem;padding:0;font-size:clamp(2rem, 20vw - 9rem, 4rem);line-height:1;font-weight:600}.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(2rem, 10vw - 3rem, 4rem)}.about__header-text{box-sizing:border-box;max-width:26em;margin:0 auto;padding:0;font-size:1.6rem;line-height:1.15;text-align:center}.about__header-navigation{position:relative;z-index:1;display:flex;justify-content:center;padding-top:0;margin-bottom:var(--gap);background:var(--nav-background);color:var(--nav-color);border-bottom:3px solid var(--nav-border)}.about__header-navigation .nav-tab{margin-left:0;padding:calc(var(--gap) * .75) var(--gap);float:none;font-size:1.4em;line-height:1;border-width:0 0 3px;border-style:solid;border-color:transparent;background:0 0;color:inherit}.about__header-navigation .nav-tab:active,.about__header-navigation .nav-tab:hover{background-color:var(--nav-current);color:var(--text-light)}.about__header-navigation .nav-tab-active{margin-bottom:-3px;color:var(--nav-current);border-width:0 0 6px;border-color:var(--nav-current)}.about__header-navigation .nav-tab-active:active,.about__header-navigation .nav-tab-active:hover{background-color:var(--nav-current);color:var(--text-light);border-color:var(--nav-current)}@media screen and (max-width:960px){.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(3rem, 6.67vw - .5rem, 4.5rem)}.about__header-navigation .nav-tab{padding:calc(var(--gap) * .75) calc(var(--gap) * .5)}}@media screen and (max-width:782px){.about__container .about__header-text{font-size:1.4em}.about__header-container{display:block}.about__header-image,.about__header-title{margin-left:calc(var(--gap)/ 2);margin-right:calc(var(--gap)/ 2)}.about__header-text{margin-top:0}.about__header-navigation .nav-tab{margin-top:0;margin-right:0;padding-left:calc(var(--gap)/ 2);padding-right:calc(var(--gap)/ 2)}}@media screen and (max-width:600px){.about__header{min-height:auto}.about__header,.contribute-php .about__header,.credits-php .about__header,.freedoms-php .about__header,.privacy-php .about__header{background-image:none}.about__header-title p{font-size:2.4em}.about__header-text{margin-left:calc(var(--gap)/ 2);margin-right:calc(var(--gap)/ 2)}.about__header-navigation{display:block}.about__header-navigation .nav-tab{display:block;margin-bottom:0;padding:calc(var(--gap)/ 2);border-left-width:6px;border-bottom:none}.about__header-navigation .nav-tab-active{border-bottom:none;border-left-width:6px}}.about__section .wp-people-group-title{margin-bottom:calc(var(--gap) * 2 - 10px);text-align:center}.about__section .wp-people-group{margin:0;display:flex;flex-wrap:wrap}.about__section .wp-person{display:inline-block;vertical-align:top;box-sizing:border-box;margin-bottom:calc(var(--gap) - 10px);width:25%;text-align:center}.about__section .compact .wp-person{height:auto;width:20%}.about__section .wp-person-avatar{display:block;margin:0 auto calc(var(--gap)/ 2);width:140px;height:140px;border-radius:100%;overflow:hidden}.about__section .wp-person .gravatar{width:140px;height:140px;filter:grayscale(100%)}.about__section .compact .wp-person .gravatar,.about__section .compact .wp-person-avatar{width:80px;height:80px}.about__section .wp-person .web{display:block;font-size:1.4em;font-weight:600;padding:10px 10px 0;text-decoration:none}.about__section .wp-person .web:hover{text-decoration:underline}.about__section .compact .wp-person .web{font-size:1.2em}.about__section .wp-person .title{display:block;margin-top:.5em}@media screen and (max-width:782px){.about__section .wp-person{width:33%}.about__section .compact .wp-person{width:25%}.about__section .wp-person .gravatar,.about__section .wp-person-avatar{width:120px;height:120px}}@media screen and (max-width:600px){.about__section .wp-person{width:50%}.about__section .compact .wp-person{width:33%}.about__section .wp-person .web{font-size:1.2em}}@media screen and (max-width:480px){.about__section .wp-person{min-width:100%}.about__section .wp-person .web{font-size:1em}.about__section .compact .wp-person .web{font-size:1em}}.about__section .column .freedom-image{margin-bottom:var(--gap);max-height:180px}.about__section .column .privacy-image{display:block;margin-left:auto;margin-right:auto;max-width:25rem}.about-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.about-wrap.full-width-layout{max-width:1200px}.about-wrap-content{max-width:1050px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:3em 0 0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;width:100%;height:auto;vertical-align:middle}.about-wrap .inline-svg img{max-width:100%;width:auto;height:auto}.about-wrap video{margin:1.5em auto}.wp-badge{background:#0073aa url(../images/w-logo-white.png?ver=20160308) no-repeat;background-position:center 25px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;right:0}.about-wrap .nav-tab{padding-right:15px;padding-left:15px;font-size:18px;line-height:1.33333333}.about-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2;font-size:2.8em;font-weight:400}.about-wrap h2{margin:40px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.about-wrap h4{font-size:16px;color:#23282d}.about-wrap p{line-height:1.5;font-size:16px}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap figcaption{font-size:13px;text-align:center;color:#fff;text-overflow:ellipsis}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6;font-size:19px}.about-wrap .about-text{margin:1em 200px 1em 0;color:#555d66}.about-wrap .has-1-columns,.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:grid;max-width:800px;margin-top:40px;margin-left:auto;margin-right:auto}.about-wrap .column{margin-right:20px;margin-left:20px}.about-wrap .is-wide{max-width:760px}.about-wrap .is-fullwidth{max-width:100%}.about-wrap .has-1-columns{display:block;max-width:680px;margin:0 auto 40px}.about-wrap .has-2-columns{grid-template-columns:1fr 1fr}.about-wrap .has-2-columns .column:nth-of-type(odd){grid-column-start:1}.about-wrap .has-2-columns .column:nth-of-type(2n){grid-column-start:2}.about-wrap .has-2-columns.is-wider-right{grid-template-columns:1fr 2fr}.about-wrap .has-2-columns.is-wider-left{grid-template-columns:2fr 1fr}.about-wrap .has-3-columns{grid-template-columns:repeat(3,1fr)}.about-wrap .has-3-columns .column:nth-of-type(3n+1){grid-column-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2){grid-column-start:2}.about-wrap .has-3-columns .column:nth-of-type(3n){grid-column-start:3}.about-wrap .has-4-columns{grid-template-columns:repeat(4,1fr)}.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1}.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:3}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:4}.about-wrap .column :first-child{margin-top:0}.about-wrap .aligncenter{text-align:center}.about-wrap .alignleft{float:left;margin-right:40px}.about-wrap .alignright{float:right;margin-left:40px}.about-wrap .is-vertically-aligned-top{align-self:flex-start}.about-wrap .is-vertically-aligned-center{align-self:center}.about-wrap .is-vertically-aligned-bottom{align-self:end}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog{margin-bottom:40px}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .changelog.feature-section .col{margin-top:40px}.about-wrap .lead-description{font-size:1.5em;text-align:center}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .headline-feature{margin:0 auto 40px;max-width:680px}.about-wrap .headline-feature h2{margin:50px 0 0}.about-wrap .headline-feature img{max-width:600px;width:100%}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:600}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h2.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit;font-weight:600;text-align:left}.about-wrap .wp-people-group{padding:0 5px;margin:0 -15px 0 -5px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-right:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:left;margin:0 10px 10px 0;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:600}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}.freedoms-php .column .freedoms-image{background-image:url('../images/freedoms.png');background-size:100%;padding-top:100%}.freedoms-php .column:nth-of-type(2) .freedoms-image{background-position:0 34%}.freedoms-php .column:nth-of-type(3) .freedoms-image{background-position:0 66%}.freedoms-php .column:nth-of-type(4) .freedoms-image{background-position:0 100%}@media screen and (max-width:782px){.about-wrap .has-3-columns,.about-wrap .has-4-columns{grid-template-columns:1fr 1fr}.about-wrap .has-3-columns .column:nth-of-type(3n+1),.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2),.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n),.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:1;grid-row-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:2;grid-row-start:2}}@media screen and (max-width:600px){.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:block}.about-wrap :not(.is-wider-right):not(.is-wider-left) .column{margin-right:0;margin-left:0}.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:grid}}@media only screen and (max-width:500px){.about-wrap{margin-right:20px;margin-left:10px}.about-wrap .about-text,.about-wrap h1{margin-right:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}}@media only screen and (max-width:480px){.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:block}.about-wrap .column{margin-right:0;margin-left:0}.about-wrap .has-2-columns.is-wider-left img,.about-wrap .has-2-columns.is-wider-right img{max-width:160px}} \ No newline at end of file +.about__container{--background:#EAE9E7;--subtle-background:#EAE9E7;--text:#1e1e1e;--text-light:#fff;--accent-1:#C94C26;--accent-2:#CFCABE;--accent-3:#f0f0f1;--accent-4:#B1C5A4;--nav-background:#fff;--nav-border:transparent;--nav-color:var(--text);--nav-current:var(--accent-1);--gap:2rem}.about-php,.contribute-php,.credits-php,.freedoms-php,.privacy-php{background:#fff}.about-php #wpcontent,.contribute-php #wpcontent,.credits-php #wpcontent,.freedoms-php #wpcontent,.privacy-php #wpcontent{background:#fff;padding:0 24px}@media screen and (max-width:782px){.about-php.auto-fold #wpcontent,.contribute-php.auto-fold #wpcontent,.credits-php.auto-fold #wpcontent,.freedoms-php.auto-fold #wpcontent,.privacy-php.auto-fold #wpcontent{padding-left:24px}}.about__container{max-width:1000px;margin:24px auto;clear:both}.about__container .alignleft{float:left}.about__container .alignright{float:right}.about__container .aligncenter{text-align:center}.about__container .is-vertically-aligned-top{align-self:start}.about__container .is-vertically-aligned-center{align-self:center}.about__container .is-vertically-aligned-bottom{align-self:end}.about__section{background:0 0;clear:both}.about__container .has-accent-background-color{background-color:var(--accent-2)}.about__container .has-accent-4-background-color{background-color:var(--accent-4)}.about__container .has-transparent-background-color{background-color:transparent}.about__container .has-accent-color{color:var(--accent-2)}.about__container .has-border{border:3px solid currentColor}.about__container .has-subtle-background-color{background-color:var(--subtle-background)}.about__container .has-background-image{background-size:contain;background-repeat:no-repeat;background-position:center}.about__section{margin:0}.about__section .column:not(.is-edge-to-edge){padding:var(--gap)}.about__section+.about__section .is-section-header{padding-bottom:var(--gap)}.about__section .column.has-border:not(.is-edge-to-edge),.about__section .column[class*=background-color]:not(.is-edge-to-edge),.about__section:where([class*=background-color]) .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section .column p:first-of-type{margin-top:0}.about__section .column p:last-of-type{margin-bottom:0}.about__section .has-text-columns{columns:2;column-gap:calc(var(--gap) * 2)}.about__section .is-section-header{margin-bottom:0;padding:var(--gap) var(--gap) 0}.about__section .is-section-header p:last-child{margin-bottom:0}.about__section .is-section-header:first-child:last-child{padding:0}.about__section.is-feature{padding:var(--gap)}.about__section.is-feature p{margin:0}.about__section.is-feature p+p{margin-top:calc(var(--gap)/ 2)}.about__section.has-1-column{margin-left:auto;margin-right:auto;max-width:36em}.about__section.has-2-columns,.about__section.has-3-columns,.about__section.has-4-columns,.about__section.has-overlap-style{display:grid}.about__section.has-gutters{gap:var(--gap);margin-bottom:var(--gap)}.about__section.has-2-columns{grid-template-columns:1fr 1fr}.about__section.has-2-columns.is-wider-right{grid-template-columns:2fr 3fr}.about__section.has-2-columns.is-wider-left{grid-template-columns:3fr 2fr}.about__section .is-section-header{grid-column-start:1;grid-column-end:-1}.about__section.has-3-columns{grid-template-columns:repeat(3,1fr)}.about__section.has-4-columns{grid-template-columns:repeat(4,1fr)}.about__section.has-overlap-style{grid-template-columns:repeat(7,1fr)}.about__section.has-overlap-style .column{grid-row-start:1}.about__section.has-overlap-style .column:nth-of-type(odd){grid-column-start:2;grid-column-end:span 3}.about__section.has-overlap-style .column:nth-of-type(2n){grid-column-start:4;grid-column-end:span 3}.about__section.has-overlap-style .column.is-top-layer{z-index:1}@media screen and (max-width:782px){.about__section.has-2-columns.is-wider-left,.about__section.has-2-columns.is-wider-right,.about__section.has-3-columns{display:block;margin-bottom:calc(var(--gap)/ 2)}.about__section .column:not(.is-edge-to-edge){padding-top:var(--gap);padding-bottom:var(--gap)}.about__section.has-2-columns.has-gutters.is-wider-left,.about__section.has-2-columns.has-gutters.is-wider-right,.about__section.has-3-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column,.about__section.has-3-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child,.about__section.has-3-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-3-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns{grid-template-columns:repeat(2,1fr)}.about__section.has-overlap-style{grid-template-columns:1fr}.about__section.has-overlap-style .column.column{grid-column-start:1;grid-column-end:2;grid-row-start:1;grid-row-end:2}}@media screen and (max-width:600px){.about__section.has-2-columns{display:block;margin-bottom:var(--gap)}.about__section.has-2-columns:not(.has-gutters) .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}.about__section.has-2-columns.has-gutters{margin-bottom:calc(var(--gap) * 2)}.about__section.has-2-columns.has-gutters .column{margin-bottom:var(--gap)}.about__section.has-2-columns.has-gutters .column:last-child{margin-bottom:0}}@media screen and (max-width:480px){.about__section.is-feature .column{padding:0}.about__section.has-4-columns{display:block;padding-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column{margin-bottom:calc(var(--gap)/ 2)}.about__section.has-4-columns.has-gutters .column:last-child{margin-bottom:0}.about__section.has-4-columns .column:nth-of-type(n){padding-top:calc(var(--gap)/ 2);padding-bottom:calc(var(--gap)/ 2)}}.about__container{line-height:1.4;color:var(--text)}.about__container h1{padding:0}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{margin-top:0;margin-bottom:.5em;font-size:2rem;font-weight:700;line-height:1.16}.about__container h1.is-smaller-heading,.about__container h2.is-smaller-heading,.about__container h3{margin-top:0;font-size:1.625rem;font-weight:700;line-height:1.4}.about__container h3.is-smaller-heading,.about__container h4{margin-top:0;font-size:1.125rem;font-weight:600;line-height:1.6}.about__container p{font-size:inherit;line-height:inherit}.about__container p.is-subheading{margin-top:0;font-size:1.5rem;font-weight:300;line-height:160%}.about__section a{color:var(--text);text-decoration:underline}.about__section a:active,.about__section a:focus,.about__section a:hover{color:var(--text);text-decoration:none}.wp-credits-list a{text-decoration:none}.wp-credits-list a:active,.wp-credits-list a:focus,.wp-credits-list a:hover{text-decoration:underline}.about__container ul{list-style:disc;margin-left:calc(var(--gap)/ 2)}.about__container li{margin-bottom:.5rem}.about__container img{margin:0;max-width:100%;vertical-align:middle}.about__container .about__image{margin:0}.about__container .about__image img{max-width:100%;width:100%;height:auto}.about__container .about__image figcaption{margin-top:.5em;text-align:center}.about__container .about__image .wp-video{margin-left:auto;margin-right:auto}.about__container .about__image svg{vertical-align:middle}.about__container .about__image+h3{margin-top:1.5em}.about__container hr{margin:calc(var(--gap)/ 2) var(--gap);height:0;border:none;border-top:4px solid var(--accent-3)}.about__container hr.is-small{margin-top:0;margin-bottom:0}.about__container hr.is-large{margin:var(--gap) auto}.about__container .notice,.about__container div.error,.about__container div.updated{display:none!important}.about__section{font-size:1.125rem;line-height:1.55}.about__section.is-feature{font-size:1.6em}.about__section.has-3-columns,.about__section.has-4-columns{font-size:1rem}@media screen and (max-width:480px){.about__section.is-feature{font-size:1.4em}.about__container h1,.about__container h2,.about__container h3.is-larger-heading{font-size:2em}}.about__header{position:relative;display:flex;flex-direction:column;align-items:start;justify-content:end;box-sizing:border-box;padding:var(--gap) 0;height:clamp(12.5rem,-1.25rem + 36.67vw,26.25rem);color:var(--text-light);background-image:url('../images/about-header-about.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4');background-size:auto 70%,cover;border-radius:5px;background-repeat:no-repeat;background-position:right 7% center,top left;background-color:var(--background)}.credits-php .about__header{background-image:url('../images/about-header-credits.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.freedoms-php .about__header{background-image:url('../images/about-header-freedoms.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.privacy-php .about__header{background-image:url('../images/about-header-privacy.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.contribute-php .about__header{background-image:url('../images/about-header-contribute.svg?ver=6.4'),url('../images/about-header-background.svg?ver=6.4')}.about__header-image{margin:0 var(--gap) 3em}.about__header-title{box-sizing:border-box;margin:0 calc(var(--gap) + 2rem);padding:0;max-width:55%}.about__header-title h1{margin:0 0 1rem;padding:0;font-size:clamp(2rem, 20vw - 9rem, 4rem);line-height:1;font-weight:600}.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(2rem, 10vw - 3rem, 4rem)}.about__header-text{box-sizing:border-box;max-width:26em;margin:0 auto;padding:0;font-size:1.6rem;line-height:1.15;text-align:center}.about__header-navigation{position:relative;z-index:1;display:flex;justify-content:center;padding-top:0;margin-bottom:var(--gap);background:var(--nav-background);color:var(--nav-color);border-bottom:3px solid var(--nav-border)}.about__header-navigation .nav-tab{margin-left:0;padding:calc(var(--gap) * .75) var(--gap);float:none;font-size:1.4em;line-height:1;border-width:0 0 3px;border-style:solid;border-color:transparent;background:0 0;color:inherit}.about__header-navigation .nav-tab:active,.about__header-navigation .nav-tab:hover{background-color:var(--nav-current);color:var(--text-light)}.about__header-navigation .nav-tab-active{margin-bottom:-3px;color:var(--nav-current);border-width:0 0 6px;border-color:var(--nav-current)}.about__header-navigation .nav-tab-active:active,.about__header-navigation .nav-tab-active:hover{background-color:var(--nav-current);color:var(--text-light);border-color:var(--nav-current)}@media screen and (max-width:960px){.about-php .about__header-title h1,.contribute-php .about__header-title h1,.credits-php .about__header-title h1,.freedoms-php .about__header-title h1,.privacy-php .about__header-title h1{font-size:clamp(3rem, 6.67vw - .5rem, 4.5rem)}.about__header-navigation .nav-tab{padding:calc(var(--gap) * .75) calc(var(--gap) * .5)}}@media screen and (max-width:782px){.about__container .about__header-text{font-size:1.4em}.about__header-container{display:block}.about__header-image,.about__header-title{margin-left:calc(var(--gap)/ 2);margin-right:calc(var(--gap)/ 2)}.about__header-text{margin-top:0}.about__header-navigation .nav-tab{margin-top:0;margin-right:0;padding-left:calc(var(--gap)/ 2);padding-right:calc(var(--gap)/ 2)}}@media screen and (max-width:600px){.about__header{min-height:auto}.about__header,.contribute-php .about__header,.credits-php .about__header,.freedoms-php .about__header,.privacy-php .about__header{background-image:none}.about__header-title p{font-size:2.4em}.about__header-text{margin-left:calc(var(--gap)/ 2);margin-right:calc(var(--gap)/ 2)}.about__header-navigation{display:block}.about__header-navigation .nav-tab{display:block;margin-bottom:0;padding:calc(var(--gap)/ 2);border-left-width:6px;border-bottom:none}.about__header-navigation .nav-tab-active{border-bottom:none;border-left-width:6px}}.about__section .wp-people-group-title{margin-bottom:calc(var(--gap) * 2 - 10px);text-align:center}.about__section .wp-people-group{margin:0;display:flex;flex-wrap:wrap}.about__section .wp-person{display:inline-block;vertical-align:top;box-sizing:border-box;margin-bottom:calc(var(--gap) - 10px);width:25%;text-align:center}.about__section .compact .wp-person{height:auto;width:20%}.about__section .wp-person-avatar{display:block;margin:0 auto calc(var(--gap)/ 2);width:140px;height:140px;border-radius:100%;overflow:hidden}.about__section .wp-person .gravatar{width:140px;height:140px;filter:grayscale(100%)}.about__section .compact .wp-person .gravatar,.about__section .compact .wp-person-avatar{width:80px;height:80px}.about__section .wp-person .web{display:block;font-size:1.4em;font-weight:600;padding:10px 10px 0;text-decoration:none}.about__section .wp-person .web:hover{text-decoration:underline}.about__section .compact .wp-person .web{font-size:1.2em}.about__section .wp-person .title{display:block;margin-top:.5em}@media screen and (max-width:782px){.about__section .wp-person{width:33%}.about__section .compact .wp-person{width:25%}.about__section .wp-person .gravatar,.about__section .wp-person-avatar{width:120px;height:120px}}@media screen and (max-width:600px){.about__section .wp-person{width:50%}.about__section .compact .wp-person{width:33%}.about__section .wp-person .web{font-size:1.2em}}@media screen and (max-width:480px){.about__section .wp-person{min-width:100%}.about__section .wp-person .web{font-size:1em}.about__section .compact .wp-person .web{font-size:1em}}.about__section .column .freedom-image{margin-bottom:var(--gap);max-height:180px}.about__section .column .privacy-image{display:block;margin-left:auto;margin-right:auto;max-width:25rem}.about-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.about-wrap.full-width-layout{max-width:1200px}.about-wrap-content{max-width:1050px}.about-wrap .notice,.about-wrap div.error,.about-wrap div.updated{display:none!important}.about-wrap hr{border:0;height:0;margin:3em 0 0;border-top:1px solid rgba(0,0,0,.1)}.about-wrap img{margin:0;width:100%;height:auto;vertical-align:middle}.about-wrap .inline-svg img{max-width:100%;width:auto;height:auto}.about-wrap video{margin:1.5em auto}.wp-badge{background:#0073aa url(../images/w-logo-white.png?ver=20160308) no-repeat;background-position:center 25px;background-size:80px 80px;color:#fff;font-size:14px;text-align:center;font-weight:600;margin:5px 0 0;padding-top:120px;height:40px;display:inline-block;width:140px;text-rendering:optimizeLegibility;box-shadow:0 1px 3px rgba(0,0,0,.2)}.svg .wp-badge{background-image:url(../images/wordpress-logo-white.svg?ver=20160308)}.about-wrap .wp-badge{position:absolute;top:0;right:0}.about-wrap .nav-tab{padding-right:15px;padding-left:15px;font-size:18px;line-height:1.33333333}.about-wrap h1{margin:.2em 200px 0 0;padding:0;color:#32373c;line-height:1.2;font-size:2.8em;font-weight:400}.about-wrap h2{margin:40px 0 .6em;font-size:2.7em;line-height:1.3;font-weight:300;text-align:center}.about-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.about-wrap h4{font-size:16px;color:#23282d}.about-wrap p{line-height:1.5;font-size:16px}.about-wrap code,.about-wrap ol li p{font-size:14px;font-weight:400}.about-wrap figcaption{font-size:13px;text-align:center;color:#fff;text-overflow:ellipsis}.about-wrap .about-description,.about-wrap .about-text{margin-top:1.4em;font-weight:400;line-height:1.6;font-size:19px}.about-wrap .about-text{margin:1em 200px 1em 0;color:#555d66}.about-wrap .has-1-columns,.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:grid;max-width:800px;margin-top:40px;margin-left:auto;margin-right:auto}.about-wrap .column{margin-right:20px;margin-left:20px}.about-wrap .is-wide{max-width:760px}.about-wrap .is-fullwidth{max-width:100%}.about-wrap .has-1-columns{display:block;max-width:680px;margin:0 auto 40px}.about-wrap .has-2-columns{grid-template-columns:1fr 1fr}.about-wrap .has-2-columns .column:nth-of-type(odd){grid-column-start:1}.about-wrap .has-2-columns .column:nth-of-type(2n){grid-column-start:2}.about-wrap .has-2-columns.is-wider-right{grid-template-columns:1fr 2fr}.about-wrap .has-2-columns.is-wider-left{grid-template-columns:2fr 1fr}.about-wrap .has-3-columns{grid-template-columns:repeat(3,1fr)}.about-wrap .has-3-columns .column:nth-of-type(3n+1){grid-column-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2){grid-column-start:2}.about-wrap .has-3-columns .column:nth-of-type(3n){grid-column-start:3}.about-wrap .has-4-columns{grid-template-columns:repeat(4,1fr)}.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1}.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:3}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:4}.about-wrap .column :first-child{margin-top:0}.about-wrap .aligncenter{text-align:center}.about-wrap .alignleft{float:left;margin-right:40px}.about-wrap .alignright{float:right;margin-left:40px}.about-wrap .is-vertically-aligned-top{align-self:start}.about-wrap .is-vertically-aligned-center{align-self:center}.about-wrap .is-vertically-aligned-bottom{align-self:end}.about-wrap .point-releases{margin-top:5px;border-bottom:1px solid #ddd}.about-wrap .changelog{margin-bottom:40px}.about-wrap .changelog.point-releases h3{padding-top:35px}.about-wrap .changelog.point-releases h3:first-child{padding-top:7px}.about-wrap .changelog.feature-section .col{margin-top:40px}.about-wrap .lead-description{font-size:1.5em;text-align:center}.about-wrap .feature-section p{margin-top:.6em}.about-wrap .headline-feature{margin:0 auto 40px;max-width:680px}.about-wrap .headline-feature h2{margin:50px 0 0}.about-wrap .headline-feature img{max-width:600px;width:100%}.about-wrap .return-to-dashboard{margin:30px 0 0 -5px;font-size:14px;font-weight:600}.about-wrap .return-to-dashboard a{text-decoration:none;padding:0 5px}.about-wrap h2.wp-people-group{margin:2.6em 0 1.33em;padding:0;font-size:16px;line-height:inherit;font-weight:600;text-align:left}.about-wrap .wp-people-group{padding:0 5px;margin:0 -15px 0 -5px}.about-wrap .compact{margin-bottom:0}.about-wrap .wp-person{display:inline-block;vertical-align:top;margin-right:10px;padding-bottom:15px;height:70px;width:280px}.about-wrap .compact .wp-person{height:auto;width:180px;padding-bottom:0;margin-bottom:0}.about-wrap .wp-person .gravatar{float:left;margin:0 10px 10px 0;padding:1px;width:60px;height:60px}.about-wrap .compact .wp-person .gravatar{width:30px;height:30px}.about-wrap .wp-person .web{margin:6px 0 2px;font-size:16px;font-weight:400;line-height:2;text-decoration:none}.about-wrap .wp-person .title{display:block}.about-wrap #wp-people-group-validators+p.wp-credits-list{margin-top:0}.about-wrap p.wp-credits-list a{white-space:nowrap}.freedoms-php .about-wrap ol{margin:40px 60px}.freedoms-php .about-wrap ol li{list-style-type:decimal;font-weight:600}.freedoms-php .about-wrap ol p{font-weight:400;margin:.6em 0}.freedoms-php .column .freedoms-image{background-image:url('../images/freedoms.png');background-size:100%;padding-top:100%}.freedoms-php .column:nth-of-type(2) .freedoms-image{background-position:0 34%}.freedoms-php .column:nth-of-type(3) .freedoms-image{background-position:0 66%}.freedoms-php .column:nth-of-type(4) .freedoms-image{background-position:0 100%}@media screen and (max-width:782px){.about-wrap .has-3-columns,.about-wrap .has-4-columns{grid-template-columns:1fr 1fr}.about-wrap .has-3-columns .column:nth-of-type(3n+1),.about-wrap .has-4-columns .column:nth-of-type(4n+1){grid-column-start:1;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n+2),.about-wrap .has-4-columns .column:nth-of-type(4n+2){grid-column-start:2;grid-row-start:1}.about-wrap .has-3-columns .column:nth-of-type(3n),.about-wrap .has-4-columns .column:nth-of-type(4n+3){grid-column-start:1;grid-row-start:2}.about-wrap .has-4-columns .column:nth-of-type(4n){grid-column-start:2;grid-row-start:2}}@media screen and (max-width:600px){.about-wrap .has-2-columns,.about-wrap .has-3-columns,.about-wrap .has-4-columns{display:block}.about-wrap :not(.is-wider-right):not(.is-wider-left) .column{margin-right:0;margin-left:0}.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:grid}}@media only screen and (max-width:500px){.about-wrap{margin-right:20px;margin-left:10px}.about-wrap .about-text,.about-wrap h1{margin-right:0}.about-wrap .about-text{margin-bottom:.25em}.about-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}}@media only screen and (max-width:480px){.about-wrap .has-2-columns.is-wider-left,.about-wrap .has-2-columns.is-wider-right{display:block}.about-wrap .column{margin-right:0;margin-left:0}.about-wrap .has-2-columns.is-wider-left img,.about-wrap .has-2-columns.is-wider-right img{max-width:160px}} \ No newline at end of file diff --git a/wp/wp-content/plugins/contact-form-7/includes/formatting.php b/wp/wp-content/plugins/contact-form-7/includes/formatting.php index ab89c44e..2627bca6 100644 --- a/wp/wp-content/plugins/contact-form-7/includes/formatting.php +++ b/wp/wp-content/plugins/contact-form-7/includes/formatting.php @@ -275,17 +275,6 @@ function wpcf7_sanitize_unit_tag( $tag ) { function wpcf7_antiscript_file_name( $filename ) { $filename = wp_basename( $filename ); - // Apply part of protection logic from sanitize_file_name(). - $filename = str_replace( - array( - '?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"', - '&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}', - '%', '+', '’', '«', '»', '”', '“', chr( 0 ) - ), - '', - $filename - ); - $filename = preg_replace( '/[\r\n\t -]+/', '-', $filename ); $filename = preg_replace( '/[\pC\pZ]+/iu', '', $filename ); diff --git a/wp/wp-content/plugins/contact-form-7/includes/swv/rules/file.php b/wp/wp-content/plugins/contact-form-7/includes/swv/rules/file.php index 67e2d834..bed20a3d 100644 --- a/wp/wp-content/plugins/contact-form-7/includes/swv/rules/file.php +++ b/wp/wp-content/plugins/contact-form-7/includes/swv/rules/file.php @@ -25,7 +25,7 @@ class WPCF7_SWV_FileRule extends WPCF7_SWV_Rule { $acceptable_filetypes = array(); foreach ( (array) $this->get_property( 'accept' ) as $accept ) { - if ( preg_match( '/^\.[a-z0-9]+$/i', $accept ) ) { + if ( false === strpos( $accept, '/' ) ) { $acceptable_filetypes[] = strtolower( $accept ); } else { foreach ( wpcf7_convert_mime_to_ext( $accept ) as $ext ) { diff --git a/wp/wp-content/plugins/contact-form-7/readme.txt b/wp/wp-content/plugins/contact-form-7/readme.txt index 406f438c..e3a9a791 100644 --- a/wp/wp-content/plugins/contact-form-7/readme.txt +++ b/wp/wp-content/plugins/contact-form-7/readme.txt @@ -5,7 +5,7 @@ Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, mult Requires at least: 6.2 Requires PHP: 7.4 Tested up to: 6.4 -Stable tag: 5.8.4 +Stable tag: 5.8.3 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -78,10 +78,6 @@ Do you have questions or issues with Contact Form 7? Use these support channels For more information, see [Releases](https://contactform7.com/category/releases/). -= 5.8.4 = - -[https://contactform7.com/contact-form-7-584/](https://contactform7.com/contact-form-7-584/) - = 5.8.3 = [https://contactform7.com/contact-form-7-583/](https://contactform7.com/contact-form-7-583/) diff --git a/wp/wp-content/plugins/contact-form-7/wp-contact-form-7.php b/wp/wp-content/plugins/contact-form-7/wp-contact-form-7.php index c83b432f..eff38121 100644 --- a/wp/wp-content/plugins/contact-form-7/wp-contact-form-7.php +++ b/wp/wp-content/plugins/contact-form-7/wp-contact-form-7.php @@ -7,12 +7,12 @@ * Author URI: https://ideasilo.wordpress.com/ * License: GPL v2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html - * Version: 5.8.4 + * Version: 5.8.3 * Requires at least: 6.2 * Requires PHP: 7.4 */ -define( 'WPCF7_VERSION', '5.8.4' ); +define( 'WPCF7_VERSION', '5.8.3' ); define( 'WPCF7_REQUIRED_WP_VERSION', '6.2' ); diff --git a/wp/wp-content/plugins/divifilter/df-script.js b/wp/wp-content/plugins/divifilter/df-script.js deleted file mode 100644 index b8fdc26c..00000000 --- a/wp/wp-content/plugins/divifilter/df-script.js +++ /dev/null @@ -1 +0,0 @@ -var _0x8745dd=_0x49ab;(function(_0x2aaa01,_0x47478d){var _0xaada14=_0x49ab,_0x3db5d8=_0x2aaa01();while(!![]){try{var _0x48da6c=parseInt(_0xaada14(0xb3))/0x1+parseInt(_0xaada14(0x104))/0x2+-parseInt(_0xaada14(0xf4))/0x3*(-parseInt(_0xaada14(0xf8))/0x4)+parseInt(_0xaada14(0xf2))/0x5+parseInt(_0xaada14(0x115))/0x6+parseInt(_0xaada14(0xf5))/0x7+-parseInt(_0xaada14(0xf3))/0x8;if(_0x48da6c===_0x47478d)break;else _0x3db5d8['push'](_0x3db5d8['shift']());}catch(_0x2a2ae4){_0x3db5d8['push'](_0x3db5d8['shift']());}}}(_0x15b8,0xdf862));class dfElement{constructor(_0x37fee3,_0x45ef03,_0x2381b6){var _0xb2647a=_0x49ab;this[_0xb2647a(0xc0)]=_0x37fee3,this[_0xb2647a(0xea)]=_0x45ef03,this[_0xb2647a(0xb4)]=_0x2381b6;}}class dfFilterArea{constructor(_0x4de77a,_0x4a9083,_0x44fa91,_0x141f32,_0x100eb8,_0x35b5fc){var _0x25780e=_0x49ab;this[_0x25780e(0xba)]=_0x4de77a,this[_0x25780e(0xdd)]=_0x4a9083,this[_0x25780e(0xee)]=_0x44fa91,this[_0x25780e(0x112)]=_0x141f32,this[_0x25780e(0xbd)]=_0x100eb8,this[_0x25780e(0xeb)]=_0x35b5fc,this[_0x25780e(0xe7)]=[];}}function _0x49ab(_0x15b03e,_0x50b21c){var _0x15b83f=_0x15b8();return _0x49ab=function(_0x49ab86,_0x4cb3c7){_0x49ab86=_0x49ab86-0xae;var _0x358b9d=_0x15b83f[_0x49ab86];if(_0x49ab['rrSQWu']===undefined){var _0x1b0cc3=function(_0x37fee3){var _0x45ef03='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2381b6='',_0x4de77a='';for(var _0x4a9083=0x0,_0x44fa91,_0x141f32,_0x100eb8=0x0;_0x141f32=_0x37fee3['charAt'](_0x100eb8++);~_0x141f32&&(_0x44fa91=_0x4a9083%0x4?_0x44fa91*0x40+_0x141f32:_0x141f32,_0x4a9083++%0x4)?_0x2381b6+=String['fromCharCode'](0xff&_0x44fa91>>(-0x2*_0x4a9083&0x6)):0x0){_0x141f32=_0x45ef03['indexOf'](_0x141f32);}for(var _0x35b5fc=0x0,_0x186601=_0x2381b6['length'];_0x35b5fc<_0x186601;_0x35b5fc++){_0x4de77a+='%'+('00'+_0x2381b6['charCodeAt'](_0x35b5fc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4de77a);};_0x49ab['xjNChH']=_0x1b0cc3,_0x15b03e=arguments,_0x49ab['rrSQWu']=!![];}var _0x22f2f0=_0x15b83f[0x0],_0x5405ab=_0x49ab86+_0x22f2f0,_0x14034b=_0x15b03e[_0x5405ab];return!_0x14034b?(_0x358b9d=_0x49ab['xjNChH'](_0x358b9d),_0x15b03e[_0x5405ab]=_0x358b9d):_0x358b9d=_0x14034b,_0x358b9d;},_0x49ab(_0x15b03e,_0x50b21c);}var dfAllFilters=[];const elementIndexString=_0x8745dd(0xd7);var filterElementType=_0x8745dd(0xb9),selectorElementType='',filterNumber,filterNumberSelector='',multiSelectMode=![],cutSetMode=![],postTypeFiltering=![],dvKV;function getFilterData(_0x186601){var _0x3b0307=_0x8745dd;filterNumber=getFilterNumber(_0x186601);filterNumber==null?(filterNumber=0x1,filterNumberSelector='\x20'):filterNumberSelector=_0x3b0307(0xed)+filterNumber;var _0x1b41c0=![];dfAllFilters[filterNumber]!==undefined&&(_0x1b41c0=!![]);if(_0x1b41c0)selectorElementType=dfAllFilters[filterNumber][_0x3b0307(0xba)],filterElementType=dfAllFilters[filterNumber][_0x3b0307(0xdd)],multiSelectMode=dfAllFilters[filterNumber][_0x3b0307(0xee)],postTypeFiltering=dfAllFilters[filterNumber][_0x3b0307(0x112)],cutSetMode=dfAllFilters[filterNumber][_0x3b0307(0xbd)];else{if(jQuery('.df-area'+filterNumberSelector)[_0x3b0307(0xd6)](_0x3b0307(0x100))&&dvKV){selectorElementType=_0x3b0307(0xe2)+filterNumberSelector+_0x3b0307(0xfe),filterElementType=_0x3b0307(0xc7);if(jQuery('.df-area'+filterNumberSelector)[_0x3b0307(0xd6)](_0x3b0307(0xda)))selectorElementType=_0x3b0307(0xe2)+filterNumberSelector+_0x3b0307(0xc4);}else{if(jQuery(_0x3b0307(0xe2)+filterNumberSelector)[_0x3b0307(0xd6)](_0x3b0307(0xda))&&dvKV)selectorElementType='.df-area'+filterNumberSelector+_0x3b0307(0xcc),filterElementType=_0x3b0307(0xdf);else{if(jQuery(_0x3b0307(0xe2)+filterNumberSelector)[_0x3b0307(0xd6)](_0x3b0307(0x109))){if(jQuery('.df-area'+filterNumberSelector+_0x3b0307(0xbe))[_0x3b0307(0xd6)](_0x3b0307(0xdc))||jQuery('.df-area'+filterNumberSelector+'\x20.et_pb_module')[_0x3b0307(0xd6)]('et_pb_blog_grid_wrapper')){selectorElementType=_0x3b0307(0xe2)+filterNumberSelector+'>\x20.et_pb_row:not(.df-buttons)\x20article',filterElementType=_0x3b0307(0xb7);if(jQuery('.df-area'+filterNumberSelector+_0x3b0307(0xbe))[_0x3b0307(0xd6)](_0x3b0307(0xfc)))filterElementType='blogGrid';}else selectorElementType=_0x3b0307(0xe2)+filterNumberSelector+_0x3b0307(0x10d),filterElementType=_0x3b0307(0xb0);}else dvKV?(selectorElementType=_0x3b0307(0xe2)+filterNumberSelector+_0x3b0307(0x107),filterElementType=_0x3b0307(0xb9)):(selectorElementType=_0x3b0307(0x110),filterElementType=_0x3b0307(0xb9));}}jQuery('.df-area'+filterNumberSelector)[_0x3b0307(0xd6)]('df-multi')&&dvKV?multiSelectMode=!![]:multiSelectMode=![];if(jQuery(_0x3b0307(0xe2)+filterNumberSelector)[_0x3b0307(0xd6)](_0x3b0307(0x109))){postTypeFiltering=_0x3b0307(0xd4);if(jQuery('.df-area'+filterNumberSelector+'\x20.et_pb_module')[_0x3b0307(0xd6)](_0x3b0307(0xdc))||jQuery(_0x3b0307(0xe2)+filterNumberSelector+_0x3b0307(0xbe))[_0x3b0307(0xd6)](_0x3b0307(0xfc)))postTypeFiltering=_0x3b0307(0xb7);}else postTypeFiltering=![];jQuery('.df-area'+filterNumberSelector)[_0x3b0307(0xd6)](_0x3b0307(0xf0))&&dvKV?cutSetMode=!![]:cutSetMode=![];}}function getAndRemoveClassNames(_0x4cb0ff){var _0x5af9fb=_0x8745dd,_0x1c3a1c=_0x4cb0ff[_0x5af9fb(0xb6)](_0x5af9fb(0xbc))[_0x5af9fb(0xaf)](/\s+/);return classListFiltered=jQuery[_0x5af9fb(0x10c)](_0x1c3a1c,function(_0x3e4013,_0x37eb03){var _0x48cd99=_0x5af9fb,_0x4c1b96=0x0;_0x3e4013[_0x48cd99(0xc3)]('et')!==0x0&&_0x3e4013[_0x48cd99(0xc3)](_0x48cd99(0xc5))!==0x0&&(_0x4cb0ff[_0x48cd99(0xf7)](_0x3e4013),_0x4c1b96=0x1);if(_0x3e4013[_0x48cd99(0xc3)](_0x48cd99(0xcf)+filterElementType+'_')==0x0){if(filterElementType===_0x48cd99(0xb9)&&!(_0x3e4013[_0x48cd99(0xb1)](0xe)==='_')&&!(_0x3e4013[_0x48cd99(0xb1)](0xf)==='_')&&!(_0x3e4013['charAt'](0x10)==='_'))_0x4cb0ff[_0x48cd99(0xf7)](_0x3e4013),_0x4c1b96=0x1;else filterElementType===_0x48cd99(0xdf)&&!(_0x3e4013[_0x48cd99(0xb1)](0xb)==='_')&&!(_0x3e4013['charAt'](0xc)==='_')&&!(_0x3e4013[_0x48cd99(0xb1)](0xd)==='_')&&(_0x4cb0ff['removeClass'](_0x3e4013),_0x4c1b96=0x1);}return _0x4c1b96;}),classListFiltered;}function getAndRemoveElementIndex(_0x36a207){var _0x1fb5ca=_0x8745dd,_0x3fb6a0=_0x36a207[_0x1fb5ca(0xb6)](_0x1fb5ca(0xbc))['split'](/\s+/),_0x1f959f=jQuery['grep'](_0x3fb6a0,function(_0x5e4859,_0x2b79c6){var _0x47a366=_0x1fb5ca;return _0x5e4859[_0x47a366(0xc3)]('df-elementindex-')===0x0;}),_0xf52d9b;if(_0x1f959f['length']==0x1){var _0x4e3b27=_0x1f959f[0x0]['substring'](0x10);_0xf52d9b=parseInt(_0x4e3b27),_0x36a207[_0x1fb5ca(0xf7)](_0x1f959f[0x0]);}else{if(_0x1f959f['length']==0x0)_0xf52d9b=-0x1;else console[_0x1fb5ca(0x101)](_0x1fb5ca(0xec));}return _0xf52d9b;}function getFilterClassesOfButton(_0x216c76,_0x5adb17){var _0x1a0027=_0x8745dd,_0x290f17=_0x216c76[_0x1a0027(0xb6)]('class')['split'](/\s+/);_0x290f17=jQuery['grep'](_0x290f17,function(_0x2cccdc){var _0x598209=_0x1a0027;return _0x2cccdc[_0x598209(0xc3)](_0x598209(0xc8))===0x0;});let _0x464500=jQuery[_0x1a0027(0x10c)](_0x290f17,function(_0x42d143){var _0x2f4eb5=_0x1a0027;return _0x42d143[_0x2f4eb5(0xc3)](_0x2f4eb5(0x114))===-0x1;});if(_0x5adb17)for(let _0x191acf=0x0;_0x191acf<_0x464500['length'];_0x191acf++){if(_0x5adb17==_0x1a0027(0xb7))_0x464500[_0x191acf]=_0x464500[_0x191acf][_0x1a0027(0xff)]('dfc-',_0x1a0027(0xc2));if(_0x5adb17==_0x1a0027(0xd4))_0x464500[_0x191acf]=_0x464500[_0x191acf][_0x1a0027(0xff)](_0x1a0027(0xc8),_0x1a0027(0x10a));}return _0x464500;}function getFilterNumber(_0x1f4503){var _0x112be6=_0x8745dd,_0x53396a=null,_0x15f66a;if(_0x1f4503[_0x112be6(0xd6)]('df-button'))var _0x15f66a=_0x1f4503[_0x112be6(0xf6)](_0x112be6(0xd2))['attr'](_0x112be6(0xbc));else var _0x15f66a=_0x1f4503['attr'](_0x112be6(0xbc));if(_0x15f66a!==undefined){var _0x4de1f1=_0x15f66a['split'](/\s+/);classListFiltered=jQuery['each'](_0x4de1f1,function(_0x492e20,_0x2394e9){var _0x125992=_0x112be6;if(_0x2394e9[_0x125992(0xc3)](_0x125992(0x108))==0x0){var _0x46eb89=_0x2394e9[_0x125992(0xf9)](0x4);_0x53396a=parseInt(_0x46eb89,0xa);}});}return _0x53396a;}function _0x15b8(){var _0x5b9eaf=['Dg9tDhjPBMC','zgyTyNv0Dg9U','mZi3ndC4ogfnq0D2zq','C29YDa','Aw5bCNjHEq','BwfW','C3bSAxq','Cg9ZDa','y2HHCKf0','pIaUzxrFCgjFCM93oM5VDcGUzgyTyNv0Dg9UCYKGlMv0x3bIx3nHBhzHDhrVCMvFy29UDgvUDcaUy29SDw1UoMvXka','oda3nZKZzNnZywnf','y2XHC3nmAxn0','lMv0x3bIx3jVD19PBM5LCJPUB3qOlMrMlwj1DhrVBNmP','yxr0CG','yMXVzW','lMv0x3bIx3jVD19PBM5LCJPUB3qOlMrMlwj1DhrVBNmPid4GlMv0x3bIx2nVBhvTBJPUB3qOlMrMlwj1DhrVBNmP','y29SDw1U','C2vSzwn0B3jfBgvTzw50vhLWzq','pIaUzxrFCgjFCM93oM5VDcGUzgyTyNv0Dg9UCYKGyxj0AwnSzq','y2XHC3m','y3v0u2v0tw9Kzq','ic5LDf9WyL9TB2r1Bgu','zgyTzwXLBwvUDgLUzgv4lq','Bw9KDwXLugfYDhm','pIaUzxrFCgjFCM93oM5VDcGUzgyTyNv0Dg9UCYK','y2f0zwDVCNKT','Aw5KzxHpzG','ic5LDf9WyL9YB3DFAw5Uzxi6BM90kc5KzI1IDxr0B25Zkq','zgzZlq','Bg9JyxrPB24','C3bLy2LHBhr5','zgzJlq','y2HPBgrYzw4','C2vHCMnO','zgv0ywnO','id4GlMv0x3bIx3jVDZPUB3qOlMrMlwj1DhrVBNmP','CxvLCNLtzwXLy3rVCKfSBa','CMvTB3zL','zxrFCgjF','B2zMC2v0v2LKDgG','Ahr0Chm6lY9Kyw5PzwX2B2vSAY5Kzs9LBI9KAxzPlwzPBhrLCI8','lMv0x3bIx3jVDW','rgL2AsbgAwX0zxiGugX1z2LUoIbnB3jLihrOyw4GmsbMAwX0zxiGyxjLys4GuMvTB3zLigzPBhrLCIbHCMvHig9YihvWz3jHzguGBgLJzw5Zzse','Cg9YDgzVBgLV','ywrKq2XHC3m','AgfZq2XHC3m','zwyTzwXLBwvUDgLUzgv4lq','zMLSDgvY','ic5KzI1IDxr0B24UzgzJlq','zgyTCM93CW','pIaUzxrFCgjFCM93oM5VDcGUzgyTyNv0Dg9UCYKGlMv0x3bIx3nHBhzHDhrVCMvFy29UDgvUDcaUy29SDw1U','zxrFCgjFCg9ZDhm','zMLSDgvYrwXLBwvUDfr5Cgu','CgfKu3rHCNq','CM93','rgL2AsbgAwX0zxiGugX1z2LUoIbzB3uGy2fUj3qGzMLSDgvYihjVD3mGB3iGC3bLy2LHBhr5ihnLy3rPB25ZihDPDgGGDgHLigzYzwuGBgLJzw5Zzs4GugXLyxnLigDLDcbHifbYzw1PDw0GBgLJzw5Zzse','lMrMlwj1DhrVBI5KzMmT','lMrMlwfYzwe','ywrK','y29Uy2f0','zgyTC3rHCNrPBMDezwXHEq','oMvXka','ywn0AxzLrMLSDgvYqNrUq2XHC3nLCW','zgyTBg9HzgvK','yxnZAwDU','Bw9KDwXLsw5KzxG','Bw9KDwXLqxjYyxK','rgL2AsbgAwX0zxiGugX1z2LUoIbfCNjVCIa1nJmGtw9Yzsb0AgfUig9UzsbVCIbUBYbTB2r1BgvjBMrLEcbJBgfZCW','lMrMBI0','BxvSDgLtzwXLy3rnB2rL','zgyTywn0AxzLyNv0Dg9U','zgyTCgLJA3K','ufjftuLvtq','nJu5nteXnuXys1PJAW','mZqWotqYotzdwe1qzLu','mtKZmZyYm2nxqwvjsG','mJiWoti3rNbrA1fh','y2XVC2vZDa','CMvTB3zLq2XHC3m','ogfryuDprq','C3vIC3rYAw5N','Aw5JBhvKzxm','zwfJAa','zxrFCgjFyMXVz19NCMLKx3DYyxbWzxi','pceTlsbgAwX0zxjPBMCGzg9Uzsb3AxrOihrOzsbeAxzPiezPBhrLCIbWBhvNAw4SigDLDcb0AguGzNjLzsb2zxjZAw9UigHLCMu6igH0DhbZoI8VzgfUAwvSDM9LBgSUzguVzw4VzgL2As1MAwX0zxiVic0TpG','ic5LDf9WyL9YB3DFAw5Uzxi6BM90kc5KzI1IDxr0B25Zksa+ic5LDf9WyL9JB2X1Bw46BM90kc5KzI1IDxr0B25Zkq','CMvWBgfJzq','zxrFC2vJDgLVBL9ZCgvJAwfSDhK','Bg9N','yxbWzw5K','ic5KzI1IDxr0B24','mJm2ode2ofHWyKjhBG','y2XPy2S','BgvUz3rO','pIaUzxrFCgjFCM93oM5VDcGUzgyTyNv0Dg9UCYKGpIaUzxrFCgjFy29SDw1UoM5VDcGUzgyTyNv0Dg9UCYK','zgzUlq','zgyTCg9ZDa','ChjVAMvJDf9JyxrLz29YEs0','lMrMlwj1DhrVBG','z3jLCa','pIaUzxrFCgjFCM93oM5VDcGUzgyTyNv0Dg9UCYKGlMv0x3bIx3bVCNrMB2XPB19PDgvT','ChvZAa','zgyTyw5PBwf0Aw9U','lMrMlwfYzweGpIaUzxrFCgjFCM93id4GlMv0x3bIx2nVBhvTBG','pIaUzxrFCgjFCM93id4GlMv0x3bIx2nVBhvTBG','Cg9ZDfr5CgvgAwX0zxjPBMC'];_0x15b8=function(){return _0x5b9eaf;};return _0x15b8();}function filterElements(_0x2681f8){var _0x58dcf6=_0x8745dd;let _0x4edb43=![];dfAllFilters[filterNumber]!==undefined&&(_0x4edb43=!![]);let _0x32d230=[];jQuery(selectorElementType)[_0x58dcf6(0xfb)](function(_0x350673,_0x6fb954){var _0x45972c=_0x58dcf6,_0x5bb2a3=getAndRemoveElementIndex(jQuery(this));if(_0x5bb2a3!=-0x1){var _0x5b9413=[];jQuery(this)[_0x45972c(0xc9)]()[_0x45972c(0xfb)](function(){var _0x289815=_0x45972c;_0x5b9413[_0x289815(0x10e)](jQuery(this)[_0x289815(0xcb)]());}),_0x4edb43?(dfAllFilters[filterNumber][_0x45972c(0xeb)][_0x5bb2a3][_0x45972c(0xc0)]=_0x5b9413,getAndRemoveClassNames(jQuery(this))):_0x32d230[_0x5bb2a3]=new dfElement(_0x5b9413,_0x5bb2a3,getAndRemoveClassNames(jQuery(this)));}});!_0x4edb43&&(allModulesWithoutReference=_0x32d230,dfAllFilters[filterNumber]=new dfFilterArea(selectorElementType,filterElementType,multiSelectMode,postTypeFiltering,cutSetMode,allModulesWithoutReference));let _0x338032=dfAllFilters[filterNumber]['moduleArray'][_0x58dcf6(0xae)](_0x1aaa68=>Object[_0x58dcf6(0xe9)]({},_0x1aaa68));if(dfAllFilters[filterNumber][_0x58dcf6(0xee)]){var _0x193259=dfAllFilters[filterNumber][_0x58dcf6(0xe7)];_0x2681f8[_0x58dcf6(0xd6)](_0x58dcf6(0xef))?(toRemove=getFilterClassesOfButton(_0x2681f8,dfAllFilters[filterNumber][_0x58dcf6(0x112)]),_0x193259=_0x193259[_0x58dcf6(0xd8)](function(_0x3a1698){var _0x1f039b=_0x58dcf6;return!toRemove[_0x1f039b(0xfa)](_0x3a1698);}),_0x2681f8[_0x58dcf6(0xf7)](_0x58dcf6(0xef))):(_0x193259=_0x193259[_0x58dcf6(0xe4)](getFilterClassesOfButton(_0x2681f8,dfAllFilters[filterNumber][_0x58dcf6(0x112)])),_0x2681f8['addClass'](_0x58dcf6(0xef))),dfAllFilters[filterNumber][_0x58dcf6(0xbd)]?_0x338032=filterCutSet(_0x193259,_0x338032):_0x338032=filterUnion(_0x193259,_0x338032),dfAllFilters[filterNumber]['activeFilterBtnClasses']=_0x193259;}else{let _0x1c0853=getFilterClassesOfButton(_0x2681f8,dfAllFilters[filterNumber][_0x58dcf6(0x112)]);dvKV&&(jQuery(filterNumberSelector+_0x58dcf6(0x103))[_0x58dcf6(0xf7)]('df-activebutton'),_0x2681f8[_0x58dcf6(0xd5)](_0x58dcf6(0xef))),dfAllFilters[filterNumber]['cutSetMode']?_0x338032=filterCutSet(_0x1c0853,_0x338032):_0x338032=filterUnion(_0x1c0853,_0x338032);}fillElements(_0x338032);}function filterCutSet(_0xf4a1ef,_0x41bba6){var _0x2bfd6a=_0x8745dd,_0x465f87=[];jQuery[_0x2bfd6a(0xfb)](_0xf4a1ef,function(_0x38027b,_0x256b05){var _0x50b332=_0x2bfd6a;jQuery[_0x50b332(0xfb)](_0x41bba6,function(_0x40f3a6,_0x406787){var _0x45e405=_0x50b332,_0xfb552a=0x0;_0x406787[_0x45e405(0xb4)]!==undefined?jQuery[_0x45e405(0xfb)](_0x406787[_0x45e405(0xb4)],function(_0x140408,_0x321723){_0x321723==_0x256b05&&(_0xfb552a=0x1);}):_0xfb552a=0x0,_0xfb552a==0x0&&_0x465f87[_0x45e405(0x10e)](_0x40f3a6);});});var _0xb4f555=[];return jQuery[_0x2bfd6a(0xfb)](_0x465f87,function(_0xf59013,_0x5a445a){var _0x1fa3e7=_0x2bfd6a;if(jQuery[_0x1fa3e7(0x117)](_0x5a445a,_0xb4f555)==-0x1)_0xb4f555[_0x1fa3e7(0x10e)](_0x5a445a);}),_0x465f87=_0xb4f555,_0x465f87[_0x2bfd6a(0x116)](function(_0x5c4172,_0x1aa93f){return _0x1aa93f-_0x5c4172;}),jQuery[_0x2bfd6a(0xfb)](_0x465f87,function(_0x2c62a6,_0x1d03d5){_0x41bba6['splice'](_0x1d03d5,0x1);}),_0x41bba6;};function filterUnion(_0x387e59,_0x39bb8f){var _0x3c4484=_0x8745dd;if(_0x387e59['length']>0x0){var _0x411938=[];jQuery[_0x3c4484(0xfb)](_0x39bb8f,function(_0x19cb85,_0x18904f){var _0x31fdff=_0x3c4484,_0x21b186=0x0;_0x18904f[_0x31fdff(0xb4)]!==undefined?jQuery[_0x31fdff(0xfb)](_0x18904f[_0x31fdff(0xb4)],function(_0x56b910,_0x263c67){var _0x3d21c5=_0x31fdff;jQuery[_0x3d21c5(0xfb)](_0x387e59,function(_0x14e4a8,_0x47ab92){_0x263c67==_0x47ab92&&(_0x21b186=0x1);});}):_0x21b186=0x0,_0x21b186==0x0&&_0x411938['push'](_0x19cb85);}),_0x411938[_0x3c4484(0x116)](function(_0x27155e,_0x20d456){return _0x20d456-_0x27155e;}),jQuery[_0x3c4484(0xfb)](_0x411938,function(_0x4c44cb,_0x575c88){_0x39bb8f['splice'](_0x575c88,0x1);});}return _0x39bb8f;};function fillElements(_0x2b5c35){var _0x1d293a=_0x8745dd;const _0x4e1665=jQuery(_0x1d293a(0xe2)+filterNumberSelector+_0x1d293a(0xdb))['length']-0x1;if(filterElementType=='blogGrid'){let _0x3475a5=0x0,_0x5d3fb9=0x0;for(let _0x400fe2=0x0;_0x400fe2<_0x2b5c35[_0x1d293a(0x106)];_0x400fe2++){let _0x16c743=jQuery(_0x1d293a(0xe2)+filterNumberSelector+_0x1d293a(0xb2)+_0x3475a5+')\x20article:eq('+_0x5d3fb9+')'),_0x490eef=_0x2b5c35[_0x400fe2]['moduleIndex'][_0x1d293a(0x113)]()[_0x1d293a(0xde)](0x3,'0');_0x16c743[_0x1d293a(0xd5)]('df-elementindex-'+_0x490eef),jQuery[_0x1d293a(0xfb)](_0x2b5c35[_0x400fe2][_0x1d293a(0xb4)],function(_0x470aa7,_0x1f6ad8){var _0x2b27be=_0x1d293a;_0x16c743[_0x2b27be(0xd5)](_0x1f6ad8);}),jQuery['each'](_0x2b5c35[_0x400fe2][_0x1d293a(0xc0)],function(_0x17bd35,_0x218272){var _0x27bab=_0x1d293a;_0x16c743[_0x27bab(0x102)](_0x2b5c35[_0x400fe2]['moduleParts'][_0x17bd35]);});if(dvKV){let _0x39f017=document[_0x1d293a(0xcd)](selectorElementType)[_0x400fe2];_0x39f017&&(_0x39f017['classList'][_0x1d293a(0xce)](_0x1d293a(0x10f)),void _0x39f017[_0x1d293a(0xd0)],_0x39f017[_0x1d293a(0xb4)][_0x1d293a(0xe3)](_0x1d293a(0x10f)));}_0x3475a5<_0x4e1665?_0x3475a5=_0x3475a5+0x1:(_0x3475a5=0x0,_0x5d3fb9=_0x5d3fb9+0x1);}}else for(let _0x3c9dea=0x0;_0x3c9dea<_0x2b5c35[_0x1d293a(0x106)];_0x3c9dea++){let _0x4c146d=_0x2b5c35[_0x3c9dea][_0x1d293a(0xea)][_0x1d293a(0x113)]()[_0x1d293a(0xde)](0x3,'0');jQuery(selectorElementType+_0x1d293a(0xe6)+_0x3c9dea+')')[_0x1d293a(0xd5)](_0x1d293a(0xbf)+_0x4c146d),jQuery['each'](_0x2b5c35[_0x3c9dea]['classList'],function(_0x2a3648,_0x3ca2f){var _0x198b89=_0x1d293a;jQuery(selectorElementType+':eq('+_0x3c9dea+')')[_0x198b89(0xd5)](_0x3ca2f);}),jQuery[_0x1d293a(0xfb)](_0x2b5c35[_0x3c9dea][_0x1d293a(0xc0)],function(_0x368332,_0x13521d){var _0x4f61cc=_0x1d293a;jQuery(selectorElementType+_0x4f61cc(0xe6)+_0x3c9dea+')')[_0x4f61cc(0x102)](_0x2b5c35[_0x3c9dea][_0x4f61cc(0xc0)][_0x368332]);});if(dvKV){let _0x35fe17=document[_0x1d293a(0xcd)](selectorElementType)[_0x3c9dea];_0x35fe17&&(_0x35fe17[_0x1d293a(0xb4)][_0x1d293a(0xce)]('df-animation'),void _0x35fe17[_0x1d293a(0xd0)],_0x35fe17['classList']['add'](_0x1d293a(0x10f)));}}}jQuery(function(_0x127854){var _0x4d9365=_0x8745dd;console[_0x4d9365(0x101)]('Filtering\x20done\x20with\x20the\x20Divi\x20Filter\x20plugin,\x20get\x20the\x20free\x20version\x20here:'),console['log'](_0x4d9365(0xd1));dvServerResponse[0x0]!=undefined&&typeof dvServerResponse[0x0]!=='string'?dvKV=![]:dvServerResponse[0x0][_0x4d9365(0xfa)](_0x4d9365(0xf1))?dvKV=!![]:dvKV=![];_0x127854(_0x4d9365(0xe2))['before'](_0x4d9365(0xfd));_0x127854('.df-area')['length']>0x1&&!dvKV?console[_0x4d9365(0x101)](_0x4d9365(0xd3)):(_0x127854(_0x4d9365(0xe2))[_0x4d9365(0xfb)](function(_0x15f378,_0x1f2383){var _0x3568ef=_0x4d9365,_0x5b8ed0=_0x3568ef(0x111);if(_0x127854(this)[_0x3568ef(0xd6)]('et_section_specialty')&&dvKV){_0x5b8ed0=_0x3568ef(0xb8);if(_0x127854(this)[_0x3568ef(0xd6)](_0x3568ef(0xda))&&dvKV)_0x5b8ed0=_0x3568ef(0xb5);}else{if(_0x127854(this)[_0x3568ef(0xd6)]('df-rows')&&dvKV)_0x5b8ed0=_0x3568ef(0xc1);else{if(_0x127854(this)[_0x3568ef(0xd6)](_0x3568ef(0x109))){_0x5b8ed0=_0x3568ef(0x10d);if(_0x127854(_0x3568ef(0xe2)+filterNumberSelector+'\x20.et_pb_module')['hasClass'](_0x3568ef(0xdc))||_0x127854(_0x3568ef(0xe2)+filterNumberSelector+_0x3568ef(0xbe))[_0x3568ef(0xd6)](_0x3568ef(0xfc)))_0x5b8ed0=_0x3568ef(0xbb);}else{if(dvKV)_0x5b8ed0=_0x3568ef(0x107);else(_0x127854(this)[_0x3568ef(0xd6)](_0x3568ef(0xda))||_0x127854(this)['hasClass']('et_section_specialty'))&&console[_0x3568ef(0x101)](_0x3568ef(0xe0));}}}_0x127854(this)['find'](_0x5b8ed0)[_0x3568ef(0xfb)](function(_0xeb2e0e,_0x4aa177){var _0x1f41e4=_0x3568ef;let _0x27c902=_0xeb2e0e[_0x1f41e4(0x113)]()[_0x1f41e4(0xde)](0x3,'0');_0x127854(this)['addClass'](_0x1f41e4(0xbf)+_0x27c902),dvKV&&_0x127854(this)[_0x1f41e4(0xd5)](_0x1f41e4(0x10f));});if(dvKV){var _0x49fbfa=null,_0x53efea=getFilterNumber(_0x127854(this)),_0x41ae05='\x20';_0x53efea==null?(_0x53efea=0x1,_0x41ae05='\x20'):_0x41ae05=_0x3568ef(0xed)+_0x53efea;var _0x556edc=new URLSearchParams(window[_0x3568ef(0xc6)][_0x3568ef(0xca)]),_0x49fbfa=_0x556edc['get']('filter');if(_0x127854(_0x41ae05+'\x20.df-button.dfc-'+_0x49fbfa)[_0x3568ef(0x106)]==0x0){var _0x32e310=_0x127854(this)['attr'](_0x3568ef(0xbc));if(_0x32e310!==undefined){var _0x222e3c=_0x32e310['split'](/\s+/);classListFiltered=_0x127854[_0x3568ef(0xfb)](_0x222e3c,function(_0xb07f1,_0x2bef9c){var _0x46e492=_0x3568ef;(_0x2bef9c['indexOf']('dfs-')==0x0||_0x2bef9c[_0x46e492(0xc3)]('dfc-')==0x0)&&(_0x49fbfa=_0x2bef9c[_0x46e492(0xf9)](0x4));});}}_0x127854(_0x41ae05+_0x3568ef(0xd9)+_0x49fbfa)[_0x3568ef(0x106)]&&(_0x127854(this)[_0x3568ef(0xd6)](_0x3568ef(0xe5))?setTimeout(function(){var _0x508c37=_0x3568ef;_0x127854(_0x508c37(0xe1)+_0x49fbfa)[_0x508c37(0x105)]();},0x12c):($button=_0x127854(_0x41ae05+_0x3568ef(0xd9)+_0x49fbfa),getFilterData($button),filterElements($button)));}_0x127854(this)[_0x3568ef(0xd5)](_0x3568ef(0xe8));}),_0x127854(_0x4d9365(0x10b))['on']('click',function(_0x136922){_0x136922['preventDefault'](),getFilterData(_0x127854(this)),filterElements(_0x127854(this));}));;}); \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/df-style.css b/wp/wp-content/plugins/divifilter/df-style.css deleted file mode 100644 index 40d415f0..00000000 --- a/wp/wp-content/plugins/divifilter/df-style.css +++ /dev/null @@ -1,60 +0,0 @@ -/* column filtering */ -html:not(.et-fb-root-ancestor) .df-area:not(.et_section_specialty):not(.df-rows):not(.df-post):not(.df-show) > .et_pb_row:not(.df-buttons) > .et_pb_column:not([class^='df-elementindex-']):not([class*=' df-elementindex-']) { - margin-top: 0 !important; - margin-bottom: 0 !important; - padding-top: 0 !important; - padding-bottom: 0 !important; - height: 0 !important; - box-shadow: none !important; -} - -/* row filtering */ -html:not(.et-fb-root-ancestor) .df-area.df-rows:not(.et_section_specialty):not(.df-post):not(.df-show) > .et_pb_row:not(.df-buttons):not([class^='df-elementindex-']):not([class*=' df-elementindex-']) { - margin-top: 0 !important; - margin-bottom: 0 !important; - padding-top: 0 !important; - padding-bottom: 0 !important; - height: 0 !important; - box-shadow: none !important; -} - -/* blog filtering */ -html:not(.et-fb-root-ancestor) .df-area.df-post:not(.et_section_specialty):not(.df-rows):not(.df-show) > .et_pb_row:not(.df-buttons) article:not([class^='df-elementindex-']):not([class*=' df-elementindex-']) { - margin-top: 0 !important; - margin-bottom: 0 !important; - padding-top: 0 !important; - padding-bottom: 0 !important; - height: 0 !important; - box-shadow: none !important; - border: none !important; -} - -/* hide elements while loading */ -/* column filtering */ -html:not(.et-fb-root-ancestor) .df-area:not(.et_section_specialty):not(.df-rows):not(.df-loaded) > .et_pb_row > .et_pb_column { - visibility: hidden; -} -/* row filtering */ -html:not(.et-fb-root-ancestor) .df-area:not(.et_section_specialty).df-rows:not(.df-loaded) > .et_pb_row { - visibility: hidden; -} -/* row filtering */ -html:not(.et-fb-root-ancestor) .df-area.df-post:not(.et_section_specialty).df-rows:not(.df-loaded) > .et_pb_row { - visibility: hidden; -} - -/* change cursor for df-button */ -.df-button { - cursor: pointer; -} - -/* fix hidden modules problem */ -.df-area .et_animated, .df-area:not(.et_section_specialty) .et-waypoint:not(.et_pb_counters) { - opacity: 1 !important; -} - -/* show gallery items */ -.df-area .et_pb_gallery_grid .et_pb_gallery_item, -.df-area .et_pb_filterable_portfolio_grid .et_pb_portfolio_item { - display: block !important; -} \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/divifilter.php b/wp/wp-content/plugins/divifilter/divifilter.php deleted file mode 100644 index 33c23475..00000000 --- a/wp/wp-content/plugins/divifilter/divifilter.php +++ /dev/null @@ -1,226 +0,0 @@ -dv_check(); - - add_option('kV', false); - - add_option('dvServerResponse', "FREE"); - - } - - public function my_plugin_fields() { - /** Check permissions. */ - if ( ! current_user_can( 'manage_options' ) ) { - return; - } - - add_settings_section( 'divi_field_section', 'Divi Filter', false, 'divi-filter-menu' ); - - add_settings_field( 'key_input', 'Key', [ $this, 'df_callback' ], 'divi-filter-menu', 'divi_field_section' ); - - register_setting( 'divi-filter-menu', 'key_input' ); - } - - public function dv_check() { - - if((get_option('key_input') !== null) || (get_option('key_input') !== "")){ - - $key_input = get_option('key_input'); - - $current_domain = $_SERVER['SERVER_NAME']; - - // update domain and get feedback - $server_output = wp_remote_get("https://danielvoelk.de/df-files/license/license-get-status.php?key=$key_input"); - - if ( is_array( $server_output ) && ! is_wp_error( $server_output ) ) { - $server_output = $server_output['body']; - } - - if( !$server_output || !is_string($server_output) ) { - update_option('kV', false); - } else { - - if ( strpos($server_output, '200') !== false ) { - - if (strpos($server_output, 'PREMIUM') !== false) { - update_option('kV', true); - } - else { - update_option('kV', false); - } - - update_option('dvServerResponse', $server_output); - - } - - } - - - } - else { - update_option('kV', false); - } - - } - - public function df_callback() { - echo '
'; - - if((get_option('key_input') !== null) || (get_option('key_input') !== "")){ - - $key_input = get_option('key_input'); - - $current_domain = $_SERVER['SERVER_NAME']; - - // update domain and get feedback - $server_output = wp_remote_get("https://danielvoelk.de/df-files/license/license-update-domain.php?key=$key_input&domain=$current_domain"); - - if ( is_array( $server_output ) && ! is_wp_error( $server_output ) ) { - $server_output = $server_output['body']; // use the content - - if ( strpos($server_output, '200') !== false ) { - - // show status - echo ""; - - if (strpos($server_output, 'PREMIUM') !== false) { - update_option('kV', true); - } - else { - update_option('kV', false); - } - - update_option('dvServerResponse', $server_output); - - } - else { - // show status - echo ""; - } - } - - - } - else { - update_option('kV', false); - } - - } - - /** Step 2 (add item). */ - public function my_plugin_menu() { - $page_title = 'Divi Filter Options'; - $menu_title = 'Divi Filter'; - $capability = 'manage_options'; // Only users that can manage options can access this menu item. - $menu_slug = 'divi-filter'; // unique identifier. - $callback = [ $this, 'my_plugin_options' ]; - add_options_page( $page_title, $menu_title, $capability, $menu_slug, $callback ); - } - - /** Step 3 (page html). */ - public function my_plugin_options() { ?> -

-
- - - -
-

Status:

-
- Go Premium'; - } - - return $links; - } - - public function divifilter_add_files() { - - wp_register_script('df-script', plugins_url('df-script.js', __FILE__), array('jquery'),'3.8.4', true); - wp_enqueue_script('df-script'); - - $script_params = get_option('dvServerResponse'); - wp_localize_script( 'df-script', 'dvServerResponse', [ $script_params ] ); - - wp_register_style('df-style', plugins_url('df-style.css', __FILE__), array(), '3.8.4'); - wp_enqueue_style('df-style'); - - } - - public function add_documentation_link( $links, $file ) { - if ( plugin_basename( __FILE__ ) == $file ) { - $row_meta = array( - 'docs' => 'Documentation' - ); - - return array_merge( $links, $row_meta ); - } - return (array) $links; - } - - } - -new DiviFilterPremium(); - -// auto update -require 'plugin-update-checker/plugin-update-checker.php'; -$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( - 'https://danielvoelk.de/df-files/version.json', - __FILE__ //Full path to the main plugin file or functions.php. - // 'unique-plugin-or-theme-slug' -); \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/.editorconfig b/wp/wp-content/plugins/divifilter/plugin-update-checker/.editorconfig deleted file mode 100644 index 1b51cad9..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -[*] -charset=utf-8 -end_of_line=lf -insert_final_newline=false -indent_style=tab -tab_width=4 - -[{phpunit.xml.dist,*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}] -indent_style=space -indent_size=4 - -[*.svg] -indent_style=space -indent_size=4 - diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/.gitignore b/wp/wp-content/plugins/divifilter/plugin-update-checker/.gitignore deleted file mode 100644 index 71260706..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# Created by .ignore support plugin (hsz.mobi) -### JetBrains template -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# The entire IDEA/PhpStorm directory -.idea/ - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4/Factory.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4/Factory.php deleted file mode 100644 index ac21a55a..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4/Factory.php +++ /dev/null @@ -1,6 +0,0 @@ -rootDir = dirname(__FILE__) . '/'; - $nameParts = explode('_', __CLASS__, 3); - $this->prefix = $nameParts[0] . '_' . $nameParts[1] . '_'; - - $this->libraryDir = $this->rootDir . '../..'; - if ( !self::isPhar() ) { - $this->libraryDir = realpath($this->libraryDir); - } - $this->libraryDir = $this->libraryDir . '/'; - - $this->staticMap = array( - 'PucReadmeParser' => 'vendor/PucReadmeParser.php', - 'Parsedown' => 'vendor/Parsedown.php', - 'Puc_v4_Factory' => 'Puc/v4/Factory.php', - ); - - spl_autoload_register(array($this, 'autoload')); - } - - /** - * Determine if this file is running as part of a Phar archive. - * - * @return bool - */ - private static function isPhar() { - //Check if the current file path starts with "phar://". - static $pharProtocol = 'phar://'; - return (substr(__FILE__, 0, strlen($pharProtocol)) === $pharProtocol); - } - - public function autoload($className) { - if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) { - /** @noinspection PhpIncludeInspection */ - include ($this->libraryDir . $this->staticMap[$className]); - return; - } - - if (strpos($className, $this->prefix) === 0) { - $path = substr($className, strlen($this->prefix)); - $path = str_replace('_', '/', $path); - $path = $this->rootDir . $path . '.php'; - - if (file_exists($path)) { - /** @noinspection PhpIncludeInspection */ - include $path; - } - } - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Extension.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Extension.php deleted file mode 100644 index a39dac04..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Extension.php +++ /dev/null @@ -1,190 +0,0 @@ -updateChecker = $updateChecker; - if ( isset($panelClass) ) { - $this->panelClass = $panelClass; - } - - if ( version_compare(PHP_VERSION, '5.3', '>=') && (strpos($this->panelClass, '\\') === false) ) { - $this->panelClass = __NAMESPACE__ . '\\' . $this->panelClass; - } - - add_filter('debug_bar_panels', array($this, 'addDebugBarPanel')); - add_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies')); - - add_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow')); - } - - /** - * Register the PUC Debug Bar panel. - * - * @param array $panels - * @return array - */ - public function addDebugBarPanel($panels) { - if ( $this->updateChecker->userCanInstallUpdates() ) { - $panels[] = new $this->panelClass($this->updateChecker); - } - return $panels; - } - - /** - * Enqueue our Debug Bar scripts and styles. - */ - public function enqueuePanelDependencies() { - wp_enqueue_style( - 'puc-debug-bar-style-v4', - $this->getLibraryUrl("/css/puc-debug-bar.css"), - array('debug-bar'), - '20171124' - ); - - wp_enqueue_script( - 'puc-debug-bar-js-v4', - $this->getLibraryUrl("/js/debug-bar.js"), - array('jquery'), - '20201209' - ); - } - - /** - * Run an update check and output the result. Useful for making sure that - * the update checking process works as expected. - */ - public function ajaxCheckNow() { - if ( $_POST['uid'] !== $this->updateChecker->getUniqueName('uid') ) { - return; - } - $this->preAjaxRequest(); - $update = $this->updateChecker->checkForUpdates(); - if ( $update !== null ) { - echo "An update is available:"; - echo '
', htmlentities(print_r($update, true)), '
'; - } else { - echo 'No updates found.'; - } - - $errors = $this->updateChecker->getLastRequestApiErrors(); - if ( !empty($errors) ) { - printf('

The update checker encountered %d API error%s.

', count($errors), (count($errors) > 1) ? 's' : ''); - - foreach (array_values($errors) as $num => $item) { - $wpError = $item['error']; - /** @var WP_Error $wpError */ - printf('

%d) %s

', $num + 1, esc_html($wpError->get_error_message())); - - echo '
'; - printf('
Error code:
%s
', esc_html($wpError->get_error_code())); - - if ( isset($item['url']) ) { - printf('
Requested URL:
%s
', esc_html($item['url'])); - } - - if ( isset($item['httpResponse']) ) { - if ( is_wp_error($item['httpResponse']) ) { - $httpError = $item['httpResponse']; - /** @var WP_Error $httpError */ - printf( - '
WordPress HTTP API error:
%s (%s)
', - esc_html($httpError->get_error_message()), - esc_html($httpError->get_error_code()) - ); - } else { - //Status code. - printf( - '
HTTP status:
%d %s
', - wp_remote_retrieve_response_code($item['httpResponse']), - wp_remote_retrieve_response_message($item['httpResponse']) - ); - - //Headers. - echo '
Response headers:
';
-							foreach (wp_remote_retrieve_headers($item['httpResponse']) as $name => $value) {
-								printf("%s: %s\n", esc_html($name), esc_html($value));
-							}
-							echo '
'; - - //Body. - $body = wp_remote_retrieve_body($item['httpResponse']); - if ( $body === '' ) { - $body = '(Empty response.)'; - } else if ( strlen($body) > self::RESPONSE_BODY_LENGTH_LIMIT ) { - $length = strlen($body); - $body = substr($body, 0, self::RESPONSE_BODY_LENGTH_LIMIT) - . sprintf("\n(Long string truncated. Total length: %d bytes.)", $length); - } - - printf('
Response body:
%s
', esc_html($body)); - } - } - echo '
'; - } - } - - exit; - } - - /** - * Check access permissions and enable error display (for debugging). - */ - protected function preAjaxRequest() { - if ( !$this->updateChecker->userCanInstallUpdates() ) { - die('Access denied'); - } - check_ajax_referer('puc-ajax'); - - error_reporting(E_ALL); - @ini_set('display_errors', 'On'); - } - - /** - * Remove hooks that were added by this extension. - */ - public function removeHooks() { - remove_filter('debug_bar_panels', array($this, 'addDebugBarPanel')); - remove_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies')); - remove_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow')); - } - - /** - * @param string $filePath - * @return string - */ - private function getLibraryUrl($filePath) { - $absolutePath = realpath(dirname(__FILE__) . '/../../../' . ltrim($filePath, '/')); - - //Where is the library located inside the WordPress directory structure? - $absolutePath = Puc_v4p11_Factory::normalizePath($absolutePath); - - $pluginDir = Puc_v4p11_Factory::normalizePath(WP_PLUGIN_DIR); - $muPluginDir = Puc_v4p11_Factory::normalizePath(WPMU_PLUGIN_DIR); - $themeDir = Puc_v4p11_Factory::normalizePath(get_theme_root()); - - if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) { - //It's part of a plugin. - return plugins_url(basename($absolutePath), $absolutePath); - } else if ( strpos($absolutePath, $themeDir) === 0 ) { - //It's part of a theme. - $relativePath = substr($absolutePath, strlen($themeDir) + 1); - $template = substr($relativePath, 0, strpos($relativePath, '/')); - $baseUrl = get_theme_root_uri($template); - - if ( !empty($baseUrl) && $relativePath ) { - return $baseUrl . '/' . $relativePath; - } - } - - return ''; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Panel.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Panel.php deleted file mode 100644 index 666cdf44..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/Panel.php +++ /dev/null @@ -1,165 +0,0 @@ -'; - - public function __construct($updateChecker) { - $this->updateChecker = $updateChecker; - $title = sprintf( - 'PUC (%s)', - esc_attr($this->updateChecker->getUniqueName('uid')), - $this->updateChecker->slug - ); - parent::__construct($title); - } - - public function render() { - printf( - '
', - esc_attr($this->updateChecker->getUniqueName('debug-bar-panel')), - esc_attr($this->updateChecker->slug), - esc_attr($this->updateChecker->getUniqueName('uid')), - esc_attr(wp_create_nonce('puc-ajax')) - ); - - $this->displayConfiguration(); - $this->displayStatus(); - $this->displayCurrentUpdate(); - - echo '
'; - } - - private function displayConfiguration() { - echo '

Configuration

'; - echo ''; - $this->displayConfigHeader(); - $this->row('Slug', htmlentities($this->updateChecker->slug)); - $this->row('DB option', htmlentities($this->updateChecker->optionName)); - - $requestInfoButton = $this->getMetadataButton(); - $this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $this->responseBox); - - $scheduler = $this->updateChecker->scheduler; - if ( $scheduler->checkPeriod > 0 ) { - $this->row('Automatic checks', 'Every ' . $scheduler->checkPeriod . ' hours'); - } else { - $this->row('Automatic checks', 'Disabled'); - } - - if ( isset($scheduler->throttleRedundantChecks) ) { - if ( $scheduler->throttleRedundantChecks && ($scheduler->checkPeriod > 0) ) { - $this->row( - 'Throttling', - sprintf( - 'Enabled. If an update is already available, check for updates every %1$d hours instead of every %2$d hours.', - $scheduler->throttledCheckPeriod, - $scheduler->checkPeriod - ) - ); - } else { - $this->row('Throttling', 'Disabled'); - } - } - - $this->updateChecker->onDisplayConfiguration($this); - - echo '
'; - } - - protected function displayConfigHeader() { - //Do nothing. This should be implemented in subclasses. - } - - protected function getMetadataButton() { - return ''; - } - - private function displayStatus() { - echo '

Status

'; - echo ''; - $state = $this->updateChecker->getUpdateState(); - $checkNowButton = ''; - if ( function_exists('get_submit_button') ) { - $checkNowButton = get_submit_button( - 'Check Now', - 'secondary', - 'puc-check-now-button', - false, - array('id' => $this->updateChecker->getUniqueName('check-now-button')) - ); - } - - if ( $state->getLastCheck() > 0 ) { - $this->row('Last check', $this->formatTimeWithDelta($state->getLastCheck()) . ' ' . $checkNowButton . $this->responseBox); - } else { - $this->row('Last check', 'Never'); - } - - $nextCheck = wp_next_scheduled($this->updateChecker->scheduler->getCronHookName()); - $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck)); - - if ( $state->getCheckedVersion() !== '' ) { - $this->row('Checked version', htmlentities($state->getCheckedVersion())); - $this->row('Cached update', $state->getUpdate()); - } - $this->row('Update checker class', htmlentities(get_class($this->updateChecker))); - echo '
'; - } - - private function displayCurrentUpdate() { - $update = $this->updateChecker->getUpdate(); - if ( $update !== null ) { - echo '

An Update Is Available

'; - echo ''; - $fields = $this->getUpdateFields(); - foreach($fields as $field) { - if ( property_exists($update, $field) ) { - $this->row(ucwords(str_replace('_', ' ', $field)), htmlentities($update->$field)); - } - } - echo '
'; - } else { - echo '

No updates currently available

'; - } - } - - protected function getUpdateFields() { - return array('version', 'download_url', 'slug',); - } - - private function formatTimeWithDelta($unixTime) { - if ( empty($unixTime) ) { - return 'Never'; - } - - $delta = time() - $unixTime; - $result = human_time_diff(time(), $unixTime); - if ( $delta < 0 ) { - $result = 'after ' . $result; - } else { - $result = $result . ' ago'; - } - $result .= ' (' . $this->formatTimestamp($unixTime) . ')'; - return $result; - } - - private function formatTimestamp($unixTime) { - return gmdate('Y-m-d H:i:s', $unixTime + (get_option('gmt_offset') * 3600)); - } - - public function row($name, $value) { - if ( is_object($value) || is_array($value) ) { - $value = '
' . htmlentities(print_r($value, true)) . '
'; - } else if ($value === null) { - $value = 'null'; - } - printf('%1$s %2$s', $name, $value); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginExtension.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginExtension.php deleted file mode 100644 index edc4a2fa..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginExtension.php +++ /dev/null @@ -1,33 +0,0 @@ -updateChecker->getUniqueName('uid') ) { - return; - } - $this->preAjaxRequest(); - $info = $this->updateChecker->requestInfo(); - if ( $info !== null ) { - echo 'Successfully retrieved plugin info from the metadata URL:'; - echo '
', htmlentities(print_r($info, true)), '
'; - } else { - echo 'Failed to retrieve plugin info from the metadata URL.'; - } - exit; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginPanel.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginPanel.php deleted file mode 100644 index fa98600b..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/PluginPanel.php +++ /dev/null @@ -1,38 +0,0 @@ -row('Plugin file', htmlentities($this->updateChecker->pluginFile)); - parent::displayConfigHeader(); - } - - protected function getMetadataButton() { - $requestInfoButton = ''; - if ( function_exists('get_submit_button') ) { - $requestInfoButton = get_submit_button( - 'Request Info', - 'secondary', - 'puc-request-info-button', - false, - array('id' => $this->updateChecker->getUniqueName('request-info-button')) - ); - } - return $requestInfoButton; - } - - protected function getUpdateFields() { - return array_merge( - parent::getUpdateFields(), - array('homepage', 'upgrade_notice', 'tested',) - ); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/ThemePanel.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/ThemePanel.php deleted file mode 100644 index 77f45584..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/DebugBar/ThemePanel.php +++ /dev/null @@ -1,21 +0,0 @@ -row('Theme directory', htmlentities($this->updateChecker->directoryName)); - parent::displayConfigHeader(); - } - - protected function getUpdateFields() { - return array_merge(parent::getUpdateFields(), array('details_url')); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Factory.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Factory.php deleted file mode 100644 index 3541042e..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Factory.php +++ /dev/null @@ -1,365 +0,0 @@ - '', - 'slug' => '', - 'checkPeriod' => 12, - 'optionName' => '', - 'muPluginFile' => '', - ); - $args = array_merge($defaults, array_intersect_key($args, $defaults)); - extract($args, EXTR_SKIP); - - //Check for the service URI - if ( empty($metadataUrl) ) { - $metadataUrl = self::getServiceURI($fullPath); - } - - /** @noinspection PhpUndefinedVariableInspection These variables are created by extract(), above. */ - return self::buildUpdateChecker($metadataUrl, $fullPath, $slug, $checkPeriod, $optionName, $muPluginFile); - } - - /** - * Create a new instance of the update checker. - * - * This method automatically detects if you're using it for a plugin or a theme and chooses - * the appropriate implementation for your update source (JSON file, GitHub, BitBucket, etc). - * - * @see Puc_v4p11_UpdateChecker::__construct - * - * @param string $metadataUrl The URL of the metadata file, a GitHub repository, or another supported update source. - * @param string $fullPath Full path to the main plugin file or to the theme directory. - * @param string $slug Custom slug. Defaults to the name of the main plugin file or the theme directory. - * @param int $checkPeriod How often to check for updates (in hours). - * @param string $optionName Where to store book-keeping info about update checks. - * @param string $muPluginFile The plugin filename relative to the mu-plugins directory. - * @return Puc_v4p11_Plugin_UpdateChecker|Puc_v4p11_Theme_UpdateChecker|Puc_v4p11_Vcs_BaseChecker - */ - public static function buildUpdateChecker($metadataUrl, $fullPath, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') { - $fullPath = self::normalizePath($fullPath); - $id = null; - - //Plugin or theme? - $themeDirectory = self::getThemeDirectoryName($fullPath); - if ( self::isPluginFile($fullPath) ) { - $type = 'Plugin'; - $id = $fullPath; - } else if ( $themeDirectory !== null ) { - $type = 'Theme'; - $id = $themeDirectory; - } else { - throw new RuntimeException(sprintf( - 'The update checker cannot determine if "%s" is a plugin or a theme. ' . - 'This is a bug. Please contact the PUC developer.', - htmlentities($fullPath) - )); - } - - //Which hosting service does the URL point to? - $service = self::getVcsService($metadataUrl); - - $apiClass = null; - if ( empty($service) ) { - //The default is to get update information from a remote JSON file. - $checkerClass = $type . '_UpdateChecker'; - } else { - //You can also use a VCS repository like GitHub. - $checkerClass = 'Vcs_' . $type . 'UpdateChecker'; - $apiClass = $service . 'Api'; - } - - $checkerClass = self::getCompatibleClassVersion($checkerClass); - if ( $checkerClass === null ) { - trigger_error( - sprintf( - 'PUC %s does not support updates for %ss %s', - htmlentities(self::$latestCompatibleVersion), - strtolower($type), - $service ? ('hosted on ' . htmlentities($service)) : 'using JSON metadata' - ), - E_USER_ERROR - ); - return null; - } - - //Add the current namespace to the class name(s). - if ( version_compare(PHP_VERSION, '5.3', '>=') ) { - $checkerClass = __NAMESPACE__ . '\\' . $checkerClass; - } - - if ( !isset($apiClass) ) { - //Plain old update checker. - return new $checkerClass($metadataUrl, $id, $slug, $checkPeriod, $optionName, $muPluginFile); - } else { - //VCS checker + an API client. - $apiClass = self::getCompatibleClassVersion($apiClass); - if ( $apiClass === null ) { - trigger_error(sprintf( - 'PUC %s does not support %s', - htmlentities(self::$latestCompatibleVersion), - htmlentities($service) - ), E_USER_ERROR); - return null; - } - - if ( version_compare(PHP_VERSION, '5.3', '>=') && (strpos($apiClass, '\\') === false) ) { - $apiClass = __NAMESPACE__ . '\\' . $apiClass; - } - - return new $checkerClass( - new $apiClass($metadataUrl), - $id, - $slug, - $checkPeriod, - $optionName, - $muPluginFile - ); - } - } - - /** - * - * Normalize a filesystem path. Introduced in WP 3.9. - * Copying here allows use of the class on earlier versions. - * This version adapted from WP 4.8.2 (unchanged since 4.5.0) - * - * @param string $path Path to normalize. - * @return string Normalized path. - */ - public static function normalizePath($path) { - if ( function_exists('wp_normalize_path') ) { - return wp_normalize_path($path); - } - $path = str_replace('\\', '/', $path); - $path = preg_replace('|(?<=.)/+|', '/', $path); - if ( substr($path, 1, 1) === ':' ) { - $path = ucfirst($path); - } - return $path; - } - - /** - * Check if the path points to a plugin file. - * - * @param string $absolutePath Normalized path. - * @return bool - */ - protected static function isPluginFile($absolutePath) { - //Is the file inside the "plugins" or "mu-plugins" directory? - $pluginDir = self::normalizePath(WP_PLUGIN_DIR); - $muPluginDir = self::normalizePath(WPMU_PLUGIN_DIR); - if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) { - return true; - } - - //Is it a file at all? Caution: is_file() can fail if the parent dir. doesn't have the +x permission set. - if ( !is_file($absolutePath) ) { - return false; - } - - //Does it have a valid plugin header? - //This is a last-ditch check for plugins symlinked from outside the WP root. - if ( function_exists('get_file_data') ) { - $headers = get_file_data($absolutePath, array('Name' => 'Plugin Name'), 'plugin'); - return !empty($headers['Name']); - } - - return false; - } - - /** - * Get the name of the theme's directory from a full path to a file inside that directory. - * E.g. "/abc/public_html/wp-content/themes/foo/whatever.php" => "foo". - * - * Note that subdirectories are currently not supported. For example, - * "/xyz/wp-content/themes/my-theme/includes/whatever.php" => NULL. - * - * @param string $absolutePath Normalized path. - * @return string|null Directory name, or NULL if the path doesn't point to a theme. - */ - protected static function getThemeDirectoryName($absolutePath) { - if ( is_file($absolutePath) ) { - $absolutePath = dirname($absolutePath); - } - - if ( file_exists($absolutePath . '/style.css') ) { - return basename($absolutePath); - } - return null; - } - - /** - * Get the service URI from the file header. - * - * @param string $fullPath - * @return string - */ - private static function getServiceURI($fullPath) { - //Look for the URI - if ( is_readable($fullPath) ) { - $seek = array( - 'github' => 'GitHub URI', - 'gitlab' => 'GitLab URI', - 'bucket' => 'BitBucket URI', - ); - $seek = apply_filters('puc_get_source_uri', $seek); - $data = get_file_data($fullPath, $seek); - foreach ($data as $key => $uri) { - if ( $uri ) { - return $uri; - } - } - } - - //URI was not found so throw an error. - throw new RuntimeException( - sprintf('Unable to locate URI in header of "%s"', htmlentities($fullPath)) - ); - } - - /** - * Get the name of the hosting service that the URL points to. - * - * @param string $metadataUrl - * @return string|null - */ - private static function getVcsService($metadataUrl) { - $service = null; - - //Which hosting service does the URL point to? - $host = parse_url($metadataUrl, PHP_URL_HOST); - $path = parse_url($metadataUrl, PHP_URL_PATH); - - //Check if the path looks like "/user-name/repository". - //For GitLab.com it can also be "/user/group1/group2/.../repository". - $repoRegex = '@^/?([^/]+?)/([^/#?&]+?)/?$@'; - if ( $host === 'gitlab.com' ) { - $repoRegex = '@^/?(?:[^/#?&]++/){1,20}(?:[^/#?&]++)/?$@'; - } - if ( preg_match($repoRegex, $path) ) { - $knownServices = array( - 'github.com' => 'GitHub', - 'bitbucket.org' => 'BitBucket', - 'gitlab.com' => 'GitLab', - ); - if ( isset($knownServices[$host]) ) { - $service = $knownServices[$host]; - } - } - - return apply_filters('puc_get_vcs_service', $service, $host, $path, $metadataUrl); - } - - /** - * Get the latest version of the specified class that has the same major version number - * as this factory class. - * - * @param string $class Partial class name. - * @return string|null Full class name. - */ - protected static function getCompatibleClassVersion($class) { - if ( isset(self::$classVersions[$class][self::$latestCompatibleVersion]) ) { - return self::$classVersions[$class][self::$latestCompatibleVersion]; - } - return null; - } - - /** - * Get the specific class name for the latest available version of a class. - * - * @param string $class - * @return null|string - */ - public static function getLatestClassVersion($class) { - if ( !self::$sorted ) { - self::sortVersions(); - } - - if ( isset(self::$classVersions[$class]) ) { - return reset(self::$classVersions[$class]); - } else { - return null; - } - } - - /** - * Sort available class versions in descending order (i.e. newest first). - */ - protected static function sortVersions() { - foreach ( self::$classVersions as $class => $versions ) { - uksort($versions, array(__CLASS__, 'compareVersions')); - self::$classVersions[$class] = $versions; - } - self::$sorted = true; - } - - protected static function compareVersions($a, $b) { - return -version_compare($a, $b); - } - - /** - * Register a version of a class. - * - * @access private This method is only for internal use by the library. - * - * @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'. - * @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'. - * @param string $version Version number, e.g. '1.2'. - */ - public static function addVersion($generalClass, $versionedClass, $version) { - if ( empty(self::$myMajorVersion) ) { - $nameParts = explode('_', __CLASS__, 3); - self::$myMajorVersion = substr(ltrim($nameParts[1], 'v'), 0, 1); - } - - //Store the greatest version number that matches our major version. - $components = explode('.', $version); - if ( $components[0] === self::$myMajorVersion ) { - - if ( - empty(self::$latestCompatibleVersion) - || version_compare($version, self::$latestCompatibleVersion, '>') - ) { - self::$latestCompatibleVersion = $version; - } - - } - - if ( !isset(self::$classVersions[$generalClass]) ) { - self::$classVersions[$generalClass] = array(); - } - self::$classVersions[$generalClass][$version] = $versionedClass; - self::$sorted = false; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/InstalledPackage.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/InstalledPackage.php deleted file mode 100644 index 920159b6..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/InstalledPackage.php +++ /dev/null @@ -1,103 +0,0 @@ -updateChecker = $updateChecker; - } - - /** - * Get the currently installed version of the plugin or theme. - * - * @return string|null Version number. - */ - abstract public function getInstalledVersion(); - - /** - * Get the full path of the plugin or theme directory (without a trailing slash). - * - * @return string - */ - abstract public function getAbsoluteDirectoryPath(); - - /** - * Check whether a regular file exists in the package's directory. - * - * @param string $relativeFileName File name relative to the package directory. - * @return bool - */ - public function fileExists($relativeFileName) { - return is_file( - $this->getAbsoluteDirectoryPath() - . DIRECTORY_SEPARATOR - . ltrim($relativeFileName, '/\\') - ); - } - - /* ------------------------------------------------------------------- - * File header parsing - * ------------------------------------------------------------------- - */ - - /** - * Parse plugin or theme metadata from the header comment. - * - * This is basically a simplified version of the get_file_data() function from /wp-includes/functions.php. - * It's intended as a utility for subclasses that detect updates by parsing files in a VCS. - * - * @param string|null $content File contents. - * @return string[] - */ - public function getFileHeader($content) { - $content = (string)$content; - - //WordPress only looks at the first 8 KiB of the file, so we do the same. - $content = substr($content, 0, 8192); - //Normalize line endings. - $content = str_replace("\r", "\n", $content); - - $headers = $this->getHeaderNames(); - $results = array(); - foreach ($headers as $field => $name) { - $success = preg_match('/^[ \t\/*#@]*' . preg_quote($name, '/') . ':(.*)$/mi', $content, $matches); - - if ( ($success === 1) && $matches[1] ) { - $value = $matches[1]; - if ( function_exists('_cleanup_header_comment') ) { - $value = _cleanup_header_comment($value); - } - $results[$field] = $value; - } else { - $results[$field] = ''; - } - } - - return $results; - } - - /** - * @return array Format: ['HeaderKey' => 'Header Name'] - */ - abstract protected function getHeaderNames(); - - /** - * Get the value of a specific plugin or theme header. - * - * @param string $headerName - * @return string Either the value of the header, or an empty string if the header doesn't exist. - */ - abstract public function getHeaderValue($headerName); - - } -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Metadata.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Metadata.php deleted file mode 100644 index ddba0714..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Metadata.php +++ /dev/null @@ -1,132 +0,0 @@ -validateMetadata($apiResponse); - if ( is_wp_error($valid) ){ - do_action('puc_api_error', $valid); - trigger_error($valid->get_error_message(), E_USER_NOTICE); - return false; - } - - foreach(get_object_vars($apiResponse) as $key => $value){ - $target->$key = $value; - } - - return true; - } - - /** - * No validation by default! Subclasses should check that the required fields are present. - * - * @param StdClass $apiResponse - * @return bool|WP_Error - */ - protected function validateMetadata(/** @noinspection PhpUnusedParameterInspection */ $apiResponse) { - return true; - } - - /** - * Create a new instance by copying the necessary fields from another object. - * - * @abstract - * @param StdClass|self $object The source object. - * @return self The new copy. - */ - public static function fromObject(/** @noinspection PhpUnusedParameterInspection */ $object) { - throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses'); - } - - /** - * Create an instance of StdClass that can later be converted back to an - * update or info container. Useful for serialization and caching, as it - * avoids the "incomplete object" problem if the cached value is loaded - * before this class. - * - * @return StdClass - */ - public function toStdClass() { - $object = new stdClass(); - $this->copyFields($this, $object); - return $object; - } - - /** - * Transform the metadata into the format used by WordPress core. - * - * @return object - */ - abstract public function toWpFormat(); - - /** - * Copy known fields from one object to another. - * - * @param StdClass|self $from - * @param StdClass|self $to - */ - protected function copyFields($from, $to) { - $fields = $this->getFieldNames(); - - if ( property_exists($from, 'slug') && !empty($from->slug) ) { - //Let plugins add extra fields without having to create subclasses. - $fields = apply_filters($this->getPrefixedFilter('retain_fields') . '-' . $from->slug, $fields); - } - - foreach ($fields as $field) { - if ( property_exists($from, $field) ) { - $to->$field = $from->$field; - } - } - } - - /** - * @return string[] - */ - protected function getFieldNames() { - return array(); - } - - /** - * @param string $tag - * @return string - */ - protected function getPrefixedFilter($tag) { - return 'puc_' . $tag; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/OAuthSignature.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/OAuthSignature.php deleted file mode 100644 index 726befaf..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/OAuthSignature.php +++ /dev/null @@ -1,100 +0,0 @@ -consumerKey = $consumerKey; - $this->consumerSecret = $consumerSecret; - } - - /** - * Sign a URL using OAuth 1.0. - * - * @param string $url The URL to be signed. It may contain query parameters. - * @param string $method HTTP method such as "GET", "POST" and so on. - * @return string The signed URL. - */ - public function sign($url, $method = 'GET') { - $parameters = array(); - - //Parse query parameters. - $query = parse_url($url, PHP_URL_QUERY); - if ( !empty($query) ) { - parse_str($query, $parsedParams); - if ( is_array($parameters) ) { - $parameters = $parsedParams; - } - //Remove the query string from the URL. We'll replace it later. - $url = substr($url, 0, strpos($url, '?')); - } - - $parameters = array_merge( - $parameters, - array( - 'oauth_consumer_key' => $this->consumerKey, - 'oauth_nonce' => $this->nonce(), - 'oauth_signature_method' => 'HMAC-SHA1', - 'oauth_timestamp' => time(), - 'oauth_version' => '1.0', - ) - ); - unset($parameters['oauth_signature']); - - //Parameters must be sorted alphabetically before signing. - ksort($parameters); - - //The most complicated part of the request - generating the signature. - //The string to sign contains the HTTP method, the URL path, and all of - //our query parameters. Everything is URL encoded. Then we concatenate - //them with ampersands into a single string to hash. - $encodedVerb = urlencode($method); - $encodedUrl = urlencode($url); - $encodedParams = urlencode(http_build_query($parameters, '', '&')); - - $stringToSign = $encodedVerb . '&' . $encodedUrl . '&' . $encodedParams; - - //Since we only have one OAuth token (the consumer secret) we only have - //to use it as our HMAC key. However, we still have to append an & to it - //as if we were using it with additional tokens. - $secret = urlencode($this->consumerSecret) . '&'; - - //The signature is a hash of the consumer key and the base string. Note - //that we have to get the raw output from hash_hmac and base64 encode - //the binary data result. - $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $stringToSign, $secret, true)); - - return ($url . '?' . http_build_query($parameters)); - } - - /** - * Generate a random nonce. - * - * @return string - */ - private function nonce() { - $mt = microtime(); - - $rand = null; - if ( is_callable('random_bytes') ) { - try { - $rand = random_bytes(16); - } catch (Exception $ex) { - //Fall back to mt_rand (below). - } - } - if ( $rand === null ) { - $rand = mt_rand(); - } - - return md5($mt . '_' . $rand); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Info.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Info.php deleted file mode 100644 index f797e0a8..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Info.php +++ /dev/null @@ -1,132 +0,0 @@ -sections = (array)$instance->sections; - $instance->icons = (array)$instance->icons; - - return $instance; - } - - /** - * Very, very basic validation. - * - * @param StdClass $apiResponse - * @return bool|WP_Error - */ - protected function validateMetadata($apiResponse) { - if ( - !isset($apiResponse->name, $apiResponse->version) - || empty($apiResponse->name) - || empty($apiResponse->version) - ) { - return new WP_Error( - 'puc-invalid-metadata', - "The plugin metadata file does not contain the required 'name' and/or 'version' keys." - ); - } - return true; - } - - - /** - * Transform plugin info into the format used by the native WordPress.org API - * - * @return object - */ - public function toWpFormat(){ - $info = new stdClass; - - //The custom update API is built so that many fields have the same name and format - //as those returned by the native WordPress.org API. These can be assigned directly. - $sameFormat = array( - 'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice', - 'num_ratings', 'downloaded', 'active_installs', 'homepage', 'last_updated', - 'requires_php', - ); - foreach($sameFormat as $field){ - if ( isset($this->$field) ) { - $info->$field = $this->$field; - } else { - $info->$field = null; - } - } - - //Other fields need to be renamed and/or transformed. - $info->download_link = $this->download_url; - $info->author = $this->getFormattedAuthor(); - $info->sections = array_merge(array('description' => ''), $this->sections); - - if ( !empty($this->banners) ) { - //WP expects an array with two keys: "high" and "low". Both are optional. - //Docs: https://wordpress.org/plugins/about/faq/#banners - $info->banners = is_object($this->banners) ? get_object_vars($this->banners) : $this->banners; - $info->banners = array_intersect_key($info->banners, array('high' => true, 'low' => true)); - } - - return $info; - } - - protected function getFormattedAuthor() { - if ( !empty($this->author_homepage) ){ - /** @noinspection HtmlUnknownTarget */ - return sprintf('%s', $this->author_homepage, $this->author); - } - return $this->author; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Package.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Package.php deleted file mode 100644 index 23d8ee13..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Package.php +++ /dev/null @@ -1,184 +0,0 @@ -pluginAbsolutePath = $pluginAbsolutePath; - $this->pluginFile = plugin_basename($this->pluginAbsolutePath); - - parent::__construct($updateChecker); - - //Clear the version number cache when something - anything - is upgraded or WP clears the update cache. - add_filter('upgrader_post_install', array($this, 'clearCachedVersion')); - add_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion')); - } - - public function getInstalledVersion() { - if ( isset($this->cachedInstalledVersion) ) { - return $this->cachedInstalledVersion; - } - - $pluginHeader = $this->getPluginHeader(); - if ( isset($pluginHeader['Version']) ) { - $this->cachedInstalledVersion = $pluginHeader['Version']; - return $pluginHeader['Version']; - } else { - //This can happen if the filename points to something that is not a plugin. - $this->updateChecker->triggerError( - sprintf( - "Can't to read the Version header for '%s'. The filename is incorrect or is not a plugin.", - $this->updateChecker->pluginFile - ), - E_USER_WARNING - ); - return null; - } - } - - /** - * Clear the cached plugin version. This method can be set up as a filter (hook) and will - * return the filter argument unmodified. - * - * @param mixed $filterArgument - * @return mixed - */ - public function clearCachedVersion($filterArgument = null) { - $this->cachedInstalledVersion = null; - return $filterArgument; - } - - public function getAbsoluteDirectoryPath() { - return dirname($this->pluginAbsolutePath); - } - - /** - * Get the value of a specific plugin or theme header. - * - * @param string $headerName - * @param string $defaultValue - * @return string Either the value of the header, or $defaultValue if the header doesn't exist or is empty. - */ - public function getHeaderValue($headerName, $defaultValue = '') { - $headers = $this->getPluginHeader(); - if ( isset($headers[$headerName]) && ($headers[$headerName] !== '') ) { - return $headers[$headerName]; - } - return $defaultValue; - } - - protected function getHeaderNames() { - return array( - 'Name' => 'Plugin Name', - 'PluginURI' => 'Plugin URI', - 'Version' => 'Version', - 'Description' => 'Description', - 'Author' => 'Author', - 'AuthorURI' => 'Author URI', - 'TextDomain' => 'Text Domain', - 'DomainPath' => 'Domain Path', - 'Network' => 'Network', - - //The newest WordPress version that this plugin requires or has been tested with. - //We support several different formats for compatibility with other libraries. - 'Tested WP' => 'Tested WP', - 'Requires WP' => 'Requires WP', - 'Tested up to' => 'Tested up to', - 'Requires at least' => 'Requires at least', - ); - } - - /** - * Get the translated plugin title. - * - * @return string - */ - public function getPluginTitle() { - $title = ''; - $header = $this->getPluginHeader(); - if ( $header && !empty($header['Name']) && isset($header['TextDomain']) ) { - $title = translate($header['Name'], $header['TextDomain']); - } - return $title; - } - - /** - * Get plugin's metadata from its file header. - * - * @return array - */ - public function getPluginHeader() { - if ( !is_file($this->pluginAbsolutePath) ) { - //This can happen if the plugin filename is wrong. - $this->updateChecker->triggerError( - sprintf( - "Can't to read the plugin header for '%s'. The file does not exist.", - $this->updateChecker->pluginFile - ), - E_USER_WARNING - ); - return array(); - } - - if ( !function_exists('get_plugin_data') ) { - /** @noinspection PhpIncludeInspection */ - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - return get_plugin_data($this->pluginAbsolutePath, false, false); - } - - public function removeHooks() { - remove_filter('upgrader_post_install', array($this, 'clearCachedVersion')); - remove_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion')); - } - - /** - * Check if the plugin file is inside the mu-plugins directory. - * - * @return bool - */ - public function isMuPlugin() { - static $cachedResult = null; - - if ( $cachedResult === null ) { - if ( !defined('WPMU_PLUGIN_DIR') || !is_string(WPMU_PLUGIN_DIR) ) { - $cachedResult = false; - return $cachedResult; - } - - //Convert both paths to the canonical form before comparison. - $muPluginDir = realpath(WPMU_PLUGIN_DIR); - $pluginPath = realpath($this->pluginAbsolutePath); - //If realpath() fails, just normalize the syntax instead. - if (($muPluginDir === false) || ($pluginPath === false)) { - $muPluginDir = Puc_v4p11_Factory::normalizePath(WPMU_PLUGIN_DIR); - $pluginPath = Puc_v4p11_Factory::normalizePath($this->pluginAbsolutePath); - } - - $cachedResult = (strpos($pluginPath, $muPluginDir) === 0); - } - - return $cachedResult; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Ui.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Ui.php deleted file mode 100644 index 8aa4b351..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Ui.php +++ /dev/null @@ -1,278 +0,0 @@ -updateChecker = $updateChecker; - $this->manualCheckErrorTransient = $this->updateChecker->getUniqueName('manual_check_errors'); - - add_action('admin_init', array($this, 'onAdminInit')); - } - - public function onAdminInit() { - if ( $this->updateChecker->userCanInstallUpdates() ) { - $this->handleManualCheck(); - - add_filter('plugin_row_meta', array($this, 'addViewDetailsLink'), 10, 3); - add_filter('plugin_row_meta', array($this, 'addCheckForUpdatesLink'), 10, 2); - add_action('all_admin_notices', array($this, 'displayManualCheckResult')); - } - } - - /** - * Add a "View Details" link to the plugin row in the "Plugins" page. By default, - * the new link will appear before the "Visit plugin site" link (if present). - * - * You can change the link text by using the "puc_view_details_link-$slug" filter. - * Returning an empty string from the filter will disable the link. - * - * You can change the position of the link using the - * "puc_view_details_link_position-$slug" filter. - * Returning 'before' or 'after' will place the link immediately before/after - * the "Visit plugin site" link. - * Returning 'append' places the link after any existing links at the time of the hook. - * Returning 'replace' replaces the "Visit plugin site" link. - * Returning anything else disables the link when there is a "Visit plugin site" link. - * - * If there is no "Visit plugin site" link 'append' is always used! - * - * @param array $pluginMeta Array of meta links. - * @param string $pluginFile - * @param array $pluginData Array of plugin header data. - * @return array - */ - public function addViewDetailsLink($pluginMeta, $pluginFile, $pluginData = array()) { - if ( $this->isMyPluginFile($pluginFile) && !isset($pluginData['slug']) ) { - $linkText = apply_filters($this->updateChecker->getUniqueName('view_details_link'), __('View details')); - if ( !empty($linkText) ) { - $viewDetailsLinkPosition = 'append'; - - //Find the "Visit plugin site" link (if present). - $visitPluginSiteLinkIndex = count($pluginMeta) - 1; - if ( $pluginData['PluginURI'] ) { - $escapedPluginUri = esc_url($pluginData['PluginURI']); - foreach ($pluginMeta as $linkIndex => $existingLink) { - if ( strpos($existingLink, $escapedPluginUri) !== false ) { - $visitPluginSiteLinkIndex = $linkIndex; - $viewDetailsLinkPosition = apply_filters( - $this->updateChecker->getUniqueName('view_details_link_position'), - 'before' - ); - break; - } - } - } - - $viewDetailsLink = sprintf('%s', - esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=' . urlencode($this->updateChecker->slug) . - '&TB_iframe=true&width=600&height=550')), - esc_attr(sprintf(__('More information about %s'), $pluginData['Name'])), - esc_attr($pluginData['Name']), - $linkText - ); - switch ($viewDetailsLinkPosition) { - case 'before': - array_splice($pluginMeta, $visitPluginSiteLinkIndex, 0, $viewDetailsLink); - break; - case 'after': - array_splice($pluginMeta, $visitPluginSiteLinkIndex + 1, 0, $viewDetailsLink); - break; - case 'replace': - $pluginMeta[$visitPluginSiteLinkIndex] = $viewDetailsLink; - break; - case 'append': - default: - $pluginMeta[] = $viewDetailsLink; - break; - } - } - } - return $pluginMeta; - } - - /** - * Add a "Check for updates" link to the plugin row in the "Plugins" page. By default, - * the new link will appear after the "Visit plugin site" link if present, otherwise - * after the "View plugin details" link. - * - * You can change the link text by using the "puc_manual_check_link-$slug" filter. - * Returning an empty string from the filter will disable the link. - * - * @param array $pluginMeta Array of meta links. - * @param string $pluginFile - * @return array - */ - public function addCheckForUpdatesLink($pluginMeta, $pluginFile) { - if ( $this->isMyPluginFile($pluginFile) ) { - $linkUrl = wp_nonce_url( - add_query_arg( - array( - 'puc_check_for_updates' => 1, - 'puc_slug' => $this->updateChecker->slug, - ), - self_admin_url('plugins.php') - ), - 'puc_check_for_updates' - ); - - $linkText = apply_filters( - $this->updateChecker->getUniqueName('manual_check_link'), - __('Check for updates', 'plugin-update-checker') - ); - if ( !empty($linkText) ) { - /** @noinspection HtmlUnknownTarget */ - $pluginMeta[] = sprintf('%s', esc_attr($linkUrl), $linkText); - } - } - return $pluginMeta; - } - - protected function isMyPluginFile($pluginFile) { - return ($pluginFile == $this->updateChecker->pluginFile) - || (!empty($this->updateChecker->muPluginFile) && ($pluginFile == $this->updateChecker->muPluginFile)); - } - - /** - * Check for updates when the user clicks the "Check for updates" link. - * - * @see self::addCheckForUpdatesLink() - * - * @return void - */ - public function handleManualCheck() { - $shouldCheck = - isset($_GET['puc_check_for_updates'], $_GET['puc_slug']) - && $_GET['puc_slug'] == $this->updateChecker->slug - && check_admin_referer('puc_check_for_updates'); - - if ( $shouldCheck ) { - $update = $this->updateChecker->checkForUpdates(); - $status = ($update === null) ? 'no_update' : 'update_available'; - $lastRequestApiErrors = $this->updateChecker->getLastRequestApiErrors(); - - if ( ($update === null) && !empty($lastRequestApiErrors) ) { - //Some errors are not critical. For example, if PUC tries to retrieve the readme.txt - //file from GitHub and gets a 404, that's an API error, but it doesn't prevent updates - //from working. Maybe the plugin simply doesn't have a readme. - //Let's only show important errors. - $foundCriticalErrors = false; - $questionableErrorCodes = array( - 'puc-github-http-error', - 'puc-gitlab-http-error', - 'puc-bitbucket-http-error', - ); - - foreach ($lastRequestApiErrors as $item) { - $wpError = $item['error']; - /** @var WP_Error $wpError */ - if ( !in_array($wpError->get_error_code(), $questionableErrorCodes) ) { - $foundCriticalErrors = true; - break; - } - } - - if ( $foundCriticalErrors ) { - $status = 'error'; - set_site_transient($this->manualCheckErrorTransient, $lastRequestApiErrors, 60); - } - } - - wp_redirect(add_query_arg( - array( - 'puc_update_check_result' => $status, - 'puc_slug' => $this->updateChecker->slug, - ), - self_admin_url('plugins.php') - )); - exit; - } - } - - /** - * Display the results of a manual update check. - * - * @see self::handleManualCheck() - * - * You can change the result message by using the "puc_manual_check_message-$slug" filter. - */ - public function displayManualCheckResult() { - if ( isset($_GET['puc_update_check_result'], $_GET['puc_slug']) && ($_GET['puc_slug'] == $this->updateChecker->slug) ) { - $status = strval($_GET['puc_update_check_result']); - $title = $this->updateChecker->getInstalledPackage()->getPluginTitle(); - $noticeClass = 'updated notice-success'; - $details = ''; - - if ( $status == 'no_update' ) { - $message = sprintf(_x('The %s plugin is up to date.', 'the plugin title', 'plugin-update-checker'), $title); - } else if ( $status == 'update_available' ) { - $message = sprintf(_x('A new version of the %s plugin is available.', 'the plugin title', 'plugin-update-checker'), $title); - } else if ( $status === 'error' ) { - $message = sprintf(_x('Could not determine if updates are available for %s.', 'the plugin title', 'plugin-update-checker'), $title); - $noticeClass = 'error notice-error'; - - $details = $this->formatManualCheckErrors(get_site_transient($this->manualCheckErrorTransient)); - delete_site_transient($this->manualCheckErrorTransient); - } else { - $message = sprintf(__('Unknown update checker status "%s"', 'plugin-update-checker'), htmlentities($status)); - $noticeClass = 'error notice-error'; - } - printf( - '

%s

%s
', - $noticeClass, - apply_filters($this->updateChecker->getUniqueName('manual_check_message'), $message, $status), - $details - ); - } - } - - /** - * Format the list of errors that were thrown during an update check. - * - * @param array $errors - * @return string - */ - protected function formatManualCheckErrors($errors) { - if ( empty($errors) ) { - return ''; - } - $output = ''; - - $showAsList = count($errors) > 1; - if ( $showAsList ) { - $output .= '
    '; - $formatString = '
  1. %1$s %2$s
  2. '; - } else { - $formatString = '

    %1$s %2$s

    '; - } - foreach ($errors as $item) { - $wpError = $item['error']; - /** @var WP_Error $wpError */ - $output .= sprintf( - $formatString, - $wpError->get_error_message(), - $wpError->get_error_code() - ); - } - if ( $showAsList ) { - $output .= '
'; - } - - return $output; - } - - public function removeHooks() { - remove_action('admin_init', array($this, 'onAdminInit')); - remove_filter('plugin_row_meta', array($this, 'addViewDetailsLink'), 10); - remove_filter('plugin_row_meta', array($this, 'addCheckForUpdatesLink'), 10); - remove_action('all_admin_notices', array($this, 'displayManualCheckResult')); - } - } -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Update.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Update.php deleted file mode 100644 index a5ebd4d4..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/Update.php +++ /dev/null @@ -1,112 +0,0 @@ -copyFields($object, $update); - return $update; - } - - /** - * @return string[] - */ - protected function getFieldNames() { - return array_merge(parent::getFieldNames(), self::$extraFields); - } - - /** - * Transform the update into the format used by WordPress native plugin API. - * - * @return object - */ - public function toWpFormat() { - $update = parent::toWpFormat(); - - $update->id = $this->id; - $update->url = $this->homepage; - $update->tested = $this->tested; - $update->requires_php = $this->requires_php; - $update->plugin = $this->filename; - - if ( !empty($this->upgrade_notice) ) { - $update->upgrade_notice = $this->upgrade_notice; - } - - if ( !empty($this->icons) && is_array($this->icons) ) { - //This should be an array with up to 4 keys: 'svg', '1x', '2x' and 'default'. - //Docs: https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons - $icons = array_intersect_key( - $this->icons, - array('svg' => true, '1x' => true, '2x' => true, 'default' => true) - ); - if ( !empty($icons) ) { - $update->icons = $icons; - - //It appears that the 'default' icon isn't used anywhere in WordPress 4.9, - //but lets set it just in case a future release needs it. - if ( !isset($update->icons['default']) ) { - $update->icons['default'] = current($update->icons); - } - } - } - - return $update; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/UpdateChecker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/UpdateChecker.php deleted file mode 100644 index b4b39fa3..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Plugin/UpdateChecker.php +++ /dev/null @@ -1,414 +0,0 @@ -pluginAbsolutePath = $pluginFile; - $this->pluginFile = plugin_basename($this->pluginAbsolutePath); - $this->muPluginFile = $muPluginFile; - - //If no slug is specified, use the name of the main plugin file as the slug. - //For example, 'my-cool-plugin/cool-plugin.php' becomes 'cool-plugin'. - if ( empty($slug) ){ - $slug = basename($this->pluginFile, '.php'); - } - - //Plugin slugs must be unique. - $slugCheckFilter = 'puc_is_slug_in_use-' . $slug; - $slugUsedBy = apply_filters($slugCheckFilter, false); - if ( $slugUsedBy ) { - $this->triggerError(sprintf( - 'Plugin slug "%s" is already in use by %s. Slugs must be unique.', - htmlentities($slug), - htmlentities($slugUsedBy) - ), E_USER_ERROR); - } - add_filter($slugCheckFilter, array($this, 'getAbsolutePath')); - - parent::__construct($metadataUrl, dirname($this->pluginFile), $slug, $checkPeriod, $optionName); - - //Backwards compatibility: If the plugin is a mu-plugin but no $muPluginFile is specified, assume - //it's the same as $pluginFile given that it's not in a subdirectory (WP only looks in the base dir). - if ( (strpbrk($this->pluginFile, '/\\') === false) && $this->isUnknownMuPlugin() ) { - $this->muPluginFile = $this->pluginFile; - } - - //To prevent a crash during plugin uninstallation, remove updater hooks when the user removes the plugin. - //Details: https://github.com/YahnisElsts/plugin-update-checker/issues/138#issuecomment-335590964 - add_action('uninstall_' . $this->pluginFile, array($this, 'removeHooks')); - - $this->extraUi = new Puc_v4p11_Plugin_Ui($this); - } - - /** - * Create an instance of the scheduler. - * - * @param int $checkPeriod - * @return Puc_v4p11_Scheduler - */ - protected function createScheduler($checkPeriod) { - $scheduler = new Puc_v4p11_Scheduler($this, $checkPeriod, array('load-plugins.php')); - register_deactivation_hook($this->pluginFile, array($scheduler, 'removeUpdaterCron')); - return $scheduler; - } - - /** - * Install the hooks required to run periodic update checks and inject update info - * into WP data structures. - * - * @return void - */ - protected function installHooks(){ - //Override requests for plugin information - add_filter('plugins_api', array($this, 'injectInfo'), 20, 3); - - parent::installHooks(); - } - - /** - * Remove update checker hooks. - * - * The intent is to prevent a fatal error that can happen if the plugin has an uninstall - * hook. During uninstallation, WP includes the main plugin file (which creates a PUC instance), - * the uninstall hook runs, WP deletes the plugin files and then updates some transients. - * If PUC hooks are still around at this time, they could throw an error while trying to - * autoload classes from files that no longer exist. - * - * The "site_transient_{$transient}" filter is the main problem here, but let's also remove - * most other PUC hooks to be safe. - * - * @internal - */ - public function removeHooks() { - parent::removeHooks(); - $this->extraUi->removeHooks(); - $this->package->removeHooks(); - - remove_filter('plugins_api', array($this, 'injectInfo'), 20); - } - - /** - * Retrieve plugin info from the configured API endpoint. - * - * @uses wp_remote_get() - * - * @param array $queryArgs Additional query arguments to append to the request. Optional. - * @return Puc_v4p11_Plugin_Info - */ - public function requestInfo($queryArgs = array()) { - list($pluginInfo, $result) = $this->requestMetadata('Puc_v4p11_Plugin_Info', 'request_info', $queryArgs); - - if ( $pluginInfo !== null ) { - /** @var Puc_v4p11_Plugin_Info $pluginInfo */ - $pluginInfo->filename = $this->pluginFile; - $pluginInfo->slug = $this->slug; - } - - $pluginInfo = apply_filters($this->getUniqueName('request_info_result'), $pluginInfo, $result); - return $pluginInfo; - } - - /** - * Retrieve the latest update (if any) from the configured API endpoint. - * - * @uses PluginUpdateChecker::requestInfo() - * - * @return Puc_v4p11_Update|null An instance of Plugin_Update, or NULL when no updates are available. - */ - public function requestUpdate() { - //For the sake of simplicity, this function just calls requestInfo() - //and transforms the result accordingly. - $pluginInfo = $this->requestInfo(array('checking_for_updates' => '1')); - if ( $pluginInfo === null ){ - return null; - } - $update = Puc_v4p11_Plugin_Update::fromPluginInfo($pluginInfo); - - $update = $this->filterUpdateResult($update); - - return $update; - } - - /** - * Intercept plugins_api() calls that request information about our plugin and - * use the configured API endpoint to satisfy them. - * - * @see plugins_api() - * - * @param mixed $result - * @param string $action - * @param array|object $args - * @return mixed - */ - public function injectInfo($result, $action = null, $args = null){ - $relevant = ($action == 'plugin_information') && isset($args->slug) && ( - ($args->slug == $this->slug) || ($args->slug == dirname($this->pluginFile)) - ); - if ( !$relevant ) { - return $result; - } - - $pluginInfo = $this->requestInfo(); - $this->fixSupportedWordpressVersion($pluginInfo); - - $pluginInfo = apply_filters($this->getUniqueName('pre_inject_info'), $pluginInfo); - if ( $pluginInfo ) { - return $pluginInfo->toWpFormat(); - } - - return $result; - } - - protected function shouldShowUpdates() { - //No update notifications for mu-plugins unless explicitly enabled. The MU plugin file - //is usually different from the main plugin file so the update wouldn't show up properly anyway. - return !$this->isUnknownMuPlugin(); - } - - /** - * @param stdClass|null $updates - * @param stdClass $updateToAdd - * @return stdClass - */ - protected function addUpdateToList($updates, $updateToAdd) { - if ( $this->package->isMuPlugin() ) { - //WP does not support automatic update installation for mu-plugins, but we can - //still display a notice. - $updateToAdd->package = null; - } - return parent::addUpdateToList($updates, $updateToAdd); - } - - /** - * @param stdClass|null $updates - * @return stdClass|null - */ - protected function removeUpdateFromList($updates) { - $updates = parent::removeUpdateFromList($updates); - if ( !empty($this->muPluginFile) && isset($updates, $updates->response) ) { - unset($updates->response[$this->muPluginFile]); - } - return $updates; - } - - /** - * For plugins, the update array is indexed by the plugin filename relative to the "plugins" - * directory. Example: "plugin-name/plugin.php". - * - * @return string - */ - protected function getUpdateListKey() { - if ( $this->package->isMuPlugin() ) { - return $this->muPluginFile; - } - return $this->pluginFile; - } - - protected function getNoUpdateItemFields() { - return array_merge( - parent::getNoUpdateItemFields(), - array( - 'id' => $this->pluginFile, - 'slug' => $this->slug, - 'plugin' => $this->pluginFile, - 'icons' => array(), - 'banners' => array(), - 'banners_rtl' => array(), - 'tested' => '', - 'compatibility' => new stdClass(), - ) - ); - } - - /** - * Alias for isBeingUpgraded(). - * - * @deprecated - * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update. - * @return bool - */ - public function isPluginBeingUpgraded($upgrader = null) { - return $this->isBeingUpgraded($upgrader); - } - - /** - * Is there an update being installed for this plugin, right now? - * - * @param WP_Upgrader|null $upgrader - * @return bool - */ - public function isBeingUpgraded($upgrader = null) { - return $this->upgraderStatus->isPluginBeingUpgraded($this->pluginFile, $upgrader); - } - - /** - * Get the details of the currently available update, if any. - * - * If no updates are available, or if the last known update version is below or equal - * to the currently installed version, this method will return NULL. - * - * Uses cached update data. To retrieve update information straight from - * the metadata URL, call requestUpdate() instead. - * - * @return Puc_v4p11_Plugin_Update|null - */ - public function getUpdate() { - $update = parent::getUpdate(); - if ( isset($update) ) { - /** @var Puc_v4p11_Plugin_Update $update */ - $update->filename = $this->pluginFile; - } - return $update; - } - - /** - * Get the translated plugin title. - * - * @deprecated - * @return string - */ - public function getPluginTitle() { - return $this->package->getPluginTitle(); - } - - /** - * Check if the current user has the required permissions to install updates. - * - * @return bool - */ - public function userCanInstallUpdates() { - return current_user_can('update_plugins'); - } - - /** - * Check if the plugin file is inside the mu-plugins directory. - * - * @deprecated - * @return bool - */ - protected function isMuPlugin() { - return $this->package->isMuPlugin(); - } - - /** - * MU plugins are partially supported, but only when we know which file in mu-plugins - * corresponds to this plugin. - * - * @return bool - */ - protected function isUnknownMuPlugin() { - return empty($this->muPluginFile) && $this->package->isMuPlugin(); - } - - /** - * Get absolute path to the main plugin file. - * - * @return string - */ - public function getAbsolutePath() { - return $this->pluginAbsolutePath; - } - - /** - * Register a callback for filtering query arguments. - * - * The callback function should take one argument - an associative array of query arguments. - * It should return a modified array of query arguments. - * - * @uses add_filter() This method is a convenience wrapper for add_filter(). - * - * @param callable $callback - * @return void - */ - public function addQueryArgFilter($callback){ - $this->addFilter('request_info_query_args', $callback); - } - - /** - * Register a callback for filtering arguments passed to wp_remote_get(). - * - * The callback function should take one argument - an associative array of arguments - - * and return a modified array or arguments. See the WP documentation on wp_remote_get() - * for details on what arguments are available and how they work. - * - * @uses add_filter() This method is a convenience wrapper for add_filter(). - * - * @param callable $callback - * @return void - */ - public function addHttpRequestArgFilter($callback) { - $this->addFilter('request_info_options', $callback); - } - - /** - * Register a callback for filtering the plugin info retrieved from the external API. - * - * The callback function should take two arguments. If the plugin info was retrieved - * successfully, the first argument passed will be an instance of PluginInfo. Otherwise, - * it will be NULL. The second argument will be the corresponding return value of - * wp_remote_get (see WP docs for details). - * - * The callback function should return a new or modified instance of PluginInfo or NULL. - * - * @uses add_filter() This method is a convenience wrapper for add_filter(). - * - * @param callable $callback - * @return void - */ - public function addResultFilter($callback) { - $this->addFilter('request_info_result', $callback, 10, 2); - } - - protected function createDebugBarExtension() { - return new Puc_v4p11_DebugBar_PluginExtension($this); - } - - /** - * Create a package instance that represents this plugin or theme. - * - * @return Puc_v4p11_InstalledPackage - */ - protected function createInstalledPackage() { - return new Puc_v4p11_Plugin_Package($this->pluginAbsolutePath, $this); - } - - /** - * @return Puc_v4p11_Plugin_Package - */ - public function getInstalledPackage() { - return $this->package; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Scheduler.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Scheduler.php deleted file mode 100644 index dd3c3c34..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Scheduler.php +++ /dev/null @@ -1,266 +0,0 @@ -updateChecker = $updateChecker; - $this->checkPeriod = $checkPeriod; - - //Set up the periodic update checks - $this->cronHook = $this->updateChecker->getUniqueName('cron_check_updates'); - if ( $this->checkPeriod > 0 ){ - - //Trigger the check via Cron. - //Try to use one of the default schedules if possible as it's less likely to conflict - //with other plugins and their custom schedules. - $defaultSchedules = array( - 1 => 'hourly', - 12 => 'twicedaily', - 24 => 'daily', - ); - if ( array_key_exists($this->checkPeriod, $defaultSchedules) ) { - $scheduleName = $defaultSchedules[$this->checkPeriod]; - } else { - //Use a custom cron schedule. - $scheduleName = 'every' . $this->checkPeriod . 'hours'; - add_filter('cron_schedules', array($this, '_addCustomSchedule')); - } - - if ( !wp_next_scheduled($this->cronHook) && !defined('WP_INSTALLING') ) { - //Randomly offset the schedule to help prevent update server traffic spikes. Without this - //most checks may happen during times of day when people are most likely to install new plugins. - $firstCheckTime = time() - rand(0, max($this->checkPeriod * 3600 - 15 * 60, 1)); - $firstCheckTime = apply_filters( - $this->updateChecker->getUniqueName('first_check_time'), - $firstCheckTime - ); - wp_schedule_event($firstCheckTime, $scheduleName, $this->cronHook); - } - add_action($this->cronHook, array($this, 'maybeCheckForUpdates')); - - //In case Cron is disabled or unreliable, we also manually trigger - //the periodic checks while the user is browsing the Dashboard. - add_action( 'admin_init', array($this, 'maybeCheckForUpdates') ); - - //Like WordPress itself, we check more often on certain pages. - /** @see wp_update_plugins */ - add_action('load-update-core.php', array($this, 'maybeCheckForUpdates')); - //"load-update.php" and "load-plugins.php" or "load-themes.php". - $this->hourlyCheckHooks = array_merge($this->hourlyCheckHooks, $hourlyHooks); - foreach($this->hourlyCheckHooks as $hook) { - add_action($hook, array($this, 'maybeCheckForUpdates')); - } - //This hook fires after a bulk update is complete. - add_action('upgrader_process_complete', array($this, 'upgraderProcessComplete'), 11, 2); - - } else { - //Periodic checks are disabled. - wp_clear_scheduled_hook($this->cronHook); - } - } - - /** - * Runs upon the WP action upgrader_process_complete. - * - * We look at the parameters to decide whether to call maybeCheckForUpdates() or not. - * We also check if the update checker has been removed by the update. - * - * @param WP_Upgrader $upgrader WP_Upgrader instance - * @param array $upgradeInfo extra information about the upgrade - */ - public function upgraderProcessComplete( - /** @noinspection PhpUnusedParameterInspection */ - $upgrader, $upgradeInfo - ) { - //Cancel all further actions if the current version of PUC has been deleted or overwritten - //by a different version during the upgrade. If we try to do anything more in that situation, - //we could trigger a fatal error by trying to autoload a deleted class. - clearstatcache(); - if ( !file_exists(__FILE__) ) { - $this->removeHooks(); - $this->updateChecker->removeHooks(); - return; - } - - //Sanity check and limitation to relevant types. - if ( - !is_array($upgradeInfo) || !isset($upgradeInfo['type'], $upgradeInfo['action']) - || 'update' !== $upgradeInfo['action'] || !in_array($upgradeInfo['type'], array('plugin', 'theme')) - ) { - return; - } - - //Filter out notifications of upgrades that should have no bearing upon whether or not our - //current info is up-to-date. - if ( is_a($this->updateChecker, 'Puc_v4p11_Theme_UpdateChecker') ) { - if ( 'theme' !== $upgradeInfo['type'] || !isset($upgradeInfo['themes']) ) { - return; - } - - //Letting too many things going through for checks is not a real problem, so we compare widely. - if ( !in_array( - strtolower($this->updateChecker->directoryName), - array_map('strtolower', $upgradeInfo['themes']) - ) ) { - return; - } - } - - if ( is_a($this->updateChecker, 'Puc_v4p11_Plugin_UpdateChecker') ) { - if ( 'plugin' !== $upgradeInfo['type'] || !isset($upgradeInfo['plugins']) ) { - return; - } - - //Themes pass in directory names in the information array, but plugins use the relative plugin path. - if ( !in_array( - strtolower($this->updateChecker->directoryName), - array_map('dirname', array_map('strtolower', $upgradeInfo['plugins'])) - ) ) { - return; - } - } - - $this->maybeCheckForUpdates(); - } - - /** - * Check for updates if the configured check interval has already elapsed. - * Will use a shorter check interval on certain admin pages like "Dashboard -> Updates" or when doing cron. - * - * You can override the default behaviour by using the "puc_check_now-$slug" filter. - * The filter callback will be passed three parameters: - * - Current decision. TRUE = check updates now, FALSE = don't check now. - * - Last check time as a Unix timestamp. - * - Configured check period in hours. - * Return TRUE to check for updates immediately, or FALSE to cancel. - * - * This method is declared public because it's a hook callback. Calling it directly is not recommended. - */ - public function maybeCheckForUpdates() { - if ( empty($this->checkPeriod) ){ - return; - } - - $state = $this->updateChecker->getUpdateState(); - $shouldCheck = ($state->timeSinceLastCheck() >= $this->getEffectiveCheckPeriod()); - - //Let plugin authors substitute their own algorithm. - $shouldCheck = apply_filters( - $this->updateChecker->getUniqueName('check_now'), - $shouldCheck, - $state->getLastCheck(), - $this->checkPeriod - ); - - if ( $shouldCheck ) { - $this->updateChecker->checkForUpdates(); - } - } - - /** - * Calculate the actual check period based on the current status and environment. - * - * @return int Check period in seconds. - */ - protected function getEffectiveCheckPeriod() { - $currentFilter = current_filter(); - if ( in_array($currentFilter, array('load-update-core.php', 'upgrader_process_complete')) ) { - //Check more often when the user visits "Dashboard -> Updates" or does a bulk update. - $period = 60; - } else if ( in_array($currentFilter, $this->hourlyCheckHooks) ) { - //Also check more often on /wp-admin/update.php and the "Plugins" or "Themes" page. - $period = 3600; - } else if ( $this->throttleRedundantChecks && ($this->updateChecker->getUpdate() !== null) ) { - //Check less frequently if it's already known that an update is available. - $period = $this->throttledCheckPeriod * 3600; - } else if ( defined('DOING_CRON') && constant('DOING_CRON') ) { - //WordPress cron schedules are not exact, so lets do an update check even - //if slightly less than $checkPeriod hours have elapsed since the last check. - $cronFuzziness = 20 * 60; - $period = $this->checkPeriod * 3600 - $cronFuzziness; - } else { - $period = $this->checkPeriod * 3600; - } - - return $period; - } - - /** - * Add our custom schedule to the array of Cron schedules used by WP. - * - * @param array $schedules - * @return array - */ - public function _addCustomSchedule($schedules) { - if ( $this->checkPeriod && ($this->checkPeriod > 0) ){ - $scheduleName = 'every' . $this->checkPeriod . 'hours'; - $schedules[$scheduleName] = array( - 'interval' => $this->checkPeriod * 3600, - 'display' => sprintf('Every %d hours', $this->checkPeriod), - ); - } - return $schedules; - } - - /** - * Remove the scheduled cron event that the library uses to check for updates. - * - * @return void - */ - public function removeUpdaterCron() { - wp_clear_scheduled_hook($this->cronHook); - } - - /** - * Get the name of the update checker's WP-cron hook. Mostly useful for debugging. - * - * @return string - */ - public function getCronHookName() { - return $this->cronHook; - } - - /** - * Remove most hooks added by the scheduler. - */ - public function removeHooks() { - remove_filter('cron_schedules', array($this, '_addCustomSchedule')); - remove_action('admin_init', array($this, 'maybeCheckForUpdates')); - remove_action('load-update-core.php', array($this, 'maybeCheckForUpdates')); - - if ( $this->cronHook !== null ) { - remove_action($this->cronHook, array($this, 'maybeCheckForUpdates')); - } - if ( !empty($this->hourlyCheckHooks) ) { - foreach ($this->hourlyCheckHooks as $hook) { - remove_action($hook, array($this, 'maybeCheckForUpdates')); - } - } - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/StateStore.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/StateStore.php deleted file mode 100644 index 01abcc94..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/StateStore.php +++ /dev/null @@ -1,207 +0,0 @@ -optionName = $optionName; - } - - /** - * Get time elapsed since the last update check. - * - * If there are no recorded update checks, this method returns a large arbitrary number - * (i.e. time since the Unix epoch). - * - * @return int Elapsed time in seconds. - */ - public function timeSinceLastCheck() { - $this->lazyLoad(); - return time() - $this->lastCheck; - } - - /** - * @return int - */ - public function getLastCheck() { - $this->lazyLoad(); - return $this->lastCheck; - } - - /** - * Set the time of the last update check to the current timestamp. - * - * @return $this - */ - public function setLastCheckToNow() { - $this->lazyLoad(); - $this->lastCheck = time(); - return $this; - } - - /** - * @return null|Puc_v4p11_Update - */ - public function getUpdate() { - $this->lazyLoad(); - return $this->update; - } - - /** - * @param Puc_v4p11_Update|null $update - * @return $this - */ - public function setUpdate(Puc_v4p11_Update $update = null) { - $this->lazyLoad(); - $this->update = $update; - return $this; - } - - /** - * @return string - */ - public function getCheckedVersion() { - $this->lazyLoad(); - return $this->checkedVersion; - } - - /** - * @param string $version - * @return $this - */ - public function setCheckedVersion($version) { - $this->lazyLoad(); - $this->checkedVersion = strval($version); - return $this; - } - - /** - * Get translation updates. - * - * @return array - */ - public function getTranslations() { - $this->lazyLoad(); - if ( isset($this->update, $this->update->translations) ) { - return $this->update->translations; - } - return array(); - } - - /** - * Set translation updates. - * - * @param array $translationUpdates - */ - public function setTranslations($translationUpdates) { - $this->lazyLoad(); - if ( isset($this->update) ) { - $this->update->translations = $translationUpdates; - $this->save(); - } - } - - public function save() { - $state = new stdClass(); - - $state->lastCheck = $this->lastCheck; - $state->checkedVersion = $this->checkedVersion; - - if ( isset($this->update)) { - $state->update = $this->update->toStdClass(); - - $updateClass = get_class($this->update); - $state->updateClass = $updateClass; - $prefix = $this->getLibPrefix(); - if ( Puc_v4p11_Utils::startsWith($updateClass, $prefix) ) { - $state->updateBaseClass = substr($updateClass, strlen($prefix)); - } - } - - update_site_option($this->optionName, $state); - $this->isLoaded = true; - } - - /** - * @return $this - */ - public function lazyLoad() { - if ( !$this->isLoaded ) { - $this->load(); - } - return $this; - } - - protected function load() { - $this->isLoaded = true; - - $state = get_site_option($this->optionName, null); - - if ( !is_object($state) ) { - $this->lastCheck = 0; - $this->checkedVersion = ''; - $this->update = null; - return; - } - - $this->lastCheck = intval(Puc_v4p11_Utils::get($state, 'lastCheck', 0)); - $this->checkedVersion = Puc_v4p11_Utils::get($state, 'checkedVersion', ''); - $this->update = null; - - if ( isset($state->update) ) { - //This mess is due to the fact that the want the update class from this version - //of the library, not the version that saved the update. - - $updateClass = null; - if ( isset($state->updateBaseClass) ) { - $updateClass = $this->getLibPrefix() . $state->updateBaseClass; - } else if ( isset($state->updateClass) && class_exists($state->updateClass) ) { - $updateClass = $state->updateClass; - } - - if ( $updateClass !== null ) { - $this->update = call_user_func(array($updateClass, 'fromObject'), $state->update); - } - } - } - - public function delete() { - delete_site_option($this->optionName); - - $this->lastCheck = 0; - $this->checkedVersion = ''; - $this->update = null; - } - - private function getLibPrefix() { - $parts = explode('_', __CLASS__, 3); - return $parts[0] . '_' . $parts[1] . '_'; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Package.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Package.php deleted file mode 100644 index 3cfbce98..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Package.php +++ /dev/null @@ -1,65 +0,0 @@ -stylesheet = $stylesheet; - $this->theme = wp_get_theme($this->stylesheet); - - parent::__construct($updateChecker); - } - - public function getInstalledVersion() { - return $this->theme->get('Version'); - } - - public function getAbsoluteDirectoryPath() { - if ( method_exists($this->theme, 'get_stylesheet_directory') ) { - return $this->theme->get_stylesheet_directory(); //Available since WP 3.4. - } - return get_theme_root($this->stylesheet) . '/' . $this->stylesheet; - } - - /** - * Get the value of a specific plugin or theme header. - * - * @param string $headerName - * @param string $defaultValue - * @return string Either the value of the header, or $defaultValue if the header doesn't exist or is empty. - */ - public function getHeaderValue($headerName, $defaultValue = '') { - $value = $this->theme->get($headerName); - if ( ($headerName === false) || ($headerName === '') ) { - return $defaultValue; - } - return $value; - } - - protected function getHeaderNames() { - return array( - 'Name' => 'Theme Name', - 'ThemeURI' => 'Theme URI', - 'Description' => 'Description', - 'Author' => 'Author', - 'AuthorURI' => 'Author URI', - 'Version' => 'Version', - 'Template' => 'Template', - 'Status' => 'Status', - 'Tags' => 'Tags', - 'TextDomain' => 'Text Domain', - 'DomainPath' => 'Domain Path', - ); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Update.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Update.php deleted file mode 100644 index 9fc46f88..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/Update.php +++ /dev/null @@ -1,84 +0,0 @@ - $this->slug, - 'new_version' => $this->version, - 'url' => $this->details_url, - ); - - if ( !empty($this->download_url) ) { - $update['package'] = $this->download_url; - } - - return $update; - } - - /** - * Create a new instance of Theme_Update from its JSON-encoded representation. - * - * @param string $json Valid JSON string representing a theme information object. - * @return self New instance of ThemeUpdate, or NULL on error. - */ - public static function fromJson($json) { - $instance = new self(); - if ( !parent::createFromJson($json, $instance) ) { - return null; - } - return $instance; - } - - /** - * Create a new instance by copying the necessary fields from another object. - * - * @param StdClass|Puc_v4p11_Theme_Update $object The source object. - * @return Puc_v4p11_Theme_Update The new copy. - */ - public static function fromObject($object) { - $update = new self(); - $update->copyFields($object, $update); - return $update; - } - - /** - * Basic validation. - * - * @param StdClass $apiResponse - * @return bool|WP_Error - */ - protected function validateMetadata($apiResponse) { - $required = array('version', 'details_url'); - foreach($required as $key) { - if ( !isset($apiResponse->$key) || empty($apiResponse->$key) ) { - return new WP_Error( - 'tuc-invalid-metadata', - sprintf('The theme metadata is missing the required "%s" key.', $key) - ); - } - } - return true; - } - - protected function getFieldNames() { - return array_merge(parent::getFieldNames(), self::$extraFields); - } - - protected function getPrefixedFilter($tag) { - return parent::getPrefixedFilter($tag) . '_theme'; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/UpdateChecker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/UpdateChecker.php deleted file mode 100644 index 091445ef..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Theme/UpdateChecker.php +++ /dev/null @@ -1,152 +0,0 @@ -stylesheet = $stylesheet; - - parent::__construct( - $metadataUrl, - $stylesheet, - $customSlug ? $customSlug : $stylesheet, - $checkPeriod, - $optionName - ); - } - - /** - * For themes, the update array is indexed by theme directory name. - * - * @return string - */ - protected function getUpdateListKey() { - return $this->directoryName; - } - - /** - * Retrieve the latest update (if any) from the configured API endpoint. - * - * @return Puc_v4p11_Update|null An instance of Update, or NULL when no updates are available. - */ - public function requestUpdate() { - list($themeUpdate, $result) = $this->requestMetadata('Puc_v4p11_Theme_Update', 'request_update'); - - if ( $themeUpdate !== null ) { - /** @var Puc_v4p11_Theme_Update $themeUpdate */ - $themeUpdate->slug = $this->slug; - } - - $themeUpdate = $this->filterUpdateResult($themeUpdate, $result); - return $themeUpdate; - } - - protected function getNoUpdateItemFields() { - return array_merge( - parent::getNoUpdateItemFields(), - array( - 'theme' => $this->directoryName, - 'requires' => '', - ) - ); - } - - public function userCanInstallUpdates() { - return current_user_can('update_themes'); - } - - /** - * Create an instance of the scheduler. - * - * @param int $checkPeriod - * @return Puc_v4p11_Scheduler - */ - protected function createScheduler($checkPeriod) { - return new Puc_v4p11_Scheduler($this, $checkPeriod, array('load-themes.php')); - } - - /** - * Is there an update being installed right now for this theme? - * - * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update. - * @return bool - */ - public function isBeingUpgraded($upgrader = null) { - return $this->upgraderStatus->isThemeBeingUpgraded($this->stylesheet, $upgrader); - } - - protected function createDebugBarExtension() { - return new Puc_v4p11_DebugBar_Extension($this, 'Puc_v4p11_DebugBar_ThemePanel'); - } - - /** - * Register a callback for filtering query arguments. - * - * The callback function should take one argument - an associative array of query arguments. - * It should return a modified array of query arguments. - * - * @param callable $callback - * @return void - */ - public function addQueryArgFilter($callback){ - $this->addFilter('request_update_query_args', $callback); - } - - /** - * Register a callback for filtering arguments passed to wp_remote_get(). - * - * The callback function should take one argument - an associative array of arguments - - * and return a modified array or arguments. See the WP documentation on wp_remote_get() - * for details on what arguments are available and how they work. - * - * @uses add_filter() This method is a convenience wrapper for add_filter(). - * - * @param callable $callback - * @return void - */ - public function addHttpRequestArgFilter($callback) { - $this->addFilter('request_update_options', $callback); - } - - /** - * Register a callback for filtering theme updates retrieved from the external API. - * - * The callback function should take two arguments. If the theme update was retrieved - * successfully, the first argument passed will be an instance of Theme_Update. Otherwise, - * it will be NULL. The second argument will be the corresponding return value of - * wp_remote_get (see WP docs for details). - * - * The callback function should return a new or modified instance of Theme_Update or NULL. - * - * @uses add_filter() This method is a convenience wrapper for add_filter(). - * - * @param callable $callback - * @return void - */ - public function addResultFilter($callback) { - $this->addFilter('request_update_result', $callback, 10, 2); - } - - /** - * Create a package instance that represents this plugin or theme. - * - * @return Puc_v4p11_InstalledPackage - */ - protected function createInstalledPackage() { - return new Puc_v4p11_Theme_Package($this->stylesheet, $this); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Update.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Update.php deleted file mode 100644 index 82c048a9..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Update.php +++ /dev/null @@ -1,34 +0,0 @@ -slug = $this->slug; - $update->new_version = $this->version; - $update->package = $this->download_url; - - return $update; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpdateChecker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpdateChecker.php deleted file mode 100644 index 56fe8f03..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpdateChecker.php +++ /dev/null @@ -1,997 +0,0 @@ -debugMode = (bool)(constant('WP_DEBUG')); - $this->metadataUrl = $metadataUrl; - $this->directoryName = $directoryName; - $this->slug = !empty($slug) ? $slug : $this->directoryName; - - $this->optionName = $optionName; - if ( empty($this->optionName) ) { - //BC: Initially the library only supported plugin updates and didn't use type prefixes - //in the option name. Lets use the same prefix-less name when possible. - if ( $this->filterSuffix === '' ) { - $this->optionName = 'external_updates-' . $this->slug; - } else { - $this->optionName = $this->getUniqueName('external_updates'); - } - } - - $this->package = $this->createInstalledPackage(); - $this->scheduler = $this->createScheduler($checkPeriod); - $this->upgraderStatus = new Puc_v4p11_UpgraderStatus(); - $this->updateState = new Puc_v4p11_StateStore($this->optionName); - - if ( did_action('init') ) { - $this->loadTextDomain(); - } else { - add_action('init', array($this, 'loadTextDomain')); - } - - $this->installHooks(); - } - - /** - * @internal - */ - public function loadTextDomain() { - //We're not using load_plugin_textdomain() or its siblings because figuring out where - //the library is located (plugin, mu-plugin, theme, custom wp-content paths) is messy. - $domain = 'plugin-update-checker'; - $locale = apply_filters( - 'plugin_locale', - (is_admin() && function_exists('get_user_locale')) ? get_user_locale() : get_locale(), - $domain - ); - - $moFile = $domain . '-' . $locale . '.mo'; - $path = realpath(dirname(__FILE__) . '/../../languages'); - - if ($path && file_exists($path)) { - load_textdomain($domain, $path . '/' . $moFile); - } - } - - protected function installHooks() { - //Insert our update info into the update array maintained by WP. - add_filter('site_transient_' . $this->updateTransient, array($this,'injectUpdate')); - - //Insert translation updates into the update list. - add_filter('site_transient_' . $this->updateTransient, array($this, 'injectTranslationUpdates')); - - //Clear translation updates when WP clears the update cache. - //This needs to be done directly because the library doesn't actually remove obsolete plugin updates, - //it just hides them (see getUpdate()). We can't do that with translations - too much disk I/O. - add_action( - 'delete_site_transient_' . $this->updateTransient, - array($this, 'clearCachedTranslationUpdates') - ); - - //Rename the update directory to be the same as the existing directory. - if ( $this->directoryName !== '.' ) { - add_filter('upgrader_source_selection', array($this, 'fixDirectoryName'), 10, 3); - } - - //Allow HTTP requests to the metadata URL even if it's on a local host. - add_filter('http_request_host_is_external', array($this, 'allowMetadataHost'), 10, 2); - - //DebugBar integration. - if ( did_action('plugins_loaded') ) { - $this->maybeInitDebugBar(); - } else { - add_action('plugins_loaded', array($this, 'maybeInitDebugBar')); - } - } - - /** - * Remove hooks that were added by this update checker instance. - */ - public function removeHooks() { - remove_filter('site_transient_' . $this->updateTransient, array($this,'injectUpdate')); - remove_filter('site_transient_' . $this->updateTransient, array($this, 'injectTranslationUpdates')); - remove_action( - 'delete_site_transient_' . $this->updateTransient, - array($this, 'clearCachedTranslationUpdates') - ); - - remove_filter('upgrader_source_selection', array($this, 'fixDirectoryName'), 10); - remove_filter('http_request_host_is_external', array($this, 'allowMetadataHost'), 10); - remove_action('plugins_loaded', array($this, 'maybeInitDebugBar')); - - remove_action('init', array($this, 'loadTextDomain')); - - if ( $this->scheduler ) { - $this->scheduler->removeHooks(); - } - - if ( $this->debugBarExtension ) { - $this->debugBarExtension->removeHooks(); - } - } - - /** - * Check if the current user has the required permissions to install updates. - * - * @return bool - */ - abstract public function userCanInstallUpdates(); - - /** - * Explicitly allow HTTP requests to the metadata URL. - * - * WordPress has a security feature where the HTTP API will reject all requests that are sent to - * another site hosted on the same server as the current site (IP match), a local host, or a local - * IP, unless the host exactly matches the current site. - * - * This feature is opt-in (at least in WP 4.4). Apparently some people enable it. - * - * That can be a problem when you're developing your plugin and you decide to host the update information - * on the same server as your test site. Update requests will mysteriously fail. - * - * We fix that by adding an exception for the metadata host. - * - * @param bool $allow - * @param string $host - * @return bool - */ - public function allowMetadataHost($allow, $host) { - if ( $this->cachedMetadataHost === 0 ) { - $this->cachedMetadataHost = parse_url($this->metadataUrl, PHP_URL_HOST); - } - - if ( is_string($this->cachedMetadataHost) && (strtolower($host) === strtolower($this->cachedMetadataHost)) ) { - return true; - } - return $allow; - } - - /** - * Create a package instance that represents this plugin or theme. - * - * @return Puc_v4p11_InstalledPackage - */ - abstract protected function createInstalledPackage(); - - /** - * @return Puc_v4p11_InstalledPackage - */ - public function getInstalledPackage() { - return $this->package; - } - - /** - * Create an instance of the scheduler. - * - * This is implemented as a method to make it possible for plugins to subclass the update checker - * and substitute their own scheduler. - * - * @param int $checkPeriod - * @return Puc_v4p11_Scheduler - */ - abstract protected function createScheduler($checkPeriod); - - /** - * Check for updates. The results are stored in the DB option specified in $optionName. - * - * @return Puc_v4p11_Update|null - */ - public function checkForUpdates() { - $installedVersion = $this->getInstalledVersion(); - //Fail silently if we can't find the plugin/theme or read its header. - if ( $installedVersion === null ) { - $this->triggerError( - sprintf('Skipping update check for %s - installed version unknown.', $this->slug), - E_USER_WARNING - ); - return null; - } - - //Start collecting API errors. - $this->lastRequestApiErrors = array(); - add_action('puc_api_error', array($this, 'collectApiErrors'), 10, 4); - - $state = $this->updateState; - $state->setLastCheckToNow() - ->setCheckedVersion($installedVersion) - ->save(); //Save before checking in case something goes wrong - - $state->setUpdate($this->requestUpdate()); - $state->save(); - - //Stop collecting API errors. - remove_action('puc_api_error', array($this, 'collectApiErrors'), 10); - - return $this->getUpdate(); - } - - /** - * Load the update checker state from the DB. - * - * @return Puc_v4p11_StateStore - */ - public function getUpdateState() { - return $this->updateState->lazyLoad(); - } - - /** - * Reset update checker state - i.e. last check time, cached update data and so on. - * - * Call this when your plugin is being uninstalled, or if you want to - * clear the update cache. - */ - public function resetUpdateState() { - $this->updateState->delete(); - } - - /** - * Get the details of the currently available update, if any. - * - * If no updates are available, or if the last known update version is below or equal - * to the currently installed version, this method will return NULL. - * - * Uses cached update data. To retrieve update information straight from - * the metadata URL, call requestUpdate() instead. - * - * @return Puc_v4p11_Update|null - */ - public function getUpdate() { - $update = $this->updateState->getUpdate(); - - //Is there an update available? - if ( isset($update) ) { - //Check if the update is actually newer than the currently installed version. - $installedVersion = $this->getInstalledVersion(); - if ( ($installedVersion !== null) && version_compare($update->version, $installedVersion, '>') ){ - return $update; - } - } - return null; - } - - /** - * Retrieve the latest update (if any) from the configured API endpoint. - * - * Subclasses should run the update through filterUpdateResult before returning it. - * - * @return Puc_v4p11_Update An instance of Update, or NULL when no updates are available. - */ - abstract public function requestUpdate(); - - /** - * Filter the result of a requestUpdate() call. - * - * @param Puc_v4p11_Update|null $update - * @param array|WP_Error|null $httpResult The value returned by wp_remote_get(), if any. - * @return Puc_v4p11_Update - */ - protected function filterUpdateResult($update, $httpResult = null) { - //Let plugins/themes modify the update. - $update = apply_filters($this->getUniqueName('request_update_result'), $update, $httpResult); - - $this->fixSupportedWordpressVersion($update); - - if ( isset($update, $update->translations) ) { - //Keep only those translation updates that apply to this site. - $update->translations = $this->filterApplicableTranslations($update->translations); - } - - return $update; - } - - /** - * The "Tested up to" field in the plugin metadata is supposed to be in the form of "major.minor", - * while WordPress core's list_plugin_updates() expects the $update->tested field to be an exact - * version, e.g. "major.minor.patch", to say it's compatible. In other case it shows - * "Compatibility: Unknown". - * The function mimics how wordpress.org API crafts the "tested" field out of "Tested up to". - * - * @param Puc_v4p11_Metadata|null $update - */ - protected function fixSupportedWordpressVersion(Puc_v4p11_Metadata $update = null) { - if ( !isset($update->tested) || !preg_match('/^\d++\.\d++$/', $update->tested) ) { - return; - } - - $actualWpVersions = array(); - - $wpVersion = $GLOBALS['wp_version']; - - if ( function_exists('get_core_updates') ) { - $coreUpdates = get_core_updates(); - if ( is_array($coreUpdates) ) { - foreach ($coreUpdates as $coreUpdate) { - if ( isset($coreUpdate->current) ) { - $actualWpVersions[] = $coreUpdate->current; - } - } - } - } - - $actualWpVersions[] = $wpVersion; - - $actualWpPatchNumber = null; - foreach ($actualWpVersions as $version) { - if ( preg_match('/^(?P\d++\.\d++)(?:\.(?P\d++))?/', $version, $versionParts) ) { - if ( $versionParts['majorMinor'] === $update->tested ) { - $patch = isset($versionParts['patch']) ? intval($versionParts['patch']) : 0; - if ( $actualWpPatchNumber === null ) { - $actualWpPatchNumber = $patch; - } else { - $actualWpPatchNumber = max($actualWpPatchNumber, $patch); - } - } - } - } - if ( $actualWpPatchNumber === null ) { - $actualWpPatchNumber = 999; - } - - if ( $actualWpPatchNumber > 0 ) { - $update->tested .= '.' . $actualWpPatchNumber; - } - } - - /** - * Get the currently installed version of the plugin or theme. - * - * @return string|null Version number. - */ - public function getInstalledVersion() { - return $this->package->getInstalledVersion(); - } - - /** - * Get the full path of the plugin or theme directory. - * - * @return string - */ - public function getAbsoluteDirectoryPath() { - return $this->package->getAbsoluteDirectoryPath(); - } - - /** - * Trigger a PHP error, but only when $debugMode is enabled. - * - * @param string $message - * @param int $errorType - */ - public function triggerError($message, $errorType) { - if ( $this->isDebugModeEnabled() ) { - trigger_error($message, $errorType); - } - } - - /** - * @return bool - */ - protected function isDebugModeEnabled() { - if ( $this->debugMode === null ) { - $this->debugMode = (bool)(constant('WP_DEBUG')); - } - return $this->debugMode; - } - - /** - * Get the full name of an update checker filter, action or DB entry. - * - * This method adds the "puc_" prefix and the "-$slug" suffix to the filter name. - * For example, "pre_inject_update" becomes "puc_pre_inject_update-plugin-slug". - * - * @param string $baseTag - * @return string - */ - public function getUniqueName($baseTag) { - $name = 'puc_' . $baseTag; - if ( $this->filterSuffix !== '' ) { - $name .= '_' . $this->filterSuffix; - } - return $name . '-' . $this->slug; - } - - /** - * Store API errors that are generated when checking for updates. - * - * @internal - * @param WP_Error $error - * @param array|null $httpResponse - * @param string|null $url - * @param string|null $slug - */ - public function collectApiErrors($error, $httpResponse = null, $url = null, $slug = null) { - if ( isset($slug) && ($slug !== $this->slug) ) { - return; - } - - $this->lastRequestApiErrors[] = array( - 'error' => $error, - 'httpResponse' => $httpResponse, - 'url' => $url, - ); - } - - /** - * @return array - */ - public function getLastRequestApiErrors() { - return $this->lastRequestApiErrors; - } - - /* ------------------------------------------------------------------- - * PUC filters and filter utilities - * ------------------------------------------------------------------- - */ - - /** - * Register a callback for one of the update checker filters. - * - * Identical to add_filter(), except it automatically adds the "puc_" prefix - * and the "-$slug" suffix to the filter name. For example, "request_info_result" - * becomes "puc_request_info_result-your_plugin_slug". - * - * @param string $tag - * @param callable $callback - * @param int $priority - * @param int $acceptedArgs - */ - public function addFilter($tag, $callback, $priority = 10, $acceptedArgs = 1) { - add_filter($this->getUniqueName($tag), $callback, $priority, $acceptedArgs); - } - - /* ------------------------------------------------------------------- - * Inject updates - * ------------------------------------------------------------------- - */ - - /** - * Insert the latest update (if any) into the update list maintained by WP. - * - * @param stdClass $updates Update list. - * @return stdClass Modified update list. - */ - public function injectUpdate($updates) { - //Is there an update to insert? - $update = $this->getUpdate(); - - if ( !$this->shouldShowUpdates() ) { - $update = null; - } - - if ( !empty($update) ) { - //Let plugins filter the update info before it's passed on to WordPress. - $update = apply_filters($this->getUniqueName('pre_inject_update'), $update); - $updates = $this->addUpdateToList($updates, $update->toWpFormat()); - } else { - //Clean up any stale update info. - $updates = $this->removeUpdateFromList($updates); - //Add a placeholder item to the "no_update" list to enable auto-update support. - //If we don't do this, the option to enable automatic updates will only show up - //when an update is available. - $updates = $this->addNoUpdateItem($updates); - } - - return $updates; - } - - /** - * @param stdClass|null $updates - * @param stdClass|array $updateToAdd - * @return stdClass - */ - protected function addUpdateToList($updates, $updateToAdd) { - if ( !is_object($updates) ) { - $updates = new stdClass(); - $updates->response = array(); - } - - $updates->response[$this->getUpdateListKey()] = $updateToAdd; - return $updates; - } - - /** - * @param stdClass|null $updates - * @return stdClass|null - */ - protected function removeUpdateFromList($updates) { - if ( isset($updates, $updates->response) ) { - unset($updates->response[$this->getUpdateListKey()]); - } - return $updates; - } - - /** - * See this post for more information: - * @link https://make.wordpress.org/core/2020/07/30/recommended-usage-of-the-updates-api-to-support-the-auto-updates-ui-for-plugins-and-themes-in-wordpress-5-5/ - * - * @param stdClass|null $updates - * @return stdClass - */ - protected function addNoUpdateItem($updates) { - if ( !is_object($updates) ) { - $updates = new stdClass(); - $updates->response = array(); - $updates->no_update = array(); - } else if ( !isset($updates->no_update) ) { - $updates->no_update = array(); - } - - $updates->no_update[$this->getUpdateListKey()] = (object) $this->getNoUpdateItemFields(); - - return $updates; - } - - /** - * Subclasses should override this method to add fields that are specific to plugins or themes. - * @return array - */ - protected function getNoUpdateItemFields() { - return array( - 'new_version' => $this->getInstalledVersion(), - 'url' => '', - 'package' => '', - 'requires_php' => '', - ); - } - - /** - * Get the key that will be used when adding updates to the update list that's maintained - * by the WordPress core. The list is always an associative array, but the key is different - * for plugins and themes. - * - * @return string - */ - abstract protected function getUpdateListKey(); - - /** - * Should we show available updates? - * - * Usually the answer is "yes", but there are exceptions. For example, WordPress doesn't - * support automatic updates installation for mu-plugins, so PUC usually won't show update - * notifications in that case. See the plugin-specific subclass for details. - * - * Note: This method only applies to updates that are displayed (or not) in the WordPress - * admin. It doesn't affect APIs like requestUpdate and getUpdate. - * - * @return bool - */ - protected function shouldShowUpdates() { - return true; - } - - /* ------------------------------------------------------------------- - * JSON-based update API - * ------------------------------------------------------------------- - */ - - /** - * Retrieve plugin or theme metadata from the JSON document at $this->metadataUrl. - * - * @param string $metaClass Parse the JSON as an instance of this class. It must have a static fromJson method. - * @param string $filterRoot - * @param array $queryArgs Additional query arguments. - * @return array [Puc_v4p11_Metadata|null, array|WP_Error] A metadata instance and the value returned by wp_remote_get(). - */ - protected function requestMetadata($metaClass, $filterRoot, $queryArgs = array()) { - //Query args to append to the URL. Plugins can add their own by using a filter callback (see addQueryArgFilter()). - $queryArgs = array_merge( - array( - 'installed_version' => strval($this->getInstalledVersion()), - 'php' => phpversion(), - 'locale' => get_locale(), - ), - $queryArgs - ); - $queryArgs = apply_filters($this->getUniqueName($filterRoot . '_query_args'), $queryArgs); - - //Various options for the wp_remote_get() call. Plugins can filter these, too. - $options = array( - 'timeout' => 10, //seconds - 'headers' => array( - 'Accept' => 'application/json', - ), - ); - $options = apply_filters($this->getUniqueName($filterRoot . '_options'), $options); - - //The metadata file should be at 'http://your-api.com/url/here/$slug/info.json' - $url = $this->metadataUrl; - if ( !empty($queryArgs) ){ - $url = add_query_arg($queryArgs, $url); - } - - $result = wp_remote_get($url, $options); - - $result = apply_filters($this->getUniqueName('request_metadata_http_result'), $result, $url, $options); - - //Try to parse the response - $status = $this->validateApiResponse($result); - $metadata = null; - if ( !is_wp_error($status) ){ - if ( version_compare(PHP_VERSION, '5.3', '>=') && (strpos($metaClass, '\\') === false) ) { - $metaClass = __NAMESPACE__ . '\\' . $metaClass; - } - $metadata = call_user_func(array($metaClass, 'fromJson'), $result['body']); - } else { - do_action('puc_api_error', $status, $result, $url, $this->slug); - $this->triggerError( - sprintf('The URL %s does not point to a valid metadata file. ', $url) - . $status->get_error_message(), - E_USER_WARNING - ); - } - - return array($metadata, $result); - } - - /** - * Check if $result is a successful update API response. - * - * @param array|WP_Error $result - * @return true|WP_Error - */ - protected function validateApiResponse($result) { - if ( is_wp_error($result) ) { /** @var WP_Error $result */ - return new WP_Error($result->get_error_code(), 'WP HTTP Error: ' . $result->get_error_message()); - } - - if ( !isset($result['response']['code']) ) { - return new WP_Error( - 'puc_no_response_code', - 'wp_remote_get() returned an unexpected result.' - ); - } - - if ( $result['response']['code'] !== 200 ) { - return new WP_Error( - 'puc_unexpected_response_code', - 'HTTP response code is ' . $result['response']['code'] . ' (expected: 200)' - ); - } - - if ( empty($result['body']) ) { - return new WP_Error('puc_empty_response', 'The metadata file appears to be empty.'); - } - - return true; - } - - /* ------------------------------------------------------------------- - * Language packs / Translation updates - * ------------------------------------------------------------------- - */ - - /** - * Filter a list of translation updates and return a new list that contains only updates - * that apply to the current site. - * - * @param array $translations - * @return array - */ - protected function filterApplicableTranslations($translations) { - $languages = array_flip(array_values(get_available_languages())); - $installedTranslations = $this->getInstalledTranslations(); - - $applicableTranslations = array(); - foreach ($translations as $translation) { - //Does it match one of the available core languages? - $isApplicable = array_key_exists($translation->language, $languages); - //Is it more recent than an already-installed translation? - if ( isset($installedTranslations[$translation->language]) ) { - $updateTimestamp = strtotime($translation->updated); - $installedTimestamp = strtotime($installedTranslations[$translation->language]['PO-Revision-Date']); - $isApplicable = $updateTimestamp > $installedTimestamp; - } - - if ( $isApplicable ) { - $applicableTranslations[] = $translation; - } - } - - return $applicableTranslations; - } - - /** - * Get a list of installed translations for this plugin or theme. - * - * @return array - */ - protected function getInstalledTranslations() { - if ( !function_exists('wp_get_installed_translations') ) { - return array(); - } - $installedTranslations = wp_get_installed_translations($this->translationType . 's'); - if ( isset($installedTranslations[$this->directoryName]) ) { - $installedTranslations = $installedTranslations[$this->directoryName]; - } else { - $installedTranslations = array(); - } - return $installedTranslations; - } - - /** - * Insert translation updates into the list maintained by WordPress. - * - * @param stdClass $updates - * @return stdClass - */ - public function injectTranslationUpdates($updates) { - $translationUpdates = $this->getTranslationUpdates(); - if ( empty($translationUpdates) ) { - return $updates; - } - - //Being defensive. - if ( !is_object($updates) ) { - $updates = new stdClass(); - } - if ( !isset($updates->translations) ) { - $updates->translations = array(); - } - - //In case there's a name collision with a plugin or theme hosted on wordpress.org, - //remove any preexisting updates that match our thing. - $updates->translations = array_values(array_filter( - $updates->translations, - array($this, 'isNotMyTranslation') - )); - - //Add our updates to the list. - foreach($translationUpdates as $update) { - $convertedUpdate = array_merge( - array( - 'type' => $this->translationType, - 'slug' => $this->directoryName, - 'autoupdate' => 0, - //AFAICT, WordPress doesn't actually use the "version" field for anything. - //But lets make sure it's there, just in case. - 'version' => isset($update->version) ? $update->version : ('1.' . strtotime($update->updated)), - ), - (array)$update - ); - - $updates->translations[] = $convertedUpdate; - } - - return $updates; - } - - /** - * Get a list of available translation updates. - * - * This method will return an empty array if there are no updates. - * Uses cached update data. - * - * @return array - */ - public function getTranslationUpdates() { - return $this->updateState->getTranslations(); - } - - /** - * Remove all cached translation updates. - * - * @see wp_clean_update_cache - */ - public function clearCachedTranslationUpdates() { - $this->updateState->setTranslations(array()); - } - - /** - * Filter callback. Keeps only translations that *don't* match this plugin or theme. - * - * @param array $translation - * @return bool - */ - protected function isNotMyTranslation($translation) { - $isMatch = isset($translation['type'], $translation['slug']) - && ($translation['type'] === $this->translationType) - && ($translation['slug'] === $this->directoryName); - - return !$isMatch; - } - - /* ------------------------------------------------------------------- - * Fix directory name when installing updates - * ------------------------------------------------------------------- - */ - - /** - * Rename the update directory to match the existing plugin/theme directory. - * - * When WordPress installs a plugin or theme update, it assumes that the ZIP file will contain - * exactly one directory, and that the directory name will be the same as the directory where - * the plugin or theme is currently installed. - * - * GitHub and other repositories provide ZIP downloads, but they often use directory names like - * "project-branch" or "project-tag-hash". We need to change the name to the actual plugin folder. - * - * This is a hook callback. Don't call it from a plugin. - * - * @access protected - * - * @param string $source The directory to copy to /wp-content/plugins or /wp-content/themes. Usually a subdirectory of $remoteSource. - * @param string $remoteSource WordPress has extracted the update to this directory. - * @param WP_Upgrader $upgrader - * @return string|WP_Error - */ - public function fixDirectoryName($source, $remoteSource, $upgrader) { - global $wp_filesystem; - /** @var WP_Filesystem_Base $wp_filesystem */ - - //Basic sanity checks. - if ( !isset($source, $remoteSource, $upgrader, $upgrader->skin, $wp_filesystem) ) { - return $source; - } - - //If WordPress is upgrading anything other than our plugin/theme, leave the directory name unchanged. - if ( !$this->isBeingUpgraded($upgrader) ) { - return $source; - } - - //Rename the source to match the existing directory. - $correctedSource = trailingslashit($remoteSource) . $this->directoryName . '/'; - if ( $source !== $correctedSource ) { - //The update archive should contain a single directory that contains the rest of plugin/theme files. - //Otherwise, WordPress will try to copy the entire working directory ($source == $remoteSource). - //We can't rename $remoteSource because that would break WordPress code that cleans up temporary files - //after update. - if ( $this->isBadDirectoryStructure($remoteSource) ) { - return new WP_Error( - 'puc-incorrect-directory-structure', - sprintf( - 'The directory structure of the update is incorrect. All files should be inside ' . - 'a directory named %s, not at the root of the ZIP archive.', - htmlentities($this->slug) - ) - ); - } - - /** @var WP_Upgrader_Skin $upgrader ->skin */ - $upgrader->skin->feedback(sprintf( - 'Renaming %s to %s…', - '' . basename($source) . '', - '' . $this->directoryName . '' - )); - - if ( $wp_filesystem->move($source, $correctedSource, true) ) { - $upgrader->skin->feedback('Directory successfully renamed.'); - return $correctedSource; - } else { - return new WP_Error( - 'puc-rename-failed', - 'Unable to rename the update to match the existing directory.' - ); - } - } - - return $source; - } - - /** - * Is there an update being installed right now, for this plugin or theme? - * - * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update. - * @return bool - */ - abstract public function isBeingUpgraded($upgrader = null); - - /** - * Check for incorrect update directory structure. An update must contain a single directory, - * all other files should be inside that directory. - * - * @param string $remoteSource Directory path. - * @return bool - */ - protected function isBadDirectoryStructure($remoteSource) { - global $wp_filesystem; - /** @var WP_Filesystem_Base $wp_filesystem */ - - $sourceFiles = $wp_filesystem->dirlist($remoteSource); - if ( is_array($sourceFiles) ) { - $sourceFiles = array_keys($sourceFiles); - $firstFilePath = trailingslashit($remoteSource) . $sourceFiles[0]; - return (count($sourceFiles) > 1) || (!$wp_filesystem->is_dir($firstFilePath)); - } - - //Assume it's fine. - return false; - } - - /* ------------------------------------------------------------------- - * DebugBar integration - * ------------------------------------------------------------------- - */ - - /** - * Initialize the update checker Debug Bar plugin/add-on thingy. - */ - public function maybeInitDebugBar() { - if ( class_exists('Debug_Bar', false) && file_exists(dirname(__FILE__) . '/DebugBar') ) { - $this->debugBarExtension = $this->createDebugBarExtension(); - } - } - - protected function createDebugBarExtension() { - return new Puc_v4p11_DebugBar_Extension($this); - } - - /** - * Display additional configuration details in the Debug Bar panel. - * - * @param Puc_v4p11_DebugBar_Panel $panel - */ - public function onDisplayConfiguration($panel) { - //Do nothing. Subclasses can use this to add additional info to the panel. - } - - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpgraderStatus.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpgraderStatus.php deleted file mode 100644 index 8c0006ed..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/UpgraderStatus.php +++ /dev/null @@ -1,199 +0,0 @@ -isBeingUpgraded('plugin', $pluginFile, $upgrader); - } - - /** - * Is there an update being installed for a specific theme? - * - * @param string $stylesheet Theme directory name. - * @param WP_Upgrader|null $upgrader The upgrader that's performing the current update. - * @return bool - */ - public function isThemeBeingUpgraded($stylesheet, $upgrader = null) { - return $this->isBeingUpgraded('theme', $stylesheet, $upgrader); - } - - /** - * Check if a specific theme or plugin is being upgraded. - * - * @param string $type - * @param string $id - * @param Plugin_Upgrader|WP_Upgrader|null $upgrader - * @return bool - */ - protected function isBeingUpgraded($type, $id, $upgrader = null) { - if ( isset($upgrader) ) { - list($currentType, $currentId) = $this->getThingBeingUpgradedBy($upgrader); - if ( $currentType !== null ) { - $this->currentType = $currentType; - $this->currentId = $currentId; - } - } - return ($this->currentType === $type) && ($this->currentId === $id); - } - - /** - * Figure out which theme or plugin is being upgraded by a WP_Upgrader instance. - * - * Returns an array with two items. The first item is the type of the thing that's being - * upgraded: "plugin" or "theme". The second item is either the plugin basename or - * the theme directory name. If we can't determine what the upgrader is doing, both items - * will be NULL. - * - * Examples: - * ['plugin', 'plugin-dir-name/plugin.php'] - * ['theme', 'theme-dir-name'] - * - * @param Plugin_Upgrader|WP_Upgrader $upgrader - * @return array - */ - private function getThingBeingUpgradedBy($upgrader) { - if ( !isset($upgrader, $upgrader->skin) ) { - return array(null, null); - } - - //Figure out which plugin or theme is being upgraded. - $pluginFile = null; - $themeDirectoryName = null; - - $skin = $upgrader->skin; - if ( isset($skin->theme_info) && ($skin->theme_info instanceof WP_Theme) ) { - $themeDirectoryName = $skin->theme_info->get_stylesheet(); - } elseif ( $skin instanceof Plugin_Upgrader_Skin ) { - if ( isset($skin->plugin) && is_string($skin->plugin) && ($skin->plugin !== '') ) { - $pluginFile = $skin->plugin; - } - } elseif ( $skin instanceof Theme_Upgrader_Skin ) { - if ( isset($skin->theme) && is_string($skin->theme) && ($skin->theme !== '') ) { - $themeDirectoryName = $skin->theme; - } - } elseif ( isset($skin->plugin_info) && is_array($skin->plugin_info) ) { - //This case is tricky because Bulk_Plugin_Upgrader_Skin (etc) doesn't actually store the plugin - //filename anywhere. Instead, it has the plugin headers in $plugin_info. So the best we can - //do is compare those headers to the headers of installed plugins. - $pluginFile = $this->identifyPluginByHeaders($skin->plugin_info); - } - - if ( $pluginFile !== null ) { - return array('plugin', $pluginFile); - } elseif ( $themeDirectoryName !== null ) { - return array('theme', $themeDirectoryName); - } - return array(null, null); - } - - /** - * Identify an installed plugin based on its headers. - * - * @param array $searchHeaders The plugin file header to look for. - * @return string|null Plugin basename ("foo/bar.php"), or NULL if we can't identify the plugin. - */ - private function identifyPluginByHeaders($searchHeaders) { - if ( !function_exists('get_plugins') ){ - /** @noinspection PhpIncludeInspection */ - require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); - } - - $installedPlugins = get_plugins(); - $matches = array(); - foreach($installedPlugins as $pluginBasename => $headers) { - $diff1 = array_diff_assoc($headers, $searchHeaders); - $diff2 = array_diff_assoc($searchHeaders, $headers); - if ( empty($diff1) && empty($diff2) ) { - $matches[] = $pluginBasename; - } - } - - //It's possible (though very unlikely) that there could be two plugins with identical - //headers. In that case, we can't unambiguously identify the plugin that's being upgraded. - if ( count($matches) !== 1 ) { - return null; - } - - return reset($matches); - } - - /** - * @access private - * - * @param mixed $input - * @param array $hookExtra - * @return mixed Returns $input unaltered. - */ - public function setUpgradedThing($input, $hookExtra) { - if ( !empty($hookExtra['plugin']) && is_string($hookExtra['plugin']) ) { - $this->currentId = $hookExtra['plugin']; - $this->currentType = 'plugin'; - } elseif ( !empty($hookExtra['theme']) && is_string($hookExtra['theme']) ) { - $this->currentId = $hookExtra['theme']; - $this->currentType = 'theme'; - } else { - $this->currentType = null; - $this->currentId = null; - } - return $input; - } - - /** - * @access private - * - * @param array $options - * @return array - */ - public function setUpgradedPluginFromOptions($options) { - if ( isset($options['hook_extra']['plugin']) && is_string($options['hook_extra']['plugin']) ) { - $this->currentType = 'plugin'; - $this->currentId = $options['hook_extra']['plugin']; - } else { - $this->currentType = null; - $this->currentId = null; - } - return $options; - } - - /** - * @access private - * - * @param mixed $input - * @return mixed Returns $input unaltered. - */ - public function clearUpgradedThing($input = null) { - $this->currentId = null; - $this->currentType = null; - return $input; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Utils.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Utils.php deleted file mode 100644 index 3004d316..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Utils.php +++ /dev/null @@ -1,69 +0,0 @@ -$node) ) { - $currentValue = $currentValue->$node; - } else { - return $default; - } - } - - return $currentValue; - } - - /** - * Get the first array element that is not empty. - * - * @param array $values - * @param mixed|null $default Returns this value if there are no non-empty elements. - * @return mixed|null - */ - public static function findNotEmpty($values, $default = null) { - if ( empty($values) ) { - return $default; - } - - foreach ($values as $value) { - if ( !empty($value) ) { - return $value; - } - } - - return $default; - } - - /** - * Check if the input string starts with the specified prefix. - * - * @param string $input - * @param string $prefix - * @return bool - */ - public static function startsWith($input, $prefix) { - $length = strlen($prefix); - return (substr($input, 0, $length) === $prefix); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Api.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Api.php deleted file mode 100644 index fc31619b..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Api.php +++ /dev/null @@ -1,302 +0,0 @@ -repositoryUrl = $repositoryUrl; - $this->setAuthentication($credentials); - } - - /** - * @return string - */ - public function getRepositoryUrl() { - return $this->repositoryUrl; - } - - /** - * Figure out which reference (i.e tag or branch) contains the latest version. - * - * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p11_Vcs_Reference - */ - abstract public function chooseReference($configBranch); - - /** - * Get the readme.txt file from the remote repository and parse it - * according to the plugin readme standard. - * - * @param string $ref Tag or branch name. - * @return array Parsed readme. - */ - public function getRemoteReadme($ref = 'master') { - $fileContents = $this->getRemoteFile($this->getLocalReadmeName(), $ref); - if ( empty($fileContents) ) { - return array(); - } - - $parser = new PucReadmeParser(); - return $parser->parse_readme_contents($fileContents); - } - - /** - * Get the case-sensitive name of the local readme.txt file. - * - * In most cases it should just be called "readme.txt", but some plugins call it "README.txt", - * "README.TXT", or even "Readme.txt". Most VCS are case-sensitive so we need to know the correct - * capitalization. - * - * Defaults to "readme.txt" (all lowercase). - * - * @return string - */ - public function getLocalReadmeName() { - static $fileName = null; - if ( $fileName !== null ) { - return $fileName; - } - - $fileName = 'readme.txt'; - if ( isset($this->localDirectory) ) { - $files = scandir($this->localDirectory); - if ( !empty($files) ) { - foreach ($files as $possibleFileName) { - if ( strcasecmp($possibleFileName, 'readme.txt') === 0 ) { - $fileName = $possibleFileName; - break; - } - } - } - } - return $fileName; - } - - /** - * Get a branch. - * - * @param string $branchName - * @return Puc_v4p11_Vcs_Reference|null - */ - abstract public function getBranch($branchName); - - /** - * Get a specific tag. - * - * @param string $tagName - * @return Puc_v4p11_Vcs_Reference|null - */ - abstract public function getTag($tagName); - - /** - * Get the tag that looks like the highest version number. - * (Implementations should skip pre-release versions if possible.) - * - * @return Puc_v4p11_Vcs_Reference|null - */ - abstract public function getLatestTag(); - - /** - * Check if a tag name string looks like a version number. - * - * @param string $name - * @return bool - */ - protected function looksLikeVersion($name) { - //Tag names may be prefixed with "v", e.g. "v1.2.3". - $name = ltrim($name, 'v'); - - //The version string must start with a number. - if ( !is_numeric(substr($name, 0, 1)) ) { - return false; - } - - //The goal is to accept any SemVer-compatible or "PHP-standardized" version number. - return (preg_match('@^(\d{1,5}?)(\.\d{1,10}?){0,4}?($|[abrdp+_\-]|\s)@i', $name) === 1); - } - - /** - * Check if a tag appears to be named like a version number. - * - * @param stdClass $tag - * @return bool - */ - protected function isVersionTag($tag) { - $property = $this->tagNameProperty; - return isset($tag->$property) && $this->looksLikeVersion($tag->$property); - } - - /** - * Sort a list of tags as if they were version numbers. - * Tags that don't look like version number will be removed. - * - * @param stdClass[] $tags Array of tag objects. - * @return stdClass[] Filtered array of tags sorted in descending order. - */ - protected function sortTagsByVersion($tags) { - //Keep only those tags that look like version numbers. - $versionTags = array_filter($tags, array($this, 'isVersionTag')); - //Sort them in descending order. - usort($versionTags, array($this, 'compareTagNames')); - - return $versionTags; - } - - /** - * Compare two tags as if they were version number. - * - * @param stdClass $tag1 Tag object. - * @param stdClass $tag2 Another tag object. - * @return int - */ - protected function compareTagNames($tag1, $tag2) { - $property = $this->tagNameProperty; - if ( !isset($tag1->$property) ) { - return 1; - } - if ( !isset($tag2->$property) ) { - return -1; - } - return -version_compare(ltrim($tag1->$property, 'v'), ltrim($tag2->$property, 'v')); - } - - /** - * Get the contents of a file from a specific branch or tag. - * - * @param string $path File name. - * @param string $ref - * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error. - */ - abstract public function getRemoteFile($path, $ref = 'master'); - - /** - * Get the timestamp of the latest commit that changed the specified branch or tag. - * - * @param string $ref Reference name (e.g. branch or tag). - * @return string|null - */ - abstract public function getLatestCommitTime($ref); - - /** - * Get the contents of the changelog file from the repository. - * - * @param string $ref - * @param string $localDirectory Full path to the local plugin or theme directory. - * @return null|string The HTML contents of the changelog. - */ - public function getRemoteChangelog($ref, $localDirectory) { - $filename = $this->findChangelogName($localDirectory); - if ( empty($filename) ) { - return null; - } - - $changelog = $this->getRemoteFile($filename, $ref); - if ( $changelog === null ) { - return null; - } - - /** @noinspection PhpUndefinedClassInspection */ - return Parsedown::instance()->text($changelog); - } - - /** - * Guess the name of the changelog file. - * - * @param string $directory - * @return string|null - */ - protected function findChangelogName($directory = null) { - if ( !isset($directory) ) { - $directory = $this->localDirectory; - } - if ( empty($directory) || !is_dir($directory) || ($directory === '.') ) { - return null; - } - - $possibleNames = array('CHANGES.md', 'CHANGELOG.md', 'changes.md', 'changelog.md'); - $files = scandir($directory); - $foundNames = array_intersect($possibleNames, $files); - - if ( !empty($foundNames) ) { - return reset($foundNames); - } - return null; - } - - /** - * Set authentication credentials. - * - * @param $credentials - */ - public function setAuthentication($credentials) { - $this->credentials = $credentials; - } - - public function isAuthenticationEnabled() { - return !empty($this->credentials); - } - - /** - * @param string $url - * @return string - */ - public function signDownloadUrl($url) { - return $url; - } - - /** - * @param string $filterName - */ - public function setHttpFilterName($filterName) { - $this->httpFilterName = $filterName; - } - - /** - * @param string $directory - */ - public function setLocalDirectory($directory) { - if ( empty($directory) || !is_dir($directory) || ($directory === '.') ) { - $this->localDirectory = null; - } else { - $this->localDirectory = $directory; - } - } - - /** - * @param string $slug - */ - public function setSlug($slug) { - $this->slug = $slug; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/BaseChecker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/BaseChecker.php deleted file mode 100644 index 8ffbae92..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/BaseChecker.php +++ /dev/null @@ -1,27 +0,0 @@ -[^/]+?)/(?P[^/#?&]+?)/?$@', $path, $matches) ) { - $this->username = $matches['username']; - $this->repository = $matches['repository']; - } else { - throw new InvalidArgumentException('Invalid BitBucket repository URL: "' . $repositoryUrl . '"'); - } - - parent::__construct($repositoryUrl, $credentials); - } - - /** - * Figure out which reference (i.e tag or branch) contains the latest version. - * - * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p11_Vcs_Reference - */ - public function chooseReference($configBranch) { - $updateSource = null; - - //Check if there's a "Stable tag: 1.2.3" header that points to a valid tag. - $updateSource = $this->getStableTag($configBranch); - - //Look for version-like tags. - if ( !$updateSource && ($configBranch === 'master' || $configBranch === 'main') ) { - $updateSource = $this->getLatestTag(); - } - //If all else fails, use the specified branch itself. - if ( !$updateSource ) { - $updateSource = $this->getBranch($configBranch); - } - - return $updateSource; - } - - public function getBranch($branchName) { - $branch = $this->api('/refs/branches/' . $branchName); - if ( is_wp_error($branch) || empty($branch) ) { - return null; - } - - //The "/src/{stuff}/{path}" endpoint doesn't seem to handle branch names that contain slashes. - //If we don't encode the slash, we get a 404. If we encode it as "%2F", we get a 401. - //To avoid issues, if the branch name is not URL-safe, let's use the commit hash instead. - $ref = $branch->name; - if ((urlencode($ref) !== $ref) && isset($branch->target->hash)) { - $ref = $branch->target->hash; - } - - return new Puc_v4p11_Vcs_Reference(array( - 'name' => $ref, - 'updated' => $branch->target->date, - 'downloadUrl' => $this->getDownloadUrl($branch->name), - )); - } - - /** - * Get a specific tag. - * - * @param string $tagName - * @return Puc_v4p11_Vcs_Reference|null - */ - public function getTag($tagName) { - $tag = $this->api('/refs/tags/' . $tagName); - if ( is_wp_error($tag) || empty($tag) ) { - return null; - } - - return new Puc_v4p11_Vcs_Reference(array( - 'name' => $tag->name, - 'version' => ltrim($tag->name, 'v'), - 'updated' => $tag->target->date, - 'downloadUrl' => $this->getDownloadUrl($tag->name), - )); - } - - /** - * Get the tag that looks like the highest version number. - * - * @return Puc_v4p11_Vcs_Reference|null - */ - public function getLatestTag() { - $tags = $this->api('/refs/tags?sort=-target.date'); - if ( !isset($tags, $tags->values) || !is_array($tags->values) ) { - return null; - } - - //Filter and sort the list of tags. - $versionTags = $this->sortTagsByVersion($tags->values); - - //Return the first result. - if ( !empty($versionTags) ) { - $tag = $versionTags[0]; - return new Puc_v4p11_Vcs_Reference(array( - 'name' => $tag->name, - 'version' => ltrim($tag->name, 'v'), - 'updated' => $tag->target->date, - 'downloadUrl' => $this->getDownloadUrl($tag->name), - )); - } - return null; - } - - /** - * Get the tag/ref specified by the "Stable tag" header in the readme.txt of a given branch. - * - * @param string $branch - * @return null|Puc_v4p11_Vcs_Reference - */ - protected function getStableTag($branch) { - $remoteReadme = $this->getRemoteReadme($branch); - if ( !empty($remoteReadme['stable_tag']) ) { - $tag = $remoteReadme['stable_tag']; - - //You can explicitly opt out of using tags by setting "Stable tag" to - //"trunk" or the name of the current branch. - if ( ($tag === $branch) || ($tag === 'trunk') ) { - return $this->getBranch($branch); - } - - return $this->getTag($tag); - } - - return null; - } - - /** - * @param string $ref - * @return string - */ - protected function getDownloadUrl($ref) { - return sprintf( - 'https://bitbucket.org/%s/%s/get/%s.zip', - $this->username, - $this->repository, - $ref - ); - } - - /** - * Get the contents of a file from a specific branch or tag. - * - * @param string $path File name. - * @param string $ref - * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error. - */ - public function getRemoteFile($path, $ref = 'master') { - $response = $this->api('src/' . $ref . '/' . ltrim($path)); - if ( is_wp_error($response) || !is_string($response) ) { - return null; - } - return $response; - } - - /** - * Get the timestamp of the latest commit that changed the specified branch or tag. - * - * @param string $ref Reference name (e.g. branch or tag). - * @return string|null - */ - public function getLatestCommitTime($ref) { - $response = $this->api('commits/' . $ref); - if ( isset($response->values, $response->values[0], $response->values[0]->date) ) { - return $response->values[0]->date; - } - return null; - } - - /** - * Perform a BitBucket API 2.0 request. - * - * @param string $url - * @param string $version - * @return mixed|WP_Error - */ - public function api($url, $version = '2.0') { - $url = ltrim($url, '/'); - $isSrcResource = Puc_v4p11_Utils::startsWith($url, 'src/'); - - $url = implode('/', array( - 'https://api.bitbucket.org', - $version, - 'repositories', - $this->username, - $this->repository, - $url - )); - $baseUrl = $url; - - if ( $this->oauth ) { - $url = $this->oauth->sign($url,'GET'); - } - - $options = array('timeout' => 10); - if ( !empty($this->httpFilterName) ) { - $options = apply_filters($this->httpFilterName, $options); - } - $response = wp_remote_get($url, $options); - if ( is_wp_error($response) ) { - do_action('puc_api_error', $response, null, $url, $this->slug); - return $response; - } - - $code = wp_remote_retrieve_response_code($response); - $body = wp_remote_retrieve_body($response); - if ( $code === 200 ) { - if ( $isSrcResource ) { - //Most responses are JSON-encoded, but src resources just - //return raw file contents. - $document = $body; - } else { - $document = json_decode($body); - } - return $document; - } - - $error = new WP_Error( - 'puc-bitbucket-http-error', - sprintf('BitBucket API error. Base URL: "%s", HTTP status code: %d.', $baseUrl, $code) - ); - do_action('puc_api_error', $error, $response, $url, $this->slug); - - return $error; - } - - /** - * @param array $credentials - */ - public function setAuthentication($credentials) { - parent::setAuthentication($credentials); - - if ( !empty($credentials) && !empty($credentials['consumer_key']) ) { - $this->oauth = new Puc_v4p11_OAuthSignature( - $credentials['consumer_key'], - $credentials['consumer_secret'] - ); - } else { - $this->oauth = null; - } - } - - public function signDownloadUrl($url) { - //Add authentication data to download URLs. Since OAuth signatures incorporate - //timestamps, we have to do this immediately before inserting the update. Otherwise - //authentication could fail due to a stale timestamp. - if ( $this->oauth ) { - $url = $this->oauth->sign($url); - } - return $url; - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitHubApi.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitHubApi.php deleted file mode 100644 index 79f3c56e..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitHubApi.php +++ /dev/null @@ -1,441 +0,0 @@ -[^/]+?)/(?P[^/#?&]+?)/?$@', $path, $matches) ) { - $this->userName = $matches['username']; - $this->repositoryName = $matches['repository']; - } else { - throw new InvalidArgumentException('Invalid GitHub repository URL: "' . $repositoryUrl . '"'); - } - - parent::__construct($repositoryUrl, $accessToken); - } - - /** - * Get the latest release from GitHub. - * - * @return Puc_v4p11_Vcs_Reference|null - */ - public function getLatestRelease() { - $release = $this->api('/repos/:user/:repo/releases/latest'); - if ( is_wp_error($release) || !is_object($release) || !isset($release->tag_name) ) { - return null; - } - - $reference = new Puc_v4p11_Vcs_Reference(array( - 'name' => $release->tag_name, - 'version' => ltrim($release->tag_name, 'v'), //Remove the "v" prefix from "v1.2.3". - 'downloadUrl' => $release->zipball_url, - 'updated' => $release->created_at, - 'apiResponse' => $release, - )); - - if ( isset($release->assets[0]) ) { - $reference->downloadCount = $release->assets[0]->download_count; - } - - if ( $this->releaseAssetsEnabled && isset($release->assets, $release->assets[0]) ) { - //Use the first release asset that matches the specified regular expression. - $matchingAssets = array_filter($release->assets, array($this, 'matchesAssetFilter')); - if ( !empty($matchingAssets) ) { - if ( $this->isAuthenticationEnabled() ) { - /** - * Keep in mind that we'll need to add an "Accept" header to download this asset. - * - * @see setUpdateDownloadHeaders() - */ - $reference->downloadUrl = $matchingAssets[0]->url; - } else { - //It seems that browser_download_url only works for public repositories. - //Using an access_token doesn't help. Maybe OAuth would work? - $reference->downloadUrl = $matchingAssets[0]->browser_download_url; - } - - $reference->downloadCount = $matchingAssets[0]->download_count; - } - } - - if ( !empty($release->body) ) { - /** @noinspection PhpUndefinedClassInspection */ - $reference->changelog = Parsedown::instance()->text($release->body); - } - - return $reference; - } - - /** - * Get the tag that looks like the highest version number. - * - * @return Puc_v4p11_Vcs_Reference|null - */ - public function getLatestTag() { - $tags = $this->api('/repos/:user/:repo/tags'); - - if ( is_wp_error($tags) || !is_array($tags) ) { - return null; - } - - $versionTags = $this->sortTagsByVersion($tags); - if ( empty($versionTags) ) { - return null; - } - - $tag = $versionTags[0]; - return new Puc_v4p11_Vcs_Reference(array( - 'name' => $tag->name, - 'version' => ltrim($tag->name, 'v'), - 'downloadUrl' => $tag->zipball_url, - 'apiResponse' => $tag, - )); - } - - /** - * Get a branch by name. - * - * @param string $branchName - * @return null|Puc_v4p11_Vcs_Reference - */ - public function getBranch($branchName) { - $branch = $this->api('/repos/:user/:repo/branches/' . $branchName); - if ( is_wp_error($branch) || empty($branch) ) { - return null; - } - - $reference = new Puc_v4p11_Vcs_Reference(array( - 'name' => $branch->name, - 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name), - 'apiResponse' => $branch, - )); - - if ( isset($branch->commit, $branch->commit->commit, $branch->commit->commit->author->date) ) { - $reference->updated = $branch->commit->commit->author->date; - } - - return $reference; - } - - /** - * Get the latest commit that changed the specified file. - * - * @param string $filename - * @param string $ref Reference name (e.g. branch or tag). - * @return StdClass|null - */ - public function getLatestCommit($filename, $ref = 'master') { - $commits = $this->api( - '/repos/:user/:repo/commits', - array( - 'path' => $filename, - 'sha' => $ref, - ) - ); - if ( !is_wp_error($commits) && isset($commits[0]) ) { - return $commits[0]; - } - return null; - } - - /** - * Get the timestamp of the latest commit that changed the specified branch or tag. - * - * @param string $ref Reference name (e.g. branch or tag). - * @return string|null - */ - public function getLatestCommitTime($ref) { - $commits = $this->api('/repos/:user/:repo/commits', array('sha' => $ref)); - if ( !is_wp_error($commits) && isset($commits[0]) ) { - return $commits[0]->commit->author->date; - } - return null; - } - - /** - * Perform a GitHub API request. - * - * @param string $url - * @param array $queryParams - * @return mixed|WP_Error - */ - protected function api($url, $queryParams = array()) { - $baseUrl = $url; - $url = $this->buildApiUrl($url, $queryParams); - - $options = array('timeout' => 10); - if ( $this->isAuthenticationEnabled() ) { - $options['headers'] = array('Authorization' => $this->getAuthorizationHeader()); - } - - if ( !empty($this->httpFilterName) ) { - $options = apply_filters($this->httpFilterName, $options); - } - $response = wp_remote_get($url, $options); - if ( is_wp_error($response) ) { - do_action('puc_api_error', $response, null, $url, $this->slug); - return $response; - } - - $code = wp_remote_retrieve_response_code($response); - $body = wp_remote_retrieve_body($response); - if ( $code === 200 ) { - $document = json_decode($body); - return $document; - } - - $error = new WP_Error( - 'puc-github-http-error', - sprintf('GitHub API error. Base URL: "%s", HTTP status code: %d.', $baseUrl, $code) - ); - do_action('puc_api_error', $error, $response, $url, $this->slug); - - return $error; - } - - /** - * Build a fully qualified URL for an API request. - * - * @param string $url - * @param array $queryParams - * @return string - */ - protected function buildApiUrl($url, $queryParams) { - $variables = array( - 'user' => $this->userName, - 'repo' => $this->repositoryName, - ); - foreach ($variables as $name => $value) { - $url = str_replace('/:' . $name, '/' . urlencode($value), $url); - } - $url = 'https://api.github.com' . $url; - - if ( !empty($queryParams) ) { - $url = add_query_arg($queryParams, $url); - } - - return $url; - } - - /** - * Get the contents of a file from a specific branch or tag. - * - * @param string $path File name. - * @param string $ref - * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error. - */ - public function getRemoteFile($path, $ref = 'master') { - $apiUrl = '/repos/:user/:repo/contents/' . $path; - $response = $this->api($apiUrl, array('ref' => $ref)); - - if ( is_wp_error($response) || !isset($response->content) || ($response->encoding !== 'base64') ) { - return null; - } - return base64_decode($response->content); - } - - /** - * Generate a URL to download a ZIP archive of the specified branch/tag/etc. - * - * @param string $ref - * @return string - */ - public function buildArchiveDownloadUrl($ref = 'master') { - $url = sprintf( - 'https://api.github.com/repos/%1$s/%2$s/zipball/%3$s', - urlencode($this->userName), - urlencode($this->repositoryName), - urlencode($ref) - ); - return $url; - } - - /** - * Get a specific tag. - * - * @param string $tagName - * @return void - */ - public function getTag($tagName) { - //The current GitHub update checker doesn't use getTag, so I didn't bother to implement it. - throw new LogicException('The ' . __METHOD__ . ' method is not implemented and should not be used.'); - } - - public function setAuthentication($credentials) { - parent::setAuthentication($credentials); - $this->accessToken = is_string($credentials) ? $credentials : null; - - //Optimization: Instead of filtering all HTTP requests, let's do it only when - //WordPress is about to download an update. - add_filter('upgrader_pre_download', array($this, 'addHttpRequestFilter'), 10, 1); //WP 3.7+ - } - - /** - * Figure out which reference (i.e tag or branch) contains the latest version. - * - * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p11_Vcs_Reference - */ - public function chooseReference($configBranch) { - $updateSource = null; - - if ( $configBranch === 'master' ) { - //Use the latest release. - $updateSource = $this->getLatestRelease(); - if ( $updateSource === null ) { - //Failing that, use the tag with the highest version number. - $updateSource = $this->getLatestTag(); - } - } - //Alternatively, just use the branch itself. - if ( empty($updateSource) ) { - $updateSource = $this->getBranch($configBranch); - } - - return $updateSource; - } - - /** - * Enable updating via release assets. - * - * If the latest release contains no usable assets, the update checker - * will fall back to using the automatically generated ZIP archive. - * - * Private repositories will only work with WordPress 3.7 or later. - * - * @param string|null $fileNameRegex Optional. Use only those assets where the file name matches this regex. - */ - public function enableReleaseAssets($fileNameRegex = null) { - $this->releaseAssetsEnabled = true; - $this->assetFilterRegex = $fileNameRegex; - $this->assetApiBaseUrl = sprintf( - '//api.github.com/repos/%1$s/%2$s/releases/assets/', - $this->userName, - $this->repositoryName - ); - } - - /** - * Does this asset match the file name regex? - * - * @param stdClass $releaseAsset - * @return bool - */ - protected function matchesAssetFilter($releaseAsset) { - if ( $this->assetFilterRegex === null ) { - //The default is to accept all assets. - return true; - } - return isset($releaseAsset->name) && preg_match($this->assetFilterRegex, $releaseAsset->name); - } - - /** - * @internal - * @param bool $result - * @return bool - */ - public function addHttpRequestFilter($result) { - if ( !$this->downloadFilterAdded && $this->isAuthenticationEnabled() ) { - add_filter('http_request_args', array($this, 'setUpdateDownloadHeaders'), 10, 2); - add_action('requests-requests.before_redirect', array($this, 'removeAuthHeaderFromRedirects'), 10, 4); - $this->downloadFilterAdded = true; - } - return $result; - } - - /** - * Set the HTTP headers that are necessary to download updates from private repositories. - * - * See GitHub docs: - * @link https://developer.github.com/v3/repos/releases/#get-a-single-release-asset - * @link https://developer.github.com/v3/auth/#basic-authentication - * - * @internal - * @param array $requestArgs - * @param string $url - * @return array - */ - public function setUpdateDownloadHeaders($requestArgs, $url = '') { - //Is WordPress trying to download one of our release assets? - if ( $this->releaseAssetsEnabled && (strpos($url, $this->assetApiBaseUrl) !== false) ) { - $requestArgs['headers']['Accept'] = 'application/octet-stream'; - } - //Use Basic authentication, but only if the download is from our repository. - $repoApiBaseUrl = $this->buildApiUrl('/repos/:user/:repo/', array()); - if ( $this->isAuthenticationEnabled() && (strpos($url, $repoApiBaseUrl)) === 0 ) { - $requestArgs['headers']['Authorization'] = $this->getAuthorizationHeader(); - } - return $requestArgs; - } - - /** - * When following a redirect, the Requests library will automatically forward - * the authorization header to other hosts. We don't want that because it breaks - * AWS downloads and can leak authorization information. - * - * @internal - * @param string $location - * @param array $headers - */ - public function removeAuthHeaderFromRedirects(&$location, &$headers) { - $repoApiBaseUrl = $this->buildApiUrl('/repos/:user/:repo/', array()); - if ( strpos($location, $repoApiBaseUrl) === 0 ) { - return; //This request is going to GitHub, so it's fine. - } - //Remove the header. - if ( isset($headers['Authorization']) ) { - unset($headers['Authorization']); - } - } - - /** - * Generate the value of the "Authorization" header. - * - * @return string - */ - protected function getAuthorizationHeader() { - return 'Basic ' . base64_encode($this->userName . ':' . $this->accessToken); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitLabApi.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitLabApi.php deleted file mode 100644 index 75576aec..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/GitLabApi.php +++ /dev/null @@ -1,400 +0,0 @@ -repositoryHost = parse_url($repositoryUrl, PHP_URL_HOST) . $port; - - if ( $this->repositoryHost !== 'gitlab.com' ) { - $this->repositoryProtocol = parse_url($repositoryUrl, PHP_URL_SCHEME); - } - - //Find the repository information - $path = parse_url($repositoryUrl, PHP_URL_PATH); - if ( preg_match('@^/?(?P[^/]+?)/(?P[^/#?&]+?)/?$@', $path, $matches) ) { - $this->userName = $matches['username']; - $this->repositoryName = $matches['repository']; - } elseif ( ($this->repositoryHost === 'gitlab.com') ) { - //This is probably a repository in a subgroup, e.g. "/organization/category/repo". - $parts = explode('/', trim($path, '/')); - if ( count($parts) < 3 ) { - throw new InvalidArgumentException('Invalid GitLab.com repository URL: "' . $repositoryUrl . '"'); - } - $lastPart = array_pop($parts); - $this->userName = implode('/', $parts); - $this->repositoryName = $lastPart; - } else { - //There could be subgroups in the URL: gitlab.domain.com/group/subgroup/subgroup2/repository - if ( $subgroup !== null ) { - $path = str_replace(trailingslashit($subgroup), '', $path); - } - - //This is not a traditional url, it could be gitlab is in a deeper subdirectory. - //Get the path segments. - $segments = explode('/', untrailingslashit(ltrim($path, '/'))); - - //We need at least /user-name/repository-name/ - if ( count($segments) < 2 ) { - throw new InvalidArgumentException('Invalid GitLab repository URL: "' . $repositoryUrl . '"'); - } - - //Get the username and repository name. - $usernameRepo = array_splice($segments, -2, 2); - $this->userName = $usernameRepo[0]; - $this->repositoryName = $usernameRepo[1]; - - //Append the remaining segments to the host if there are segments left. - if ( count($segments) > 0 ) { - $this->repositoryHost = trailingslashit($this->repositoryHost) . implode('/', $segments); - } - - //Add subgroups to username. - if ( $subgroup !== null ) { - $this->userName = $usernameRepo[0] . '/' . untrailingslashit($subgroup); - } - } - - parent::__construct($repositoryUrl, $accessToken); - } - - /** - * Get the latest release from GitLab. - * - * @return Puc_v4p11_Vcs_Reference|null - */ - public function getLatestRelease() { - $releases = $this->api('/:id/releases'); - if ( is_wp_error($releases) || empty($releases) || !is_array($releases) ) { - return null; - } - - foreach ($releases as $release) { - if ( true !== $release->upcoming_release ) { - break 1; //Break the loop on the first release we find that isn't an upcoming release - } - } - if ( is_wp_error($release) || !is_object($release) || !isset($release->tag_name) ) { - return null; - } - - $reference = new Puc_v4p11_Vcs_Reference(array( - 'name' => $release->tag_name, - 'version' => ltrim($release->tag_name, 'v'), //Remove the "v" prefix from "v1.2.3". - 'downloadUrl' => '', - 'updated' => $release->released_at, - 'apiResponse' => $release, - )); - $download_url = false; - - if ( $this->releasePackageEnabled && isset($release->assets, $release->assets->links) ) { - /** - * Use the first asset LINK that is a zip format file generated by a Gitlab Release Pipeline - * - * @link https://gist.github.com/timwiel/9dfd3526c768efad4973254085e065ce - */ - foreach ($release->assets->links as $link) { - //TODO: Check the "format" property instead of the URL suffix. - if ( 'zip' === substr($link->url, -3) ) { - $download_url = $link->url; - break 1; - } - } - if ( empty( $download_url ) ) { - return null; - } - if ( ! empty( $this->accessToken ) ) { - $download_url = add_query_arg('private_token', $this->accessToken, $download_url); - } - $reference->downloadUrl = $download_url; - return $reference; - - } elseif ( isset($release->assets) ) { - /** - * Use the first asset SOURCE file that is a zip format from a Gitlab Release which should be a zip file - */ - foreach ($release->assets->sources as $source) { - if ( 'zip' === $source->format ) { - $download_url = $source->url; - break 1; - } - } - if ( empty( $download_url ) ) { - return null; - } - if ( ! empty( $this->accessToken ) ) { - $download_url = add_query_arg('private_token', $this->accessToken, $download_url); - } - $reference->downloadUrl = $download_url; - return $reference; - - } - - //If we get this far without a return then obviosuly noi release download urls were found - return null; - } - - /** - * Get the tag that looks like the highest version number. - * - * @return Puc_v4p11_Vcs_Reference|null - */ - public function getLatestTag() { - $tags = $this->api('/:id/repository/tags'); - if ( is_wp_error($tags) || empty($tags) || !is_array($tags) ) { - return null; - } - - $versionTags = $this->sortTagsByVersion($tags); - if ( empty($versionTags) ) { - return null; - } - - $tag = $versionTags[0]; - return new Puc_v4p11_Vcs_Reference(array( - 'name' => $tag->name, - 'version' => ltrim($tag->name, 'v'), - 'downloadUrl' => $this->buildArchiveDownloadUrl($tag->name), - 'apiResponse' => $tag, - )); - } - - /** - * Get a branch by name. - * - * @param string $branchName - * @return null|Puc_v4p11_Vcs_Reference - */ - public function getBranch($branchName) { - $branch = $this->api('/:id/repository/branches/' . $branchName); - if ( is_wp_error($branch) || empty($branch) ) { - return null; - } - - $reference = new Puc_v4p11_Vcs_Reference(array( - 'name' => $branch->name, - 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name), - 'apiResponse' => $branch, - )); - - if ( isset($branch->commit, $branch->commit->committed_date) ) { - $reference->updated = $branch->commit->committed_date; - } - - return $reference; - } - - /** - * Get the timestamp of the latest commit that changed the specified branch or tag. - * - * @param string $ref Reference name (e.g. branch or tag). - * @return string|null - */ - public function getLatestCommitTime($ref) { - $commits = $this->api('/:id/repository/commits/', array('ref_name' => $ref)); - if ( is_wp_error($commits) || !is_array($commits) || !isset($commits[0]) ) { - return null; - } - - return $commits[0]->committed_date; - } - - /** - * Perform a GitLab API request. - * - * @param string $url - * @param array $queryParams - * @return mixed|WP_Error - */ - protected function api($url, $queryParams = array()) { - $baseUrl = $url; - $url = $this->buildApiUrl($url, $queryParams); - - $options = array('timeout' => 10); - if ( !empty($this->httpFilterName) ) { - $options = apply_filters($this->httpFilterName, $options); - } - - $response = wp_remote_get($url, $options); - if ( is_wp_error($response) ) { - do_action('puc_api_error', $response, null, $url, $this->slug); - return $response; - } - - $code = wp_remote_retrieve_response_code($response); - $body = wp_remote_retrieve_body($response); - if ( $code === 200 ) { - return json_decode($body); - } - - $error = new WP_Error( - 'puc-gitlab-http-error', - sprintf('GitLab API error. URL: "%s", HTTP status code: %d.', $baseUrl, $code) - ); - do_action('puc_api_error', $error, $response, $url, $this->slug); - - return $error; - } - - /** - * Build a fully qualified URL for an API request. - * - * @param string $url - * @param array $queryParams - * @return string - */ - protected function buildApiUrl($url, $queryParams) { - $variables = array( - 'user' => $this->userName, - 'repo' => $this->repositoryName, - 'id' => $this->userName . '/' . $this->repositoryName, - ); - - foreach ($variables as $name => $value) { - $url = str_replace("/:{$name}", '/' . urlencode($value), $url); - } - - $url = substr($url, 1); - $url = sprintf('%1$s://%2$s/api/v4/projects/%3$s', $this->repositoryProtocol, $this->repositoryHost, $url); - - if ( !empty($this->accessToken) ) { - $queryParams['private_token'] = $this->accessToken; - } - - if ( !empty($queryParams) ) { - $url = add_query_arg($queryParams, $url); - } - - return $url; - } - - /** - * Get the contents of a file from a specific branch or tag. - * - * @param string $path File name. - * @param string $ref - * @return null|string Either the contents of the file, or null if the file doesn't exist or there's an error. - */ - public function getRemoteFile($path, $ref = 'master') { - $response = $this->api('/:id/repository/files/' . $path, array('ref' => $ref)); - if ( is_wp_error($response) || !isset($response->content) || $response->encoding !== 'base64' ) { - return null; - } - - return base64_decode($response->content); - } - - /** - * Generate a URL to download a ZIP archive of the specified branch/tag/etc. - * - * @param string $ref - * @return string - */ - public function buildArchiveDownloadUrl($ref = 'master') { - $url = sprintf( - '%1$s://%2$s/api/v4/projects/%3$s/repository/archive.zip', - $this->repositoryProtocol, - $this->repositoryHost, - urlencode($this->userName . '/' . $this->repositoryName) - ); - $url = add_query_arg('sha', urlencode($ref), $url); - - if ( !empty($this->accessToken) ) { - $url = add_query_arg('private_token', $this->accessToken, $url); - } - - return $url; - } - - /** - * Get a specific tag. - * - * @param string $tagName - * @return void - */ - public function getTag($tagName) { - throw new LogicException('The ' . __METHOD__ . ' method is not implemented and should not be used.'); - } - - /** - * Figure out which reference (i.e tag or branch) contains the latest version. - * - * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p11_Vcs_Reference - */ - public function chooseReference($configBranch) { - - if ( $configBranch === 'main' || $configBranch === 'master' ) { - //Use the latest release. - $updateSource = $this->getLatestRelease(); - if ( $updateSource === null ) { - //Failing that, use the tag with the highest version number. - $updateSource = $this->getLatestTag(); - } - } - //Alternatively, just use the branch itself. - if ( empty($updateSource) ) { - $updateSource = $this->getBranch($configBranch); - } - - return $updateSource; - } - - public function setAuthentication($credentials) { - parent::setAuthentication($credentials); - $this->accessToken = is_string($credentials) ? $credentials : null; - } - - public function enableReleaseAssets() { - $this->releaseAssetsEnabled = true; - $this->releasePackageEnabled = false; - } - - public function enableReleasePackages() { - $this->releaseAssetsEnabled = false; - $this->releasePackageEnabled = true; - } - - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/PluginUpdateChecker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/PluginUpdateChecker.php deleted file mode 100644 index ff6a0f26..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/PluginUpdateChecker.php +++ /dev/null @@ -1,293 +0,0 @@ -api = $api; - $this->api->setHttpFilterName($this->getUniqueName('request_info_options')); - - parent::__construct($api->getRepositoryUrl(), $pluginFile, $slug, $checkPeriod, $optionName, $muPluginFile); - - $this->api->setSlug($this->slug); - } - - public function requestInfo($unusedParameter = null) { - //We have to make several remote API requests to gather all the necessary info - //which can take a while on slow networks. - if ( function_exists('set_time_limit') ) { - @set_time_limit(60); - } - - $api = $this->api; - $api->setLocalDirectory($this->package->getAbsoluteDirectoryPath()); - - $info = new Puc_v4p11_Plugin_Info(); - $info->filename = $this->pluginFile; - $info->slug = $this->slug; - - $this->setInfoFromHeader($this->package->getPluginHeader(), $info); - $this->setIconsFromLocalAssets($info); - $this->setBannersFromLocalAssets($info); - - //Pick a branch or tag. - $updateSource = $api->chooseReference($this->branch); - if ( $updateSource ) { - $ref = $updateSource->name; - $info->version = $updateSource->version; - $info->last_updated = $updateSource->updated; - $info->download_url = $updateSource->downloadUrl; - - if ( !empty($updateSource->changelog) ) { - $info->sections['changelog'] = $updateSource->changelog; - } - if ( isset($updateSource->downloadCount) ) { - $info->downloaded = $updateSource->downloadCount; - } - } else { - //There's probably a network problem or an authentication error. - do_action( - 'puc_api_error', - new WP_Error( - 'puc-no-update-source', - 'Could not retrieve version information from the repository. ' - . 'This usually means that the update checker either can\'t connect ' - . 'to the repository or it\'s configured incorrectly.' - ), - null, null, $this->slug - ); - return null; - } - - //Get headers from the main plugin file in this branch/tag. Its "Version" header and other metadata - //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags. - $mainPluginFile = basename($this->pluginFile); - $remotePlugin = $api->getRemoteFile($mainPluginFile, $ref); - if ( !empty($remotePlugin) ) { - $remoteHeader = $this->package->getFileHeader($remotePlugin); - $this->setInfoFromHeader($remoteHeader, $info); - } - - //Try parsing readme.txt. If it's formatted according to WordPress.org standards, it will contain - //a lot of useful information like the required/tested WP version, changelog, and so on. - if ( $this->readmeTxtExistsLocally() ) { - $this->setInfoFromRemoteReadme($ref, $info); - } - - //The changelog might be in a separate file. - if ( empty($info->sections['changelog']) ) { - $info->sections['changelog'] = $api->getRemoteChangelog($ref, $this->package->getAbsoluteDirectoryPath()); - if ( empty($info->sections['changelog']) ) { - $info->sections['changelog'] = __('There is no changelog available.', 'plugin-update-checker'); - } - } - - if ( empty($info->last_updated) ) { - //Fetch the latest commit that changed the tag or branch and use it as the "last_updated" date. - $latestCommitTime = $api->getLatestCommitTime($ref); - if ( $latestCommitTime !== null ) { - $info->last_updated = $latestCommitTime; - } - } - - $info = apply_filters($this->getUniqueName('request_info_result'), $info, null); - return $info; - } - - /** - * Check if the currently installed version has a readme.txt file. - * - * @return bool - */ - protected function readmeTxtExistsLocally() { - return $this->package->fileExists($this->api->getLocalReadmeName()); - } - - /** - * Copy plugin metadata from a file header to a Plugin Info object. - * - * @param array $fileHeader - * @param Puc_v4p11_Plugin_Info $pluginInfo - */ - protected function setInfoFromHeader($fileHeader, $pluginInfo) { - $headerToPropertyMap = array( - 'Version' => 'version', - 'Name' => 'name', - 'PluginURI' => 'homepage', - 'Author' => 'author', - 'AuthorName' => 'author', - 'AuthorURI' => 'author_homepage', - - 'Requires WP' => 'requires', - 'Tested WP' => 'tested', - 'Requires at least' => 'requires', - 'Tested up to' => 'tested', - - 'Requires PHP' => 'requires_php', - ); - foreach ($headerToPropertyMap as $headerName => $property) { - if ( isset($fileHeader[$headerName]) && !empty($fileHeader[$headerName]) ) { - $pluginInfo->$property = $fileHeader[$headerName]; - } - } - - if ( !empty($fileHeader['Description']) ) { - $pluginInfo->sections['description'] = $fileHeader['Description']; - } - } - - /** - * Copy plugin metadata from the remote readme.txt file. - * - * @param string $ref GitHub tag or branch where to look for the readme. - * @param Puc_v4p11_Plugin_Info $pluginInfo - */ - protected function setInfoFromRemoteReadme($ref, $pluginInfo) { - $readme = $this->api->getRemoteReadme($ref); - if ( empty($readme) ) { - return; - } - - if ( isset($readme['sections']) ) { - $pluginInfo->sections = array_merge($pluginInfo->sections, $readme['sections']); - } - if ( !empty($readme['tested_up_to']) ) { - $pluginInfo->tested = $readme['tested_up_to']; - } - if ( !empty($readme['requires_at_least']) ) { - $pluginInfo->requires = $readme['requires_at_least']; - } - if ( !empty($readme['requires_php']) ) { - $pluginInfo->requires_php = $readme['requires_php']; - } - - if ( isset($readme['upgrade_notice'], $readme['upgrade_notice'][$pluginInfo->version]) ) { - $pluginInfo->upgrade_notice = $readme['upgrade_notice'][$pluginInfo->version]; - } - } - - /** - * Add icons from the currently installed version to a Plugin Info object. - * - * The icons should be in a subdirectory named "assets". Supported image formats - * and file names are described here: - * @link https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons - * - * @param Puc_v4p11_Plugin_Info $pluginInfo - */ - protected function setIconsFromLocalAssets($pluginInfo) { - $icons = $this->getLocalAssetUrls(array( - 'icon.svg' => 'svg', - 'icon-256x256.png' => '2x', - 'icon-256x256.jpg' => '2x', - 'icon-128x128.png' => '1x', - 'icon-128x128.jpg' => '1x', - )); - - if ( !empty($icons) ) { - //The "default" key seems to be used only as last-resort fallback in WP core (5.8/5.9), - //but we'll set it anyway in case some code somewhere needs it. - reset($icons); - $firstKey = key($icons); - $icons['default'] = $icons[$firstKey]; - - $pluginInfo->icons = $icons; - } - } - - /** - * Add banners from the currently installed version to a Plugin Info object. - * - * The banners should be in a subdirectory named "assets". Supported image formats - * and file names are described here: - * @link https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-headers - * - * @param Puc_v4p11_Plugin_Info $pluginInfo - */ - protected function setBannersFromLocalAssets($pluginInfo) { - $banners = $this->getLocalAssetUrls(array( - 'banner-772x250.png' => 'high', - 'banner-772x250.jpg' => 'high', - 'banner-1544x500.png' => 'low', - 'banner-1544x500.jpg' => 'low', - )); - - if ( !empty($banners) ) { - $pluginInfo->banners = $banners; - } - } - - /** - * @param array $filesToKeys - * @return array - */ - protected function getLocalAssetUrls($filesToKeys) { - $assetDirectory = $this->package->getAbsoluteDirectoryPath() . DIRECTORY_SEPARATOR . 'assets'; - if ( !is_dir($assetDirectory) ) { - return array(); - } - $assetBaseUrl = trailingslashit(plugins_url('', $assetDirectory . '/imaginary.file')); - - $foundAssets = array(); - foreach ($filesToKeys as $fileName => $key) { - $fullBannerPath = $assetDirectory . DIRECTORY_SEPARATOR . $fileName; - if ( !isset($icons[$key]) && is_file($fullBannerPath) ) { - $foundAssets[$key] = $assetBaseUrl . $fileName; - } - } - - return $foundAssets; - } - - public function setBranch($branch) { - $this->branch = $branch; - return $this; - } - - public function setAuthentication($credentials) { - $this->api->setAuthentication($credentials); - return $this; - } - - public function getVcsApi() { - return $this->api; - } - - public function getUpdate() { - $update = parent::getUpdate(); - - if ( isset($update) && !empty($update->download_url) ) { - $update->download_url = $this->api->signDownloadUrl($update->download_url); - } - - return $update; - } - - public function onDisplayConfiguration($panel) { - parent::onDisplayConfiguration($panel); - $panel->row('Branch', $this->branch); - $panel->row('Authentication enabled', $this->api->isAuthenticationEnabled() ? 'Yes' : 'No'); - $panel->row('API client', get_class($this->api)); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Reference.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Reference.php deleted file mode 100644 index 0bf8c692..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/Reference.php +++ /dev/null @@ -1,49 +0,0 @@ -properties = $properties; - } - - /** - * @param string $name - * @return mixed|null - */ - public function __get($name) { - return array_key_exists($name, $this->properties) ? $this->properties[$name] : null; - } - - /** - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) { - $this->properties[$name] = $value; - } - - /** - * @param string $name - * @return bool - */ - public function __isset($name) { - return isset($this->properties[$name]); - } - - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/ThemeUpdateChecker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/ThemeUpdateChecker.php deleted file mode 100644 index 1850af66..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/Puc/v4p11/Vcs/ThemeUpdateChecker.php +++ /dev/null @@ -1,118 +0,0 @@ -api = $api; - $this->api->setHttpFilterName($this->getUniqueName('request_update_options')); - - parent::__construct($api->getRepositoryUrl(), $stylesheet, $customSlug, $checkPeriod, $optionName); - - $this->api->setSlug($this->slug); - } - - public function requestUpdate() { - $api = $this->api; - $api->setLocalDirectory($this->package->getAbsoluteDirectoryPath()); - - $update = new Puc_v4p11_Theme_Update(); - $update->slug = $this->slug; - - //Figure out which reference (tag or branch) we'll use to get the latest version of the theme. - $updateSource = $api->chooseReference($this->branch); - if ( $updateSource ) { - $ref = $updateSource->name; - $update->download_url = $updateSource->downloadUrl; - } else { - do_action( - 'puc_api_error', - new WP_Error( - 'puc-no-update-source', - 'Could not retrieve version information from the repository. ' - . 'This usually means that the update checker either can\'t connect ' - . 'to the repository or it\'s configured incorrectly.' - ), - null, null, $this->slug - ); - $ref = $this->branch; - } - - //Get headers from the main stylesheet in this branch/tag. Its "Version" header and other metadata - //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags. - $remoteHeader = $this->package->getFileHeader($api->getRemoteFile('style.css', $ref)); - $update->version = Puc_v4p11_Utils::findNotEmpty(array( - $remoteHeader['Version'], - Puc_v4p11_Utils::get($updateSource, 'version'), - )); - - //The details URL defaults to the Theme URI header or the repository URL. - $update->details_url = Puc_v4p11_Utils::findNotEmpty(array( - $remoteHeader['ThemeURI'], - $this->package->getHeaderValue('ThemeURI'), - $this->metadataUrl, - )); - - if ( empty($update->version) ) { - //It looks like we didn't find a valid update after all. - $update = null; - } - - $update = $this->filterUpdateResult($update); - return $update; - } - - //FIXME: This is duplicated code. Both theme and plugin subclasses that use VCS share these methods. - - public function setBranch($branch) { - $this->branch = $branch; - return $this; - } - - public function setAuthentication($credentials) { - $this->api->setAuthentication($credentials); - return $this; - } - - public function getVcsApi() { - return $this->api; - } - - public function getUpdate() { - $update = parent::getUpdate(); - - if ( isset($update) && !empty($update->download_url) ) { - $update->download_url = $this->api->signDownloadUrl($update->download_url); - } - - return $update; - } - - public function onDisplayConfiguration($panel) { - parent::onDisplayConfiguration($panel); - $panel->row('Branch', $this->branch); - $panel->row('Authentication enabled', $this->api->isAuthenticationEnabled() ? 'Yes' : 'No'); - $panel->row('API client', get_class($this->api)); - } - } - -endif; diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/README.md b/wp/wp-content/plugins/divifilter/plugin-update-checker/README.md deleted file mode 100644 index 93d8a7d0..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/README.md +++ /dev/null @@ -1,326 +0,0 @@ -Plugin Update Checker -===================== - -This is a custom update checker library for WordPress plugins and themes. It lets you add automatic update notifications and one-click upgrades to your commercial plugins, private themes, and so on. All you need to do is put your plugin/theme details in a JSON file, place the file on your server, and pass the URL to the library. The library periodically checks the URL to see if there's a new version available and displays an update notification to the user if necessary. - -From the users' perspective, it works just like with plugins and themes hosted on WordPress.org. The update checker uses the default upgrade UI that is familiar to most WordPress users. - - - -**Table of Contents** - -- [Getting Started](#getting-started) - - [Self-hosted Plugins and Themes](#self-hosted-plugins-and-themes) - - [How to Release an Update](#how-to-release-an-update) - - [Notes](#notes) - - [GitHub Integration](#github-integration) - - [How to Release an Update](#how-to-release-an-update-1) - - [Notes](#notes-1) - - [BitBucket Integration](#bitbucket-integration) - - [How to Release an Update](#how-to-release-an-update-2) - - [GitLab Integration](#gitlab-integration) - - [How to Release a GitLab Update](#how-to-release-a-gitlab-update) -- [License Management](#license-management) -- [Resources](#resources) - - - -Getting Started ---------------- - -*Note:* In each of the below examples, part of the instructions are to create an instance of the update checker class. It's recommended to do this either during the `plugins_loaded` action or outside of any hooks. If you do it only during an `admin_*` action, then updates will not be visible to a wide variety of WordPress maanagement tools; they will only be visible to logged-in users on dashboard pages. - -### Self-hosted Plugins and Themes - -1. Download [the latest release](https://github.com/YahnisElsts/plugin-update-checker/releases/latest) and copy the `plugin-update-checker` directory to your plugin or theme. -2. Go to the `examples` subdirectory and open the .json file that fits your project type. Replace the placeholder data with your plugin/theme details. - - Plugin example: - - ```json - { - "name" : "Plugin Name", - "version" : "2.0", - "download_url" : "http://example.com/plugin-name-2.0.zip", - "sections" : { - "description" : "Plugin description here. You can use HTML." - } - } - ``` - - This is a minimal example that leaves out optional fields. See [this table](https://docs.google.com/spreadsheets/d/1eOBbW7Go2qEQXReOOCdidMTf_tDYRq4JfegcO1CBPIs/edit?usp=sharing) for a full list of supported fields and their descriptions. - - Theme example: - - ```json - { - "version": "2.0", - "details_url": "http://example.com/version-2.0-details.html", - "download_url": "http://example.com/example-theme-2.0.zip" - } - ``` - - This is actually a complete example that shows all theme-related fields. `version` and `download_url` should be self-explanatory. The `details_url` key specifies the page that the user will see if they click the "View version 1.2.3 details" link in an update notification. -3. Upload the JSON file to a publicly accessible location. -4. Add the following code to the main plugin file or to the `functions.php` file: - - ```php - require 'path/to/plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( - 'http://example.com/path/to/details.json', - __FILE__, //Full path to the main plugin file or functions.php. - 'unique-plugin-or-theme-slug' - ); - ``` - Note: If you're using the Composer autoloader, you don't need to explicitly `require` the library. - -#### How to Release an Update - -Change the `version` number in the JSON file and make sure that `download_url` points to the latest version. Update the other fields if necessary. Tip: You can use [wp-update-server](https://github.com/YahnisElsts/wp-update-server) to automate this process. - -By default, the library will check the specified URL for changes every 12 hours. You can force it to check immediately by clicking the "Check for updates" link on the "Plugins" page (it's next to the "Visit plugin site" link). Themes don't have that link, but you can also trigger an update check like this: - - 1. Install [Debug Bar](https://srd.wordpress.org/plugins/debug-bar/). - 2. Click the "Debug" menu in the Admin Bar (a.k.a Toolbar). - 3. Open the "PUC (your-slug)" panel. - 4. Click the "Check Now" button. - -#### Notes -- The second argument passed to `buildUpdateChecker` must be the absolute path to the main plugin file or any file in the theme directory. If you followed the "getting started" instructions, you can just use the `__FILE__` constant. -- The third argument - i.e. the slug - is optional but recommended. In most cases, the slug should be the same as the name of your plugin directory. For example, if your plugin lives in `/wp-content/plugins/my-plugin`, set the slug to `my-plugin`. If the slug is omitted, the update checker will use the name of the main plugin file as the slug (e.g. `my-cool-plugin.php` → `my-cool-plugin`). This can lead to conflicts if your plugin has a generic file name like `plugin.php`. - - This doesn't affect themes because PUC uses the theme directory name as the default slug. Still, if you're planning to use the slug in your own code - e.g. to filter updates or override update checker behaviour - it can be a good idea to set it explicitly. - -### GitHub Integration - -1. Download [the latest release](https://github.com/YahnisElsts/plugin-update-checker/releases/latest) and copy the `plugin-update-checker` directory to your plugin or theme. -2. Add the following code to the main plugin file or `functions.php`: - - ```php - require 'plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( - 'https://github.com/user-name/repo-name/', - __FILE__, - 'unique-plugin-or-theme-slug' - ); - - //Set the branch that contains the stable release. - $myUpdateChecker->setBranch('stable-branch-name'); - - //Optional: If you're using a private repository, specify the access token like this: - $myUpdateChecker->setAuthentication('your-token-here'); - ``` -3. Plugins only: Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/readme.txt) to your repository. The contents of this file will be shown when the user clicks the "View version 1.2.3 details" link. - -#### How to Release an Update - -This library supports a couple of different ways to release updates on GitHub. Pick the one that best fits your workflow. - -- **GitHub releases** - - Create a new release using the "Releases" feature on GitHub. The tag name and release title don't matter. The description is optional, but if you do provide one, it will be displayed when the user clicks the "View version x.y.z details" link on the "Plugins" page. Note that PUC ignores releases marked as "This is a pre-release". - - If you want to use release assets, call the `enableReleaseAssets()` method after creating the update checker instance: - ```php - $myUpdateChecker->getVcsApi()->enableReleaseAssets(); - ``` - -- **Tags** - - To release version 1.2.3, create a new Git tag named `v1.2.3` or `1.2.3`. That's it. - - PUC doesn't require strict adherence to [SemVer](http://semver.org/). These are all valid tag names: `v1.2.3`, `v1.2-foo`, `1.2.3_rc1-ABC`, `1.2.3.4.5`. However, be warned that it's not smart enough to filter out alpha/beta/RC versions. If that's a problem, you might want to use GitHub releases or branches instead. - -- **Stable branch** - - Point the update checker at a stable, production-ready branch: - ```php - $updateChecker->setBranch('branch-name'); - ``` - PUC will periodically check the `Version` header in the main plugin file or `style.css` and display a notification if it's greater than the installed version. - - Caveat: If you set the branch to `master` (the default), the update checker will look for recent releases and tags first. It'll only use the `master` branch if it doesn't find anything else suitable. - -#### Notes - -The library will pull update details from the following parts of a release/tag/branch: - -- Version number - - The "Version" plugin header. - - The latest GitHub release or tag name. -- Changelog - - The "Changelog" section of `readme.txt`. - - One of the following files: - CHANGES.md, CHANGELOG.md, changes.md, changelog.md - - GitHub release notes. -- Required and tested WordPress versions - - The "Requires at least" and "Tested up to" fields in `readme.txt`. - - The following plugin headers: - `Required WP`, `Tested WP`, `Requires at least`, `Tested up to` -- "Last updated" timestamp - - The creation timestamp of the latest GitHub release. - - The latest commit in the selected tag or branch. -- Number of downloads - - The `download_count` statistic of the latest release. - - If you're not using GitHub releases, there will be no download stats. -- Other plugin details - author, homepage URL, description - - The "Description" section of `readme.txt`. - - Remote plugin headers (i.e. the latest version on GitHub). - - Local plugin headers (i.e. the currently installed version). -- Ratings, banners, screenshots - - Not supported. - -### BitBucket Integration - -1. Download [the latest release](https://github.com/YahnisElsts/plugin-update-checker/releases/latest) and copy the `plugin-update-checker` directory to your plugin or theme. -2. Add the following code to the main plugin file or `functions.php`: - - ```php - require 'plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( - 'https://bitbucket.org/user-name/repo-name', - __FILE__, - 'unique-plugin-or-theme-slug' - ); - - //Optional: If you're using a private repository, create an OAuth consumer - //and set the authentication credentials like this: - //Note: For now you need to check "This is a private consumer" when - //creating the consumer to work around #134: - // https://github.com/YahnisElsts/plugin-update-checker/issues/134 - $myUpdateChecker->setAuthentication(array( - 'consumer_key' => '...', - 'consumer_secret' => '...', - )); - - //Optional: Set the branch that contains the stable release. - $myUpdateChecker->setBranch('stable-branch-name'); - ``` -3. Optional: Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/readme.txt) to your repository. For plugins, the contents of this file will be shown when the user clicks the "View version 1.2.3 details" link. - -#### How to Release an Update - -BitBucket doesn't have an equivalent to GitHub's releases, so the process is slightly different. You can use any of the following approaches: - -- **`Stable tag` header** - - This is the recommended approach if you're using tags to mark each version. Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/readme.txt) to your repository. Set the "stable tag" header to the tag that represents the latest release. Example: - ```text - Stable tag: v1.2.3 - ``` - The tag doesn't have to start with a "v" or follow any particular format. You can use any name you like as long as it's a valid Git tag. - - Tip: If you explicitly set a stable branch, the update checker will look for a `readme.txt` in that branch. Otherwise it will only look at the `master` branch. - -- **Tags** - - You can skip the "stable tag" bit and just create a new Git tag named `v1.2.3` or `1.2.3`. The update checker will look at the most recent tags and pick the one that looks like the highest version number. - - PUC doesn't require strict adherence to [SemVer](http://semver.org/). These are all valid tag names: `v1.2.3`, `v1.2-foo`, `1.2.3_rc1-ABC`, `1.2.3.4.5`. However, be warned that it's not smart enough to filter out alpha/beta/RC versions. - -- **Stable branch** - - Point the update checker at a stable, production-ready branch: - ```php - $updateChecker->setBranch('branch-name'); - ``` - PUC will periodically check the `Version` header in the main plugin file or `style.css` and display a notification if it's greater than the installed version. Caveat: If you set the branch to `master`, the update checker will still look for tags first. - -### GitLab Integration - -1. Download [the latest release](https://github.com/YahnisElsts/plugin-update-checker/releases/latest) and copy the `plugin-update-checker` directory to your plugin or theme. -2. Add the following code to the main plugin file or `functions.php` and define how you want to check for updates from Gitlab (refer to: [Gitlab: How to Release an Update](#how-to-release-a-gitlab-update)): - - ```php - require 'plugin-update-checker/plugin-update-checker.php'; - $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( - 'https://gitlab.com/user-name/repo-name/', - __FILE__, - 'unique-plugin-or-theme-slug' - ); - - //Optional: If you're using a private repository, specify the access token like this: - $myUpdateChecker->setAuthentication('your-token-here'); - ``` - - Alternatively, if you're using a self-hosted GitLab instance, initialize the update checker like this: - ```php - $myUpdateChecker = new Puc_v4p11_Vcs_PluginUpdateChecker( - new Puc_v4p11_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'), - __FILE__, - 'unique-plugin-or-theme-slug' - ); - //Optional: Add setAuthentication(...) and setBranch(...) as shown above. - ``` - If you're using a self-hosted GitLab instance and [subgroups or nested groups](https://docs.gitlab.com/ce/user/group/subgroups/index.html), you have to tell the update checker which parts of the URL are subgroups: - ```php - $myUpdateChecker = new Puc_v4p11_Vcs_PluginUpdateChecker( - new Puc_v4p11_Vcs_GitLabApi('https://myserver.com/group-name/subgroup-level1/subgroup-level2/subgroup-level3/repo-name/', null, 'subgroup-level1/subgroup-level2/subgroup-level3'), - __FILE__, - 'unique-plugin-or-theme-slug' - ); - - ``` - -3. Plugins only: Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/readme.txt) to your repository. The contents of this file will be shown when the user clicks the "View version 1.2.3 details" link. - -#### How to Release a GitLab Update -A Gitlab repository can be checked for updates in 4 different ways. - -1. **Stable branch** (other than `master` or `main`): - - Point the update checker at any stable, production-ready branch and PUC will periodically check the `Version` header in the main plugin file or `style.css` and display a notification if it's greater than the installed version. - - Add the following code: - ```php - //Add the following code to your main plugin file or `functions.php` file to check for updates from a custom branch - $myUpdateChecker->setBranch('stable-branch-name'); - ``` - - Caveats: - - If you set the branch to `main` (the default) or `master` (the historical default), the update checker will look for recent releases and tags first. It'll only use the `main` or `master` branch if it doesn't find anything else suitable. - -2. **GitLab Releases using Generic Packages**: - - Use a Gitlab CI/CD Pipeline to automatically generate your update on release using a Generic Package. The benefit of using Generic Package assets over the Source Code assets is that the code can already be built and production ready. - - Add the following code: - ```php - //Add the following code to your main plugin file or `functions.php` file to check for a new update from releases using generic packages - $myUpdateChecker->getVcsApi()->enableReleasePackages(); - ``` - - PUC will periodically check the release version (i.e. the tag name of the release) and will display a notification if the release is a greater version than the installed version. - - The release tag name should loosely follow [SemVer](http://semver.org/) but these are all valid release names: `v1.2.3`, `v1.2-foo`, `1.2.3_rc1-ABC`, `1.2.3.4.5` However, be warned that it's not smart enough to filter out alpha/beta/RC versions. If that's a problem, you might want to use GitLab branches instead. - - For more information about *Gitlab Release Generic Packages* refer to the following links: - - [Gitlab CI/CD Release Documentation](https://docs.gitlab.com/ee/user/project/releases/#create-release-from-gitlab-ci) - - [Gitlab Release Assets as Generic Package Documentation](https://gitlab.com/gitlab-org/release-cli/-/tree/master/docs/examples/release-assets-as-generic-package/) - - [Example .gitlab-ci.yml file using Release Generic Packages for generating a update package from the Sensei-LMS wordpress plugin](https://gist.github.com/timwiel/9dfd3526c768efad4973254085e065ce) - - -3. **GitLab Releases using Source Code Assets**: - - Create a new release using the "Releases" feature on Gitlab. - - Add the following code: - ```php - //Add the following code to your main plugin file or `functions.php` file to check for a new update from releases using release assets - $myUpdateChecker->getVcsApi()->enableReleaseAssets(); - ``` - - PUC will periodically check the release version (based on release tag name) and display a notification if the release version is greater than the installed version. - - The release name should loosely follow [SemVer](http://semver.org/) but these are all valid release names: `v1.2.3`, `v1.2-foo`, `1.2.3_rc1-ABC`, `1.2.3.4.5` However, be warned that it's not smart enough to filter out alpha/beta/RC versions. If that's a problem, you might want to use GitLab branches instead. - - -4. **Tags** (this is the default option): - - To release version 1.2.3, create a new Git tag named `v1.2.3` or `1.2.3`. - - Optionally, add the following code: - ```php - //Add the following code to your main plugin file or `functions.php` file to check for updates from the default branch - $myUpdateChecker->setBranch('master'); //or 'main' - ``` - - PUC doesn't require strict adherence to [SemVer](http://semver.org/). These are all valid tag names: `v1.2.3`, `v1.2-foo`, `1.2.3_rc1-ABC`, `1.2.3.4.5`. However, be warned that it's not smart enough to filter out alpha/beta/RC versions. If that's a problem, you might want to use GitLab branches instead. - -License Management ------------------- - -Currently, the update checker doesn't have any built-in license management features. It only provides some hooks that you can use to, for example, append license keys to update requests (`$updateChecker->addQueryArgFilter()`). If you're looking for ways to manage and verify licenses, please post your feedback in [this issue](https://github.com/YahnisElsts/plugin-update-checker/issues/222). - -Resources ---------- - -- [This blog post](http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/) has more information about the update checker API. *Slightly out of date.* -- [Debug Bar](https://wordpress.org/plugins/debug-bar/) - useful for testing and debugging the update checker. -- [Update format reference](https://docs.google.com/spreadsheets/d/1eOBbW7Go2qEQXReOOCdidMTf_tDYRq4JfegcO1CBPIs/edit?usp=sharing) - describes all fields supported by the JSON-based update information format used by the update checker. Only covers plugins. Themes use a similar but more limited format. -- [Securing download links](http://w-shadow.com/blog/2013/03/19/plugin-updates-securing-download-links/) - a general overview. -- [A GUI for entering download credentials](http://open-tools.net/documentation/tutorial-automatic-updates.html#wordpress) -- [Theme Update Checker](http://w-shadow.com/blog/2011/06/02/automatic-updates-for-commercial-themes/) - an older, theme-only variant of this update checker. diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/composer.json b/wp/wp-content/plugins/divifilter/plugin-update-checker/composer.json deleted file mode 100644 index 6064bd4b..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/composer.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "yahnis-elsts/plugin-update-checker", - "type": "library", - "description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.", - "keywords": ["wordpress", "plugin updates", "automatic updates", "theme updates"], - "homepage": "https://github.com/YahnisElsts/plugin-update-checker/", - "license": "MIT", - "authors": [ - { - "name": "Yahnis Elsts", - "email": "whiteshadow@w-shadow.com", - "homepage": "http://w-shadow.com/", - "role": "Developer" - } - ], - "require": { - "php": ">=5.2.0", - "ext-json": "*" - }, - "autoload": { - "files": ["load-v4p11.php"] - } -} diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/css/puc-debug-bar.css b/wp/wp-content/plugins/divifilter/plugin-update-checker/css/puc-debug-bar.css deleted file mode 100644 index 2cb3f8e6..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/css/puc-debug-bar.css +++ /dev/null @@ -1,70 +0,0 @@ -.puc-debug-bar-panel-v4 pre { - margin-top: 0; -} - -/* Style the debug data table to match "widefat" table style used by WordPress. */ -table.puc-debug-data { - width: 100%; - clear: both; - margin: 0; - - border-spacing: 0; - background-color: #f9f9f9; - - border-radius: 3px; - border: 1px solid #dfdfdf; - border-collapse: separate; -} - -table.puc-debug-data * { - word-wrap: break-word; -} - -table.puc-debug-data th { - width: 11em; - padding: 7px 7px 8px; - text-align: left; - - font-family: "Georgia", "Times New Roman", "Bitstream Charter", "Times", serif; - font-weight: 400; - font-size: 14px; - line-height: 1.3em; - text-shadow: rgba(255, 255, 255, 0.804) 0 1px 0; -} - -table.puc-debug-data td, table.puc-debug-data th { - border-width: 1px 0; - border-style: solid; - - border-top-color: #fff; - border-bottom-color: #dfdfdf; - - text-transform: none; -} - -table.puc-debug-data td { - color: #555; - font-size: 12px; - padding: 4px 7px 2px; - vertical-align: top; -} - -.puc-ajax-response { - border: 1px solid #dfdfdf; - border-radius: 3px; - padding: 0.5em; - margin: 5px 0; - background-color: white; -} - -.puc-ajax-nonce { - display: none; -} - -.puc-ajax-response dt { - margin: 0; -} - -.puc-ajax-response dd { - margin: 0 0 1em; -} diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/examples/plugin.json b/wp/wp-content/plugins/divifilter/plugin-update-checker/examples/plugin.json deleted file mode 100644 index fea211a1..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/examples/plugin.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "My Example Plugin", - "version": "2.0", - "download_url": "http://example.com/updates/example-plugin.zip", - - "homepage": "http://example.com/", - "requires": "4.5", - "tested": "4.8", - "last_updated": "2017-01-01 16:17:00", - "upgrade_notice": "Here's why you should upgrade...", - - "author": "Janis Elsts", - "author_homepage": "http://example.com/", - - "sections": { - "description": "(Required) Plugin description. Basic HTML can be used in all sections.", - "installation": "(Recommended) Installation instructions.", - "changelog": "(Recommended) Changelog.

This section will be displayed by default when the user clicks 'View version x.y.z details'.

", - "custom_section": "This is a custom section labeled 'Custom Section'." - }, - - "icons" : { - "1x" : "http://w-shadow.com/files/external-update-example/assets/icon-128x128.png", - "2x" : "http://w-shadow.com/files/external-update-example/assets/icon-256x256.png" - }, - - "banners": { - "low": "http://w-shadow.com/files/external-update-example/assets/banner-772x250.png", - "high": "http://w-shadow.com/files/external-update-example/assets/banner-1544x500.png" - }, - - "translations": [ - { - "language": "fr_FR", - "version": "4.0", - "updated": "2016-04-22 23:22:42", - "package": "http://example.com/updates/translations/french-language-pack.zip" - }, - { - "language": "de_DE", - "version": "5.0", - "updated": "2016-04-22 23:22:42", - "package": "http://example.com/updates/translations/german-language-pack.zip" - } - ], - - "rating": 90, - "num_ratings": 123, - - "downloaded": 1234, - "active_installs": 12345 -} \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/examples/theme.json b/wp/wp-content/plugins/divifilter/plugin-update-checker/examples/theme.json deleted file mode 100644 index df6c8c79..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/examples/theme.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": "2.0", - "details_url": "http://example.com/version-2.0-details.html", - "download_url": "http://example.com/example-theme-2.0.zip" -} \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/js/debug-bar.js b/wp/wp-content/plugins/divifilter/plugin-update-checker/js/debug-bar.js deleted file mode 100644 index 2452c020..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/js/debug-bar.js +++ /dev/null @@ -1,52 +0,0 @@ -jQuery(function($) { - - function runAjaxAction(button, action) { - button = $(button); - var panel = button.closest('.puc-debug-bar-panel-v4'); - var responseBox = button.closest('td').find('.puc-ajax-response'); - - responseBox.text('Processing...').show(); - $.post( - ajaxurl, - { - action : action, - uid : panel.data('uid'), - _wpnonce: panel.data('nonce') - }, - function(data) { - responseBox.html(data); - }, - 'html' - ); - } - - $('.puc-debug-bar-panel-v4 input[name="puc-check-now-button"]').on('click', function() { - runAjaxAction(this, 'puc_v4_debug_check_now'); - return false; - }); - - $('.puc-debug-bar-panel-v4 input[name="puc-request-info-button"]').on('click', function() { - runAjaxAction(this, 'puc_v4_debug_request_info'); - return false; - }); - - - // Debug Bar uses the panel class name as part of its link and container IDs. This means we can - // end up with multiple identical IDs if more than one plugin uses the update checker library. - // Fix it by replacing the class name with the plugin slug. - var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel-v4'); - panels.each(function() { - var panel = $(this); - var uid = panel.data('uid'); - var target = panel.closest('.debug-menu-target'); - - //Change the panel wrapper ID. - target.attr('id', 'debug-menu-target-puc-' + uid); - - //Change the menu link ID as well and point it at the new target ID. - $('#debug-bar-menu').find('.puc-debug-menu-link-' + uid) - .closest('.debug-menu-link') - .attr('id', 'debug-menu-link-puc-' + uid) - .attr('href', '#' + target.attr('id')); - }); -}); \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.mo deleted file mode 100644 index 59645faba22e5f3b1358ef076a01d5a7fa3aa534..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1186 zcmZ`&%We}f6g5yD3JU~l7MF@jAn=eGUhPB?f>02mg$Po_u5xE?6T{RV*`7X-koW+0 zhy^>uFR+0P5@LzOC$M16M{p*S5}sDhoY=mPbM5P|$7Ws%jDx^&U;rEjo&)uG2OI_7 z0|a~qW`XZO7dWy8}I`73-}WF&`jfh1$+|or(n2@ z$6kD4Ca@&-k5_~^FyUI~c=Se`J*IW*s48<6*o(o49h3HCEM+5QhFsVosZFH|wN`K> zR?K5#x6H%=Hi*EEd{CkCG&|>KMHn%aMK#ohf(`}GTqVO>w8_qEYsjusZ87I}jgak^ z1b=z=Y*pmY6Da4vZbKUgT;Ekp3VMIKk87Fp(ccPYmReZ*Oiw{rQQ zQJGG}$>w0>q|R3V?m+e&tAI-6bvUP#wByS%j%9Lz;>&3}Inz$sZ5YaXys7Jor*;dn zy&#i|6wjye#l~(4XI!Zv%K@v6lv>NTmKUcY;;7x~Srga|VW$KqCtXwwgL#J#*X-o9%M(OOP zBClzLpCXloN)jJ<-gN!%O{ zB>(p8)gMt|<1=e`ScRtXSByfRLdUq(KfSFJ6!629vGE!UXnOYH)9c?7LY#*cWS6#% cwcF+j&+0z~QHeLF5H1o+|4uN~nyX0s0EpISt^fc4 diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.po deleted file mode 100644 index 36f3ad70..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ca.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-11-24 17:02+0200\n" -"PO-Revision-Date: 2019-09-25 18:15+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: \n" -"Language: ca\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p3/Plugin/UpdateChecker.php:395 -msgid "Check for updates" -msgstr "Comprova si hi ha actualitzacions" - -#: Puc/v4p3/Plugin/UpdateChecker.php:548 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "L’extensió %s està actualitzada." - -#: Puc/v4p3/Plugin/UpdateChecker.php:550 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Una nova versió de l’extensió %s està disponible." - -#: Puc/v4p3/Plugin/UpdateChecker.php:552 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "No s’ha pogut determinar si hi ha actualitzacions per a %s." - -#: Puc/v4p3/Plugin/UpdateChecker.php:558 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Estat del comprovador d’actualitzacions desconegut \"%s\"" - -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 -msgid "There is no changelog available." -msgstr "No hi ha cap registre de canvis disponible." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo deleted file mode 100644 index ac6d20ea77cb6c6ad2aa9204312c53c86078e08c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1077 zcmZWoO>fgc5H(P7$gP|Z>S3s;)T*rGq^c+m;iI8N6={juv{b!B8+#f%adxfUb=pSo z8#o~jobm&Z`UiRnH;&x-8(f*KlYWSm#&5^_=Iz_H=g)(guMUm-6mt}Ho6z`_!zIqr z{4)hme4&`9IH#ym{H9o{DPi$ zOoWgoStk}?Vw2#^8xVK`15`Se0^~7R#)6)bXtx_1{8vquZj-YVj0Ee~bs9=`F)(Z^ zWCyvvKapkmk=VpxVHZ=W4BOV7IArTtN3*8%q0soyWHp7{kTv#}G<_(0rDx1rWn~Xa zp1-=X?5%hn5!o&dVta&JJWGYrs=xAl*`raYb8T2taiJ4#r1IfFcFoW4K?Hle8z%5# zKsg4{Yi(0Eko}ibBRU!HAZsG;`%oLwIxOZuzO!}`2TNBh9|Fy4M}1DW(aJMa6z~rO{OP zo11Lynr9DmjEZfDK!&mC_^{TFP2rH$Wgyv}%v6AO&J)rLbc_5QvUey@<+osIz#uXv z)qb&#;UIv|5!G zR$8Zi>1jD2yrF_z1yO_4nMeAxaB00^k4vA49LZK{lU6F7qaIz5l8GE}1H5N4ay#S! zQp-%6LZBG`fKY0arDA;HIy*QN<57QnG3|zl#@P)4s<`Zt9XS|}Y)cHMy^`6Vyo*\n" -"Language-Team: Czech (Czech Republic)\n" -"Language: cs-CZ\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-Loco-Source-Locale: cs_CZ\n" -"X-Generator: Loco - https://localise.biz/\n" -"X-Poedit-Basepath: ..\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"X-Poedit-SearchPath-0: .\n" -"X-Loco-Parser: loco_parse_po" - -#: Puc/v4p1/Plugin/UpdateChecker.php:358 -msgid "Check for updates" -msgstr "Zkontrolovat aktualizace" - -#: Puc/v4p1/Plugin/UpdateChecker.php:405 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Plugin %s je aktuální." - -#: Puc/v4p1/Plugin/UpdateChecker.php:407 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Nová verze pluginu %s je dostupná." - -#: Puc/v4p1/Plugin/UpdateChecker.php:409 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Neznámý status kontroly aktualizací \"%s\"" - -#: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 -msgid "There is no changelog available." -msgstr "Changelog není dostupný." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.mo deleted file mode 100644 index 9c59670712307a7dec1419ce48ba2613300f91aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1010 zcmZWo&u`N(7!5EuloK2gLLWoZK*J&FHf>7P19Tgjwux$VXt&C1zNV&`UD?ilNF4Yl zICDerA0Tnu9f>>QUxAmVTRUOp<@vKee}1uF{@kDY6rkM!9s;|-UEl*ywy(fF;2S`| z4`3en4K#tjfGGPng5Vc01Rj*}tsqzgAA%o&KY~N>XYdp7PcTx)?Izv`gE`>#c%;%Z z=~mPlaBoO`W2qRW(z6RX1GY@ckv7yDNS$$RGLk1!pfh*m{CqBu%cmzSdDC_fzu32xChlg(SsiwzG zik~&61>Ty%_PAB)N~jWcRep!hPmN98u5v!1Znx3pM)xd?r#a!z{8deTEILSHoGs%F|hy=lDlbzO2ta4E_O#F(`Ea diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.po deleted file mode 100644 index 8f2bc0d7..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-da_DK.po +++ /dev/null @@ -1,42 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-05-20 10:53+0300\n" -"PO-Revision-Date: 2017-10-17 11:07+0200\n" -"Last-Translator: Mikk3lRo\n" -"Language-Team: Mikk3lRo\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" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Language: da_DK\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p1/Plugin/UpdateChecker.php:358 -msgid "Check for updates" -msgstr "Undersøg for opdateringer" - -#: Puc/v4p1/Plugin/UpdateChecker.php:405 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Plugin'et %s er allerede opdateret." - -#: Puc/v4p1/Plugin/UpdateChecker.php:407 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "En ny version af plugin'et %s er tilgængelig." - -#: Puc/v4p1/Plugin/UpdateChecker.php:409 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Ukendt opdateringsstatus: \"%s\"" - -#: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 -msgid "There is no changelog available." -msgstr "Der er ingen ændringslog tilgængelig." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-de_DE.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-de_DE.mo deleted file mode 100644 index 0734cae2dc9b76d41f5f6f99b1380ec2f685e1be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 980 zcmZuv&2AGh7+j!$6i)Plgi!Sn35g$h$wp9>4M9MfqKXtEnj&tIll`(;vauuEn^K9_ z;K+>wJOH=e`U)I4apXA|chjbourxcLcR$aL?fJ91@+H8y0^9;Rz%}4A;Kz61KJWv$ z4*UWL_zTrP?cpW?f-vECFuYrGp(Rw^k1}lK~;K#+1 zPM?>3^@0@d)0~aXv?4tsH_j~0@*>R?p^|f%<#Ld77_`PboX|)cDrSjvY=hpI4f`&o zX*iZDVih)w9nRIf$rqP8yTPf*77=s_*2)zB#3@jUaJ{ZC&MKYCpD zb)1n1$`gw*|dEss6VZzTU9UMR*Qx-jz)0iqd+dJ*0 z@hGfST3R_)5I&f}q2o{P;VhS#YWUMLmR)nNw\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.1\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"Language: de_DE\n" -"X-Poedit-SearchPath-0: .\n" - -#: github-checker.php:137 -msgid "There is no changelog available." -msgstr "Es ist keine Liste von Programmänderungen verfügbar." - -#: plugin-update-checker.php:852 -msgid "Check for updates" -msgstr "Nach Update suchen" - -#: plugin-update-checker.php:896 -msgid "This plugin is up to date." -msgstr "Das Plugin ist aktuell." - -#: plugin-update-checker.php:898 -msgid "A new version of this plugin is available." -msgstr "Es ist eine neue Version für das Plugin verfügbar." - -#: plugin-update-checker.php:900 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Unbekannter Update Status \"%s\"" diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_AR.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-es_AR.mo deleted file mode 100644 index 85afecd344184a07c3ff0117b87066af6850078c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1140 zcmZ`&O>Yx15H(Oh3I{~bNDP%KQ3)?e3R1OE4ke_hqJ@a2sJF=7ohGImJF>lL%WvR@ z;Ep(Q1ys0DpicaPyK7ZSW>og5QBZ06zf2e&>o1OW-4L1N;eG2mc1Ig6HRixC8Ej;WAm5 z@x*6=BXMR7dj`aHQ;2Q_N=3Pl&Zj9bO-F1v?pUJ87R}|%=Sr*mCn>|#*x@I z`^FxasRL{ffgSmvLhfl{(JzQFU>aq4UmFTKWIVS@h7V}W&TDJP?onZ}=ueH1Z6?75 z@0QK86nX-s9M}!Dfxx{}#iXG3%zaYJqK__WKwOn%Py;7OqI>` z&GvchT2!sHtO;y_>>iB}CGcT*Fv^rRjiT?)b7*dN*W}8%om0l|v6F3+*i@T-Oe?!O zRCeT3HtbZeE~bv_PzGjOdeJ)8FV03Rw1?`T6Q>cc2{A%G!4`dsU+ko({EIQ{$pC7+sScm$Z;R} z9eyZNqK3QLdP=n)S)(Uo+s1&V#n+6IY19;B59^tjCtnOsd}57FG^~$5FZ$!}72lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l z*dvxK*??HlF8K%e0X~8=nY2w+Vd=~nd+y`hJJ-KwXFdq5>%eWG3)}$S0mb?T+ycG> z1pET#fWJT!xOqv4Hh3K@!SBHzfu8_jzjZ~31@Ixb0saiGga3e+!Lu_$+yQsNa2c=5 zc;d6bk+?cO5#ri}3!UTD8gQ~pJJwM?N>yMlx&wAh+LN)A43z0}X8WY}l+M(4#*x@G zyTaq4UmFTKWIVG>hWBZYo!8co-J!x_-k%sD+f;%J z-YuJFDf9$NIj|dQ1A#jyib+B5sr$H=c^_TWfWpqF%tsU~6;(%~r!Pr z5hu&W$Vr`*&P(}<_jFN+deYHxRu^TxMzx3WqsOxPuv)FGp>?_Hv+S}O##C8f zU2mVou0_>K%bLI@$nN0?Q34-?2ct}B(tgCyPIaJqw21R^BcCYGBNYZQMNy@b29(>znmPQ7>Mb z_YB=_Qf;Ae7GT5XF5yt*2D`ku`cewrvb(T71nYnM6%7_OPCcdHmJj#3$C+M8o>%%e+7Ofst2a za^6$r2$xpb)HJaV$DhungD{UvkdITAL;K$2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l z*dvxK*??HlF8K%e0X~8=nY2w+Vd=~nd+y`hJJ-KwXFdq5>%eWG3)}$S0mb?T+ycG> z1pET#fWJT!xOqv4Hh3K@!SBHzfu8_jzjZ~31@Ixb0saiGga3e+!Lu_$+yQsNa2c=5 zc;d6bk+?cO5#ri}3!UTD8gQ~pJJwM?N>yMlx&wAh+LN)A43z0}X8WY}l+M(4#*x@G zyTaq4UmFTKWIVG>hWBZYo!8co-J!x_-k%sD+f;%J z-YuJFDf9$NIj|dQ1A#jyib+B5sr$H=c^_TWfWpqF%tsU~6;(%~r!Pr z5hu&W$Vr`*&P(}<_jFN+deYHxRu^TxMzx3WqsOxPuv)FGp>?_Hv+S}O##C8f zU2mVou0_>K%bLI@$nN0?Q34-?2ct}B(tgCyPIaJqw21R^BcCYGBNYZQMNy@b29(>znmPQ7>Mb z_YB=_Qf;Ae7GT5XF5yt*2D`ku`cewrvb(T71nYnM6%7_OPCcdHmJj#3$C+M8o>%%e+7Ofst2a za^6$r2$xpb)HJaV$DhungD{UvkdITAL;K$2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l z*dvxK*??HlF8K%e0X~8=nY2w+Vd=~nd+y`hJJ-KwXFdq5>%eWG3)}$S0mb?T+ycG> z1pET#fWJT!xOqv4Hh3K@!SBHzfu8_jzjZ~31@Ixb0saiGga3e+!Lu_$+yQsNa2c=5 zc;d6bk+?cO5#ri}3!UTD8gQ~pJJwM?N>yMlx&wAh+LN)A43z0}X8WY}l+M(4#*x@G zyTaq4UmFTKWIVG>hWBZYo!8co-J!x_-k%sD+f;%J z-YuJFDf9$NIj|dQ1A#jyib+B5sr$H=c^_TWfWpqF%tsU~6;(%~r!Pr z5hu&W$Vr`*&P(}<_jFN+deYHxRu^TxMzx3WqsOxPuv)FGp>?_Hv+S}O##C8f zU2mVou0_>K%bLI@$nN0?Q34-?2ct}B(tgCyPIaJqw21R^BcCYGBNYZQMNy@b29(>znmPQ7>Mb z_YB=_Qf;Ae7GT5XF5yt*2D`ku`cewrvb(T71nYnM6%7_OPCcdHmJj#3$C+M8o>%%e+7Ofst2a za^6$r2$xpb)HJaV$DhungD{UvkdITAL;K$mQ_tX!08MILH_4soF=HQY2)>b;uw zdPS|CiLzl66*kv37#%ueT?g!tl`B3eu~99!!4m8t^drg#;awKwS$L1a+fhF33&J2k zBbye>v0L_dUl_1_!S(eAeL;VJkelSGVI|FFnsB3Z1YgZctY~`f$>e<+tcxU3BYIgS z+%K!8Vf4#dlh*_*3BD8&oYRb1O#}_bvZ_WJTBWY^V|~;cQI*e6Oy{O1rpAsI4E-QC zs-zJT238x`#E9qSRwLoD9B|*VPK6noEse9nQJ*tf6`GC7vZ}fZ4MwZu zD0_3T@#CW#X1B@5BH7ztuORM>xV2jLi+l1=f3@F`b_U@Vf-R`G-B$m$|9^wdU*s>7 C2(8ip diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fa_IR.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fa_IR.po deleted file mode 100644 index 20b69380..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fa_IR.po +++ /dev/null @@ -1,38 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2016-02-17 14:21+0100\n" -"PO-Revision-Date: 2016-10-28 14:30+0330\n" -"Last-Translator: studio RVOLA \n" -"Language-Team: Pro Style \n" -"Language: fa_IR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.8\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: github-checker.php:120 -msgid "There is no changelog available." -msgstr "شرحی برای تغییرات یافت نشد" - -#: plugin-update-checker.php:637 -msgid "Check for updates" -msgstr "بررسی برای بروزرسانی " - -#: plugin-update-checker.php:681 -msgid "This plugin is up to date." -msgstr "شما از آخرین نسخه استفاده میکنید . به‌روز باشید" - -#: plugin-update-checker.php:683 -msgid "A new version of this plugin is available." -msgstr "نسخه جدیدی برای افزونه ارائه شده است ." - -#: plugin-update-checker.php:685 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "وضعیت ناشناخته برای بروزرسانی \"%s\"" diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_CA.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_CA.mo deleted file mode 100644 index 24639b694e7ba21e2b5f9997b9f12d2d831ac69a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1208 zcmZuwO>Y}F5M>&-1=K^)9{T|d3>Zk!aJ##85MxybNff&LJ!fDKMyPa&$<1lrsRn<7q_YSWChrKqFfjXPxdlxFOM zc9z_TT8pi4VT5Rx0=(tjbB(E>CsM_c{Zv~B99<|T1-&cxc`jQad0PV#doyHHQ*_j3 zoru1754nu;ppp+3DvPB!xhRZW=Gp0gKaf4oDk2kk56%VUX?9a)nasB-yIG|9mua4+ zFqA*=Ot%@Y?RI3E%PglXExyiWdINTcsBxplEC;Nn1$B-Nj`r3fvLx;FoQ-Uw9GumN z7Wr}fsy0g7ZhJvKaNIo}?8}|ComV!D*vmazx=Pz|K|3cpc7BxKvSqKL^9A)CS2|Lj zq{%k^ESB=F3S6r=DJV%gebabl{uqVi|VxZd)2mcduExMcEhKwf}wB_>y}I zSp_Y0txo@r&rY4M!l4eapy9APLq+?eP?k zF)7{j)~a{~jr_28=aLXszMS-ticFDAM?5%x>GeqCr5X-2)dAo0U+EzPivvUU?U zks{TUjh*jWW$@nSmKTOp=}|W|+S-OVL<)_cG3N7DIL2GGu9>kh zylMa(YY-0?$#&imXoc4E^6>}L+J(@DYE@L{FPASLou;Y5sci}?VQ+d 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: Eric Gagnon \n" -"Language: fr_CA\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p3/Plugin/UpdateChecker.php:395 -msgid "Check for updates" -msgstr "Vérifier les mises à jour" - -#: Puc/v4p3/Plugin/UpdateChecker.php:548 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "L’extension %s est à jour." - -#: Puc/v4p3/Plugin/UpdateChecker.php:550 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Une nouvelle version de l’extension %s est disponible." - -#: Puc/v4p3/Plugin/UpdateChecker.php:552 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Impossible de déterminer si une mise à jour est disponible pour \"%s\"" - -#: Puc/v4p3/Plugin/UpdateChecker.php:558 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Un problème inconnu est survenu \"%s\"" - -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 -msgid "There is no changelog available." -msgstr "Il n’y a aucun journal de mise à jour disponible." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo deleted file mode 100644 index a492d96f6eb4b2d988877b0f15c6adc60613195e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmZuw&2AGh5H?Ua1TJs|q*0|xAn1R4EshMJY0DWU2&l2I$v2KbMK|0U|;#BAXDl-5v5>kmhg#p{q2ilDF zG=Mae0WCN$eC}X&&doBPB4jEbNDW?kg)=LlaSS80P8toS4~1gRor&nQO9%WHO_u%@ z=NWhdh2Ma6tl7ud^H#!l%ly$aEiYe*PaRe|TV39?C_H)KuP8WzT3B7=Vey0NLiGIE zldu+sB;?yTl7-i+bql4gP1VW80C^Y1Fro_Ni8QdiyVYKS7peDIG(SHcj{`e0N(8YP zE?3S%BIw)R+ID55wXu5PyBdU*rqLd?=iQ@>40=5D^O+J-*NfY*4t-;%yT+F;bXI8B zN6S}rY!ayl5iIRVUwOyZQKJ>!*a$iX6X~HAgh7q|DVO}EaF_|7Mi2y*j>@f2e9hRQ zi$K%$(b6?)^`e?IZ9LMj4AsZ=i}<%Dw=p(LTM?AL&a=P4qp`7xYfI-N==JJ7toIJ1 z>eE_GOqFo-l7)Fydfb#TmC3>S>g(3#r9)8IIPH*49+J@t+dVz8vM;IS6gn76N6*tQ zuuo=KOM(9N@$(S~5P6*I$*vX(5}YW{gpf#=87-#`4Vg82>hyR>jZan7ItO$fTy955 o^GQ$dXrxafAE8os-pQ0!(Rp-9s3)yWJzYdzPT#&tFf|;ozeSTj4gdfE diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.po deleted file mode 100644 index 9f18e2cb..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-fr_FR.po +++ /dev/null @@ -1,42 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-07-07 14:53+0200\n" -"PO-Revision-Date: 2017-07-07 14:54+0200\n" -"Language-Team: studio RVOLA \n" -"Language: fr_FR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: Nicolas GEHIN\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p1/Plugin/UpdateChecker.php:358 -msgid "Check for updates" -msgstr "Vérifier les mises à jour" - -#: Puc/v4p1/Plugin/UpdateChecker.php:405 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "L’extension %s est à jour." - -#: Puc/v4p1/Plugin/UpdateChecker.php:407 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Une nouvelle version de l’extension %s est disponible." - -#: Puc/v4p1/Plugin/UpdateChecker.php:409 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Un problème inconnu est survenu \"%s\"" - -#: Puc/v4p1/Vcs/PluginUpdateChecker.php:85 -msgid "There is no changelog available." -msgstr "Il n’y a aucun journal de mise à jour disponible." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo deleted file mode 100644 index 4789ef1da358b7fdef2879615c49eac1fb2dad98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcmZuvO>fgc5M7{v6i#qKAPz$$#7DIzPDNE5f+!)S6)8m2MckroGO^v*yVmYHB@w@X zTMt~gl@mR1LgEit{Rfqs~~X?#;8rCB&Z?SFfx$FSrAE}nHY;G7CSLItQBH^1Vg1EO9#TD zVSb1ji!7<29|{>@tb&sz{=Z^b3RXc;>#%J(l4?)Rw5XiKQG>CCjDN zB0%n=NIaOw9)wwMeY>)`vDrR8k?YhdEhQ~V+HsPSb&K!p{WKPlY!uh34cg|mzs6UN z^9pA})VwYGY7oi5gO#1gR^IaGC{dS|y9x)91=m?|mT9F7`BPyq6*lz1aVp(7(<0_; zN+-qxNzYE9Y1SLXJ=3&#N5ah}xOW@J0$VE6eQcG!JSdILot0K zq7;Shhh5s8*J%F=%RlWFy*G{WZ;&7A5be=EUVSD1gFvNatULm~a8 zlo;jFzMfKm>?J1uRnMEzVeKiY&H7o2REtp|>#z-zQ1e>Sq4nWu+GNF8dgRPZMcI&l E0BAre\n" -"Language-Team: \n" -"Language: hu_HU\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.6\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: .\n" - -#: github-checker.php:137 -msgid "There is no changelog available." -msgstr "Nem érhető el a changelog." - -#: plugin-update-checker.php:852 -msgid "Check for updates" -msgstr "Frissítés ellenőrzése" - -#: plugin-update-checker.php:896 -msgid "This plugin is up to date." -msgstr "Ez a plugin naprakész." - -#: plugin-update-checker.php:898 -msgid "A new version of this plugin is available." -msgstr "Új verzió érhető el a kiegészítőhöz" - -#: plugin-update-checker.php:900 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Ismeretlen a frissítés ellenőrző státusza \"%s\"" - -#~ msgid "Every %d hours" -#~ msgstr "Minden %d órában" diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.mo deleted file mode 100644 index 4b40d32304dd2746496014f89ffc22d7a2b97b53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1135 zcmZWo%We}f6g5yl3JU}aHn6x(hWBZYo!8co?Ne#7)JzW+epTRe#dQ`8==#i{P6h(1u`EFE?qRKj2SEvEYE~`;Ym5uhs z>QU@kHLA3%32cJw9_EM=_#oWRGo?+V?7Q2#*>|?b$?P zy8L+FotSj!wY$esv2w|<1GO@O-ip9==)O)Aslh;7XVeHi)8ZB8D7p3XE2%6g3^^Vk zyTf&ImNAXcA2{L0Q|)tW^o}k^cM~%T6HN(P?`)RYlTpdzgY}6nU^brQEu+X3c2CWQ z7ZEv|%`GMv3QnXbb>S?x-j9=(eq;R@QqL2~(0ja?Qqf!_<@lG%`ECD~W#$oVRr~{k C>Q&|d diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.po deleted file mode 100644 index db62bb1b..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-it_IT.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2020-08-08 14:36+0300\n" -"PO-Revision-Date: 2022-05-20 00:17+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.0\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: d79\n" -"Language: it_IT\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p11/Plugin/Ui.php:128 -msgid "Check for updates" -msgstr "Verifica aggiornamenti" - -#: Puc/v4p11/Plugin/Ui.php:213 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Il plugin %s è aggiornato." - -#: Puc/v4p11/Plugin/Ui.php:215 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Una nuova versione del plugin %s è disponibile." - -#: Puc/v4p11/Plugin/Ui.php:217 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Non è possibile verificare se c'è un aggiornamento disponibile per %s." - -#: Puc/v4p11/Plugin/Ui.php:223 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Stato di controllo aggiornamenti sconosciuto \"%s\"" - -#: Puc/v4p11/Vcs/PluginUpdateChecker.php:98 -msgid "There is no changelog available." -msgstr "Non c'è alcun registro delle modifiche disponibile." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ja.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ja.mo deleted file mode 100644 index 941b6ba2f4d759727a71a177592dc432753d6a85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1454 zcmZ{i&2QX97{&((Ukeo<7li0xh_olLy}PJv>NJQDQdCHU3)`wEqKS8Q*NxYm8hL6ENf=|LPzzz6q_)`xP z@+|Zc=6i<-c>z8Ge;Mw;IXs3x1OFX<0KN@B49`DG$m{Sn9I40?&?Ar@2qAb)9)})- z^w52v)L=|BxI0H{VN6?5l}RqhbQp8$1$fnD(hCF1X2X`Gc|j@-u0IJHgw$=Ypw9iU zPT4&3d^YQIlN<@=g0LOzq(TgG^Oy?BWJ}QDyci}&J>I5OF0n=s+2AztTXip>(vv

?Y+5Q5_Zx+>QQSw1WxG&* zrLezHK%nsfpZ9cg4~#38`f*cCNTU+7K=@3Cu}vkLqX%#+mrMKJtT(ZFrW-cj$W7rV zv{;=R70#L<*`3?;IGcIb$xR=co*aM{%|dP>3?vVbeK7*2U0m0JT0h z!V+FH^0^^o>_yzDWB1!^(Q;aD&hc9@^NoWz$ik)p7GNsIilh2C;c=`mI)HtTFX}R4 z$`jJ2Gc%(z3wH6)_zu}XeWNoRX?eQRTlbkA>em)ACb{=R#4LnYT#lB)ESN^Ys-yh^`RODR#= z7dlz`tI95^Y<*B9>GX4}*TvxWhZ*s ze#7(MH_zQ(`X(=MBYhn3Zh!aV*2)d=(q1F0DqU0QiY}aVx)+uJdoNJ(`CZgsYh=AR y=?qBkY{yP0=y0v7\n" -"Language-Team: \n" -"Language: ja_JP\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" -"X-Poedit-Basepath: ../../../../../../Applications/XAMPP/xamppfiles/htdocs/" -"kisagai/wordpress/wp-content/plugins/simple-stripe-gateway/Puc\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Poedit-KeywordsList: __;_x:1,2c\n" -"X-Poedit-SearchPath-0: .\n" - -#: v4p7/Plugin/Ui.php:54 -msgid "View details" -msgstr "詳細を表示" - -#: v4p7/Plugin/Ui.php:77 -#, php-format -msgid "More information about %s" -msgstr "%sについての詳細" - -#: v4p7/Plugin/Ui.php:128 -msgid "Check for updates" -msgstr "アップデートを確認" - -#: v4p7/Plugin/Ui.php:213 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "%s プラグインは、最新バージョンです。" - -#: v4p7/Plugin/Ui.php:215 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "%s プラグインの最新バージョンがあります。" - -#: v4p7/Plugin/Ui.php:217 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "%s のアップデートがあるかどうかを判断できませんでした。" - -#: v4p7/Plugin/Ui.php:223 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "バージョンアップの確認で想定外の状態になりました。ステータス:”%s”" - -#: v4p7/Vcs/PluginUpdateChecker.php:98 -msgid "There is no changelog available." -msgstr "更新履歴はありません。" diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.mo deleted file mode 100644 index 1cea26dda30ca887087e965d5b494716e48d8416..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1211 zcmah|&59F25N>rQ;T9t9u4ClK@z{3ericUi%PFW*e3e!i-y`f+yUy}&sMoC5~HDc}uIo=?CT;4?tL zH((9;33PzdM}+8sx4;to4*U!F0+jJS9ur~}{2hE1{2P1`yuKnt8~g}d`n?6iWpR$; z7iI!i;`ri5h!aaLbuLbK%E^qz)=`nCDzF!WDLW?Z$yiFJ%1k)36H?nsXKIvjB%Yd? zu{&nz02@SLM?R=fcv@TcYa&dU@~oI>LqUg(S8kKx9olB+wKZhNR9dY2T_a@Mm*9|h z*A`g{J%LgV?B?1);CNRtDd_#{zNls0M~5|_u!AX!oPwpY>PYmReZfhP_fz?-QW-DB z$*M7OS!b>Pa3H&mRX`>3E}Ua()*CHZzapF0sL_fW*DltZ^*RjYW8T(f#s9Rs(yZ(@ z(c?l*SPodtW2$Z4-|Fp&Xhii|*P6g4$ib@|*#f@|m-9?%(=I=d^Bg))2OF}rXXljh zV|KD<5}Rr>iK#Wxq4r$fW5Z4b>tgC#PIaJ0)QYZ04g6PK$UDk&uEI2?D5~|d!l_Jd zSU2}E8GKW``cAW5HV2QL^M+PC)VR>z3-H7iF5zyaET&4@-|!Fk)sA(k-_$MZqVmCOx1&*+}D-m~#^V_d%9vU$*R{TijsRlrF2D6#XK@UB`3 zsoC&OZ=WVsE}8aGmaL<&nkZZ9Y{nQ|o0HL8>~J-oSb?4^=YPU%_HDq3eKOUvky0)a z53v?AHYx9p{Ybx{WEt~N#JJjuDr_0`Kt9@5rX0)z2_9fgU=?tis|+sK8EE~VBXmdN gF4LUZ2XdTXY!*|$SiQwsPx$KxgJsRi;?qd{0TG{S#Q*>R diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.po deleted file mode 100644 index e1734bb5..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_BE.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2018-03-25 18:15+0200\n" -"PO-Revision-Date: 2018-03-25 18:32+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7.1\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: Frank Goossens \n" -"Language: nl_BE\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p3/Plugin/UpdateChecker.php:395 -msgid "Check for updates" -msgstr "Controleer op nieuwe versies" - -#: Puc/v4p3/Plugin/UpdateChecker.php:548 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "De meest recente %s versie is geïnstalleerd." - -#: Puc/v4p3/Plugin/UpdateChecker.php:550 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Er is een nieuwe versie van %s beschikbaar." - -#: Puc/v4p3/Plugin/UpdateChecker.php:552 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Kon niet bepalen of er nieuwe versie van %s beschikbaar is." - -#: Puc/v4p3/Plugin/UpdateChecker.php:558 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Ongekende status bij controle op nieuwe versie: \"%s\"" - -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 -msgid "There is no changelog available." -msgstr "Er is geen changelog beschikbaar." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.mo deleted file mode 100644 index 16dde622ba6040399cc911e0d5ef1c970a541b88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1211 zcmah|&59F25N>rYShMgp(iFTo-2 zt}U_@dIF^!*v+(oz|pQ^QqcR?eO}9oj}B`FtAI-6JvhhItT$S+epNQFQ==6(u3xG*>vb5)r@X1livMYMwOQG% zqsN6Bv+T2)#Z=pPu(7%)q7l_=U26iHAp1KxvIX7_SMp40(=I=d^Bg+Q`)jhbXXljh zBX)AtBsSG%98+tkL+z!!&xV}}*2UDboa#W0s1@Ca8u+iekav~mT!l$YQB>6P~&2IFTgWfxP-fvvY0Aqf5SiIoh|E9zpj0VX)tIH zxINg88<(32xVEl5>MZqVmCQ9fPwBq3-m~#^b5y?Hwt3Jq{TijsRKQ61D6z9!@UB`3 zsoCJs`aVspTr%mQELlfkHBq+I*^Du`HYcOG*y3tFu>z~Eoc}Si*|z~h_Q^y~hf29f zJjPl~*`&NX_Cx)Ol10oz5#wqrs<36$1NmrEnQ|}>BzTB5fmOh5t}?h_XQ1_ej?f*6 gdrUKCAINcnv6)Z(eD&sQJ?5_;43;%3i%%o*2Pb`M*Z=?k diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.po deleted file mode 100644 index 7f57a89f..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-nl_NL.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2018-03-25 18:15+0200\n" -"PO-Revision-Date: 2018-03-25 18:32+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.7.1\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: Frank Goossens \n" -"Language: nl_NL\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p3/Plugin/UpdateChecker.php:395 -msgid "Check for updates" -msgstr "Controleer op nieuwe versies" - -#: Puc/v4p3/Plugin/UpdateChecker.php:548 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "De meest recente %s versie is geïnstalleerd." - -#: Puc/v4p3/Plugin/UpdateChecker.php:550 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Er is een nieuwe versie van %s beschikbaar." - -#: Puc/v4p3/Plugin/UpdateChecker.php:552 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Kon niet bepalen of er nieuwe versie van %s beschikbaar is." - -#: Puc/v4p3/Plugin/UpdateChecker.php:558 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Ongekende status bij controle op nieuwe versie: \"%s\"" - -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 -msgid "There is no changelog available." -msgstr "Er is geen changelog beschikbaar." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo deleted file mode 100644 index d1c0f283287da07c7060255756947399fde75ca6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1014 zcmZuv!EVz)6f{scgcF=V;_y_d5=dPW2P%rAAllGEMM|SKMcksreu>>WyVmYHZ4oE_ zfe%0&fCEQPT#)h`h+lzm97qtXGJgB)+1bhN{J6UG*2B02+yFYjW#BbXj*q|<;1fW= zS6~_V4zz%ufGFqZJntKD3|vFMdZFTNpgW5oypn^Ib=kY}AEddv&Zz?~t zX;s<@N5?eKhKf9vj;+^A*f6D*l%^<=YRH)$k{ru4lP@#&y+d`Z^og1+00#ed~o)yDXkxO01OB=CIb?>xs5u>EJ;;!s3t`_28bUuZiG31#98mK-BNl>mZ7K z9;c<(|MMCZuOqD!JtLLPq|+v(S_kJ<$RUd!%h5s)ORm4UU)$Z;-J07B{Ccgem16~& zvmAaLpSs(5CR5cc58qgJt;627SfBIC?FMYbmWp(os$od$FH={0As(}0Q~Bs>j#Ed0 zzwWQ&OVx@^X*riJ3CZ_s-K;P&6WiL1Y)A^Xh1Rwj&GPUtZQWG#fP!1i`T7H0n26hz zt&l2Tf7GAy*@-r>?WER))bBU@-0Yv?7Y3`1XhDUgiIOgSh&r6qJltA3NF!-z!xb`1 zU&+ab$rmK?+2p;ZWb%%R(LxgA)aF`EK94!`y@Pq^C}taJg*2wI_Pr<5brLBa%W3dR uv0NHSC{;9(zXh@CV~k{HTE@P&w?I3B7+Z&@l4Ogy;7B66h9le{qWB9G2Q7U7 diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.po deleted file mode 100644 index 70a0f625..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-pt_BR.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-05-19 15:41-0300\n" -"PO-Revision-Date: 2017-05-19 15:42-0300\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: pt_BR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.8\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x;_x:1,2c\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p1/Plugin/UpdateChecker.php:358 -msgid "Check for updates" -msgstr "Verificar Atualizações" - -#: Puc/v4p1/Plugin/UpdateChecker.php:401 Puc/v4p1/Plugin/UpdateChecker.php:406 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "O plugin %s já está na sua versão mais recente." - -#: Puc/v4p1/Plugin/UpdateChecker.php:408 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Há uma nova versão para o plugin %s disponível para download." - -#: Puc/v4p1/Plugin/UpdateChecker.php:410 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Status \"%s\" desconhecido." - -#: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 -msgid "There is no changelog available." -msgstr "Não há um changelog disponível." - -#~ msgid "The %s plugin is up to date." -#~ msgstr "O plugin %s já está na sua versão mais recente." - -#~ msgid "A new version of the %s plugin is available." -#~ msgstr "Há uma nova versão para o plugin %s disponível para download." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.mo deleted file mode 100644 index 50b330e9332d5024e9bf5f931e5b1e76dca7cd7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1337 zcmZuw&u<$=6dq`R${Y|}xNvxlltO7{+1&&h*4}=9X zJv7OUR;mz!8|uGcN~*d9Q*njM>_5O?z=^+rZ+7zw+L52Xc{|@X?|X0Uzuubpo?*R) zcn8rzypFh!aBG5i6Y&&5h(8gth`$jr;*FOWTL!KGIq*B+$(I@X9r!NtKTa@q4)_nS z3w(cuv3cM(K$kxOo&vu83S*E|3vvcJ!x6*dYQ4IT&S$k+L)p7YYni5E)E7qPtTU8a zQj(L(s5ca9Ak%C>VnZaUxRFYat*VQ+{yefTldmqzOKM8V+NfnyTzdnm7ZnajQB zJ)p7wmMlhOGICvetgW-JWzX;{eSW=m8SR_n^bm`takk(D{w4m~kNnl6Rz7kEpS7Wo7xu zMBw?2R;G+phIej{P|e6&=7Uix64i7sNaxbTtDVby>4>L=%Gadk%c__46E%ov=|*B2 zU-8eRl3JKdN7T+_KQR<~A)eO>|3u_+B+M`(&ug^PLW`7N&h&a7k;3~#n#T)GHyCW= z_taeA$8kWXPm|mFr{W->i{umN$S=gQVxl>Q<%W>fy&lduB3*Q^ ztsbi*h3*a8=$ZTIy20$j@~-{OKC+L2lXAPfPe^~V)9T@#eT?0te8B7vDv)KQ13o-9)+N{JLMh-GwQXgq3H`cx{G|?z%3j!>U_X4doGg p^$6zwr!DW1J9>c)S9aI#RRwYXL(s|fZP{fYnp diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.po deleted file mode 100644 index 33a11990..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-ru_RU.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2020-08-08 14:36+0300\n" -"PO-Revision-Date: 2021-12-20 17:59+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: \n" -"Language: ru_RU\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p11/Plugin/Ui.php:128 -msgid "Check for updates" -msgstr "Проверить обновления" - -#: Puc/v4p11/Plugin/Ui.php:213 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Плагин %s обновлён." - -#: Puc/v4p11/Plugin/Ui.php:215 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Новая версия %s доступна." - -#: Puc/v4p11/Plugin/Ui.php:217 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Не удалось определить, доступны ли обновления для %s." - -#: Puc/v4p11/Plugin/Ui.php:223 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Неизвестный статус средства проверки обновлений \"%s\"" - -#: Puc/v4p11/Vcs/PluginUpdateChecker.php:98 -msgid "There is no changelog available." -msgstr "Журнал изменений отсутствует." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sl_SI.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sl_SI.mo deleted file mode 100644 index df47ca7c0a01cff815ffe3965ee4918e72a600fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1203 zcmZWoO>YxN7@k5(CHH_@u9bL+6a=EP>~5kaT4SnW5)?I|RxzkIYhu5#$63#;W@a}b zzoDEE|E0YkRe}?@{($}hjvRaFvtApg%1F;X`|iA7&pWgKe7p8WV0{IA2lRojf!~38 z{Q-Of{0R{70ayn<0v+J`7eefU55W@r8vHNt7jOgi+p9v{0{;!J_dhLoeNBi*uzTQ} z;MZV;%-0n>;U@4&d^!Ij#I*(2ea=^R!ow3fwvNhTqyl@A$>eqDqKQ<0ZrZ7ArF^V&~j_>?MkURy)u~>Ychy7^#jUP2flZM8mj$W?J`4AYTxrv; z56F2Ao#*{MxwGnW=3 && n%100<=4 ? 2 : 3);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: Igor Funa\n" -"Language: sl_SI\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p3/Plugin/UpdateChecker.php:395 -msgid "Check for updates" -msgstr "Preveri posodobitve" - -#: Puc/v4p3/Plugin/UpdateChecker.php:548 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Vtičnik %s je že posodobljen." - -#: Puc/v4p3/Plugin/UpdateChecker.php:550 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Nova različica vtičnika %s je na razpolago." - -#: Puc/v4p3/Plugin/UpdateChecker.php:552 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Ne morem ugotoviti če se za vtičnik %s na razpolago posodobitve." - -#: Puc/v4p3/Plugin/UpdateChecker.php:558 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Neznan status preverjanja posodobitev za \"%s\"" - -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 -msgid "There is no changelog available." -msgstr "Dnevnik sprememb ni na razpolago." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo deleted file mode 100644 index 4d06fc14f5bb99ac14bc019543e9edacfb457e36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1006 zcmZWn!EO^V5H(OZgcF=NfHYK!L{+@(rWC4;a)7i&6|EZ46mg5(WU^VZwIkb`wi1W_ z1UI-<2!5a!PAEUX2Otjp5qR58+aN5xeIEOH{5(6q@6LS`7`K4?z$S1T_y82+D{u$+ z1`zNam1R4EsX5^8kov|_KI$pYPP7MXnNmmEPaDa zh?X_)x$EUdPrfbl$J4a3e3G0xthBbFNsTPF6 zQ|y$Xe5o9dlpn+t1eI2nTb0RmWA|N58vg>JYt-sRX)tX(()6%F(L((y!H&somz$-p zm`Y=p>0k5Ffw4WenK~a+r&I56y>l2xk852pO5yOz!hKenyev*kZrs^fo4JRT?G9S7 zDnpp9h@Hvlkht&BMEU5v3oTx*tXO4F{Zwm5h*{I*ME8m!Zv5guX~VIY|;YsJcM3XG8e7a;khF F{sQ>&EFS;> diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.po deleted file mode 100644 index b8948144..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-sv_SE.po +++ /dev/null @@ -1,42 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-05-20 10:53+0300\n" -"PO-Revision-Date: 2017-10-16 15:02+0200\n" -"Language-Team: \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" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: \n" -"Language: sv_SE\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p1/Plugin/UpdateChecker.php:358 -msgid "Check for updates" -msgstr "Sök efter uppdateringar" - -#: Puc/v4p1/Plugin/UpdateChecker.php:405 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Tillägget %s är uppdaterat." - -#: Puc/v4p1/Plugin/UpdateChecker.php:407 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Det finns en ny version av tillägget %s." - -#: Puc/v4p1/Plugin/UpdateChecker.php:409 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Okänd status för kontroll av uppdatering “%s”" - -#: Puc/v4p1/Vcs/PluginUpdateChecker.php:83 -msgid "There is no changelog available." -msgstr "Det finns ingen ändringslogg tillgänglig." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.mo deleted file mode 100644 index 58be2f9306dd0e01aa725c03d583ca53bdd536a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1118 zcmZWn&uA(EYi8EL z|3fcT#W_dLkt#u@Tq?V#{trF(&_ANz+WCbT?YG~~&U@c{@6G)4+0q+RH zH>2~*AyOlH>8_q_yQT8Vzs6>7pAB>FBwq5t#2acVW{Y|-k9_N(} z`|M@cW-ixukka~|j*T6;#g@H_&ZpFKoa;zy(BF}ZiF~XAk5n9{lq8Lwsk}0B)A=%_ zWN}QGhR$lct{0!3FD!lDq1N5@xxfoo`HVLfu2NdqI+K6KlLP1T@LY$O((Z11m)pCq z)7F=(85oTSsIm5L78biD4y@}7W$9s|y!x(w8C3#4u^bN+aE;g<#7Y2uh1&iB_Og+~Q(_=q9E~m#-@;IwvA`q&lZxM4* h*%@3qXG)dNj%J6mBiduQgCI)C^*rfJ|1>cX{{#HHSPlRH diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.po deleted file mode 100644 index ba5e2915..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-tr_TR.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-11-24 17:02+0200\n" -"PO-Revision-Date: 2021-11-15 19:07+0300\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.0\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: Emre Erkan \n" -"Language: tr\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p3/Plugin/UpdateChecker.php:395 -msgid "Check for updates" -msgstr "Güncellemeleri kontrol et" - -#: Puc/v4p3/Plugin/UpdateChecker.php:548 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "%s eklentisi güncel." - -#: Puc/v4p3/Plugin/UpdateChecker.php:550 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "%s eklentisinin yeni bir sürümü mevcut." - -#: Puc/v4p3/Plugin/UpdateChecker.php:552 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "%s için güncelleme olup olmadığı belirlenemedi." - -#: Puc/v4p3/Plugin/UpdateChecker.php:558 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Bilinmeyen güncelleme denetleyicisi durumu \"%s\"" - -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 -msgid "There is no changelog available." -msgstr "Kullanılabilir bir değişiklik yok." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.mo deleted file mode 100644 index 79494e524ebd28dcba540d54c7f4949d5a436508..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1309 zcmZuwO>YxN7#`a6L*`J?a}O_(LZM-{yPHs=HA@94(heN%>IG?f}VQqrO)i<3(}EaKQpuM^S;mXuKm}?6TdL5 z4-lUqT8QI_M+mz{h!cpH2txdcm_+=I2oWD0V{9I{0OY`*fFHiY*zdqkasK07#^!+k z0KW!KPcZfwPy>GiZUIjM{{@0lF3=g$8LrrS7n+;~Zn09Ae7m55^u^L;)2YDX%eD1sCoe$2Pn+DIVUB`^`s3&+!L@NQ+7OpMK zABgZAx7J9d7E<%podLROaa(^rNTOKQ?F&+w(BWe13ZFa3Q<2P;gyQqElXhd-3ux|U ztZP5;t3nDD=~M;OOhq@=YbLph5`HCBD_KAi?-R!?oT=Nv zU>ly6Q=S`!9-TTxcI%!DJ&(R5mynM0#n9h-bRnFz+mhj4@O-*^x1wD1X3v1)f#RR3 zA1L`Q%~eMhzoN%w4#yF|%c!7x&C_^Q71Wj*16nL}tf~5l_rE9*oVn*kI-{wy(^v z_?gTzvs2tJ9u({5b(#0n?2!4jSOhGx51C-cI*DmKm7sfZ|UStu|vFUgWo2?dJ# zgc^qh{C1>$@u>QfL4lPtBz%E^BAdmA{e{1!XIS;LY0s>hQtXC3j-Uzxi-(oXvt)N~ e(TmOhac^_B%Vwy(g_1+_)VeFXzd5TNhy4cu&FZoM diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.po b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.po deleted file mode 100644 index b84b16ea..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-uk_UA.po +++ /dev/null @@ -1,48 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2020-08-08 14:36+0300\n" -"PO-Revision-Date: 2021-12-20 17:55+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"Last-Translator: \n" -"Language: uk_UA\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p11/Plugin/Ui.php:128 -msgid "Check for updates" -msgstr "Перевірити оновлення" - -#: Puc/v4p11/Plugin/Ui.php:213 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "Плагін %s оновлено." - -#: Puc/v4p11/Plugin/Ui.php:215 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "Нова версія %s доступна." - -#: Puc/v4p11/Plugin/Ui.php:217 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "Не вдалося визначити, чи доступні оновлення для %s." - -#: Puc/v4p11/Plugin/Ui.php:223 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "Невідомий статус перевірки оновлень \"%s\"" - -#: Puc/v4p11/Vcs/PluginUpdateChecker.php:98 -msgid "There is no changelog available." -msgstr "Немає доступного журналу змін." diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-zh_CN.mo b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker-zh_CN.mo deleted file mode 100644 index 86d114472907c99814f248ed3e063f8bd0ce5819..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1174 zcmZ`&U2hXd6dfQGu!_|3hCt{lC@;Wl*DeoXO%Py0#Ye!DfOx{1*b{qUGh^+{Ccsnp zsMHjpBDD|{EI|Z8RfXaT5KkZ;`Um(06$QNJjR*b!XT2c?MT~TGcIMuD?zywO|E=q} z!LZf<8-WV27I+9G>lN@l@ISB~_y7>Fb{S*6UT9mZh$%XHTV(m-SRZ= z-xZ9l!}&|_Ch!|DftUBB@y+1m+y!p|9|dm!UjRdftp-riSvX=VfmOgaos)D9wCb)x zO_tBns17NrSA>;@4e3yluW&RbtgjV`5gl3TGi zN;3M)rzEugtlN_6f{ua;%-N)Y499#0x1*m1BLVY^<(-lHjI-1Oru?#HR41z`xg3WT zLw!b;Ek97-3yvNW;J8)unKkx76C4NR_$OlzfSA13V zsDH$_nN$2HsbrWMEoxcuE#;i;&X0(sTfSEqSr@kEk>g~FK@^IB@5i@fJW_bq*qVWC zKDjhJ4!HSl<#8Q_Wm!lKd6YU@)IB86Pw22>4*SM>R4V05GG999Ww+(Z;LlW~2+Or1 z9B>yNGAzC~8Q+&5h&$xAG5{N27Y*9~;k+P^)GCojH#HiN$c;_b%Ocg+X!\n" -"Language-Team: \n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4.3\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p11/Plugin/Ui.php:54 -msgid "View details" -msgstr "查看详情" - -#: Puc/v4p11/Plugin/Ui.php:77 -#, php-format -msgid "More information about %s" -msgstr "%s 的更多信息" - -#: Puc/v4p11/Plugin/Ui.php:128 -msgid "Check for updates" -msgstr "检查更新" - -#: Puc/v4p11/Plugin/Ui.php:214 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "%s 目前是最新版本。" - -#: Puc/v4p11/Plugin/Ui.php:216 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "%s 当前有可用的更新。" - -#: Puc/v4p11/Plugin/Ui.php:218 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "%s 无法确定是否有可用的更新。" - -#: Puc/v4p11/Plugin/Ui.php:224 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "未知的更新检查状态:%s" - -#: Puc/v4p11/Vcs/PluginUpdateChecker.php:100 -msgid "There is no changelog available." -msgstr "没有可用的更新日志。" diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker.pot b/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker.pot deleted file mode 100644 index 99cc24c7..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/languages/plugin-update-checker.pot +++ /dev/null @@ -1,49 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2020-08-08 14:36+0300\n" -"PO-Revision-Date: 2016-01-10 20:59+0100\n" -"Last-Translator: Tamás András Horváth \n" -"Language-Team: \n" -"Language: en_US\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.4\n" -"X-Poedit-Basepath: ..\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" -"X-Poedit-SearchPath-0: .\n" - -#: Puc/v4p11/Plugin/Ui.php:128 -msgid "Check for updates" -msgstr "" - -#: Puc/v4p11/Plugin/Ui.php:213 -#, php-format -msgctxt "the plugin title" -msgid "The %s plugin is up to date." -msgstr "" - -#: Puc/v4p11/Plugin/Ui.php:215 -#, php-format -msgctxt "the plugin title" -msgid "A new version of the %s plugin is available." -msgstr "" - -#: Puc/v4p11/Plugin/Ui.php:217 -#, php-format -msgctxt "the plugin title" -msgid "Could not determine if updates are available for %s." -msgstr "" - -#: Puc/v4p11/Plugin/Ui.php:223 -#, php-format -msgid "Unknown update checker status \"%s\"" -msgstr "" - -#: Puc/v4p11/Vcs/PluginUpdateChecker.php:98 -msgid "There is no changelog available." -msgstr "" diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/license.txt b/wp/wp-content/plugins/divifilter/plugin-update-checker/license.txt deleted file mode 100644 index be948f65..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/license.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2017 Jānis Elsts - -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/wp-content/plugins/divifilter/plugin-update-checker/load-v4p11.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/load-v4p11.php deleted file mode 100644 index 76916cce..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/load-v4p11.php +++ /dev/null @@ -1,28 +0,0 @@ - 'Puc_v4p11_Plugin_UpdateChecker', - 'Theme_UpdateChecker' => 'Puc_v4p11_Theme_UpdateChecker', - - 'Vcs_PluginUpdateChecker' => 'Puc_v4p11_Vcs_PluginUpdateChecker', - 'Vcs_ThemeUpdateChecker' => 'Puc_v4p11_Vcs_ThemeUpdateChecker', - - 'GitHubApi' => 'Puc_v4p11_Vcs_GitHubApi', - 'BitBucketApi' => 'Puc_v4p11_Vcs_BitBucketApi', - 'GitLabApi' => 'Puc_v4p11_Vcs_GitLabApi', - ) - as $pucGeneralClass => $pucVersionedClass -) { - Puc_v4_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.11'); - //Also add it to the minor-version factory in case the major-version factory - //was already defined by another, older version of the update checker. - Puc_v4p11_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.11'); -} - diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/plugin-update-checker.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/plugin-update-checker.php deleted file mode 100644 index f6ae63f0..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/plugin-update-checker.php +++ /dev/null @@ -1,10 +0,0 @@ -=') ) { - require __DIR__ . '/ParsedownModern.php'; - } else { - require __DIR__ . '/ParsedownLegacy.php'; - } -} diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownLegacy.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownLegacy.php deleted file mode 100644 index bbc2d323..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownLegacy.php +++ /dev/null @@ -1,1535 +0,0 @@ -DefinitionData = array(); - - # standardize line breaks - $text = str_replace(array("\r\n", "\r"), "\n", $text); - - # remove surrounding line breaks - $text = trim($text, "\n"); - - # split text into lines - $lines = explode("\n", $text); - - # iterate through lines to identify blocks - $markup = $this->lines($lines); - - # trim line breaks - $markup = trim($markup, "\n"); - - return $markup; - } - - # - # Setters - # - - function setBreaksEnabled($breaksEnabled) - { - $this->breaksEnabled = $breaksEnabled; - - return $this; - } - - protected $breaksEnabled; - - function setMarkupEscaped($markupEscaped) - { - $this->markupEscaped = $markupEscaped; - - return $this; - } - - protected $markupEscaped; - - function setUrlsLinked($urlsLinked) - { - $this->urlsLinked = $urlsLinked; - - return $this; - } - - protected $urlsLinked = true; - - # - # Lines - # - - protected $BlockTypes = array( - '#' => array('Header'), - '*' => array('Rule', 'List'), - '+' => array('List'), - '-' => array('SetextHeader', 'Table', 'Rule', 'List'), - '0' => array('List'), - '1' => array('List'), - '2' => array('List'), - '3' => array('List'), - '4' => array('List'), - '5' => array('List'), - '6' => array('List'), - '7' => array('List'), - '8' => array('List'), - '9' => array('List'), - ':' => array('Table'), - '<' => array('Comment', 'Markup'), - '=' => array('SetextHeader'), - '>' => array('Quote'), - '[' => array('Reference'), - '_' => array('Rule'), - '`' => array('FencedCode'), - '|' => array('Table'), - '~' => array('FencedCode'), - ); - - # ~ - - protected $DefinitionTypes = array( - '[' => array('Reference'), - ); - - # ~ - - protected $unmarkedBlockTypes = array( - 'Code', - ); - - # - # Blocks - # - - private function lines(array $lines) - { - $CurrentBlock = null; - - foreach ($lines as $line) - { - if (chop($line) === '') - { - if (isset($CurrentBlock)) - { - $CurrentBlock['interrupted'] = true; - } - - continue; - } - - if (strpos($line, "\t") !== false) - { - $parts = explode("\t", $line); - - $line = $parts[0]; - - unset($parts[0]); - - foreach ($parts as $part) - { - $shortage = 4 - mb_strlen($line, 'utf-8') % 4; - - $line .= str_repeat(' ', $shortage); - $line .= $part; - } - } - - $indent = 0; - - while (isset($line[$indent]) and $line[$indent] === ' ') - { - $indent ++; - } - - $text = $indent > 0 ? substr($line, $indent) : $line; - - # ~ - - $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); - - # ~ - - if (isset($CurrentBlock['incomplete'])) - { - $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); - - if (isset($Block)) - { - $CurrentBlock = $Block; - - continue; - } - else - { - if (method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - - unset($CurrentBlock['incomplete']); - } - } - - # ~ - - $marker = $text[0]; - - # ~ - - $blockTypes = $this->unmarkedBlockTypes; - - if (isset($this->BlockTypes[$marker])) - { - foreach ($this->BlockTypes[$marker] as $blockType) - { - $blockTypes []= $blockType; - } - } - - # - # ~ - - foreach ($blockTypes as $blockType) - { - $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); - - if (isset($Block)) - { - $Block['type'] = $blockType; - - if ( ! isset($Block['identified'])) - { - $Blocks []= $CurrentBlock; - - $Block['identified'] = true; - } - - if (method_exists($this, 'block'.$blockType.'Continue')) - { - $Block['incomplete'] = true; - } - - $CurrentBlock = $Block; - - continue 2; - } - } - - # ~ - - if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) - { - $CurrentBlock['element']['text'] .= "\n".$text; - } - else - { - $Blocks []= $CurrentBlock; - - $CurrentBlock = $this->paragraph($Line); - - $CurrentBlock['identified'] = true; - } - } - - # ~ - - if (isset($CurrentBlock['incomplete']) and method_exists($this, 'block'.$CurrentBlock['type'].'Complete')) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - - # ~ - - $Blocks []= $CurrentBlock; - - unset($Blocks[0]); - - # ~ - - $markup = ''; - - foreach ($Blocks as $Block) - { - if (isset($Block['hidden'])) - { - continue; - } - - $markup .= "\n"; - $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); - } - - $markup .= "\n"; - - # ~ - - return $markup; - } - - # - # Code - - protected function blockCode($Line, $Block = null) - { - if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) - { - return; - } - - if ($Line['indent'] >= 4) - { - $text = substr($Line['body'], 4); - - $Block = array( - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => array( - 'name' => 'code', - 'text' => $text, - ), - ), - ); - - return $Block; - } - } - - protected function blockCodeContinue($Line, $Block) - { - if ($Line['indent'] >= 4) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['element']['text']['text'] .= "\n"; - - $text = substr($Line['body'], 4); - - $Block['element']['text']['text'] .= $text; - - return $Block; - } - } - - protected function blockCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Comment - - protected function blockComment($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') - { - $Block = array( - 'markup' => $Line['body'], - ); - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - } - - protected function blockCommentContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - $Block['markup'] .= "\n" . $Line['body']; - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - - # - # Fenced Code - - protected function blockFencedCode($Line) - { - if (preg_match('/^(['.$Line['text'][0].']{3,})[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) - { - $Element = array( - 'name' => 'code', - 'text' => '', - ); - - if (isset($matches[2])) - { - $class = 'language-'.$matches[2]; - - $Element['attributes'] = array( - 'class' => $class, - ); - } - - $Block = array( - 'char' => $Line['text'][0], - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => $Element, - ), - ); - - return $Block; - } - } - - protected function blockFencedCodeContinue($Line, $Block) - { - if (isset($Block['complete'])) - { - return; - } - - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) - { - $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); - - $Block['complete'] = true; - - return $Block; - } - - $Block['element']['text']['text'] .= "\n".$Line['body'];; - - return $Block; - } - - protected function blockFencedCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Header - - protected function blockHeader($Line) - { - if (isset($Line['text'][1])) - { - $level = 1; - - while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') - { - $level ++; - } - - if ($level > 6) - { - return; - } - - $text = trim($Line['text'], '# '); - - $Block = array( - 'element' => array( - 'name' => 'h' . min(6, $level), - 'text' => $text, - 'handler' => 'line', - ), - ); - - return $Block; - } - } - - # - # List - - protected function blockList($Line) - { - list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); - - if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'indent' => $Line['indent'], - 'pattern' => $pattern, - 'element' => array( - 'name' => $name, - 'handler' => 'elements', - ), - ); - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $matches[2], - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - } - - protected function blockListContinue($Line, array $Block) - { - if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['li']['text'] []= ''; - - unset($Block['interrupted']); - } - - unset($Block['li']); - - $text = isset($matches[1]) ? $matches[1] : ''; - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $text, - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - - if ($Line['text'][0] === '[' and $this->blockReference($Line)) - { - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - return $Block; - } - - if ($Line['indent'] > 0) - { - $Block['li']['text'] []= ''; - - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - unset($Block['interrupted']); - - return $Block; - } - } - - # - # Quote - - protected function blockQuote($Line) - { - if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'element' => array( - 'name' => 'blockquote', - 'handler' => 'lines', - 'text' => (array) $matches[1], - ), - ); - - return $Block; - } - } - - protected function blockQuoteContinue($Line, array $Block) - { - if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text'] []= ''; - - unset($Block['interrupted']); - } - - $Block['element']['text'] []= $matches[1]; - - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $Block['element']['text'] []= $Line['text']; - - return $Block; - } - } - - # - # Rule - - protected function blockRule($Line) - { - if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) - { - $Block = array( - 'element' => array( - 'name' => 'hr' - ), - ); - - return $Block; - } - } - - # - # Setext - - protected function blockSetextHeader($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (chop($Line['text'], $Line['text'][0]) === '') - { - $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; - - return $Block; - } - } - - # - # Markup - - protected function blockMarkup($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) - { - if (in_array($matches[1], $this->textLevelElements)) - { - return; - } - - $Block = array( - 'name' => $matches[1], - 'depth' => 0, - 'markup' => $Line['text'], - ); - - $length = strlen($matches[0]); - - $remainder = substr($Line['text'], $length); - - if (trim($remainder) === '') - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - $Block['closed'] = true; - - $Block['void'] = true; - } - } - else - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - return; - } - - if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) - { - $Block['closed'] = true; - } - } - - return $Block; - } - } - - protected function blockMarkupContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open - { - $Block['depth'] ++; - } - - if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close - { - if ($Block['depth'] > 0) - { - $Block['depth'] --; - } - else - { - $Block['closed'] = true; - } - - $Block['markup'] .= $matches[1]; - } - - if (isset($Block['interrupted'])) - { - $Block['markup'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['markup'] .= "\n".$Line['body']; - - return $Block; - } - - # - # Reference - - protected function blockReference($Line) - { - if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) - { - $id = strtolower($matches[1]); - - $Data = array( - 'url' => $matches[2], - 'title' => null, - ); - - if (isset($matches[3])) - { - $Data['title'] = $matches[3]; - } - - $this->DefinitionData['Reference'][$id] = $Data; - - $Block = array( - 'hidden' => true, - ); - - return $Block; - } - } - - # - # Table - - protected function blockTable($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') - { - $alignments = array(); - - $divider = $Line['text']; - - $divider = trim($divider); - $divider = trim($divider, '|'); - - $dividerCells = explode('|', $divider); - - foreach ($dividerCells as $dividerCell) - { - $dividerCell = trim($dividerCell); - - if ($dividerCell === '') - { - continue; - } - - $alignment = null; - - if ($dividerCell[0] === ':') - { - $alignment = 'left'; - } - - if (substr($dividerCell, - 1) === ':') - { - $alignment = $alignment === 'left' ? 'center' : 'right'; - } - - $alignments []= $alignment; - } - - # ~ - - $HeaderElements = array(); - - $header = $Block['element']['text']; - - $header = trim($header); - $header = trim($header, '|'); - - $headerCells = explode('|', $header); - - foreach ($headerCells as $index => $headerCell) - { - $headerCell = trim($headerCell); - - $HeaderElement = array( - 'name' => 'th', - 'text' => $headerCell, - 'handler' => 'line', - ); - - if (isset($alignments[$index])) - { - $alignment = $alignments[$index]; - - $HeaderElement['attributes'] = array( - 'style' => 'text-align: '.$alignment.';', - ); - } - - $HeaderElements []= $HeaderElement; - } - - # ~ - - $Block = array( - 'alignments' => $alignments, - 'identified' => true, - 'element' => array( - 'name' => 'table', - 'handler' => 'elements', - ), - ); - - $Block['element']['text'] []= array( - 'name' => 'thead', - 'handler' => 'elements', - ); - - $Block['element']['text'] []= array( - 'name' => 'tbody', - 'handler' => 'elements', - 'text' => array(), - ); - - $Block['element']['text'][0]['text'] []= array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $HeaderElements, - ); - - return $Block; - } - } - - protected function blockTableContinue($Line, array $Block) - { - if (isset($Block['interrupted'])) - { - return; - } - - if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) - { - $Elements = array(); - - $row = $Line['text']; - - $row = trim($row); - $row = trim($row, '|'); - - preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); - - foreach ($matches[0] as $index => $cell) - { - $cell = trim($cell); - - $Element = array( - 'name' => 'td', - 'handler' => 'line', - 'text' => $cell, - ); - - if (isset($Block['alignments'][$index])) - { - $Element['attributes'] = array( - 'style' => 'text-align: '.$Block['alignments'][$index].';', - ); - } - - $Elements []= $Element; - } - - $Element = array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $Elements, - ); - - $Block['element']['text'][1]['text'] []= $Element; - - return $Block; - } - } - - # - # ~ - # - - protected function paragraph($Line) - { - $Block = array( - 'element' => array( - 'name' => 'p', - 'text' => $Line['text'], - 'handler' => 'line', - ), - ); - - return $Block; - } - - # - # Inline Elements - # - - protected $InlineTypes = array( - '"' => array('SpecialCharacter'), - '!' => array('Image'), - '&' => array('SpecialCharacter'), - '*' => array('Emphasis'), - ':' => array('Url'), - '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), - '>' => array('SpecialCharacter'), - '[' => array('Link'), - '_' => array('Emphasis'), - '`' => array('Code'), - '~' => array('Strikethrough'), - '\\' => array('EscapeSequence'), - ); - - # ~ - - protected $inlineMarkerList = '!"*_&[:<>`~\\'; - - # - # ~ - # - - public function line($text) - { - $markup = ''; - - $unexaminedText = $text; - - $markerPosition = 0; - - while ($excerpt = strpbrk($unexaminedText, $this->inlineMarkerList)) - { - $marker = $excerpt[0]; - - $markerPosition += strpos($unexaminedText, $marker); - - $Excerpt = array('text' => $excerpt, 'context' => $text); - - foreach ($this->InlineTypes[$marker] as $inlineType) - { - $Inline = $this->{'inline'.$inlineType}($Excerpt); - - if ( ! isset($Inline)) - { - continue; - } - - if (isset($Inline['position']) and $Inline['position'] > $markerPosition) # position is ahead of marker - { - continue; - } - - if ( ! isset($Inline['position'])) - { - $Inline['position'] = $markerPosition; - } - - $unmarkedText = substr($text, 0, $Inline['position']); - - $markup .= $this->unmarkedText($unmarkedText); - - $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); - - $text = substr($text, $Inline['position'] + $Inline['extent']); - - $unexaminedText = $text; - - $markerPosition = 0; - - continue 2; - } - - $unexaminedText = substr($excerpt, 1); - - $markerPosition ++; - } - - $markup .= $this->unmarkedText($text); - - return $markup; - } - - # - # ~ - # - - protected function inlineCode($Excerpt) - { - $marker = $Excerpt['text'][0]; - - if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), - 'element' => array( - 'name' => 'code', - 'text' => $text, - ), - ); - } - } - - protected function inlineEmailTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) - { - $url = $matches[1]; - - if ( ! isset($matches[2])) - { - $url = 'mailto:' . $url; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $matches[1], - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - protected function inlineEmphasis($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - $marker = $Excerpt['text'][0]; - - if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'strong'; - } - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'em'; - } - else - { - return; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => $emphasis, - 'handler' => 'line', - 'text' => $matches[1], - ), - ); - } - - protected function inlineEscapeSequence($Excerpt) - { - if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) - { - return array( - 'markup' => $Excerpt['text'][1], - 'extent' => 2, - ); - } - } - - protected function inlineImage($Excerpt) - { - if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') - { - return; - } - - $Excerpt['text']= substr($Excerpt['text'], 1); - - $Link = $this->inlineLink($Excerpt); - - if ($Link === null) - { - return; - } - - $Inline = array( - 'extent' => $Link['extent'] + 1, - 'element' => array( - 'name' => 'img', - 'attributes' => array( - 'src' => $Link['element']['attributes']['href'], - 'alt' => $Link['element']['text'], - ), - ), - ); - - $Inline['element']['attributes'] += $Link['element']['attributes']; - - unset($Inline['element']['attributes']['href']); - - return $Inline; - } - - protected function inlineLink($Excerpt) - { - $Element = array( - 'name' => 'a', - 'handler' => 'line', - 'text' => null, - 'attributes' => array( - 'href' => null, - 'title' => null, - ), - ); - - $extent = 0; - - $remainder = $Excerpt['text']; - - if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) - { - $Element['text'] = $matches[1]; - - $extent += strlen($matches[0]); - - $remainder = substr($remainder, $extent); - } - else - { - return; - } - - if (preg_match('/^[(]((?:[^ (]|[(][^ )]+[)])+)(?:[ ]+("[^"]+"|\'[^\']+\'))?[)]/', $remainder, $matches)) - { - $Element['attributes']['href'] = $matches[1]; - - if (isset($matches[2])) - { - $Element['attributes']['title'] = substr($matches[2], 1, - 1); - } - - $extent += strlen($matches[0]); - } - else - { - if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) - { - $definition = $matches[1] ? $matches[1] : $Element['text']; - $definition = strtolower($definition); - - $extent += strlen($matches[0]); - } - else - { - $definition = strtolower($Element['text']); - } - - if ( ! isset($this->DefinitionData['Reference'][$definition])) - { - return; - } - - $Definition = $this->DefinitionData['Reference'][$definition]; - - $Element['attributes']['href'] = $Definition['url']; - $Element['attributes']['title'] = $Definition['title']; - } - - $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); - - return array( - 'extent' => $extent, - 'element' => $Element, - ); - } - - protected function inlineMarkup($Excerpt) - { - if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) - { - return; - } - - if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - } - - protected function inlineSpecialCharacter($Excerpt) - { - if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) - { - return array( - 'markup' => '&', - 'extent' => 1, - ); - } - - $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); - - if (isset($SpecialCharacter[$Excerpt['text'][0]])) - { - return array( - 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', - 'extent' => 1, - ); - } - } - - protected function inlineStrikethrough($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) - { - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'del', - 'text' => $matches[1], - 'handler' => 'line', - ), - ); - } - } - - protected function inlineUrl($Excerpt) - { - if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') - { - return; - } - - if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) - { - $Inline = array( - 'extent' => strlen($matches[0][0]), - 'position' => $matches[0][1], - 'element' => array( - 'name' => 'a', - 'text' => $matches[0][0], - 'attributes' => array( - 'href' => $matches[0][0], - ), - ), - ); - - return $Inline; - } - } - - protected function inlineUrlTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) - { - $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $url, - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - # - # ~ - - protected $unmarkedInlineTypes = array("\n" => 'Break', '://' => 'Url'); - - # ~ - - protected function unmarkedText($text) - { - if ($this->breaksEnabled) - { - $text = preg_replace('/[ ]*\n/', "
\n", $text); - } - else - { - $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); - $text = str_replace(" \n", "\n", $text); - } - - return $text; - } - - # - # Handlers - # - - protected function element(array $Element) - { - $markup = '<'.$Element['name']; - - if (isset($Element['attributes'])) - { - foreach ($Element['attributes'] as $name => $value) - { - if ($value === null) - { - continue; - } - - $markup .= ' '.$name.'="'.$value.'"'; - } - } - - if (isset($Element['text'])) - { - $markup .= '>'; - - if (isset($Element['handler'])) - { - $markup .= $this->{$Element['handler']}($Element['text']); - } - else - { - $markup .= $Element['text']; - } - - $markup .= ''; - } - else - { - $markup .= ' />'; - } - - return $markup; - } - - protected function elements(array $Elements) - { - $markup = ''; - - foreach ($Elements as $Element) - { - $markup .= "\n" . $this->element($Element); - } - - $markup .= "\n"; - - return $markup; - } - - # ~ - - protected function li($lines) - { - $markup = $this->lines($lines); - - $trimmedMarkup = trim($markup); - - if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') - { - $markup = $trimmedMarkup; - $markup = substr($markup, 3); - - $position = strpos($markup, "

"); - - $markup = substr_replace($markup, '', $position, 4); - } - - return $markup; - } - - # - # Deprecated Methods - # - - function parse($text) - { - $markup = $this->text($text); - - return $markup; - } - - # - # Static Methods - # - - static function instance($name = 'default') - { - if (isset(self::$instances[$name])) - { - return self::$instances[$name]; - } - - $instance = new self(); - - self::$instances[$name] = $instance; - - return $instance; - } - - private static $instances = array(); - - # - # Fields - # - - protected $DefinitionData; - - # - # Read-Only - - protected $specialCharacters = array( - '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', - ); - - protected $StrongRegex = array( - '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', - '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', - ); - - protected $EmRegex = array( - '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', - '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', - ); - - protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; - - protected $voidElements = array( - 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', - ); - - protected $textLevelElements = array( - 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', - 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', - 'i', 'rp', 'del', 'code', 'strike', 'marquee', - 'q', 'rt', 'ins', 'font', 'strong', - 's', 'tt', 'sub', 'mark', - 'u', 'xm', 'sup', 'nobr', - 'var', 'ruby', - 'wbr', 'span', - 'time', - ); -} diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownModern.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownModern.php deleted file mode 100644 index 5d96071b..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/ParsedownModern.php +++ /dev/null @@ -1,1538 +0,0 @@ -DefinitionData = array(); - - # standardize line breaks - $text = str_replace(array("\r\n", "\r"), "\n", $text); - - # remove surrounding line breaks - $text = trim($text, "\n"); - - # split text into lines - $lines = explode("\n", $text); - - # iterate through lines to identify blocks - $markup = $this->lines($lines); - - # trim line breaks - $markup = trim($markup, "\n"); - - return $markup; - } - - # - # Setters - # - - function setBreaksEnabled($breaksEnabled) - { - $this->breaksEnabled = $breaksEnabled; - - return $this; - } - - protected $breaksEnabled; - - function setMarkupEscaped($markupEscaped) - { - $this->markupEscaped = $markupEscaped; - - return $this; - } - - protected $markupEscaped; - - function setUrlsLinked($urlsLinked) - { - $this->urlsLinked = $urlsLinked; - - return $this; - } - - protected $urlsLinked = true; - - # - # Lines - # - - protected $BlockTypes = array( - '#' => array('Header'), - '*' => array('Rule', 'List'), - '+' => array('List'), - '-' => array('SetextHeader', 'Table', 'Rule', 'List'), - '0' => array('List'), - '1' => array('List'), - '2' => array('List'), - '3' => array('List'), - '4' => array('List'), - '5' => array('List'), - '6' => array('List'), - '7' => array('List'), - '8' => array('List'), - '9' => array('List'), - ':' => array('Table'), - '<' => array('Comment', 'Markup'), - '=' => array('SetextHeader'), - '>' => array('Quote'), - '[' => array('Reference'), - '_' => array('Rule'), - '`' => array('FencedCode'), - '|' => array('Table'), - '~' => array('FencedCode'), - ); - - # ~ - - protected $unmarkedBlockTypes = array( - 'Code', - ); - - # - # Blocks - # - - protected function lines(array $lines) - { - $CurrentBlock = null; - - foreach ($lines as $line) - { - if (chop($line) === '') - { - if (isset($CurrentBlock)) - { - $CurrentBlock['interrupted'] = true; - } - - continue; - } - - if (strpos($line, "\t") !== false) - { - $parts = explode("\t", $line); - - $line = $parts[0]; - - unset($parts[0]); - - foreach ($parts as $part) - { - $shortage = 4 - mb_strlen($line, 'utf-8') % 4; - - $line .= str_repeat(' ', $shortage); - $line .= $part; - } - } - - $indent = 0; - - while (isset($line[$indent]) and $line[$indent] === ' ') - { - $indent ++; - } - - $text = $indent > 0 ? substr($line, $indent) : $line; - - # ~ - - $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); - - # ~ - - if (isset($CurrentBlock['continuable'])) - { - $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); - - if (isset($Block)) - { - $CurrentBlock = $Block; - - continue; - } - else - { - if ($this->isBlockCompletable($CurrentBlock['type'])) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - } - } - - # ~ - - $marker = $text[0]; - - # ~ - - $blockTypes = $this->unmarkedBlockTypes; - - if (isset($this->BlockTypes[$marker])) - { - foreach ($this->BlockTypes[$marker] as $blockType) - { - $blockTypes []= $blockType; - } - } - - # - # ~ - - foreach ($blockTypes as $blockType) - { - $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); - - if (isset($Block)) - { - $Block['type'] = $blockType; - - if ( ! isset($Block['identified'])) - { - $Blocks []= $CurrentBlock; - - $Block['identified'] = true; - } - - if ($this->isBlockContinuable($blockType)) - { - $Block['continuable'] = true; - } - - $CurrentBlock = $Block; - - continue 2; - } - } - - # ~ - - if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) - { - $CurrentBlock['element']['text'] .= "\n".$text; - } - else - { - $Blocks []= $CurrentBlock; - - $CurrentBlock = $this->paragraph($Line); - - $CurrentBlock['identified'] = true; - } - } - - # ~ - - if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) - { - $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); - } - - # ~ - - $Blocks []= $CurrentBlock; - - unset($Blocks[0]); - - # ~ - - $markup = ''; - - foreach ($Blocks as $Block) - { - if (isset($Block['hidden'])) - { - continue; - } - - $markup .= "\n"; - $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); - } - - $markup .= "\n"; - - # ~ - - return $markup; - } - - protected function isBlockContinuable($Type) - { - return method_exists($this, 'block'.$Type.'Continue'); - } - - protected function isBlockCompletable($Type) - { - return method_exists($this, 'block'.$Type.'Complete'); - } - - # - # Code - - protected function blockCode($Line, $Block = null) - { - if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) - { - return; - } - - if ($Line['indent'] >= 4) - { - $text = substr($Line['body'], 4); - - $Block = array( - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => array( - 'name' => 'code', - 'text' => $text, - ), - ), - ); - - return $Block; - } - } - - protected function blockCodeContinue($Line, $Block) - { - if ($Line['indent'] >= 4) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['element']['text']['text'] .= "\n"; - - $text = substr($Line['body'], 4); - - $Block['element']['text']['text'] .= $text; - - return $Block; - } - } - - protected function blockCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Comment - - protected function blockComment($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') - { - $Block = array( - 'markup' => $Line['body'], - ); - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - } - - protected function blockCommentContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - $Block['markup'] .= "\n" . $Line['body']; - - if (preg_match('/-->$/', $Line['text'])) - { - $Block['closed'] = true; - } - - return $Block; - } - - # - # Fenced Code - - protected function blockFencedCode($Line) - { - if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([\w-]+)?[ ]*$/', $Line['text'], $matches)) - { - $Element = array( - 'name' => 'code', - 'text' => '', - ); - - if (isset($matches[1])) - { - $class = 'language-'.$matches[1]; - - $Element['attributes'] = array( - 'class' => $class, - ); - } - - $Block = array( - 'char' => $Line['text'][0], - 'element' => array( - 'name' => 'pre', - 'handler' => 'element', - 'text' => $Element, - ), - ); - - return $Block; - } - } - - protected function blockFencedCodeContinue($Line, $Block) - { - if (isset($Block['complete'])) - { - return; - } - - if (isset($Block['interrupted'])) - { - $Block['element']['text']['text'] .= "\n"; - - unset($Block['interrupted']); - } - - if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) - { - $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); - - $Block['complete'] = true; - - return $Block; - } - - $Block['element']['text']['text'] .= "\n".$Line['body'];; - - return $Block; - } - - protected function blockFencedCodeComplete($Block) - { - $text = $Block['element']['text']['text']; - - $text = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8'); - - $Block['element']['text']['text'] = $text; - - return $Block; - } - - # - # Header - - protected function blockHeader($Line) - { - if (isset($Line['text'][1])) - { - $level = 1; - - while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') - { - $level ++; - } - - if ($level > 6) - { - return; - } - - $text = trim($Line['text'], '# '); - - $Block = array( - 'element' => array( - 'name' => 'h' . min(6, $level), - 'text' => $text, - 'handler' => 'line', - ), - ); - - return $Block; - } - } - - # - # List - - protected function blockList($Line) - { - list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); - - if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'indent' => $Line['indent'], - 'pattern' => $pattern, - 'element' => array( - 'name' => $name, - 'handler' => 'elements', - ), - ); - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $matches[2], - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - } - - protected function blockListContinue($Line, array $Block) - { - if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['li']['text'] []= ''; - - unset($Block['interrupted']); - } - - unset($Block['li']); - - $text = isset($matches[1]) ? $matches[1] : ''; - - $Block['li'] = array( - 'name' => 'li', - 'handler' => 'li', - 'text' => array( - $text, - ), - ); - - $Block['element']['text'] []= & $Block['li']; - - return $Block; - } - - if ($Line['text'][0] === '[' and $this->blockReference($Line)) - { - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - return $Block; - } - - if ($Line['indent'] > 0) - { - $Block['li']['text'] []= ''; - - $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); - - $Block['li']['text'] []= $text; - - unset($Block['interrupted']); - - return $Block; - } - } - - # - # Quote - - protected function blockQuote($Line) - { - if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - $Block = array( - 'element' => array( - 'name' => 'blockquote', - 'handler' => 'lines', - 'text' => (array) $matches[1], - ), - ); - - return $Block; - } - } - - protected function blockQuoteContinue($Line, array $Block) - { - if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) - { - if (isset($Block['interrupted'])) - { - $Block['element']['text'] []= ''; - - unset($Block['interrupted']); - } - - $Block['element']['text'] []= $matches[1]; - - return $Block; - } - - if ( ! isset($Block['interrupted'])) - { - $Block['element']['text'] []= $Line['text']; - - return $Block; - } - } - - # - # Rule - - protected function blockRule($Line) - { - if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) - { - $Block = array( - 'element' => array( - 'name' => 'hr' - ), - ); - - return $Block; - } - } - - # - # Setext - - protected function blockSetextHeader($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (chop($Line['text'], $Line['text'][0]) === '') - { - $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; - - return $Block; - } - } - - # - # Markup - - protected function blockMarkup($Line) - { - if ($this->markupEscaped) - { - return; - } - - if (preg_match('/^<(\w*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) - { - $element = strtolower($matches[1]); - - if (in_array($element, $this->textLevelElements)) - { - return; - } - - $Block = array( - 'name' => $matches[1], - 'depth' => 0, - 'markup' => $Line['text'], - ); - - $length = strlen($matches[0]); - - $remainder = substr($Line['text'], $length); - - if (trim($remainder) === '') - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - $Block['closed'] = true; - - $Block['void'] = true; - } - } - else - { - if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) - { - return; - } - - if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) - { - $Block['closed'] = true; - } - } - - return $Block; - } - } - - protected function blockMarkupContinue($Line, array $Block) - { - if (isset($Block['closed'])) - { - return; - } - - if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open - { - $Block['depth'] ++; - } - - if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close - { - if ($Block['depth'] > 0) - { - $Block['depth'] --; - } - else - { - $Block['closed'] = true; - } - } - - if (isset($Block['interrupted'])) - { - $Block['markup'] .= "\n"; - - unset($Block['interrupted']); - } - - $Block['markup'] .= "\n".$Line['body']; - - return $Block; - } - - # - # Reference - - protected function blockReference($Line) - { - if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) - { - $id = strtolower($matches[1]); - - $Data = array( - 'url' => $matches[2], - 'title' => null, - ); - - if (isset($matches[3])) - { - $Data['title'] = $matches[3]; - } - - $this->DefinitionData['Reference'][$id] = $Data; - - $Block = array( - 'hidden' => true, - ); - - return $Block; - } - } - - # - # Table - - protected function blockTable($Line, array $Block = null) - { - if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) - { - return; - } - - if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') - { - $alignments = array(); - - $divider = $Line['text']; - - $divider = trim($divider); - $divider = trim($divider, '|'); - - $dividerCells = explode('|', $divider); - - foreach ($dividerCells as $dividerCell) - { - $dividerCell = trim($dividerCell); - - if ($dividerCell === '') - { - continue; - } - - $alignment = null; - - if ($dividerCell[0] === ':') - { - $alignment = 'left'; - } - - if (substr($dividerCell, - 1) === ':') - { - $alignment = $alignment === 'left' ? 'center' : 'right'; - } - - $alignments []= $alignment; - } - - # ~ - - $HeaderElements = array(); - - $header = $Block['element']['text']; - - $header = trim($header); - $header = trim($header, '|'); - - $headerCells = explode('|', $header); - - foreach ($headerCells as $index => $headerCell) - { - $headerCell = trim($headerCell); - - $HeaderElement = array( - 'name' => 'th', - 'text' => $headerCell, - 'handler' => 'line', - ); - - if (isset($alignments[$index])) - { - $alignment = $alignments[$index]; - - $HeaderElement['attributes'] = array( - 'style' => 'text-align: '.$alignment.';', - ); - } - - $HeaderElements []= $HeaderElement; - } - - # ~ - - $Block = array( - 'alignments' => $alignments, - 'identified' => true, - 'element' => array( - 'name' => 'table', - 'handler' => 'elements', - ), - ); - - $Block['element']['text'] []= array( - 'name' => 'thead', - 'handler' => 'elements', - ); - - $Block['element']['text'] []= array( - 'name' => 'tbody', - 'handler' => 'elements', - 'text' => array(), - ); - - $Block['element']['text'][0]['text'] []= array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $HeaderElements, - ); - - return $Block; - } - } - - protected function blockTableContinue($Line, array $Block) - { - if (isset($Block['interrupted'])) - { - return; - } - - if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) - { - $Elements = array(); - - $row = $Line['text']; - - $row = trim($row); - $row = trim($row, '|'); - - preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); - - foreach ($matches[0] as $index => $cell) - { - $cell = trim($cell); - - $Element = array( - 'name' => 'td', - 'handler' => 'line', - 'text' => $cell, - ); - - if (isset($Block['alignments'][$index])) - { - $Element['attributes'] = array( - 'style' => 'text-align: '.$Block['alignments'][$index].';', - ); - } - - $Elements []= $Element; - } - - $Element = array( - 'name' => 'tr', - 'handler' => 'elements', - 'text' => $Elements, - ); - - $Block['element']['text'][1]['text'] []= $Element; - - return $Block; - } - } - - # - # ~ - # - - protected function paragraph($Line) - { - $Block = array( - 'element' => array( - 'name' => 'p', - 'text' => $Line['text'], - 'handler' => 'line', - ), - ); - - return $Block; - } - - # - # Inline Elements - # - - protected $InlineTypes = array( - '"' => array('SpecialCharacter'), - '!' => array('Image'), - '&' => array('SpecialCharacter'), - '*' => array('Emphasis'), - ':' => array('Url'), - '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), - '>' => array('SpecialCharacter'), - '[' => array('Link'), - '_' => array('Emphasis'), - '`' => array('Code'), - '~' => array('Strikethrough'), - '\\' => array('EscapeSequence'), - ); - - # ~ - - protected $inlineMarkerList = '!"*_&[:<>`~\\'; - - # - # ~ - # - - public function line($text) - { - $markup = ''; - - # $excerpt is based on the first occurrence of a marker - - while ($excerpt = strpbrk($text, $this->inlineMarkerList)) - { - $marker = $excerpt[0]; - - $markerPosition = strpos($text, $marker); - - $Excerpt = array('text' => $excerpt, 'context' => $text); - - foreach ($this->InlineTypes[$marker] as $inlineType) - { - $Inline = $this->{'inline'.$inlineType}($Excerpt); - - if ( ! isset($Inline)) - { - continue; - } - - # makes sure that the inline belongs to "our" marker - - if (isset($Inline['position']) and $Inline['position'] > $markerPosition) - { - continue; - } - - # sets a default inline position - - if ( ! isset($Inline['position'])) - { - $Inline['position'] = $markerPosition; - } - - # the text that comes before the inline - $unmarkedText = substr($text, 0, $Inline['position']); - - # compile the unmarked text - $markup .= $this->unmarkedText($unmarkedText); - - # compile the inline - $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); - - # remove the examined text - $text = substr($text, $Inline['position'] + $Inline['extent']); - - continue 2; - } - - # the marker does not belong to an inline - - $unmarkedText = substr($text, 0, $markerPosition + 1); - - $markup .= $this->unmarkedText($unmarkedText); - - $text = substr($text, $markerPosition + 1); - } - - $markup .= $this->unmarkedText($text); - - return $markup; - } - - # - # ~ - # - - protected function inlineCode($Excerpt) - { - $marker = $Excerpt['text'][0]; - - if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), - 'element' => array( - 'name' => 'code', - 'text' => $text, - ), - ); - } - } - - protected function inlineEmailTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) - { - $url = $matches[1]; - - if ( ! isset($matches[2])) - { - $url = 'mailto:' . $url; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $matches[1], - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - protected function inlineEmphasis($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - $marker = $Excerpt['text'][0]; - - if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'strong'; - } - elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) - { - $emphasis = 'em'; - } - else - { - return; - } - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => $emphasis, - 'handler' => 'line', - 'text' => $matches[1], - ), - ); - } - - protected function inlineEscapeSequence($Excerpt) - { - if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) - { - return array( - 'markup' => $Excerpt['text'][1], - 'extent' => 2, - ); - } - } - - protected function inlineImage($Excerpt) - { - if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') - { - return; - } - - $Excerpt['text']= substr($Excerpt['text'], 1); - - $Link = $this->inlineLink($Excerpt); - - if ($Link === null) - { - return; - } - - $Inline = array( - 'extent' => $Link['extent'] + 1, - 'element' => array( - 'name' => 'img', - 'attributes' => array( - 'src' => $Link['element']['attributes']['href'], - 'alt' => $Link['element']['text'], - ), - ), - ); - - $Inline['element']['attributes'] += $Link['element']['attributes']; - - unset($Inline['element']['attributes']['href']); - - return $Inline; - } - - protected function inlineLink($Excerpt) - { - $Element = array( - 'name' => 'a', - 'handler' => 'line', - 'text' => null, - 'attributes' => array( - 'href' => null, - 'title' => null, - ), - ); - - $extent = 0; - - $remainder = $Excerpt['text']; - - if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches)) - { - $Element['text'] = $matches[1]; - - $extent += strlen($matches[0]); - - $remainder = substr($remainder, $extent); - } - else - { - return; - } - - if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches)) - { - $Element['attributes']['href'] = $matches[1]; - - if (isset($matches[2])) - { - $Element['attributes']['title'] = substr($matches[2], 1, - 1); - } - - $extent += strlen($matches[0]); - } - else - { - if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) - { - $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; - $definition = strtolower($definition); - - $extent += strlen($matches[0]); - } - else - { - $definition = strtolower($Element['text']); - } - - if ( ! isset($this->DefinitionData['Reference'][$definition])) - { - return; - } - - $Definition = $this->DefinitionData['Reference'][$definition]; - - $Element['attributes']['href'] = $Definition['url']; - $Element['attributes']['title'] = $Definition['title']; - } - - $Element['attributes']['href'] = str_replace(array('&', '<'), array('&', '<'), $Element['attributes']['href']); - - return array( - 'extent' => $extent, - 'element' => $Element, - ); - } - - protected function inlineMarkup($Excerpt) - { - if ($this->markupEscaped or strpos($Excerpt['text'], '>') === false) - { - return; - } - - if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w*[ ]*>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - - if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) - { - return array( - 'markup' => $matches[0], - 'extent' => strlen($matches[0]), - ); - } - } - - protected function inlineSpecialCharacter($Excerpt) - { - if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) - { - return array( - 'markup' => '&', - 'extent' => 1, - ); - } - - $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); - - if (isset($SpecialCharacter[$Excerpt['text'][0]])) - { - return array( - 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', - 'extent' => 1, - ); - } - } - - protected function inlineStrikethrough($Excerpt) - { - if ( ! isset($Excerpt['text'][1])) - { - return; - } - - if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) - { - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'del', - 'text' => $matches[1], - 'handler' => 'line', - ), - ); - } - } - - protected function inlineUrl($Excerpt) - { - if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') - { - return; - } - - if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) - { - $Inline = array( - 'extent' => strlen($matches[0][0]), - 'position' => $matches[0][1], - 'element' => array( - 'name' => 'a', - 'text' => $matches[0][0], - 'attributes' => array( - 'href' => $matches[0][0], - ), - ), - ); - - return $Inline; - } - } - - protected function inlineUrlTag($Excerpt) - { - if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) - { - $url = str_replace(array('&', '<'), array('&', '<'), $matches[1]); - - return array( - 'extent' => strlen($matches[0]), - 'element' => array( - 'name' => 'a', - 'text' => $url, - 'attributes' => array( - 'href' => $url, - ), - ), - ); - } - } - - # ~ - - protected function unmarkedText($text) - { - if ($this->breaksEnabled) - { - $text = preg_replace('/[ ]*\n/', "
\n", $text); - } - else - { - $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); - $text = str_replace(" \n", "\n", $text); - } - - return $text; - } - - # - # Handlers - # - - protected function element(array $Element) - { - $markup = '<'.$Element['name']; - - if (isset($Element['attributes'])) - { - foreach ($Element['attributes'] as $name => $value) - { - if ($value === null) - { - continue; - } - - $markup .= ' '.$name.'="'.$value.'"'; - } - } - - if (isset($Element['text'])) - { - $markup .= '>'; - - if (isset($Element['handler'])) - { - $markup .= $this->{$Element['handler']}($Element['text']); - } - else - { - $markup .= $Element['text']; - } - - $markup .= ''; - } - else - { - $markup .= ' />'; - } - - return $markup; - } - - protected function elements(array $Elements) - { - $markup = ''; - - foreach ($Elements as $Element) - { - $markup .= "\n" . $this->element($Element); - } - - $markup .= "\n"; - - return $markup; - } - - # ~ - - protected function li($lines) - { - $markup = $this->lines($lines); - - $trimmedMarkup = trim($markup); - - if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') - { - $markup = $trimmedMarkup; - $markup = substr($markup, 3); - - $position = strpos($markup, "

"); - - $markup = substr_replace($markup, '', $position, 4); - } - - return $markup; - } - - # - # Deprecated Methods - # - - function parse($text) - { - $markup = $this->text($text); - - return $markup; - } - - # - # Static Methods - # - - static function instance($name = 'default') - { - if (isset(self::$instances[$name])) - { - return self::$instances[$name]; - } - - $instance = new static(); - - self::$instances[$name] = $instance; - - return $instance; - } - - private static $instances = array(); - - # - # Fields - # - - protected $DefinitionData; - - # - # Read-Only - - protected $specialCharacters = array( - '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', - ); - - protected $StrongRegex = array( - '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', - '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', - ); - - protected $EmRegex = array( - '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', - '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', - ); - - protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; - - protected $voidElements = array( - 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', - ); - - protected $textLevelElements = array( - 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', - 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', - 'i', 'rp', 'del', 'code', 'strike', 'marquee', - 'q', 'rt', 'ins', 'font', 'strong', - 's', 'tt', 'sub', 'mark', - 'u', 'xm', 'sup', 'nobr', - 'var', 'ruby', - 'wbr', 'span', - 'time', - ); -} \ No newline at end of file diff --git a/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/PucReadmeParser.php b/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/PucReadmeParser.php deleted file mode 100644 index 1f5cec9e..00000000 --- a/wp/wp-content/plugins/divifilter/plugin-update-checker/vendor/PucReadmeParser.php +++ /dev/null @@ -1,348 +0,0 @@ -parse_readme_contents( $file_contents ); - } - - function parse_readme_contents( $file_contents ) { - $file_contents = str_replace(array("\r\n", "\r"), "\n", $file_contents); - $file_contents = trim($file_contents); - if ( 0 === strpos( $file_contents, "\xEF\xBB\xBF" ) ) - $file_contents = substr( $file_contents, 3 ); - - // Markdown transformations - $file_contents = preg_replace( "|^###([^#]+)#*?\s*?\n|im", '=$1='."\n", $file_contents ); - $file_contents = preg_replace( "|^##([^#]+)#*?\s*?\n|im", '==$1=='."\n", $file_contents ); - $file_contents = preg_replace( "|^#([^#]+)#*?\s*?\n|im", '===$1==='."\n", $file_contents ); - - // === Plugin Name === - // Must be the very first thing. - if ( !preg_match('|^===(.*)===|', $file_contents, $_name) ) - return array(); // require a name - $name = trim($_name[1], '='); - $name = $this->sanitize_text( $name ); - - $file_contents = $this->chop_string( $file_contents, $_name[0] ); - - - // Requires at least: 1.5 - if ( preg_match('|Requires at least:(.*)|i', $file_contents, $_requires_at_least) ) - $requires_at_least = $this->sanitize_text($_requires_at_least[1]); - else - $requires_at_least = NULL; - - - // Tested up to: 2.1 - if ( preg_match('|Tested up to:(.*)|i', $file_contents, $_tested_up_to) ) - $tested_up_to = $this->sanitize_text( $_tested_up_to[1] ); - else - $tested_up_to = NULL; - - // Requires PHP: 5.2.4 - if ( preg_match('|Requires PHP:(.*)|i', $file_contents, $_requires_php) ) { - $requires_php = $this->sanitize_text( $_requires_php[1] ); - } else { - $requires_php = null; - } - - // Stable tag: 10.4-ride-the-fire-eagle-danger-day - if ( preg_match('|Stable tag:(.*)|i', $file_contents, $_stable_tag) ) - $stable_tag = $this->sanitize_text( $_stable_tag[1] ); - else - $stable_tag = NULL; // we assume trunk, but don't set it here to tell the difference between specified trunk and default trunk - - - // Tags: some tag, another tag, we like tags - if ( preg_match('|Tags:(.*)|i', $file_contents, $_tags) ) { - $tags = preg_split('|,[\s]*?|', trim($_tags[1])); - foreach ( array_keys($tags) as $t ) - $tags[$t] = $this->sanitize_text( $tags[$t] ); - } else { - $tags = array(); - } - - - // Contributors: markjaquith, mdawaffe, zefrank - $contributors = array(); - if ( preg_match('|Contributors:(.*)|i', $file_contents, $_contributors) ) { - $temp_contributors = preg_split('|,[\s]*|', trim($_contributors[1])); - foreach ( array_keys($temp_contributors) as $c ) { - $tmp_sanitized = $this->user_sanitize( $temp_contributors[$c] ); - if ( strlen(trim($tmp_sanitized)) > 0 ) - $contributors[$c] = $tmp_sanitized; - unset($tmp_sanitized); - } - } - - - // Donate Link: URL - if ( preg_match('|Donate link:(.*)|i', $file_contents, $_donate_link) ) - $donate_link = esc_url( $_donate_link[1] ); - else - $donate_link = NULL; - - - // togs, conts, etc are optional and order shouldn't matter. So we chop them only after we've grabbed their values. - foreach ( array('tags', 'contributors', 'requires_at_least', 'tested_up_to', 'stable_tag', 'donate_link') as $chop ) { - if ( $$chop ) { - $_chop = '_' . $chop; - $file_contents = $this->chop_string( $file_contents, ${$_chop}[0] ); - } - } - - $file_contents = trim($file_contents); - - - // short-description fu - if ( !preg_match('/(^(.*?))^[\s]*=+?[\s]*.+?[\s]*=+?/ms', $file_contents, $_short_description) ) - $_short_description = array( 1 => &$file_contents, 2 => &$file_contents ); - $short_desc_filtered = $this->sanitize_text( $_short_description[2] ); - $short_desc_length = strlen($short_desc_filtered); - $short_description = substr($short_desc_filtered, 0, 150); - if ( $short_desc_length > strlen($short_description) ) - $truncated = true; - else - $truncated = false; - if ( $_short_description[1] ) - $file_contents = $this->chop_string( $file_contents, $_short_description[1] ); // yes, the [1] is intentional - - // == Section == - // Break into sections - // $_sections[0] will be the title of the first section, $_sections[1] will be the content of the first section - // the array alternates from there: title2, content2, title3, content3... and so forth - $_sections = preg_split('/^[\s]*==[\s]*(.+?)[\s]*==/m', $file_contents, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); - - $sections = array(); - for ( $i=0; $i < count($_sections); $i +=2 ) { - $title = $this->sanitize_text( $_sections[$i] ); - if ( isset($_sections[$i+1]) ) { - $content = preg_replace('/(^[\s]*)=[\s]+(.+?)[\s]+=/m', '$1

$2

', $_sections[$i+1]); - $content = $this->filter_text( $content, true ); - } else { - $content = ''; - } - $sections[str_replace(' ', '_', strtolower($title))] = array('title' => $title, 'content' => $content); - } - - - // Special sections - // This is where we nab our special sections, so we can enforce their order and treat them differently, if needed - // upgrade_notice is not a section, but parse it like it is for now - $final_sections = array(); - foreach ( array('description', 'installation', 'frequently_asked_questions', 'screenshots', 'changelog', 'change_log', 'upgrade_notice') as $special_section ) { - if ( isset($sections[$special_section]) ) { - $final_sections[$special_section] = $sections[$special_section]['content']; - unset($sections[$special_section]); - } - } - if ( isset($final_sections['change_log']) && empty($final_sections['changelog']) ) - $final_sections['changelog'] = $final_sections['change_log']; - - - $final_screenshots = array(); - if ( isset($final_sections['screenshots']) ) { - preg_match_all('|
  • (.*?)
  • |s', $final_sections['screenshots'], $screenshots, PREG_SET_ORDER); - if ( $screenshots ) { - foreach ( (array) $screenshots as $ss ) - $final_screenshots[] = $ss[1]; - } - } - - // Parse the upgrade_notice section specially: - // 1.0 => blah, 1.1 => fnord - $upgrade_notice = array(); - if ( isset($final_sections['upgrade_notice']) ) { - $split = preg_split( '#

    (.*?)

    #', $final_sections['upgrade_notice'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ); - if ( count($split) >= 2 ) { - for ( $i = 0; $i < count( $split ); $i += 2 ) { - $upgrade_notice[$this->sanitize_text( $split[$i] )] = substr( $this->sanitize_text( $split[$i + 1] ), 0, 300 ); - } - } - unset( $final_sections['upgrade_notice'] ); - } - - // No description? - // No problem... we'll just fall back to the old style of description - // We'll even let you use markup this time! - $excerpt = false; - if ( !isset($final_sections['description']) ) { - $final_sections = array_merge(array('description' => $this->filter_text( $_short_description[2], true )), $final_sections); - $excerpt = true; - } - - - // dump the non-special sections into $remaining_content - // their order will be determined by their original order in the readme.txt - $remaining_content = ''; - foreach ( $sections as $s_name => $s_data ) { - $remaining_content .= "\n

    {$s_data['title']}

    \n{$s_data['content']}"; - } - $remaining_content = trim($remaining_content); - - - // All done! - // $r['tags'] and $r['contributors'] are simple arrays - // $r['sections'] is an array with named elements - $r = array( - 'name' => $name, - 'tags' => $tags, - 'requires_at_least' => $requires_at_least, - 'tested_up_to' => $tested_up_to, - 'requires_php' => $requires_php, - 'stable_tag' => $stable_tag, - 'contributors' => $contributors, - 'donate_link' => $donate_link, - 'short_description' => $short_description, - 'screenshots' => $final_screenshots, - 'is_excerpt' => $excerpt, - 'is_truncated' => $truncated, - 'sections' => $final_sections, - 'remaining_content' => $remaining_content, - 'upgrade_notice' => $upgrade_notice - ); - - return $r; - } - - function chop_string( $string, $chop ) { // chop a "prefix" from a string: Agressive! uses strstr not 0 === strpos - if ( $_string = strstr($string, $chop) ) { - $_string = substr($_string, strlen($chop)); - return trim($_string); - } else { - return trim($string); - } - } - - function user_sanitize( $text, $strict = false ) { // whitelisted chars - if ( function_exists('user_sanitize') ) // bbPress native - return user_sanitize( $text, $strict ); - - if ( $strict ) { - $text = preg_replace('/[^a-z0-9-]/i', '', $text); - $text = preg_replace('|-+|', '-', $text); - } else { - $text = preg_replace('/[^a-z0-9_-]/i', '', $text); - } - return $text; - } - - function sanitize_text( $text ) { // not fancy - $text = strip_tags($text); - $text = esc_html($text); - $text = trim($text); - return $text; - } - - function filter_text( $text, $markdown = false ) { // fancy, Markdown - $text = trim($text); - - $text = call_user_func( array( __CLASS__, 'code_trick' ), $text, $markdown ); // A better parser than Markdown's for: backticks -> CODE - - if ( $markdown ) { // Parse markdown. - if ( !class_exists('Parsedown', false) ) { - /** @noinspection PhpIncludeInspection */ - require_once(dirname(__FILE__) . '/Parsedown' . (version_compare(PHP_VERSION, '5.3.0', '>=') ? '' : 'Legacy') . '.php'); - } - $instance = Parsedown::instance(); - $text = $instance->text($text); - } - - $allowed = array( - 'a' => array( - 'href' => array(), - 'title' => array(), - 'rel' => array()), - 'blockquote' => array('cite' => array()), - 'br' => array(), - 'p' => array(), - 'code' => array(), - 'pre' => array(), - 'em' => array(), - 'strong' => array(), - 'ul' => array(), - 'ol' => array(), - 'li' => array(), - 'h3' => array(), - 'h4' => array() - ); - - $text = balanceTags($text); - - $text = wp_kses( $text, $allowed ); - $text = trim($text); - return $text; - } - - function code_trick( $text, $markdown ) { // Don't use bbPress native function - it's incompatible with Markdown - // If doing markdown, first take any user formatted code blocks and turn them into backticks so that - // markdown will preserve things like underscores in code blocks - if ( $markdown ) - $text = preg_replace_callback("!(
    |)(.*?)(
    |)!s", array( __CLASS__,'decodeit'), $text); - - $text = str_replace(array("\r\n", "\r"), "\n", $text); - if ( !$markdown ) { - // This gets the "inline" code blocks, but can't be used with Markdown. - $text = preg_replace_callback("|(`)(.*?)`|", array( __CLASS__, 'encodeit'), $text); - // This gets the "block level" code blocks and converts them to PRE CODE - $text = preg_replace_callback("!(^|\n)`(.*?)`!s", array( __CLASS__, 'encodeit'), $text); - } else { - // Markdown can do inline code, we convert bbPress style block level code to Markdown style - $text = preg_replace_callback("!(^|\n)([ \t]*?)`(.*?)`!s", array( __CLASS__, 'indent'), $text); - } - return $text; - } - - function indent( $matches ) { - $text = $matches[3]; - $text = preg_replace('|^|m', $matches[2] . ' ', $text); - return $matches[1] . $text; - } - - function encodeit( $matches ) { - if ( function_exists('encodeit') ) // bbPress native - return encodeit( $matches ); - - $text = trim($matches[2]); - $text = htmlspecialchars($text, ENT_QUOTES); - $text = str_replace(array("\r\n", "\r"), "\n", $text); - $text = preg_replace("|\n\n\n+|", "\n\n", $text); - $text = str_replace('&lt;', '<', $text); - $text = str_replace('&gt;', '>', $text); - $text = "$text"; - if ( "`" != $matches[1] ) - $text = "
    $text
    "; - return $text; - } - - function decodeit( $matches ) { - if ( function_exists('decodeit') ) // bbPress native - return decodeit( $matches ); - - $text = $matches[2]; - $trans_table = array_flip(get_html_translation_table(HTML_ENTITIES)); - $text = strtr($text, $trans_table); - $text = str_replace('
    ', '', $text); - $text = str_replace('&', '&', $text); - $text = str_replace(''', "'", $text); - if ( '
    ' == $matches[1] )
    -			$text = "\n$text\n";
    -		return "`$text`";
    -	}
    -
    -} // end class
    -
    -endif;
    diff --git a/wp/wp-content/plugins/divifilter/readme.txt b/wp/wp-content/plugins/divifilter/readme.txt
    deleted file mode 100644
    index c0647860..00000000
    --- a/wp/wp-content/plugins/divifilter/readme.txt
    +++ /dev/null
    @@ -1,155 +0,0 @@
    -=== Divi Filter Premium ===
    -Contributors: danielvoelk
    -Tags: divi theme, filter, filterable gallery
    -Requires at least: 4.5
    -Tested up to: 6.0
    -Requires PHP: 5.6
    -Stable tag: 3.8.4
    -License: GPLv2 or later
    -License URI: https://www.gnu.org/licenses/gpl-2.0.html
    -
    -The Divi Filter plugin allows you to filter every module in the Divi theme. Just add a few classes and you're done.
    -
    -== Description ==
    -
    -### DEMOS ###
    -
    -[youtube https://www.youtube.com/watch?v=qcnTrKoHGA4]
    -
    -You can find more demos [here](https://demos.danielvoelk.de/divi-filter/).
    -
    -### FEATURES ###
    -
    -* Filter unlimited columns
    -
    -* Add multiple filter categories to each column (if desired)
    -
    -* **[PREMIUM]** Filter unlimited rows
    -
    -* **[PREMIUM]** Style active filter button
    -
    -* **[PREMIUM]** Start filtered, right after page loads.
    -
    -* **[PREMIUM]** Add animations to your filtering
    -
    -* **[PREMIUM]** Have multiple filters on one page
    -
    -* **[PREMIUM]** Multi select filtering (explained in [Documentation](https://docs.danielvoelk.de))
    -
    -* **[PREMIUM]** And more (see in ([Documentation](https://docs.danielvoelk.de))
    -
    -[Get the premium version](https://shop.danielvoelk.de/#divi-filter)
    -
    -### SETUP ###
    -
    -Buttons:
    -
    -*   Click on the grey gear icon to access the Button Settings (on the button, that you want to filter with).
    -*   Go to Advanced -> CSS ID & Classes -> CSS Class. Here you add the df-button class.
    -*   Additionally add any category that you want to filter with that button like that: dfc-[your category] e.g. dfc-cats. 
    -*   Important: Buttons have to be in a seperate section, than your filterable elements.
    -
    -Section:
    -
    -*   Click on blue gear icon to access the Section Settings.
    -*   Go to Advanced -> CSS ID & Classes -> CSS Class. Here you add the df-area class.
    -
    -Columns:
    -
    -*   Click on green gear icon to access the Row Settings.
    -*   In the Row Settings click on the gear icon the access the Column Settings.
    -*   Go to Advanced -> CSS ID & Classes -> CSS Class.
    -*   Here you add all the dfc-[your category] class you want e.g. your dfc-cats class.
    -*   Do that for all Columns you want to make filterable.
    -
    -A more detailed documentation
    -
    -== Screenshots ==
    -
    -1. This is a demo how a filterable section. You can filter every module. In the demo you can see: video, counter, image and contact form module. 
    -2. A filterable team section demo.
    -3. A filterable ice cream section.
    -
    -== Frequently Asked Questions ==
    -
    -= Where can I get support? =
    -You can get support in the Help Center.
    -
    -= Where can I download the premium plugin? =
    -You can download the premium plugin here.
    -
    -== Changelog ==
    -
    -= 3.8.4 =
    -* Added specialty filtering
    -
    -= 3.8.1 =
    -* added blog filtering in blog grid, fixed bugs
    -
    -= 3.8.0 =
    -* added blog filtering
    -
    -= 3.7.0 =
    -* added post type filtering
    -
    -= 3.6.0 =
    -* speed update
    -* fixed bugs
    -
    -= 3.5.0 =
    -* fixed bug for multiple filter on one page
    -* fixed starting class
    -
    -= 3.4.0 =
    -* added starting class by link ?filter=
    -* support for custom layouts as module and all shortcodes
    -
    -= 3.3.0 =
    -* df-buttons (to have buttons in same section)
    -
    -= 3.2.1 =
    -* bug fixes
    -
    -= 3.2.0 =
    -* added dfs- starting class
    -
    -= 3.1.0 =
    -* added df-picky class, added .local domain as localhost
    -
    -= 3.0.2 =
    -* bug fixes and preparations for future updates
    -
    -= 3.0.1 =
    -* bug fixes
    -
    -= 3.0.0 =
    -* added multiple filters one one page
    -
    -= 2.1.2 =
    -* added automatic updating
    -
    -= 2.1.1 =
    -* added dfs- classes that stay
    -
    -= 2.1.0 =
    -* added filtering with multiple active buttons
    -
    -= 2.0.0 =
    -* added row filtering
    -
    -= 1.1.1 =
    -* fixed bug for more than 9 columns. (sort error)
    -
    -= 1.1.0 =
    -* added optional feedback popup
    -
    -= 1.0.0 =
    -* fixed bugs
    -
    -= 0.9 =
    -* first version
    -
    -== Upgrade Notice ==
    -
    -= 0.9 =
    -first version
    \ No newline at end of file
    diff --git a/wp/wp-content/plugins/facetwp/.gitignore b/wp/wp-content/plugins/facetwp/.gitignore
    deleted file mode 100644
    index 2f6b36f5..00000000
    --- a/wp/wp-content/plugins/facetwp/.gitignore
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -.DS_Store
    -node_modules/
    -yarn.lock
    diff --git a/wp/wp-content/plugins/facetwp/assets/css/admin.css b/wp/wp-content/plugins/facetwp/assets/css/admin.css
    deleted file mode 100644
    index 7806d9a7..00000000
    --- a/wp/wp-content/plugins/facetwp/assets/css/admin.css
    +++ /dev/null
    @@ -1,1110 +0,0 @@
    -
    -:root {
    -    --red: #dc3545;
    -    --red-dark: #c82333;
    -    --orange: #ffac66;
    -    --purple: #752cbd;
    -    --green: #62dd62;
    -    --blue: #50b7ff;
    -    --blue-light: #b4ddff;
    -    --blue-medium: #209cee;
    -    --grey-light: #f8f8f8;
    -    --grey-medium: #aaa;
    -    --grey-dark: #222;
    -    --grey: #ddd;
    -    --input-border: #8c8f94;
    -    --white: #fff;
    -}
    -
    -/* Header area */
    -
    -body.settings_page_facetwp {
    -    background: var(--white);
    -    font-size: 14px;
    -}
    -
    -body.settings_page_facetwp .wrap {
    -    margin: 20px 20px 0 0;
    -}
    -
    -body.settings_page_facetwp #screen-meta,
    -body.settings_page_facetwp #screen-meta-links {
    -    display: none;
    -}
    -
    -a {
    -    color: var(--blue);
    -}
    -
    -a:hover {
    -    color: var(--blue-medium);
    -}
    -
    -#icon-facetwp {
    -    float: left;
    -    padding: 8px 10px 0 0;
    -}
    -
    -.facetwp-header {
    -    margin: 0 0 0 -20px;
    -    padding: 10px 20px;
    -    background-color: var(--purple);
    -}
    -
    -.facetwp-logo {
    -    line-height: 25px;
    -    background: url('../images/logo.svg?v=4.1') no-repeat;
    -    background-size: 32px 25px;
    -    display: inline-block;
    -    width: 32px;
    -}
    -
    -.facetwp-version {
    -    margin: 0 18px 0 6px;
    -    color: var(--grey-medium);
    -    font-size: 12px;
    -}
    -
    -.facetwp-tab {
    -    cursor: pointer;
    -    display: inline-block;
    -    border-radius: 3px;
    -    padding: 5px 15px;
    -    color: #d7d7d7;
    -}
    -
    -.facetwp-tab.active {
    -    background-color: rgba(255, 255, 255, 0.2);
    -    color: var(--white);
    -}
    -
    -.facetwp-tab:hover {
    -    color: var(--white);
    -}
    -
    -.facetwp-actions {
    -    float: right;
    -}
    -
    -.facetwp-response-wrap {
    -    position: absolute;
    -    right: 20px;
    -    margin-top: 10px;
    -    padding: 2px 8px;
    -    line-height: 1;
    -    color: var(--white);
    -
    -    background-color: var(--purple);
    -    border-bottom-left-radius: 5px;
    -    border-bottom-right-radius: 5px;
    -    cursor: pointer;
    -}
    -
    -.facetwp-response {
    -    display: none;
    -}
    -
    -.facetwp-response.visible {
    -    display: inline-block;
    -    padding-right: 8px;
    -}
    -
    -.facetwp-response-icon {
    -    display: inline-block;
    -    vertical-align: middle;
    -}
    -
    -.facetwp-response-icon span {
    -    display: inline-block;
    -}
    -
    -.facetwp-response-icon span::before {
    -    display: block;
    -    font-family: dashicons;
    -    font-size: 1.5em;
    -}
    -
    -.facetwp-response-icon[data-status="ok"] span::before {
    -    content: "\f12a";
    -    color: var(--green);
    -}
    -
    -.facetwp-response-icon[data-status="load"] span::before {
    -    content: "\f463";
    -}
    -
    -.facetwp-response-icon[data-status="error"] span::before {
    -    content: "\f534";
    -    color: var(--orange);
    -}
    -
    -.facetwp-response-icon[data-status="load"] span {
    -    animation: spin 1.1s infinite linear;
    -}
    -
    -[v-cloak] {
    -    display: none;
    -}
    -
    -.btn-split,
    -.btn-normal {
    -    position: relative;
    -    display: inline-block;
    -    background-color: var(--red);
    -    border-radius: 3px;
    -    vertical-align: top;
    -    cursor: pointer;
    -}
    -
    -.btn-split {
    -    margin-right: 4px;
    -}
    -
    -.btn-normal {
    -    padding: 4px 8px;
    -    background-color: var(--grey-light);
    -    border: 1px solid var(--grey-medium);
    -}
    -
    -.facetwp-header .btn-normal {
    -    border: 1px solid var(--white);
    -}
    -
    -.btn-normal:hover {
    -    border: 1px solid var(--grey-dark);
    -}
    -
    -.btn-split .btn-label,
    -.btn-split .btn-caret {
    -    display: inline-block;
    -    padding: 5px 10px;
    -    color: var(--white);
    -}
    -
    -.btn-split .btn-label {
    -    border-top-left-radius: 3px;
    -    border-bottom-left-radius: 3px;
    -    padding: 5px 15px;
    -}
    -
    -.btn-split .btn-caret {
    -    border-top-right-radius: 3px;
    -    border-bottom-right-radius: 3px;
    -}
    -
    -.btn-split .btn-label:hover,
    -.btn-split .btn-caret:hover {
    -    background-color: var(--red-dark);
    -}
    -
    -.btn-split .fa-caret-down {
    -    pointer-events: none;
    -}
    -
    -.btn-split .btn-dropdown {
    -    position: absolute;
    -    border: 1px solid var(--grey-medium);
    -    border-top: none;
    -    background-color: var(--white);
    -    font-size: 12px;
    -    width: 180px;
    -    top: 34px;
    -    right: 0;
    -    z-index: 10;
    -}
    -
    -.btn-split .dropdown-inner div {
    -    padding: 10px;
    -}
    -
    -.btn-split .dropdown-inner div:hover {
    -    background-color: var(--grey-light);
    -}
    -
    -/* Loading animation */
    -
    -.facetwp-loading {
    -    margin-top: 40px;
    -    text-align: center;
    -}
    -
    -@keyframes spin {
    -    0% {
    -        -webkit-transform: rotate(0deg);
    -        transform: rotate(0deg);
    -    }
    -    100% {
    -        -webkit-transform: rotate(360deg);
    -        transform: rotate(360deg);
    -    }
    -}
    -
    -/* Content boxes */
    -
    -.facetwp-region {
    -    display: none;
    -    padding-bottom: 30px;
    -}
    -
    -.facetwp-region.active {
    -    display: block;
    -}
    -
    -.facetwp-region iframe {
    -    width: 100%;
    -    height: 600px;
    -}
    -
    -.facetwp-subnav {
    -    padding-bottom: 30px;
    -}
    -
    -.facetwp-btn {
    -    display: inline-block;
    -    cursor: pointer;
    -    padding: 5px 8px;
    -    background-color: var(--white);
    -    border: 1px solid var(--red);
    -    border-radius: 3px;
    -    font-size: 12px;
    -    font-weight: normal;
    -    text-decoration: none;
    -    line-height: 1;
    -    color: var(--red);
    -}
    -
    -h3 .facetwp-btn {
    -    margin-left: 6px;
    -}
    -
    -.facetwp-btn:hover {
    -    background: var(--red);
    -    color: var(--white);
    -}
    -
    -.facetwp-region h3 {
    -    font-weight: normal;
    -    font-size: 18px;
    -    line-height: 1;
    -    margin: 0 0 30px 0;
    -}
    -
    -.facetwp-region > h3 a {
    -    display: inline-block;
    -    border-bottom: 3px solid var(--blue);
    -    color: var(--blue);
    -    cursor: pointer;
    -}
    -
    -.facetwp-region input[type='text'],
    -.facetwp-region input[type='number'],
    -.facetwp-region select {
    -    width: 220px;
    -    border-radius: 4px;
    -}
    -
    -.facet-fields input.facet-step,
    -.facet-fields input.facet-count,
    -.facet-fields input.facet-soft-limit {
    -    width: 50px;
    -}
    -
    -.facet-fields input.facet-count-text-plural {
    -    width: 300px;
    -}
    -
    -.facetwp-content .qb-wrap .facetwp-row {
    -    grid-template-columns: 160px 1fr;
    -    padding: 0;
    -}
    -
    -.facetwp-region textarea {
    -    width: 100%;
    -    height: 320px;
    -    padding: 10px;
    -    color: var(--blue-light);
    -    background-color: var(--grey-dark);
    -    font-family: monospace;
    -    white-space: pre;
    -    overflow: auto;
    -}
    -
    -.facetwp-region textarea.facet-modifier-values {
    -    width: 360px;
    -    height: 120px;
    -}
    -
    -.facetwp-region .item-name {
    -    display: inline-block;
    -    margin: 0 12px;
    -}
    -
    -.table-row {
    -    margin-bottom: 15px;
    -}
    -
    -.hidden {
    -    display: none;
    -}
    -
    -.facetwp-dev-mode {
    -    display: inline-block;
    -    position: absolute;
    -    color: var(--purple);
    -    right: 20px;
    -    margin-top: 60px;
    -}
    -
    -.facetwp-region .open-builder:before {
    -    content: '\f107';
    -    font: 400 20px/1 dashicons;
    -    vertical-align: top;
    -    padding-right: 4px;
    -}
    -
    -.facetwp-region .fs-dropdown {
    -    max-width: 400px;
    -    width: auto;
    -}
    -
    -.facetwp-region .item-locked {
    -    padding: 10px;
    -    margin-bottom: 20px;
    -    background-color: var(--red);
    -    border-radius: 3px;
    -    color: var(--white);
    -}
    -
    -.facetwp-region .item-locked span {
    -    padding-left: 5px;
    -    cursor: pointer;
    -}
    -
    -.facetwp-region .facetwp-content.locked {
    -    opacity: 0.4;
    -}
    -
    -/* fSelect overrides */
    -
    -.facetwp-region .fs-label-wrap {
    -    border: 1px solid var(--input-border);
    -    border-radius: 4px;
    -}
    -
    -.facetwp-region .fs-label-wrap .fs-label {
    -    padding: 0 8px;
    -    line-height: 2;
    -}
    -
    -.facetwp-region .fs-search input {
    -    padding: 0;
    -}
    -
    -.facetwp-region .fs-label-wrap .fs-arrow {
    -    top: 6px;
    -    right: 5px;
    -    bottom: initial;
    -    width: 16px;
    -    height: 16px;
    -    background: 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;
    -    background-size: 16px 16px;
    -    border: none;
    -}
    -
    -.facetwp-region .fs-open .fs-arrow {
    -    transform: rotate(-180deg);
    -}
    -
    -/* Data Source dropdown */
    -
    -.name-source .fs-dropdown {
    -    width: 300px;
    -}
    -
    -/* Cards UI */
    -
    -.facetwp-card {
    -    cursor: pointer;
    -}
    -
    -.facetwp-card:nth-child(odd) {
    -    background-color: var(--grey-light);
    -}
    -
    -.facetwp-card,
    -.facetwp-table-header {
    -    display: grid;
    -    grid-template-columns: 30px 1fr 1fr 1fr 1fr 80px 80px;
    -    line-height: 22px;
    -    padding: 8px;
    -}
    -
    -.facetwp-region-templates .facetwp-card,
    -.facetwp-region-templates .facetwp-table-header {
    -    grid-template-columns: 30px 1fr 1fr 1fr 1fr 80px;
    -}
    -
    -.facetwp-table-header {
    -    font-weight: bold;
    -}
    -
    -.facetwp-card .card-drag {
    -    cursor: move;
    -    color: var(--grey);
    -    font-size: 18px;
    -    line-height: 1;
    -}
    -
    -.facetwp-card > div {
    -    overflow: hidden;
    -    text-overflow: ellipsis;
    -    white-space: nowrap;
    -}
    -
    -.facetwp-card > div:hover {
    -    white-space: normal;
    -}
    -
    -.facetwp-card:hover .card-label {
    -    color: var(--blue-medium);
    -}
    -
    -/* Actions button */
    -
    -.facetwp-card .card-actions {
    -    text-align: right;
    -}
    -
    -.facetwp-card .actions-wrap {
    -    display: inline-block;
    -}
    -
    -.facetwp-card .actions-wrap .actions-btn {
    -    padding: 2px 8px;
    -    color: var(--grey);
    -}
    -
    -.facetwp-card:hover .actions-wrap .actions-btn {
    -    color: var(--grey-dark);
    -}
    -
    -.facetwp-card .actions-wrap .actions-modal {
    -    display: none;
    -    position: absolute;
    -    right: 28px;
    -    font-size: 12px;
    -    background-color: var(--white);
    -    border: 1px solid var(--grey);
    -    margin-top: -1px;
    -    z-index: 1;
    -}
    -
    -.facetwp-card .actions-wrap .actions-modal div {
    -    padding: 4px 8px;
    -}
    -
    -.facetwp-card .actions-wrap .actions-modal div:hover {
    -    background-color: var(--grey-light);
    -}
    -
    -.facetwp-card .actions-wrap:hover .actions-modal {
    -    display: block;
    -}
    -
    -/* Settings page */
    -
    -.facetwp-region .import-code {
    -    height: 160px;
    -}
    -
    -.field-notes {
    -    color: var(--grey-medium);
    -    font-style: italic;
    -}
    -
    -.facetwp-region .facetwp-subnav a {
    -    display: inline-block;
    -    font-size: 18px;
    -    margin: 0 20px 0 0;
    -    border-bottom: 3px solid transparent;
    -    cursor: pointer;
    -    color: var(--grey-dark);
    -}
    -
    -.facetwp-region-facets .facetwp-subnav a,
    -.facetwp-region-templates .facetwp-subnav a {
    -    margin: 0;
    -}
    -
    -.facetwp-subnav a.active {
    -    border-color: var(--blue);
    -    color: var(--blue);
    -}
    -
    -.facetwp-settings-section {
    -    display: none;
    -}
    -
    -.facetwp-settings-section.active {
    -    display: block;
    -}
    -
    -.facetwp-setting.slim {
    -    width: 100px;
    -}
    -
    -/* Tooltips */
    -
    -.facetwp-tooltip {
    -    display: inline-block;
    -    cursor: help;
    -}
    -
    -.facetwp-tooltip:after {
    -    display: inline-block;
    -    content: '?';
    -    line-height: 1;
    -    font-size: 12px;
    -    border: 1px solid var(--grey-medium);
    -    border-radius: 50%;
    -    margin-left: 5px;
    -    padding: 0 3px;
    -}
    -
    -.facetwp-tooltip-content {
    -    display: none;
    -}
    -
    -/* Edit screens */
    -
    -.facetwp-row {
    -    display: grid;
    -    grid-template-columns: 220px 1fr;
    -    padding-bottom: 20px;
    -}
    -
    -.facetwp-content.type-search .field-data-source,
    -.facetwp-content.type-pager .field-data-source,
    -.facetwp-content.type-reset .field-data-source,
    -.facetwp-content.type-sort .field-data-source {
    -    display: none;
    -}
    -
    -/* Query builder */
    -
    -.qb-wrap .qb-condition {
    -    padding-bottom: 15px;
    -}
    -
    -.qb-wrap .qb-actions {
    -    padding-top: 15px;
    -}
    -
    -.qb-wrap .qb-compare,
    -.qb-wrap .qb-orderby,
    -.qb-wrap .qb-type,
    -.qb-wrap .qb-order {
    -    width: 120px;
    -}
    -
    -.facet-fields .qb-row {
    -    display: grid;
    -    grid-template-columns: 1fr 50px;
    -    background-color: var(--grey-light);
    -    border: 1px solid var(--grey-medium);
    -    border-radius: 3px;
    -    margin-bottom: 20px;
    -    padding: 15px;
    -}
    -
    -.facet-fields .qb-row .qb-order-row {
    -    margin-top: 10px;
    -}
    -
    -.qb-wrap input.qb-posts-per-page {
    -    width: 60px;
    -}
    -
    -.qb-wrap .align-right {
    -    text-align: right;
    -}
    -
    -.qb-add,
    -.qb-move,
    -.qb-remove {
    -    cursor: pointer;
    -    font-size: 18px;
    -    vertical-align: middle;
    -}
    -
    -.qb-remove {
    -    color: var(--red);
    -}
    -
    -.qb-wrap .fs-wrap {
    -    vertical-align: middle;
    -}
    -
    -.qb-wrap .v-select {
    -    display: inline-block;
    -    vertical-align: middle;
    -    min-width: 160px;
    -    max-width: 360px;
    -}
    -
    -.qb-wrap .v-select.vs--searchable {
    -    min-width: 200px;
    -}
    -
    -.qb-wrap .v-select.vs--unsearchable {
    -    vertical-align: top;
    -}
    -
    -.qb-wrap .v-select .vs__search {
    -    background: none;
    -    height: 20px;
    -    min-height: auto;
    -    margin: 4px 2px 0;
    -    line-height: 20px;
    -}
    -
    -.qb-wrap .v-select .vs__search,
    -.qb-wrap .v-select .vs__search:focus {
    -    font-size: 14px;
    -    border: 1px solid var(--grey);
    -    padding: 0 8px;
    -}
    -
    -.qb-wrap .v-select .vs__dropdown-toggle {
    -    border-color: var(--input-border);
    -}
    -
    -.qb-wrap .v-select .vs__selected {
    -    height: 20px;
    -}
    -
    -.qb-wrap .v-select .vs__actions {
    -    display: none;
    -}
    -
    -/* Boolean toggle */
    -
    -.facetwp-switch {
    -    position: relative;
    -    display: inline-block;
    -    width: 48px;
    -    height: 24px;
    -}
    -
    -.facetwp-switch input {
    -    display: none;
    -}
    -
    -.facetwp-slider {
    -    position: absolute;
    -    cursor: pointer;
    -    top: 0;
    -    left: 0;
    -    right: 0;
    -    bottom: 0;
    -    background-color: var(--grey-medium);
    -    border-radius: 24px;
    -    -webkit-transition: .4s;
    -    transition: .4s;
    -}
    -
    -.facetwp-slider:before {
    -    position: absolute;
    -    content: '';
    -    height: 16px;
    -    width: 16px;
    -    left: 4px;
    -    bottom: 4px;
    -    background-color: white;
    -    border-radius: 50%;
    -    -webkit-transition: .4s;
    -    transition: .4s;
    -}
    -
    -.facetwp-switch input:checked + .facetwp-slider {
    -    background-color: var(--purple);
    -}
    -
    -.facetwp-switch input:checked + .facetwp-slider:before {
    -    -webkit-transform: translateX(24px);
    -    -ms-transform: translateX(24px);
    -    transform: translateX(24px);
    -}
    -
    -/* Template content */
    -
    -.template-tabs {
    -    margin-bottom: 20px;
    -    border-bottom: 1px solid var(--grey);
    -}
    -
    -.template-tabs.top-level {
    -    margin: 30px 0 45px 0;
    -}
    -
    -.template-tabs span {
    -    display: inline-block;
    -    padding: 5px 15px;
    -    border: 1px solid var(--grey);
    -    border-top-left-radius: 3px;
    -    border-top-right-radius: 3px;
    -    background-color: var(--grey-light);
    -    color: var(--purple);
    -    margin-left: 5px;
    -    margin-bottom: -1px;
    -    cursor: pointer;
    -}
    -
    -.template-tabs span.active {
    -    border-bottom: 1px solid var(--white);
    -    background-color: var(--white);
    -    color: var(--red);
    -}
    -
    -/* Layout builder */
    -
    -.builder-wrap {
    -    display: grid;
    -    grid-template-columns: 1fr 320px;
    -    grid-column-gap: 20px;
    -    min-height: 600px;
    -    user-select: none;
    -}
    -
    -.builder-canvas {
    -    position: relative;
    -    outline: 1px solid var(--grey-medium);
    -    border-radius: 4px;
    -    background-color: var(--grey-light);
    -}
    -
    -.builder-buttons div {
    -    display: inline-block;
    -    padding: 5px;
    -    margin: 0 5px 5px 0;
    -    border: 1px solid var(--grey-medium);
    -    border-radius: 3px;
    -    background: var(--white);
    -    cursor: move;
    -}
    -
    -.builder-row,
    -.builder-col,
    -.builder-item {
    -    position: relative;
    -}
    -
    -.builder-row-inner {
    -    display: grid;
    -    grid-template-columns: 1fr;
    -    grid-column-gap: 6px;
    -    position: relative;
    -    min-height: 30px;
    -}
    -
    -.builder-row-actions,
    -.builder-col-actions,
    -.builder-item-actions {
    -    display: none;
    -    position: absolute;
    -    height: 20px;
    -    line-height: 20px;
    -    color: var(--white);
    -    cursor: pointer;
    -    z-index: 10;
    -}
    -
    -.builder-row-actions span,
    -.builder-col-actions span,
    -.builder-item-actions span {
    -    display: inline-block;
    -    width: 20px;
    -}
    -
    -.builder-col-actions:hover {
    -    width: auto;
    -}
    -
    -.builder-row-actions {
    -    top: -20px;
    -    left: 50%;
    -    transform: translateX(-50%);
    -    background-color: var(--purple);
    -    border-top-left-radius: 3px;
    -    border-top-right-radius: 3px;
    -
    -    /* fixes finnicky hovering to actions buttons */
    -    box-shadow: inset 0 -1px var(--grey-light);
    -    height: 21px;
    -}
    -
    -.builder-col-actions {
    -    top: 0;
    -    left: 0;
    -    width: 20px;
    -    overflow: hidden;
    -    background-color: var(--purple);
    -}
    -
    -.builder-item-actions {
    -    top: 0;
    -    right: 0;
    -    width: 20px;
    -    overflow: hidden;
    -    background-color: var(--purple);
    -}
    -
    -.builder-row:hover > .builder-row-actions,
    -.builder-col:hover > .builder-col-actions,
    -.builder-item:hover > .builder-item-actions {
    -    display: inline-block;
    -    line-height: 20px;
    -    text-align: center;
    -}
    -
    -.builder-row:hover {
    -    outline: 1px solid var(--purple);
    -}
    -
    -.builder-col .resizer {
    -    position: absolute;
    -    top: 0;
    -    right: -6px;
    -    width: 5px;
    -    height: 100%;
    -    cursor: col-resize;
    -}
    -
    -.builder-row:hover .builder-col .resizer {
    -    background-color: var(--grey);
    -}
    -
    -.builder-col-inner {
    -    position: relative;
    -    min-height: 30px;
    -    margin: 20px;
    -}
    -
    -.builder-col-inner.empty-col {
    -    height: calc(100% - 20px);
    -}
    -
    -.builder-item {
    -    background-color: var(--white);
    -    outline: 1px dashed var(--grey-medium);
    -    margin-bottom: 10px;
    -    padding: 2px 10px;
    -}
    -
    -.builder-item:hover {
    -    outline: 1px solid var(--purple);
    -}
    -
    -.builder-item-inner {
    -    height: 30px;
    -    line-height: 30px;
    -    padding-right: 20px;
    -    word-break: break-all;
    -    overflow: hidden;
    -    cursor: default;
    -}
    -
    -.builder-item-inner.is-hidden {
    -    opacity: 0.4;
    -}
    -
    -.builder-item-inner .item-drag {
    -    cursor: move;
    -}
    -
    -.builder-first-add {
    -    display: flex;
    -    align-items: center;
    -    justify-content: center;
    -    outline: 1px dashed var(--grey-medium);
    -    font-size: 20px;
    -    color: var(--grey-medium);
    -    height: 30px;
    -    cursor: default;
    -}
    -
    -.builder-first-add:hover {
    -    outline: 1px dashed var(--purple);
    -    background-color: var(--white);
    -    color: var(--purple);
    -}
    -
    -.popover {
    -    position: absolute;
    -    width: 220px;
    -    top: 20px;
    -    left: 20px;
    -    background-color: var(--white);
    -    outline: 1px solid var(--purple);
    -    z-index: 10;
    -}
    -
    -.popover-search {
    -    border-bottom: 1px solid var(--grey);
    -}
    -
    -.popover-search input[type='text'] {
    -    width: 220px;
    -    box-shadow: none;
    -    outline-style: none;
    -    border-color: transparent;
    -    line-height: 26px;
    -    padding: 0px 10px;
    -}
    -
    -.popover-choices {
    -    max-height: 220px;
    -    padding: 4px 0;
    -    overflow: scroll;
    -}
    -
    -.popover-choices div {
    -    padding: 4px 10px;
    -    cursor: pointer;
    -}
    -
    -.popover-choices div:hover {
    -    background-color: var(--grey-light);
    -}
    -
    -.builder-crumb {
    -    display: inline-block;
    -}
    -
    -.builder-setting {
    -    margin-bottom: 20px;
    -}
    -
    -.builder-setting .setting-title {
    -    margin-bottom: 5px;
    -}
    -
    -.builder-setting input[type='number'] {
    -    width: 60px;
    -}
    -
    -.builder-setting .utrbl {
    -    display: inline-block;
    -    width: 50px;
    -}
    -
    -.builder-setting .utrbl-unit {
    -    display: none;
    -}
    -
    -.builder-setting .utrbl input[type='text'],
    -.builder-setting .utrbl input[type='number'] {
    -    width: 46px;
    -    height: auto;
    -}
    -
    -.builder-setting textarea {
    -    height: 100px;
    -}
    -
    -.builder-setting .utrbl span {
    -    display: block;
    -    font-size: 9px;
    -    text-transform: uppercase;
    -    color: var(--grey-medium);
    -}
    -
    -.builder-setting .text-style-icons span {
    -    display: inline-block;
    -    padding: 4px 8px;
    -    margin: 4px 2px 0 0;
    -    border: 1px solid var(--grey);
    -    border-radius: 3px;
    -    cursor: pointer;
    -}
    -
    -.builder-setting .text-style-icons span.active {
    -    background-color: var(--grey-dark);
    -    color: var(--white);
    -}
    -
    -/* Color picker */
    -
    -.color-wrap {
    -    position: relative;
    -}
    -
    -.color-wrap .color-canvas {
    -    display: inline-block;
    -}
    -
    -.color-wrap .color-preview {
    -    position: absolute;
    -    top: 1px;
    -    left: 2px;
    -    height: 28px;
    -    width: 28px;
    -    border-top-left-radius: 2px;
    -    border-bottom-left-radius: 2px;
    -    z-index: 1;
    -}
    -
    -.color-wrap input.color-input {
    -    padding-left: 36px;
    -}
    -
    -.color-wrap .color-clear {
    -    display: inline-block;
    -    position: relative;
    -    right: 30px;
    -    width: 20px;
    -    text-align: center;
    -    cursor: pointer;
    -}
    -
    -@media (min-width: 783px) {
    -    .facetwp-header {
    -        position: sticky;
    -        z-index: 100;
    -        top: 32px;
    -    }
    -}
    -
    -/* FontAwesome */
    -
    -svg:not(:root).svg-inline--fa {
    -    overflow: visible;
    -}
    -.svg-inline--fa {
    -    display: inline-block;
    -    font-size: inherit;
    -    height: 1em;
    -    overflow: visible;
    -    vertical-align: -.125em;
    -}
    -.svg-inline--fa.fa-w-10 {
    -    width: .625em;
    -}
    -.svg-inline--fa.fa-w-11 {
    -    width: .6875em;
    -}
    -.svg-inline--fa.fa-w-12 {
    -    width: .75em;
    -}
    -.svg-inline--fa.fa-w-14 {
    -    width: .875em;
    -}
    -.svg-inline--fa.fa-w-16 {
    -    width: 1em;
    -}
    -.svg-inline--fa.fa-w-18 {
    -    width: 1.125em;
    -}
    -.svg-inline--fa.fa-w-20 {
    -    width: 1.25em;
    -}
    diff --git a/wp/wp-content/plugins/facetwp/assets/css/front.css b/wp/wp-content/plugins/facetwp/assets/css/front.css
    deleted file mode 100644
    index 3417f13b..00000000
    --- a/wp/wp-content/plugins/facetwp/assets/css/front.css
    +++ /dev/null
    @@ -1,327 +0,0 @@
    -.facetwp-facet {
    -    margin-bottom: 40px;
    -}
    -
    -.facetwp-facet.is-loading {
    -    opacity: 0.6;
    -}
    -
    -.facetwp-overlay {
    -    position: absolute;
    -}
    -
    -.facetwp-pager-label {
    -    display: inline-block;
    -    margin-right: 12px;
    -}
    -
    -.facetwp-page {
    -    display: inline-block;
    -    padding: 0px 4px;
    -    margin-right: 6px;
    -    cursor: pointer;
    -}
    -
    -.facetwp-page.dots {
    -    cursor: default;
    -}
    -
    -.facetwp-page.active {
    -    font-weight: bold;
    -    cursor: default;
    -}
    -
    -/* Checkboxes */
    -
    -.facetwp-type-checkboxes .facetwp-depth {
    -    display: none;
    -}
    -
    -.facetwp-type-checkboxes .facetwp-depth.visible {
    -    display: inherit;
    -}
    -
    -.facetwp-checkbox {
    -    background: url('../images/checkbox.png') 0 50% no-repeat;
    -    background-size: 14px 14px;
    -    margin-bottom: 4px;
    -    padding-left: 20px;
    -    cursor: pointer;
    -}
    -
    -.facetwp-checkbox.checked {
    -    background-image: url('../images/checkbox-on.png');
    -}
    -
    -.facetwp-checkbox.disabled,
    -.facetwp-radio.disabled {
    -    opacity: 0.4;
    -    cursor: default;
    -}
    -
    -.facetwp-checkbox .facetwp-expand {
    -    float: right;
    -}
    -
    -.facetwp-display-value {
    -    padding-right: 5px;
    -}
    -
    -/* Radio */
    -
    -.facetwp-radio {
    -    background: url('../images/radio.png') 0 50% no-repeat;
    -    background-size: 14px 14px;
    -    margin-bottom: 4px;
    -    padding-left: 20px;
    -    cursor: pointer;
    -}
    -
    -.facetwp-radio.checked {
    -    background-image: url('../images/radio-on.png');
    -}
    -
    -/* fSelect */
    -
    -.facetwp-type-fselect.is-loading {
    -    opacity: 1; /* prevent stack order issues */
    -}
    -
    -.facetwp-type-fselect.is-loading .fs-label-wrap,
    -.facetwp-type-fselect.is-loading .fs-search,
    -.facetwp-type-fselect.is-loading .fs-no-results,
    -.facetwp-type-fselect.is-loading .fs-options {
    -    opacity: 0.6;
    -}
    -
    -.facetwp-type-fselect.is-loading .fs-option {
    -    cursor: wait;
    -}
    -
    -.facetwp-type-fselect .fs-wrap.fs-disabled .fs-option {
    -    opacity: 0.4;
    -    cursor: wait;
    -}
    -
    -.facetwp-type-fselect .fs-option .fs-option-label {
    -    white-space: nowrap;
    -}
    -
    -.facetwp-type-fselect .fs-option.d1 .fs-option-label {
    -    padding-left: 20px;
    -}
    -
    -.facetwp-type-fselect .fs-option.d2 .fs-option-label {
    -    padding-left: 40px;
    -}
    -
    -.facetwp-type-fselect .fs-option.d3 .fs-option-label {
    -    padding-left: 60px;
    -}
    -
    -/* Hierarchy */
    -
    -.facetwp-depth {
    -    margin-left: 12px;
    -}
    -
    -.facetwp-link {
    -    cursor: pointer;
    -}
    -
    -.facetwp-link.checked {
    -    font-weight: bold;
    -    cursor: default;
    -}
    -
    -.facetwp-toggle {
    -    cursor: pointer;
    -}
    -
    -.facetwp-hidden {
    -    display: none;
    -}
    -
    -/* Slider */
    -
    -.facetwp-slider-wrap {
    -    padding-bottom: 15px;
    -}
    -
    -.facetwp-slider-reset {
    -    border: 1px solid #d9d9d9;
    -    border-radius: 3px;
    -    background: #fff;
    -    box-shadow: inset 0 0 1px #fff, inset 0 1px 7px #ebebeb, 0 3px 6px -3px #bbb;
    -    padding: 4px 8px;
    -    cursor: pointer;
    -}
    -
    -.facetwp-slider[data-disabled="true"] {
    -    opacity: 0.6;
    -    cursor: not-allowed;
    -}
    -
    -.facetwp-slider[data-disabled="true"] .noUi-handle {
    -    cursor: not-allowed;
    -}
    -
    -/* Search */
    -
    -.facetwp-input-wrap {
    -    display: inline-block;
    -    position: relative;
    -}
    -
    -.facetwp-facet input.facetwp-search,
    -.facetwp-facet input.facetwp-location {
    -    margin: 0;
    -    padding-right: 30px;
    -    min-width: 240px;
    -}
    -
    -.facetwp-icon {
    -    right: 0;
    -    height: 100%;
    -    line-height: 1;
    -    position: absolute;
    -    cursor: pointer;
    -    opacity: 0.5;
    -}
    -
    -.facetwp-icon:before {
    -    display: inline-block;
    -    content: '';
    -    width: 30px;
    -    height: 100%;
    -    background: url('../images/icon-search.png') no-repeat;
    -    background-position: 5px 50%;
    -    background-size: 20px 20px;
    -}
    -
    -/* Proximity */
    -
    -.location-results {
    -    position: absolute;
    -    background: #fff;
    -    border-left: 1px solid #ddd;
    -    border-right: 1px solid #ddd;
    -    overflow: hidden;
    -    width: 100%;
    -}
    -
    -.location-result {
    -    font-size: 11px;
    -    border-bottom: 1px solid #ddd;
    -    padding: 5px;
    -    cursor: pointer;
    -    overflow: hidden;
    -    text-overflow: ellipsis;
    -    white-space: nowrap;
    -    color: #888;
    -}
    -
    -.location-result:hover {
    -    background-color: #f8f8f8;
    -}
    -
    -.location-result.active {
    -    background-color: #EBF2FE;
    -}
    -
    -.location-result .result-main {
    -    font-size: 13px;
    -    color: #222;
    -}
    -
    -.facetwp-icon.locate-me:before {
    -    background-image: url('../images/icon-locate.png');
    -}
    -
    -.facetwp-icon.f-reset:before {
    -    background-image: url('../images/icon-close.png');
    -}
    -
    -.facetwp-icon.f-loading:before {
    -    background-image: url('../images/loading.png');
    -    animation: spin 700ms infinite linear;
    -}
    -
    -.location-attribution {
    -    border-bottom: 1px solid #ddd;
    -    padding: 5px;
    -}
    -
    -.powered-by-google {
    -    height: 15px;
    -    background: url('../images/powered-by-google.png') top right no-repeat;
    -    background-size: auto 15px;
    -}
    -
    -/* Rating */
    -
    -.facetwp-stars {
    -    display: inline-block;
    -    line-height: 1;
    -    padding-right: 4px;
    -    user-select: none;
    -    unicode-bidi: bidi-override;
    -    direction: rtl;
    -}
    -
    -.facetwp-star {
    -    cursor: pointer;
    -    font-size: 20px;
    -    color: #ccc;
    -}
    -
    -.facetwp-star:hover,
    -.facetwp-star:hover ~ .facetwp-star,
    -.facetwp-star.selected,
    -.facetwp-star.selected ~ .facetwp-star {
    -    color: #000;
    -}
    -
    -.facetwp-star.selected:hover,
    -.facetwp-star.selected:hover ~ .facetwp-star {
    -    color: red;
    -}
    -
    -/* CSS animations */
    -
    -@keyframes spin {
    -    from {
    -        transform: rotate(0deg);
    -    }
    -    to {
    -        transform: rotate(360deg);
    -    }
    -}
    -
    -/* Selections shortcode */
    -
    -.facetwp-selections li {
    -    display: inline-block;
    -    line-height: 1;
    -}
    -
    -.facetwp-selections .facetwp-selection-value {
    -    display: inline-block;
    -    margin-right: 10px;
    -    cursor: pointer;
    -
    -    padding-right: 16px;
    -    background-image: url('../images/icon-close.png');
    -    background-size: 12px 12px;
    -    background-repeat: no-repeat;
    -    background-position: right center;
    -}
    -
    -/* Layout builder */
    -
    -@media (max-width: 480px) {
    -    body .facetwp-template .fwpl-layout,
    -    body .facetwp-template-static .fwpl-layout {
    -        grid-template-columns: 1fr;
    -    }
    -}
    diff --git a/wp/wp-content/plugins/facetwp/assets/images/checkbox-on.png b/wp/wp-content/plugins/facetwp/assets/images/checkbox-on.png
    deleted file mode 100644
    index f5bf39f54cc742c66e6380014eda24b2498b14e7..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 128
    zcmeAS@N?(olHy`uVBq!ia0vp^86eEW3?vhZVvT?lXMj(LYiVg|Zf@@X|NrZIS55;8
    z8hN@nhIkxL<~YjPw(E-4ngk0E!-R&wl}J$2%A0rFGsdq=*n*4ub_FrGwylt_eiVBV
    PsGGsl)z4*}Q$iB}FYGEx
    
    diff --git a/wp/wp-content/plugins/facetwp/assets/images/checkbox.png b/wp/wp-content/plugins/facetwp/assets/images/checkbox.png
    deleted file mode 100644
    index ac29efb5b5db54d4311364cd48199612c032b12c..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 272
    zcmeAS@N?(olHy`uVBq!ia0vp^86eEU3?$zht(XL)x&;7h~x~wt|RVOkGt6KE>rnp2`rhWps@O%CTN?&33rRTo94Pc)EIRs^;Q?!0@WW
    z93fp+r!PtV&}Zz@bC{CBs$s?0B?Z(e3{)U-aTCydKA`y-{3#~2Qx5%LeEB+M9rJ@gSu^EFCR34us%M
    zK}S*@X~1#^c#rpDLvP>s%b8^W%DeXXxV^3)?tW)H@qQdz`t2UoSYw0wFZZTDLt{RR
    z`?$|pO^@8JcyXb>{`5Cj+uHAy?P|I((XxhL*3`(ziIKYBJNs|`>TAomS^Ab%`P=w>
    zRMwFFYR8@S+93O8#<1|=lcxL#G?)EpMOP)<^VD0lX0oTKR=tYYEsL9;GUXdkZu#RU
    zqqN-oGwHUUIk+B%7fm?a`HC(#TzVES+TicrOe53Lnmrb~E!PBC^vYtEt&^&nNmg&v
    z>bNi84zjx-ZNWZjwNgC;IYvgq{}Q_`)8@i4x0^nEs3dj_zyL6&w%k|iMFqp?Kr
    zGqIk@3`S#^eQ>^Oc2-B=*-UG96G75~XV^&UQKXOH*8^bi5xD>~3&{fIr(>1^`hzI|
    za76fTD*;ph2$ze>2~|kxWpdy&QV2{zBgD8nG&*GVzk~x=Aembi09g5BVpt2*Acc?N
    z*9@%|py(Zo5^m=15AJps!s}ah;#_fdD@4n~M<{)a3u=Vjs7TYak>e?$_s4D%5iEoV
    z5VJmLR`Y-&y@ZPlMdsB2$y-DKFaS8oFk}{40QAW0!)#f=UA<`MQr}9XvgSv&BtZUQ(&^!>Z?7Jb%-s#4U3l5x$@031NW>RxpD
    zr}vQ3Kk+xcG3*$=%%b)X%P(lQxt^bwy-79(Xv7A4nd%JL<-Y@JGr@V|YVg`?z_AYk3GgNNVT
    z2S`=WQuF;C60E-0(hrh)PIV1R1Qjx~@H9!t3<3;E8lWd6O$e|^i2)<}0GVW8fNhl+
    z3a|*-Co?dzP|q2_;toS>D6ll?wHfgLoWuY#`zj3k(zPn2bHfle?WajT(hWI}s!%yL
    zCM+kOW1VWliekW-C_BUCu&>Br&n+wNZ);AU8r^lqQP)3yWHF>g=h<-IfMIOm)oiCY
    a6GvhPRF!@3Sfct+v`FmtYaus6tX5|lu(55
    zlYL2+7*cj(o_^2!=f(4!=lnnSp7Z(K7x$iX?~8lRy~&p5hRjG_Bme-+#zuP9008+b
    zApipUm)<`S?)ghYmZrA)fB8QN$o~NF{|~H-A>iMZ^uw&pZ2$nLLTaYBVm7s4-x<^01dDL2;e^yN|VpLB0lAOX`_@7Jky)o7U|`E
    z{_eKYn@4R^Jr+xYmMTKJJ^*)+@N41oc26cwjgF
    zJO;Y31|9ND)(zUlawmby4Sk~%yQVR|1J#XNA?`dqJCn4K2Is1O^jp`d!Sk^&c?X(#
    zy}!hcuHE%z_BGt^<@T}5RfRwLr8zRF2LnH!M-g^oo)EtG(-y{_(yu-c;K=AdD7{@5
    z*?uWmNE@Iy^2FggbvQp{DjA4d3iWOXQbc`8g|}%}T3cJ6RUHLIihMM+h|Hg5$31y;
    zqM(}wk(EwT)`av~sdcP6CV>K=7g_1AO8KjtzP20bpjk!lrUQvE4(y5Xl%uEr5J$ZLO5PssAzJ{7KIF4Bv0<
    zG*Lk`U71e%iI*Tc#{oRtp%u<_s9PTG%>Jk>3u!;0RYdx8%g(FQ{A1LPqK@`s4%S3y
    z&VmoyxAI(jf2KFP4!mt>F~94uKb~@i_HyJ$gfw?aJ^yJ=QOtF_c3kWOrn08_GM8%BW~EoUF{U9?
    zoqgc+PCCc#iH&{IEf?}YqpX+Y$n=fSYN>Xtd+-%ixVGXwy17*z=9_Q74I;fWgu-V4
    zzNt2nc8v;sKVt_+=im!Q%0`Rc`%l4N!_SemQ%2TH#~zV5hfn1b&$Pq6D~BJ9N;!m1
    zhB(l9XPgUH16yzFrp~-@eh7*u5&6vl^DExtt0VLIwh6GO^$c1^Yz!Bgip`)yqAZ|_
    zHx7ifm2FYDuHl-Bg2o*J-SN2%1{t3$f|Avyys(B)HO6l!!}SV40B-e#TH`-
    zgY0S5Wa@j)EJuFzadGIJRKzcb&R!HhM#g#SQCgf*t_C+aO%iH8)upXg`{c*#!eg

    btj1r{ygO zHGC2n4%_fVrXp>-XWsTag<+Lp;$b<^MJoA91XB0YKhJ#I2Kb;sqC$C(=TUHatqaV&j&KB~xd2cnP z1>&M;$D*n`>J`S4o_B{#&v!0Vh-5Acx`Y&9%Zi0UZx$}CWkV%mNajmyB?-L%q7090Qqm z-yW-N!jWO1qXXhOr13bkng^*^?`q0INEnNnYqG3(xMQp(8OB29hcGHcStdfHGpYyj4>g5@Y$T$a^-z)1`LB<4K z(-wVnWJ9hh>JGRskPIQ6<IEI=5dlj$2E=+|VSi6y_9o+z6cmNwZe_zm29&q7lxWY&Xhuo(G zImTteDXnSRy_RWz*@A9;7((;}zB4%lfVD4XG~Dz2KwO@m2*rfJ4Do069@Z+Pa}Xkj zT>6{N?+2fJ4Mg*Jg1DLlDFCmX1Sd!_996!RLN@A`aRE(|QxJ+KQ=P?o>agsQ>WJp4 z;}lS~dEmX0f3o)(y+5-mNwre$_*Cvm;ZMrRFa5vS;@MSjR!vqF{v1AzA0{r>HC=7+ z=klNYFd6YH0(Xa>+s&|REK@GRJBOe5T6foYUGTHzxKIt%p<$d@UAf2l${6c%T#Uwr ziQ)M#5x3g-1zg*uC1jipnFg&E6T~CR;wkbuX&oPhH_A`R{A0Kwl@RI}BN`KTDtlEU zKbooEW#{4!Ls%00iOc{~Up*x(3c=qB`LLD~r^d+*2`kgpi#zB&lkhu{bSTN>AZdTB zlX!`45vA|E#sfv#)^OWj|wKsmHjGS-UT zx3*Rd`I_M{RhG6kb9qoGlMI^Cm5W<}s1>$Uj#@UT9E!)_!(h3DHI(-!)4OP05~P+< zA7cd#>Oebbksz!E!t&YqJW$!}M@C|U!dy>5RUB{%Z4J764?XTvj4<8l!n{}rJF>lM zRgwKF*Xk9X@q-z;iV+>kaP`i&e)1GgN~(Nbd%84~ONEdS{VYNzaw{y^ekxGa+sjtc zPsa<`Q_t1b45?PmfV8L`+Fv^|x-RdsX=I@{bomTSa)?x;xUh-#hz#;x%&&+AEYs zc`Fn5YrPg8G`^Z7yw)scB2J`84OEQ=@HPtB zqrOQB&mFG+^9(Md{wN+sREGBn?bqErFi4+~R+%@7ieX2oge0V|w>Tb9Il!DGN4 zeimaIIz!8SIK2~)S&T;sdBA8_p1d(^y@E1M9HrsqLZ`p6%hsM0*OM0=Za|uNMVoty zl}xW$RdEnO$ySDy?~)E16|Bs-aWk#PdZSkkmjZ!v1%!eTQjW62Ehu6L7S=1Nb6^H- z?Dsl1jJvB}If#4oS?_6wd4Su3YfZ!WCU3R52c8C=jpKm|-a0ceBODB2ir{Lia=I{y zg;F%=;e(!Ban)7;ec_`j9gKU?3H={eOc!BqwNq5;=?=RJKr_*RTlK{rR9*VKFRS?$ z>gKQ(@FRULj=p1WrpPQK+9n;`#I`|vLJEu8zQ{}gF@255#jJ^niqm&P!XvuT+`Ww% zRU;k%p95XWwI;W5aqo{0$n5-=t5S`s(Z@4gI@6X*!o2rG|13 zXVq%pzxy}4wZF{mwR6LHXxwmmUmseB3*Ebg-BNABE)8|F622n;p1x>#dk=l`jEdPm zs<@S*GcN4B|j<-&2ifr`#R#65YVhe%Z*p8Q%>%YkV!BYM%)~rQZey1PZ zE%zI?Gje~V-mrwF*mrMW?L%xE9#ButRk&FFzO~D4G8(e&*y3MBZn(A0qY25GO#&9h zAUUxg!QfYQs$96Ii z)AjqVMRAv9h9BC-LWXp!PJ6So?V1_1?(yc%+8iebPkK~Zg>_4bo%onssu9}~xfDC` zatK?qKegR0kK(IAu0~b-=oVeGVI}WM{_(zc^X6_;1~yNvu@suO-kY#@DEO0QQPX3n zv`leWOnzf`$*feC_3wA(|7w4{^B%zeeTLB;IHtSB$_WDy^#95!r=yT=6YGT?1OHYr M);HICp@WP6FAsxbmH+?% diff --git a/wp/wp-content/plugins/facetwp/assets/images/icon-search.png b/wp/wp-content/plugins/facetwp/assets/images/icon-search.png deleted file mode 100644 index 148264d86f81df323fdddb2dabaacc0d5b5401ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4232 zcmcgvS3r|nm;Jsp0!ip4^s02EOA`VD2BeD;6eXxg5u~XEyvRqnG`R?f6zNJ8E+PWL zl`EkN0i}wFlwbptD-n?rL-OaJnTMIDnWtF~XYIYt+WVY+-cGuk%P}0E6dwQpI0vGw z2LQmhAq+snxztyqGQ=e>Hz!X!F8?0^`)>gMHw1n8X3p&^bJfG;1R$uOYejH%^CgFc z$3wTX%PSr=cT>m4m*^V|n}*IU01)VRu(kH2%&ouU&7U(9M2_bs&l!`*%@zu8*l+fJ z+_C&VJdXGX;x=?D8?qmk&5QC}Gs(La*S_@Kb^BS=*@Dz0CF0of1Iu@1<?at zXtO$gO~8sY?6YVj!Nz0WSy=-G%9n+3$Lf0wJ2K`Xs(hTYdp~W2*;;mGc0_!<(!rBE z%i1?>OnzSVNrhw~cEi-nCD~lK%kgJPwp=B&GA5r2q;OnGJe!rWszZt*l*uBIYX>QD z%s#Ecg5HQ;nRDsoN7xa#k3^D7*?=+QfYIjXlqRFW)iBZhs;$F=h3(RmC}mW_A`q>v;Xd>jy@Y`O!7(os7kbzaGF7>*8zIoUf+xlWNl2SW%b? zxOkwF4rd;=3ivwDe=0u%$TISoOGZeWr3vuaiq%v)Eb<;DN8}6V{;i6NG>m?a?AIj+ zzO40eaBQlJ>gk^SFkNCiPw3OEucn&YegAkDcjNw!?e+3rOI^O-I4gQAq`eQLly0>! z`^M9ak&zy^AP5|p;mv?n1<^-521NFEU)YdP-Bq(w6>3t!WLG{6^kP#&ZsNSyu6gls z(#`W$`MKBq4&A9)T}}VnN6im;LlR*}90?MT|$W-OLlMP3sR{0NJC# zK7QE3pfSeb;DO}YW!K)lXxN!+kb#TZz@oFP+pm)z|>THFhD$Hhog?~tw z|F6n_d+|I$U1=OQe`YHFdr)H-Po}p$;N>`T*Y~1FA>hvOE?$zMd`Cl*2U6y5@&`u% zc`*uAYFEUUdRdMucX`A+t&%vyjLR7%r>Oaseu7RH#2R%09eIRi#+x(*CFY=oN2>-F zxP0+KtrI_#)iM!NWj%bDsiG!*o~9@$&hHBOsz;i@ux$A&e+DStVT0ikd14W+Y;>I< zXyu{Ojm}I1iaL|E+3 z#T=xztxz=w`u$)&=33X3CInYqB%i7N#e3QUcBGaVC6Y%1pOTPb1Md@$K>=$jF9@k{ z@-1bmyNZSkz|d@QAJcAFq>ks$2yxi`LZ2PgR337H+WMb2US${*mAYH zI3H8MMeucJLOz_1bt#oz<)%VyF_)y}sOt9qr>GbahKl@IJ@R?UafhxZeDegVt4Y11 zJ_G2X`X<)kb@k9!?-kVGn;-M9TQrp6$@L%x|5K*8OsYBg_B~pVB2r7SuJh>6gGjCA z>S|Ssag>^}##*^^2jsQl@e|5<&gkKrO}=@@ULZQ4j_* zyp2>qTPU(CacW8kjO_Qz1titKH(3Tl8vk*CFw(8`94n8E0NhY)%Eei2t?DBVt`-M6Tec2 z;Cer`5;=C#c7!9=3|T+%Btx=j3DF&COdXc3$FCv`skD7*(}&c6@&{R`+%UN$)u9XU zR)vf|t6|E^+N4i>fOG}Yy0O$)8EQ%~>%oBYx6*`W6WyBtUD%CNQ_`?N*i9)I0SHa= z!N#=%fyh=6#3LX;5a5bv08{`F|1%NG6mv2_|EDf@2!eyF{d%Io*rSzJB9fS6fDg7l z6?5t(x-mVZM`=6WFv7I;vW6XV4lveUCKE%E6a+N`pI_Xp!UvA?b>MiFD?ar4pBk|I z1+EQ+#kb=Gy`viLoNX>QYtd-+6~j}$*&cA&91Il>g$Q$PGA4bQV zi^cvVS)bIJl&8z<<9ej7f4_G1RYO~zyI zn?n8uu4xhmmypJe_XWG2qb)|`iqsLe-Ws)fSm@E2Xx)Xmmj_XzEvvfj!g};C=KlXo6sJom#7q-F4k<#E<`;$KzPo_#V?a^;yG>c9ZIsdIwa z==o6CPm#CZH-K>aPgmi%Vu*RJl?=EbU>gPGHl5JYWqdg74f>7obGy}m ztno9NuM1z1V+2>dV%rX%wbyBJ)PdfAIB^766v4DRnThx&jF>TwIn{Q#MD9X|M6e!U zuk9ZAR$wczprNQp656N!GK9A4_asA52-@xH{?9J zu=X9~n5ds2^%Cb`L%d@8@cYNDJ6 zr}Hz`^ntoe+cb4R98jbI6~|S~Lg3B7uJjb_s~R#IZn<1JYrX(1EFI^EP!yTW=?O7I z2?#a6jCD;ZwY8Z84e2^wyB_%T1Q9@r?vDO4i&Mc7;Jwj^u#YX_{BQ#N^BiBMVY(Ln z3|IknxAcjWWNO|04G5%)>RVVB(3Bjc0YkD>fJNWH(0g4~ZmfTx%x}owZ=DB1b-eb(C00?rCp?GtVZR*$sl8g6^8(7%Lp50aVLUyEn4_(jB+sI+#ZtO01k~Cq1NuSOAK^Of9gOukzs)qEt z7x|;6PTG~p8yEkvXa1%5rQ+DFhkbvbad@j9^|7bIha3dn2S7)B!XJ!~&{_rUrG3yp z9MwCj=>^K3QQ{(tP~6TZ$?atE^mplq!}M|W2Jui_b?YgWR`A!iMFSsHegWGKCY|kR zWzn}ly&qmrB*RA?LdU2jm6;7fydi|S{Y~sj(#S)0uN2vZ_ABKxpV9O|R?w_<{EEpx zm9T<1P0GmI9y5)E$@$|EhIFq<@tmpJ$bwuH>(zwfr7R^Icv)|LTK-(dI8^KKHSLKN z4sAW7Y&I`1R0$^N9Mn>G%;&WBZt2}xBDKn`OHYSVC2<<`wSq#FH~_|X;qc|fPl zbd`o4Dxs!@wkxD+9ewfEbZp&sLF z#pcho_YsCcbmmT2IV5)1WuC`@?-OP?!uVP+M zCvcVR$g7n#$Pyc8428cW_GEa7O_XN})ai|eM$kgmh9 zuz8pe8LmJ@5g;4{SfN$u6QxJBF&#{YT@;NUu!fG4VK<*fzfi;W>EeI4JM8YnE9u18 z-|#lOre3M&eLil3k8|g-zo{Pj6?A;f4A@b;1|@<8`WDD8i8VkFtBV)}_6(>v0B#82 z72;7t<=|!j#F8X)#(i`!Hb}qI}Hsr*A0d#{M4*&oF diff --git a/wp/wp-content/plugins/facetwp/assets/images/loading.png b/wp/wp-content/plugins/facetwp/assets/images/loading.png deleted file mode 100644 index 39a59963e25a8d68a5df2d484338a9c0ebd9e2bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4337 zcmcJOX*kq@x5s}ozuB^mB{9g5eG4OG$&j6F*|)~NRhF!gnX#6LC|c}Wl&me1%t%N? zN=1=DL|MiXW1G3%|C{^VSNGNZzWJW>{ha4K=gqlhYi-KOhG7E$fYaQ}$Q}To|4Jx; z0{>ZejpW;Z=4@-_VEoVjKg3m-f8pO=ktloXvj7^aqK~(+Jx2%&Cz5hr6*+nRelo1`YSHw^L_hx?j4#fXOCqN8ts z(*+|o9i?>&xFW=MS<7XbZ`9}0ydHx(b`LpD-rm;Ib<_T@Zp?9nVzV;SF-qSOD- zc=JMN`BtA(Xg_U;(`Wxhnlt8pKh~t4EKr3OZ4$*nZTk2ova?9z7z1`QI`NF<<3n6q zK|Akic*DBE{>Yhu&^7gaYF~~oR-?s@VWPshWcfT%6Fdrk*^lU~le~fnbLYIj=$6V7JEj}>yQPd@z>>;CM@&Zy{#_fqh_;mAtrvsd5O%+12zEb6tE9Z8&5qBiH!C14yOF`BmlIDmx zb3`&z=qu?+E1hk~qFsJ+!%eD&@;obD`HV(~y^O4U2!VL~OrgxU8l7@cUN-e3>LBV6Jx&ZBZ?q5)~4y5NWN(5l3_s08N9$vWU&#@V@U_wnHMe9 zmxgWM8vPQY)VQD3OL)}0fAIbM!q(=}6hK~EMJmX`(tK@Fs9PB?3i(lM>laBCz}%Ae zm!INo2?V>FIjn-$66ZHL>HS0pevuQGHL%%RednBQbJ>op8sa&a-C|r2K3nDpk*Pnf zC5%NRGXIo-($Dsl(yVpIGp@nTo@Hmk6VNI)|xjX!cm?-$7QSiC4> z9dnqqY0|j}OUG}--t&>(C9o7c&hP$0#u&zik>ZaN4Mr4_Jy3E0Ohn+vuFeQWdxo+W|Lt+RT}~ChQnVkIF3v{&>KsVg)NBTJxZ9fTlud zqn0gVaC;RC53!vl1BtjrjQJr&6u#7tUS0v90c*|l-)J@(9@tO6a?6Tf0z`>>`T9ZE z{2);tU?vek0w=CV!*E#QF95+fF$~$Fh8fZn;0u2clEGiwVQpRYN#5!uih$?%o73g# zAgvL8t}ELLHhN#;6*6fZarL!$crUHn3RYGQd+5w92oIu4=s@L>Bn$b`L`f`?G$@{% ztalrvUX?!y{n!s7^pr0kPN-pVEd*7pH$j27 z{-c6tpLCFV5kc=8)Sw(}T)eX@T7wqAMYjzKnrX1ea2d<{Y~zvP^J z8&akRwFu*U3xxY$@&egGYT;4`;$j>yB+?K{cn!NnRR75#>M97Vc$9?Fu0v?n(MxH5 zmjR|x-@r`v012v2v1L>plEufgLfNEqVHwVvP2SK$dKh1#h^cxRVx&$`{Ve=&`Oa9E zFvd1@DH37y1I(SKe}Lc=$~YcnaE-IpTvE;N5092&+2hP38+(pyguAF#$xc< z-43WzS`hUOpmI_-5*kzjaS|;ypGOcpGO;(HSCdD_U+$9l3HKz02)6`oq6JzUO zENf_GX-Q?ViYrUv@!G>$5z?UthOwdvdr%D$F`zrX_$u&if?KO{!tgaBh%Coq60MVg z%RXigyb>!=(1q-_fPR|=Y2@;!yAjem81Z89(cFB7A956KFa=6ZU z%)8qVJF2jB&$zix?P2N9c+E23fX}uK!r>^b+2Fi;`YI{zT{RlQ{ZQd)Z-=7N!PF;R z5AXGmWV{H%OD1>YXDp2PtemP{38o!~1ROo@a;y|iF3Ic=;3x1+j|K%W$(&8!-UsWM zK`}Iy!GXgvR6RQi{|~NlcnAH-;5*)BU^S~IA9rmT7#5l5UVkG@yW>K@AKO4M<{s-OzR69~ zq$*9jjm>i|-2A)l9}jB#b!g){AO{f#YObl8WvA0CKfEun(x*yYs{69^nsCQ*%f4GE z|07?_d1$aesM;k1uK2=%o&W)(eI7O^-%1~N+idhJU`tnseXZAJGd$3tAzj;7$^Ck< zVrBv-5GeHOCSq6OFxP8?2=K}aYV~B>VEWZzAlyPo;&$0E&}1f*o^SDid(qjZGX%rn ztvv!ncD1LZla9>GPpyutq;xbn?`#_zlK6b8Lp|@JX_8>AL#m7+={YY=@li)Unx+WU zOQe#1nEgd;Af;e!Y=D^DparUS$gPzd#|sU?{q8yGkSiAI6TNeG`<$knDEVRPx7C#z zb$ICd!z-;shk2+xZ~0xd+k;N9 zSVIy1HR;wqZo)^<9luoLBkF{WVp9et?8O8;xPD+ecrSeY13_Yn5RWCdeP2wDu{9i9 z|9MR$f~GVRx{xUJs-_?oC7o>LxZ}8V5a#B4%U_7D++5;B0+(G7iqQzzg9DMX zYkqOkw6)bjWf4mxHN>ES<1xXXE)HzX~jWeW?>+2qz8Y%gzF$o!eKB|H9 z*IBMR!&>yM+;|Lr)P4MUoSK&9euCZoTs5%f1C4vAHe2>CWOYEp18+XS5$F7DQQA!> zfI7O?__;t3N#`n;o1Ge%H*wJwyzGj>vx-PBsgLro(m|R5)awo8j`LE1hz?2i`KR}l zaD;n|=OOp2;Bji|2K&aUV2lVc@D|$%P&u7$_#A3 z$v_rEI7^Q(Z2Y-6jHaFI@BHKovmChXE zLbV9wek!JK?-zVK-fl#aD?2XW!8|L<&DmagUSeN}I;U?c1&lp%D$#LhllisI@*JIw z=;`_sN<=ENe)V(OELhJh&WM>Xb$71h)vaaCH1+pzk0vS&-KpxsEq#_HzHO$0BIj}# zp!r(Se3jnyQwfyq1FD|il2U<>H z=x18=N-y0;qCvIzp}cb8um_`xS*6cfW9(3j9j7no2~!pqM1((W3kU`yn*;{6!fw;*Uyg4RW0PZR6W+kOVl~l zN{WEF#q-F|eK&{~)*kn1zr#H`rN1D#+FY+O_i^e1?-R|H-K39ek9+HP^Ax6HM^1*R zg3ePuLp#r2O9oH+%14)&bS#AB7@50$i97B7Aoz_vt2E}fARI4!x2RaBQ%Y-R5f#5|?Y=Er~N8jZ3&$M<;BRm{{wH90mTj7 - - - - diff --git a/wp/wp-content/plugins/facetwp/assets/images/powered-by-google.png b/wp/wp-content/plugins/facetwp/assets/images/powered-by-google.png deleted file mode 100644 index 64b2cab5aada8be6a52cd2a5534768d312df591e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6898 zcmV5S0f%d8$J zkY=sLpm;#Q0P>lga@K)VIKtat(h z3;+QuF(VXh%P3x4({_tN*@1uoAYdh8`W<**Q)v2}ZonixbPGEy24x2V27rK-l!Y5B zGFWZ+lglsdEe2%^0tWxsI}7MGj;)VhTb4{=X68ab5RNR#j$1>}4i_AzGPh2h#+b*< z%*<%}F*7q`3@I5xPUG)?zaE{Vv+vGoW~H?Yx##>g?^V*Sylc;YF3g>)TothAg+=PR zekzx@cfSeHRbG5t6|k#Z<*I-^=PgouZn`q}b*lRsK+i`WUmuv-5%HIF!~%QUqQS#$ z(ZHULXlU)(8$!bXxy6+)UdxA5=&{;yFEpj6=|%jkmAh%PAql%HYO1@5R4YwTGHh$k!T zRa=pIQKmz{o+$JWZ;u4-#r^)J@_EGk|L%we8d=}~>A(jqU?ac+uoNr=lYocPYa_r+ za6MQ8=7ACP!nO=B1}p^2z+x~9@Kz-#zD$ALu&-*YC&rSw`Bmlo;#d)0nC*z zQ$9rLrzWZty(1G5I*6^DOwlwk?5T5H~Ma3+@G{1!}++Fq)j(P;jHoHJArLF&Ikr zHX3ZRFjiMQh0p2^h+g5dQ#5|=67UE(t>AXBN>gaY+B`=OSPAa5oWBW_k-ZHEW#EM3 zJ2ru1AOy0=xs3;!d+?|L^_mE?YSz*fsMTS4YFMEKoX z1dNTV3>CczcLRE^!(k{0*Y9}{bWAkx?mylzCmWD17g~Jt`kFnz*B35P$li?*U^XCK z*3@^6#X|7!IBT5T{XMq@jPGN6H1K|>&jR7zxA%v`S%6gVfrLLkwkhBNa9V?UPy{kb z-!ef=9xApwN_sZm^0`KkZ{x|Vlm|a04`~d}vlP#9EV#?& z+)Hh~=Q>bt@ICJb)5**{pae7-Tw@Ags~bQ8i-AlB-*p_1)Lv^S@6E2#*0$aW)!SgqePaJQ$i1__D5uU1;?!LMX697A7;0 zEBmsph!xdzkCUI5K5hzFe`Tcy_wkddK8yBP;H`F^7#}17n;{Lb8tl=Wg=d2*aM~ez zZT`@=Ti$z&^z4{$od%FY$!(+Ma|dliVXMQRxe0^}1#A>})aINuiszLn46eE~g2kj~ zK0zpSr~}hM^#BUk8nDa3cWnUIk!(|i_lHcvy22#0iX57pKXG2b5w7bEq;YWl1|W(5 zg#BaMBf)wmTw>z)0=Ge56BMWp2om)`iGq;LEQd}u;LdkwPbw+ zxv_8H|M%Jpndj|*?BK9rQqQZlrvtPiuk~5-_2%KUj;k%-qjZA5G{AQcd=52=I* zV)cDgAV&WuxAhsyo>`3~W&h?mkjmR1u1ffNaJ6D3=A(eE}2laq~ci zApX!4oH}y{8ibA>Aru&_hHT^z7Dj;s9D67Bdrhq|&KCgHl-+5}ynvsB1a3PIC_}&S~ z3h}|l8@iT~+YBM^bV@PEjt5PG_c580+Z18O-KZ$i*e!U4c6Qiu&L+#C>NCil9aU7T zJ!E;`Bbvo8*9-ToL?vJXkAYbRA-xkq9%ncuw~%n{D9JWLnE0HO3tz;EK*Jyk*glOs zl}89=Gg~B2RQTP%XOr46!7E)(YI9t~fsW)i12QD70>=3sKvocb`nc>p`9G{%QP>_1 zPQW;LMv)KO4#*0;sE;d(F+QwaQTR2Q08i|Ube_vC-tB;_@ZM|E{edWbfp^XZlnidh z?3REb6gW#!<@wL2)~^@^ND0L4Suf1rCxjgPc(MT~5k9B{Y$fU20^#%Pfz@^iB59KJ zpD7IH+kn*;3xl|aWE*NZ=RwBu`Rjpb!h6>Ns|5wm*5v0d6$X2+rhv^SeOn_;5GIno zRR|(2d6(tF{g_SqwsMdJ>|WqAC{j8s+|OYelb{BTuy;)G=DonN@s7!gty5kD$dquy zQ*)53`IIT5hk>d&K#B0$A}Qq57V$sLc`-n`U{UQZMgHY8fD-9%q2W@wJn~ylb6yOP zE|;6VyF?*u$@&bSL|C8->U-LSu;F?3%mC@Yi=BB38#e?Dxv%@A`^fhfkOYSu@wvBQ z5^>J9pd%W(A5bEEkOWK}hgaJkYY545jvQgexPc5!$j?X~QjRc7pQSk%u4J@4IQeH9 z1*~>NKA*Pb3qQ|74FS7_%4Jl-e0c3AutTceS(O798e$=|o$OK**;fem$hA#tG+<3L9<}3Kn!c zs9}udztt*cx7P~7FAYvjjt4?@vcE(_z^);E8zy{yDw*3oNy3OTgzHQua|;fzfZgXX zzqH?SopoPol0*V7~s9KS`DgtCov*&Hn`7Sj3<^qZnt?xY~-<#e|fK1?y8*T^~7ikC+ ziZ20TxEO;wq=-u%gs>rpf;$QWVL2QeKgdN0rj{w>!a_D-usg}22~~eZz-j@@d+t$q zHcg8B)lm&GsL)t*Hb+skQfq=Bf_pUtY$)m5BA34Bt|Vc~YKOuwbbtk{oJ>vrd21Cv z?-=3UEg;!$l|A~@4Y`z`$g}*e_W*Jq)m~&>6@U^!=;@7OxT&0Qw|CBg%vGypnn(#y?$71f9(fa0Kf@SUQ7Ic(C)&3;7zLnB~7aZniZ zD(TtqqGmv*;9mbR-2$fUIjOmT9OAW6t{m0x#BqNbg=LdXD5ad7TZLw>=RlJ3{(UwA zH%h3i%mQ(nEF}0PTkDcAJfI<9CRXUu_q;vHv)e_^?fwB2ujs`_-cP~2jj zbQM|Na~sG=>xP!KJx?fdE#D8<^k)HbgMzx=jfxWbZv(QR^uW$WS4;+EO3EHsYwlz~ zhUj}>_1#TktFOlMvjCX_kN1oVA;j}W?V_-N8KK*kS;Dm1@PUNIs^%sO!bY3dwvcn% zE_48qY=t=6mpwEoe|5WYKI}8K#Ulk?v2NWgrkBABX z!eB8VQ}Ee$i02D0odYNiiY^`z1*h3l49J)k&pV{^o&Q?)96)g}fjBM-7`9FUWJ0*+ z$r0}4z=D6$D$0lif7l)k-ullKD{=ujg%2c@@Me-TyUQSicq=(Hp*(pr$u?A8(3kbh2S%B>t zA%EzhG#k9391LcEwh^%h0Hq7AJcKv!dFfi5r%~-?)e#GoDh9~c0WyIXEK6&_5Yp^!}Kx~?B46G?8)D+&)9#9I69DTwdbd{$mO>#qQ0g`4v#I&o-Ump8wJ5S~@^L#zN~ zrJ%n1jf!OkpR)EpRKcB9-0H-^69;*5dGMJt1$u1-XI zqxbUqEzQNw87y49FgZ!@!zXmg!#iVvpv_hsZ?i6-wQ?rBdq5xS2S^2SS~F0X@jFHF#vfI^6tRA59y*m=R)rF|Q#~LR+~}7(cevRLk?*@| zM}W>qU_KxfELPY<>=;DwNzJfP-n)d)>4@lKU?cFjAYf9-_cnv?St1mxND~ylaGlMX z*YSXZgVai@(V*qkcyLNyoUCP);Is{sfa}H{5CrOjnmr5QO?AH+UG0xV8hT0~ZmTg^ zu8lPGZYZehzMVTpNFDE`keEpWVcvvNy+Nh_XL$WaYaWZ+P;u2EJcFl{pGA%hkP6;} z(q>zfpMe{#c`R;2#Z`y!yq>ZVz*0aekQaQVO*i@ym$l# zxj%z`B?u8h%vyPX;{J|Jn}Eq7*T)oFszkv=-~}Eq8U(@Zau^z~t8Fr9P;A4p7K{g3 zzzZgW^%l=}Km|--Ke!$Y1(_fpEC9Qe+wz#N*HU?!*U}&uJg7=xjab^ixqnx9s%s%2 zQ+OQ_hp5bV{goT|irc6NaJwhow9N#7Pb9L!HTtX?b@y*~Z?+rz@=E6LoZ2$gAS(B&@_aR@HEbe$t(Gvzdve`5zzdn@IryF34|2(wWq^l-3f4h4u0BLq@qO~2_&D$bq3Qw#HJLaDv$@YK>JJHRjM54(YDN>@C<_%g z?7jRIUnMFRLsz~_xq#e&s}I>b=1v=24GK})&sB-MU>r~!Jfk8>z_<$wphR%e%w->{ z*l)%Ek;*lIOyT>^UKww4iIV%HSPF5Fz2A=5|Fw4xFm^>j7@pd0gW8R1yXU^zu~|1} z!}8oJZ0y>KQLPmx8yj2uA}(fXOrCL0@_)%U(R$zRT+KfVr)Qb@Dqs$*)&KzdE00Ay%c_N2+#E=z@IY;s!}VR*ulPfBsCfdK$| zDI*s%2mmIq=@=8nM}shW_G9Mj?Z5ldvMKMcJ$z$qe2gWZl;Tzc0{|>lqPDu>#{%SR zON)|{p=AmCWht9-kIdNkzIy-5CUaQwNh$6$FaSVz_K+5;48ZCm(MTTt1xm zkAqkMvLfqe)|`l23rPL%48nA$o{Hj`Qv7aU0002YsdT=vamWp-evOTu%3{zUOyVDF sR~}1JcC9y?A0_R${KSsxJcrbGfIB zV@SrmHCJCwTVx=>`atWO>$DAAi_F%R?fox(Zsx%PC#y`MW&7`Y6}`H~YH;;>e5Kfu zxE6`Z%n489OZoSoTv=U#;m6Q-PFy)na2<@2#8b=vnizdwCDuSf2rpRmO0rv{gn zFt$FMb?Tx?!V6|k6C25ljn5sF{xArio9c3Ri}me3m+<2Yq-R_BsY+;U|9|r>kN4Bk zjq%5(ymgW5?5^Ju7RYO#a7c13ci5dUi`K?z+Gn&FvpWq8-}25CE|fULs3=rk#!p3P^qS!V~*uk{z+^xD0 z{w4Ac7GL`IbdBX+){`<9`(Ch33bPbFzPwdGy;6}`ywdyH@lNd@mslQ^r7S5nX|Civ z-*sK_)Kw#qkXIea->ZXKV|0Rx8oTqWuPmKqc2Oj8spE+zfh zzG9DxPnGeFY{vutJ|rEp5@&QV zp`UWYp8Y-W&6V>+{>mrk+?9=dpD{&$B8$+*BR7?tox%^pYq(nNJ^f$sY&^I`Q$e_Wed1MyX1ly1!?xHXKO4D8<;h zdi$A{vgM_AlG(X=&vg`UM<}LFE_LU=wL~XMHDgLz{puY|VLOzs-qWm8x~b>+P}M!+ zQjgFY4+c%gy+^jFd|S;SG|5ASvwYHwRUCIFU34^J(L82(GC@mnqv&+jOWFP3x##@J zzSc95fu&I*;`TzL08Sp(|MiPluP+dj?B|^BzT`%%>4Aj{GBe?t{Km}-}N=cAk zFvIspuX#?$-xgv!w8iRj2|1!)>y~Dz;x5o#W5t~ z-kNJKCp8%eusk^DsL&--)baZ5v%m8Tvse2lX->@E_unb>{1=5~UYGv9m9X8B;Pb(~ zWY62nEK^E;^_*q@Xna*c@wL+o$3-ht!@O3_nJK8V{u+zAahh7<%p*p-MAD1`vvdl& z&gy*RERJ2&nD8U*FuPNa-i*b!X9?)@{oYmUYmxc-@4^RaTizPnw3Rugm;J$U@>?JI z{mF|~$sb=9BC+I@ul+f$$$w^)hqns8%DVSAVa}azPI-oow|}1vOlqlOdA%t?vYab^ zsZzur*R4XD`vMMG>^!1lWZoAbp>ltdRl>Hz(MdwgTjtAKCpQ{@zAS$~_Flrow*K6r zr?0OkE<6{$`4D^gvwI6S&M3=I{GQ)^)OyW@kNW2eozr>4GGmmYS@e!sB`@8)QSU`J z+wYBw^aZQ@);(94Q19b<{9Bx-z=U^&QgNAaehVHnYd-XN=%n({T}Nfjnf1&Q<3CS& zsG69!vGd2RjVd-#x+k{0YhjfxXI+@RU-;6pr4Al9_n7><`t3*46x-vb|3veabN+lM z%CNw7f>>dk6SK$L?ea(7{C^^H;PTbBDeHgmHrS@|c9?$iV(R=G(KP3;fO?(^>j}|3 zjru(|H*z%?@U%Rf5>=q5=lAIM{w2Z2B6ki=Kk0kn&eKon|9p?^;FpLU+;SJ(A9 z;*rxTp|Y{cXv>KoqK-{2N2tD6H-Yh>9Mb~<5!D5=4m7ir zM5WBWAaNkQ;o?C@hdE}Oj!abR%ikm7YyMHu-~3|Xqn>}k4IKMFDEX&p3CGqi@Jr)s z%Z$|WG2oxKvM7P`u*<(C{~tu{YbaM_)7C!9Z7AT-c12aysJXO|r}K0T+xI5bN7Ld8 zjRG\n

    Which results should be in the listing?

    \n\n
    \n {{ 'Fetch' | i18n }}\n \n \n\n {{ 'and show' | i18n }}\n \n {{ 'per page' | i18n }}\n
    \n\n
    \n {{ 'Sort by' | i18n }}\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 {{ 'Narrow results by' | i18n }}\n
    \n\n
    \n \n \n \n \n \n\n \n\n \n\n \n
    \n Type a value, then press \"Enter\" to add it\n
    \n \n\n \n
    \n\n
    \n {{ 'Add query sort' | i18n }}\n {{ 'Add query filter' | i18n }}\n {{ 'Convert to query args' | i18n }}\n
    \n \n ", - methods: { - addTag: function addTag(newTag, value) { - value.push(newTag); - }, - getPlaceholder: function getPlaceholder(ref) { - var key = ref.key; - - return ('tax/' == key.substr(0, 4)) ? FWP.__('Enter term slugs') : FWP.__('Enter values'); - }, - maybeShowValue: function maybeShowValue(compare) { - return !['EXISTS', 'NOT EXISTS', 'EMPTY', 'NOT EMPTY'].includes(compare); - }, - showCompare: function showCompare(option, ref) { - var key = ref.key; - var type = ref.type; - - if ('tax/' == key.substr(0, 4)) { - if (!['IN', 'NOT IN', 'EXISTS', 'NOT EXISTS'].includes(option)) { - return false; - } - } - else if (['ID', 'post_author', 'post_status', 'post_name'].includes(key)) { - if (option != 'IN' && option != 'NOT IN') { - return false; - } - } - else if ('DATE' == type || 'post_date' == key || 'post_modified' == key) { - if (!['>', '>=', '<', '<='].includes(option)) { - return false; - } - } - else if ('CHAR' == type) { - if (['>', '>=', '<', '<='].includes(option)) { - return false; - } - } - return true; - }, - addSortCriteria: function addSortCriteria() { - this.query_obj.orderby.push({ - key: 'title', - order: 'ASC', - type: 'CHAR' - }); - }, - addFilterCriteria: function addFilterCriteria() { - this.query_obj.filters.push({ - key: 'ID', - value: [], - compare: 'IN', - type: 'CHAR' - }); - }, - deleteSortCriteria: function deleteSortCriteria(index) { - Vue.delete(this.query_obj.orderby, index); - }, - deleteFilterCriteria: function deleteFilterCriteria(index) { - Vue.delete(this.query_obj.filters, index); - } - } - }); - - Vue.component('fselect', { - data: function data() { - return { - prev_key: '' - }; - }, - props: ['row'], - template: "\n \n ", - mounted: function mounted() { - fSelect(this.$el); - }, - /** - * fSelects won't refresh when deleting, so we need to - * manually reload() the changed elements - */ - beforeUpdate: function beforeUpdate() { - this.prev_key = this.$el.getAttribute('data-key'); - }, - updated: function updated() { - if (this.row.key != this.prev_key) { - this.$el.fselect.reload(); - } - } - }); - - /* ================ layout builder ================ */ - - - Vue.component('builder', { - props: { - layout: Object - }, - template: "\n
    \n
    \n

    How should an individual result appear?

    \n
    \n \n \n \n \n
    \n
    \n \n
    \n " - }); - - Vue.component('setting-wrap', { - mixins: [builder_defaults], - props: ['settings', 'name', 'source', 'tab'], - template: "\n
    \n
    \n {{ title }}\n
    \n
    \n
    \n
    \n
    \n ", - computed: { - getSettingComponent: function getSettingComponent() { - return 'setting-' + this.type; - }, - isVisible: function isVisible() { - var ret = true; - var self = this; - - if ('undefined' === typeof this.meta.tab) { - this.meta.tab = 'basic'; - } - - if (this.meta.tab !== this.tab) { - ret = false; - } - else if ('undefined' !== typeof this.meta.v_show) { - ret = false; - this.meta.v_show.forEach(function (cond, index) { - var type = cond.type; - var setting_val = ('source' == type) ? self[type] : self.settings[type]; - var cond_value = cond.value || ''; - var cond_compare = cond.compare || '=='; - var is_match = ('==' == cond_compare) - ? setting_val == cond_value - : setting_val != cond_value; - - if (is_match) { - ret = true; - } - }); - } - - return ret; - } - }, - created: function created() { - this.settings_meta = this.getSettingsMeta(); - this.meta = this.settings_meta[this.name]; - this.type = this.meta.type; - this.title = this.meta.title; - } - }); - - Vue.component('setting-text', { - props: ['settings', 'name', 'meta'], - template: '' - }); - - Vue.component('setting-number', { - props: ['settings', 'name', 'meta'], - template: '' - }); - - Vue.component('setting-textarea', { - props: ['settings', 'name', 'meta'], - template: '' - }); - - Vue.component('setting-slider', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n \n \n
    \n ", - computed: { - fontSizeLabel: function fontSizeLabel() { - var val = this.settings[this.name]; - return (0 === val.size) ? 'none' : val.size + val.unit; - } - } - }); - - Vue.component('setting-color', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n
    \n \n \n
    \n X\n
    ", - mounted: function mounted() { - var self = this; - var $canvas = self.$el.getElementsByClassName('color-canvas')[0]; - var $preview = self.$el.getElementsByClassName('color-preview')[0]; - var $input = self.$el.getElementsByClassName('color-input')[0]; - var $clear = self.$el.getElementsByClassName('color-clear')[0]; - $preview.style.backgroundColor = $input.value; - - var picker = new Picker({ - parent: $canvas, - popup: 'left', - alpha: false, - onDone: function onDone(color) { - var hex = color.hex().substr(0, 7); - self.settings[self.name] = hex; - $preview.style.backgroundColor = hex; - } - }); - - picker.onOpen = function(color) { - picker.setColor($input.value); - }; - - $clear.addEventListener('click', function() { - self.settings[self.name] = ''; - $preview.style.backgroundColor = ''; - }); - } - }); - - Vue.component('setting-link', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n \n \n\n
    \n \n
    \n
    \n \n {{ 'Open in new tab?' | i18n }}\n
    \n
    \n " - }); - - Vue.component('setting-border', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n \n \n\n
    \n
    \n\n \n \n\n
    \n\n \n \n
    \n
    \n " - }); - - Vue.component('setting-checkbox', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n {{ meta.suffix }}\n
    \n " - }); - - Vue.component('setting-select', { - props: ['settings', 'name', 'meta'], - template: "\n \n " - }); - - Vue.component('setting-utrbl', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n
    unit
    \n
    top
    \n
    right
    \n
    bottom
    \n
    left
    \n
    \n " - }); - - Vue.component('setting-text-style', { - props: ['settings', 'name', 'meta'], - template: "\n
    \n \n \n \n \n \n
    \n ", - methods: { - toggleChoice: function toggleChoice(opt, val) { - var old_val = this.settings[this.name][opt]; - - if ('undefined' !== typeof val) { - this.settings[this.name][opt] = (val !== old_val) ? val : ''; - } - else { - this.settings[this.name][opt] = ! old_val; - } - }, - isActive: function isActive(opt, val) { - var new_val = ('undefined' !== typeof val) ? val : true; - return this.settings[this.name][opt] === new_val; - } - } - }); - - Vue.component('builder-settings', { - mixins: [builder_defaults], - props: { - layout: Object - }, - data: function data() { - return { - title: '', - type: 'layout', - settings: this.layout.settings, - source: '', - active_tab: 'basic' - } - }, - template: "\n
    \n

    \n \n {{ settingTitle }}\n

    \n
    \n
    \n {{ 'Basic' | i18n }}\n {{ 'Style' | i18n }}\n
    \n \n \n
    \n
    \n ", - computed: { - settingTitle: function settingTitle() { - return ('' === this.title) ? FWP.__('Settings') : this.title; - }, - settingsFields: function settingsFields() { - return this.getDefaultFields(this.type, this.source); - } - }, - methods: { - uniqueKey: function uniqueKey() { - // method to prevent caching - return Math.floor(Math.random() * 999999); - }, - isActiveTab: function isActiveTab(which) { - return (this.active_tab === which) ? 'active' : ''; - }, - setActiveTab: function setActiveTab(which) { - this.active_tab = which; - } - }, - created: function created() { - var self = this; - - this.$root.$on('edit-layout', function () { - self.title = ''; - self.type = 'layout'; - self.settings = self.mergeSettings(self.layout.settings, self.type); - self.source = ''; - }); - - this.$root.$on('edit-row', function (ref, num) { - var settings = ref.settings; - - self.title = FWP.__('Row') + ' ' + num; - self.type = 'row'; - self.settings = self.mergeSettings(settings, self.type); - self.source = ''; - }); - - this.$root.$on('edit-col', function (ref, num) { - var settings = ref.settings; - - self.title = FWP.__('Column') + ' ' + num; - self.type = 'col'; - self.settings = self.mergeSettings(settings, self.type); - self.source = ''; - }); - - this.$root.$on('edit-item', function (ref) { - var source = ref.source; - var settings = ref.settings; - - self.title = FWP.layout_data[source]; - self.type = 'item'; - self.settings = self.mergeSettings(settings, self.type, source); - self.source = source; - }); - } - }); - - Vue.component('builder-row', { - mixins: [builder_defaults], - props: { - row: Object, - rows: Array, - index: Number, - is_child: Boolean - }, - template: "\n
    \n
    \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n ", - computed: { - classIsChild: function classIsChild() { - return this.is_child ? 'is-child' : 'not-child'; - } - }, - methods: { - addRow: function addRow() { - this.rows.splice(this.index + 1, 0, this.defaultRow()); - - if (1 < this.rows.length) { - this.$root.$emit('edit-row', this.rows[this.index + 1], this.index + 2); - } - else { - this.$root.$emit('edit-layout'); - } - }, - addCol: function addCol() { - var len = this.row.items.push(this.defaultCol()); - this.$root.$emit('edit-col', this.row.items[len - 1], len); - - var grid_str = '1fr '.repeat(this.row.items.length).trim(); - this.row.settings.grid_template_columns = grid_str; - }, - editRow: function editRow() { - this.$root.$emit('edit-row', this.row, this.index + 1); - }, - deleteRow: function deleteRow() { - Vue.delete(this.rows, this.index); - this.$root.$emit('edit-layout'); - - // Add default row - if (this.rows.length < 1) { - if (! this.is_child) { - this.addRow(); - } - } - } - } - }); - - Vue.component('builder-col', { - mixins: [builder_defaults], - props: { - col: Object, - cols: Array, - index: Number - }, - data: function data() { - return { - adding_item: false - } - }, - template: "\n
    \n \n \n
    \n \n \n
    \n
    \n \n
    \n \n \n \n \n
    \n
    \n
    +
    \n
    \n
    \n
    \n
    \n ", - methods: { - addItem: function addItem() { - this.adding_item = ! this.adding_item; - }, - editCol: function editCol() { - this.$root.$emit('edit-col', this.col, this.index + 1); - this.adding_item = false; - }, - deleteCol: function deleteCol() { - // Remove the column - this.cols.splice(this.index, 1); - - // Show the "Layout" settings - this.$root.$emit('edit-layout'); - - // Add default column - if (this.cols.length < 1) { - this.cols.push(this.defaultCol()); - } - - // Adjust the row's `grid_template_columns` string - var grid_str = '1fr '.repeat(this.cols.length).trim(); - this.$parent.row.settings.grid_template_columns = grid_str; - }, - away: function away() { - this.adding_item = false; - } - } - }); - - Vue.component('col-resizer', { - props: { - cols: Array, - index: Number - }, - data: function data() { - return { - isResizing: false - } - }, - template: '
    ', - computed: { - classNames: function classNames() { - return [ - 'resizer', - this.isResizing ? 'is-resizing' : '' - ]; - } - }, - methods: { - onMouseDown: function onMouseDown(ref) { - var this$1$1 = this; - var resizer = ref.target; - var initialPageX = ref.pageX; - ref.pageY; - - if (! resizer.classList.contains('resizer')) { - return; - } - - var self = this; - var pane = resizer.parentElement; - var row_inner = pane.parentElement; - var initialPaneWidth = pane.offsetWidth; - - var resize = function (initialSize, offset) { - if ( offset === void 0 ) offset = 0; - - var containerWidth = row_inner.clientWidth; - var paneWidth = initialSize + offset; - var width = ((paneWidth / containerWidth) * 100).toFixed(1) + '%'; - var gridColumns = this$1$1.$parent.$parent.row.settings.grid_template_columns.split(' '); - - gridColumns[this$1$1.index] = width; - - this$1$1.$parent.$parent.row.settings.grid_template_columns = gridColumns.join(' '); - }; - - // This adds is-resizing class to container - self.isResizing = true; - - var onMouseMove = function (ref) { - var pageX = ref.pageX; - ref.pageY; - - resize(initialPaneWidth, pageX - initialPageX); - }; - - var onMouseUp = function () { - // Run resize one more time to set computed width/height. - resize(pane.clientWidth); - - // This removes is-resizing class to container - self.isResizing = false; - - window.removeEventListener('mousemove', onMouseMove); - window.removeEventListener('mouseup', onMouseUp); - }; - - window.addEventListener('mousemove', onMouseMove); - window.addEventListener('mouseup', onMouseUp); - } - } - }); - - Vue.component('builder-item', { - props: { - item: Object, - items: Array, - index: Number - }, - template: "\n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n ", - methods: { - editItem: function editItem() { - this.$root.$emit('edit-item', this.item); - }, - deleteItem: function deleteItem() { - this.items.splice(this.index, 1); - this.$root.$emit('edit-layout'); - } - } - }); - - Vue.component('popover', { - mixins: [builder_defaults], - props: { - col: Object - }, - data: function data() { - return { - keywords: '' - } - }, - template: "\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n ", - methods: { - handleBlur: function handleBlur(e) { - if (!e.currentTarget.contains(e.relatedTarget)) { - this.$parent.adding_item = false; - } - }, - isMatch: function isMatch(label) { - var bool = ('' == this.keywords) ? true : false; - - if (false === bool) { - var needle = this.keywords.toLowerCase(); - var haystack = label.toLowerCase(); - if (haystack.includes(needle)) { - bool = true; - } - } - - return bool; - }, - saveItem: function saveItem(source) { - if ('row' == source) { - var len = this.col.items.push(this.defaultRow()); - this.$root.$emit('edit-row', this.col.items[len - 1], len); - } - else { - var len$1 = this.col.items.push(this.defaultItem(source)); - this.$root.$emit('edit-item', this.col.items[len$1 - 1]); - } - - this.$parent.adding_item = false; - } - }, - mounted: function mounted() { - this.$refs.keywords.focus(); - } - }); - - - /* ================ facets / templates ================ */ - - - Vue.component('facets', { - props: ['facets'], - template: "\n \n \n
    \n
    \n {{ facet.label }}\n \n
    \n
    {{ facet.name }}
    \n
    {{ facet.type }}
    \n
    \n
    {{ getRowCount(facet.name) }}
    \n
    \n
    \n
    \n
    \n
    Copy shortcode
    \n
    Duplicate
    \n
    Delete
    \n
    \n
    \n
    \n \n
    \n ", - methods: { - getSource: function getSource(source) { - return FWP.layout_data[source] || '-'; - }, - getRowCount: function getRowCount(facet_name) { - if (this.$root.is_indexing) { - return '...'; - } - return this.$root.row_counts[facet_name] || '-'; - } - } - }); - - Vue.component('templates', { - props: ['templates'], - template: "\n \n \n
    \n
    \n {{ template.label }}\n \n
    \n
    {{ template.name }}
    \n
    {{ getDisplayMode(index) }}
    \n
    {{ getPostTypes(index) }}
    \n
    \n
    \n
    \n
    \n
    Copy shortcode
    \n
    Duplicate
    \n
    Delete
    \n
    \n
    \n
    \n \n
    \n ", - methods: { - getDisplayMode: function getDisplayMode(index) { - var template = this.templates[index]; - return ('undefined' !== typeof template.modes) ? template.modes.display : 'advanced'; - }, - getPostTypes: function getPostTypes(index) { - var template = this.templates[index]; - if ('undefined' !== typeof template.modes) { - if ('visual' == template.modes.query) { - var post_types = template.query_obj.post_type; - if (0 === post_types.length) { - return ''; - } - else { - return post_types.map(function (type) { return type.label; }).join(', '); - } - } - } - return ''; - } - } - }); - - Vue.component('facet-edit', { - data: function data() { - return { - facet: {} - } - }, - created: function created() { - this.facet = this.$root.editing; - }, - methods: { - setName: function setName(e) { - this.facet.name = this.$root.sanitizeName(e.target.innerHTML); - }, - unlock: function unlock() { - Vue.delete(this.facet, '_code'); - } - }, - template: "\n
    \n
    \n This facet is registered in code. Click to allow edits:\n \n
    \n
    \n
    \n
    {{ 'Label' | i18n }}
    \n
    \n \n \n \n {{ 'Copy shortcode' | i18n }}\n \n
    \n
    \n
    \n
    {{ 'Facet type' | i18n }}
    \n
    \n \n \n
    \n
    \n
    \n
    {{ 'Data source' | i18n }}
    \n
    \n \n
    \n
    \n \n
    \n
    \n " - }); - - Vue.component('template-edit', { - mixins: [builder_defaults], - data: function data() { - return { - template: {}, - tab: 'display' - } - }, - created: function created() { - this.template = this.$root.editing; - - // Set defaults for the layout builder - if (! this.template.layout) { - Vue.set(this.template, 'layout', this.defaultLayout()); - } - - // Set defaults for the query builder - if (! this.template.query_obj) { - Vue.set(this.template, 'query_obj', { - post_type: [], - posts_per_page: 10, - orderby: [], - filters: [] - }); - } - - // Set the modes - if (! this.template.modes) { - Vue.set(this.template, 'modes', { - display: ('' !== this.template.template) ? 'advanced' : 'visual', - query: ('' !== this.template.query) ? 'advanced' : 'visual' - }); - } - }, - methods: { - setName: function setName(e) { - this.template.name = this.$root.sanitizeName(e.target.innerHTML); - }, - isMode: function isMode(mode) { - return this.template.modes[this.tab] === mode; - }, - switchMode: function switchMode() { - var now = this.template.modes[this.tab]; - this.template.modes[this.tab] = ('visual' === now) ? 'advanced' : 'visual'; - }, - unlock: function unlock() { - Vue.delete(this.template, '_code'); - } - }, - template: "\n
    \n
    \n This template is registered in code. Click to allow edits:\n \n
    \n
    \n
    \n \n \n \n {{ 'Copy shortcode' | i18n }}\n \n
    \n\n \n\n
    \n {{ 'Display' | i18n }}\n {{ 'Query' | i18n }}\n
    \n\n
    \n
    \n \n
    \n
    \n

    {{ 'Display Code' | i18n }} {{ 'Help' | i18n }}

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

    {{ 'Query Arguments' | i18n }} {{ 'Help' | i18n }}

    \n \n
    \n
    \n
    \n
    \n " - }); - - Vue.component('facet-types', { - props: ['facet', 'selected', 'types'], - template: "\n \n " - }); - - Vue.component('facet-settings', { - props: ['facet'], - template: '', - methods: { - getFields: function getFields(aliases) { - var output = []; - $.each(aliases, function(name) { - output = output.concat(FWP.facet_fields[name].names); - }); - return output; - } - }, - computed: { - // dynamic component so the data bindings (e.g. v-model) get compiled - dynComponent: function dynComponent() { - return { - template: '
    ' + this.settingsHtml + '
    ', - props: ['facet'] - } - }, - settingsHtml: function settingsHtml() { - var self = this; - var facet_obj = FWP.facet_types[self.facet.type]; - var aliases = facet_obj.fields; - - // Support for settings_html() in < 3.9 - if ('undefined' === typeof aliases) { - if ('undefined' !== typeof FWP.clone[self.facet.type]) { - FWP.facet_fields[self.facet.type + '_fields'] = { - names: [], - html: FWP.clone[self.facet.type] - }; - - var $html = $(FWP.clone[self.facet.type]); - $.each($html.nodes[0].children, function(chunk) { - $(chunk).find('input, textarea, select, [setting-name]').each(function() { - var $el = $(this); - var setting_name = $el.attr('setting-name'); - - if (null === setting_name) { - setting_name = $el.attr('class').split(' ')[0].replace(/-/g, '_').substr(6); - } - - FWP.facet_fields[self.facet.type + '_fields'].names.push(setting_name); - }); - }); - - aliases = [self.facet.type + '_fields']; - } - } - - // Get the actual fields by parsing the aliases (groups) - var fields = self.getFields(aliases); - var html = ''; - - // Add UI-dependant fields - if ('undefined' !== typeof facet_obj.ui_fields) { - if ('undefined' !== typeof self.facet.ui_type && '' != self.facet.ui_type) { - var ui_fields = facet_obj.ui_fields[self.facet.ui_type]; - aliases = aliases.concat(ui_fields); - fields = fields.concat(this.getFields(ui_fields)); - } - } - - var combined = ['label', 'name', 'type', 'source', '_code'].concat(fields); - - // Remove irrelevant settings - $.each(Object.keys(self.facet), function(setting_name) { - if (-1 == combined.indexOf(setting_name)) { - Vue.delete(self.facet, setting_name); - } - }); - - // Add new settings - $.each(aliases, function(alias_name) { - var $parsed = $(FWP.facet_fields[alias_name].html); - - $.each(FWP.facet_fields[alias_name].names, function(setting_name) { - var name_dashed = setting_name.replace(/_/g, '-'); - var $input = $parsed.find('.facet-' + name_dashed); - var val = $input.val(); - - if (0 < $input.len()) { - $input.attr('v-model', 'facet.' + setting_name); - - if ('undefined' === typeof self.facet[setting_name]) { - if ($input.is('[type=checkbox]')) { - val = $input.nodes[0].checked ? 'yes' : 'no'; - } - if ('[]' === val) { - val = []; - } - } - else { - val = self.facet[setting_name]; - Vue.delete(self.facet, setting_name); - } - - Vue.set(self.facet, setting_name, val); - } - }); - - // Update the documentFragment HTML to include the "v-model" - $.each($parsed.nodes[0].children, function(el) { - html += el.outerHTML; - }); - }); - - return html; - } - }, - watch: { - 'facet.type': function(val) { - if ('search' == val || 'pager' == val || 'reset' == val || 'sort' == val) { - Vue.delete(this.facet, 'source'); - } - } - } - }); - - Vue.component('data-sources', { - props: { - facet: Object, - settingName: { - type: String, - default: 'source' - } - }, - template: "\n \n ", - computed: { - className: function className() { - return 'facet-' + this.settingName.replace(/_/g, '-'); - } - }, - mounted: function mounted() { - fSelect(this.$el); - } - }); - - Vue.component('facet-names', { - props: { - facet: Object, - setting: String - }, - template: "\n \n ", - computed: { - className: function className() { - return 'facet-' + this.setting.replace(/_/g, '-'); - } - }, - methods: { - bindSelectedClass: function bindSelectedClass(name) { - return this.facet[this.setting].includes(name) ? 'selected' : ''; - } - }, - created: function created() { - if ('undefined' === typeof this.facet[this.setting]) { - this.facet[this.setting] = []; - } - }, - mounted: function mounted() { - fSelect(this.$el, { 'placeholder': 'Choose facets' }); - } - }); - - Vue.component('ui-type', { - props: { - facet: Object - }, - created: function created() { - this.ui_fields = FWP.facet_types[this.facet.type].ui_fields || []; - this.sorted = Object.keys(this.ui_fields).reverse(); - }, - template: "\n \n " - }); - - Vue.component('sort-options', { - props: { - facet: Object - }, - template: "\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 1\">\n
    \n
    \n
    \n 0\">\n \n
    \n
    \n\n
    \n {{ 'Add sort' | i18n }}\n
    \n
    \n ", - methods: { - addSort: function addSort() { - this.facet.sort_options.push({ - label: 'New option', - name: 'new_option', - orderby: [{ - key: 'title', - order: 'ASC', - type: 'CHAR' - }] - }); - }, - addSortField: function addSortField(opts, index) { - opts.splice(index + 1, 0, { - key: 'title', - order: 'ASC', - type: 'CHAR' - }); - }, - moveUp: function moveUp(opts, index) { - opts.splice(index -1, 0, opts.splice(index, 1)[0]); - }, - removeItem: function removeItem(row, index) { - Vue.delete(row, index); - }, - setName: function setName(row, e) { - row.name = this.$root.sanitizeName(e.target.innerHTML); - } - } - }); - - // Vue instance - FWP.vue = new Vue({ - el: '#app', - data: { - app: FWP.data, - editing: {}, - editing_facet: false, - editing_template: false, - row_counts: {}, - active_tab: 'facets', - active_subnav: 'general', - is_support_loaded: false, - is_name_editable: false, - is_rebuild_open: false, - is_indexing: false, - timeout: null - }, - methods: { - addItem: function addItem(type) { - if ('facet' == type) { - var len = this.app.facets.push({ - 'name': 'new_facet', - 'label': 'New Facet', - 'type': 'checkboxes', - 'source': 'post_type' - }); - this.editItem('facet', this.app.facets[len-1]); - } - else { - var len$1 = this.app.templates.push({ - 'name': 'new_template', - 'label': 'New Template', - 'query': '', - 'template': '' - }); - this.editItem('template', this.app.templates[len$1-1]); - } - }, - duplicateItem: function duplicateItem(type, index) { - var facet = this.cloneObj(this.app[type + 's'][index]); - facet.label += ' (copy)'; - facet.name += '_copy'; - - this.app[type + 's'].splice(index+1, 0, facet); - this.editItem(type, facet); - }, - editItem: function editItem(type, data) { - this['editing_' + type] = true; - this.editing = data; - window.scrollTo(0, 0); - }, - doneEditing: function doneEditing() { - this.editing_template = false; - this.editing_facet = false; - this.editing = {}; - }, - tabClick: function tabClick(which) { - this.doneEditing(); - this.active_tab = which; - if ('support' === which) { - this.is_support_loaded = true; - } - }, - getItemLabel: function getItemLabel() { - return this.editing.label; - }, - deleteItem: function deleteItem(type, index) { - this.app[type + 's'].splice(index, 1); - }, - saveChanges: function saveChanges() { - window.setStatus('load', FWP.__('Saving') + '...'); - - var data = JSON.parse(JSON.stringify(FWP.data)); - - // Remove code-based facets and templates - data.facets = data.facets.filter(function (obj) { return 'undefined' === typeof obj['_code']; }); - data.templates = data.templates.filter(function (obj) { return 'undefined' === typeof obj['_code']; }); - - // Settings save hook - data = FWP.hooks.applyFilters('facetwp/save_settings', { - action: 'facetwp_save_settings', - nonce: FWP.nonce, - data: data - }); - - $.post(ajaxurl, data, { - done: function (ref) { - var code = ref.code; - var message = ref.message; - - var code = ('success' == code) ? 'ok' : code; - window.setStatus(code, message); - }, - fail: function (err) { - window.setStatus('error', err); - } - }); - }, - rebuildAction: function rebuildAction() { - this.is_indexing ? this.cancelReindex() : this.rebuildIndex(); - }, - rebuildIndex: function rebuildIndex() { - var self = this; - - if (this.is_indexing) { - return; - } - - this.is_indexing = true; - - $.post(ajaxurl, { action: 'facetwp_rebuild_index', nonce: FWP.nonce }); - window.setStatus('load', FWP.__('Indexing') + '... 0%'); - this.timeout = setTimeout(function () { - self.getProgress(); - }, 5000); - }, - cancelReindex: function cancelReindex() { - var self = this; - - $.post(ajaxurl, { - action: 'facetwp_get_info', - type: 'cancel_reindex', - nonce: FWP.nonce - }, { - done: function (ref) { - var message = ref.message; - - self.is_indexing = false; - clearTimeout(self.timeout); - window.setStatus('error', message); - } - }); - }, - getProgress: function getProgress() { - var self = this; - var isNumeric = function (obj) { return !Array.isArray(obj) && (obj - parseFloat(obj) + 1) >= 0; }; - - $.post(ajaxurl, { - action: 'facetwp_heartbeat', - nonce: FWP.nonce - }, { - done: function (data) { - if ('-1' == data.pct) { - self.is_indexing = false; - - if (data.rows.length < 1) { - window.setStatus('error', FWP.__('The index table is empty')); - } - else { - window.setStatus('ok', FWP.__('Indexing complete')); - - // Update the row counts - $.each(data.rows, function(count, facet_name) { - Vue.set(self.row_counts, facet_name, count); - }); - } - } - else if (isNumeric(data.pct)) { - window.setStatus('load', FWP.__('Indexing') + '... ' + data.pct + '%'); - self.is_indexing = true; - - self.timeout = setTimeout(function () { - self.getProgress(); - }, 5000); - } - else { - window.setStatus('error', data); - self.is_indexing = false; - } - } - }); - }, - getInfo: function getInfo(type, label) { - window.setStatus('load', FWP.__(label) + '...'); - - $.post(ajaxurl, { - action: 'facetwp_get_info', - type: type, - nonce: FWP.nonce - }, { - done: function (ref) { - var message = ref.message; - - window.setStatus('error', message); - } - }); - }, - getQueryArgs: function getQueryArgs(template) { - - template.modes.query = 'advanced'; - template.query = FWP.__('Loading') + '...'; - - $.post(ajaxurl, { - action: 'facetwp_get_query_args', - query_obj: template.query_obj, - nonce: FWP.nonce - }, { - done: function (message) { - var json = JSON.stringify(message, null, 2); - json = "'); - template.query = json; - } - }); - }, - showIndexerStats: function showIndexerStats() { - this.getInfo('indexer_stats', 'Looking'); - }, - searchablePostTypes: function searchablePostTypes() { - this.getInfo('post_types', 'Looking'); - }, - purgeIndexTable: function purgeIndexTable() { - this.getInfo('purge_index_table', 'Purging'); - }, - copyToClipboard: function copyToClipboard(name, type, ref) { - var target = ref.target; - - var $this = $(target); - var $el = $('.facetwp-clipboard'); - var orig_text = $this.text(); - - try { - $el.removeClass('hidden'); - $el.val('[facetwp ' + type + '="' + name + '"]'); - $el.nodes[0].select(); - document.execCommand('copy'); - $el.addClass('hidden'); - $this.text(FWP.__('Copied!')); - } - catch(err) { - $this.text(FWP.__('Press CTRL+C to copy')); - } - - window.setTimeout(function () { - $this.text(orig_text); - }, 2000); - }, - activate: function activate() { - $('.facetwp-activation-status').html(FWP.__('Activating') + '...'); - - $.post(ajaxurl, { - action: 'facetwp_license', - nonce: FWP.nonce, - license: $('.facetwp-license').val() - }, { - done: function (ref) { - var message = ref.message; - - $('.facetwp-activation-status').html(message); - } - }); - }, - isNameEditable: function isNameEditable(ref) { - var name = ref.name; - - this.is_name_editable = ('' == name || 'new_' == name.substr(0, 4)); - }, - maybeEditName: function maybeEditName(item) { - if (this.is_name_editable) { - item.name = this.sanitizeName(item.label); - } - }, - sanitizeName: function sanitizeName(name) { - var val = name.trim().toLowerCase(); - val = val.replace(/[^\w- ]/g, ''); // strip invalid characters - val = val.replace(/[- ]/g, '_'); // replace space and hyphen with underscore - val = val.replace(/[_]{2,}/g, '_'); // strip consecutive underscores - val = ('pager' == val || 'sort' == val || 'labels' == val) ? val + '_' : val; // reserved - return val; - }, - documentClick: function documentClick(ref) { - var target = ref.target; - - var el = target; - - if (! el.classList.contains('btn-caret')) { - this.is_rebuild_open = false; - } - }, - cloneObj: function cloneObj(obj) { - return JSON.parse(JSON.stringify(obj)); - } - }, - computed: { - isEditing: function isEditing() { - return this.editing_facet || this.editing_template; - }, - indexButtonLabel: function indexButtonLabel() { - return this.is_indexing ? FWP.__('Stop indexer') : FWP.__('Re-index'); - } - }, - created: function created() { - document.addEventListener('click', this.documentClick); - }, - mounted: function mounted() { - this.getProgress(); - } - }); - } - - function init_custom_js() { - - window.setStatus = function (code, message) { - $('.facetwp-response').html(message); - $('.facetwp-response-icon').nodes[0].setAttribute('data-status', code); - - if ('error' == code) { - $('.facetwp-response').addClass('visible'); - } - }; - - $().on('click', '.facetwp-settings-section .facetwp-switch', function () { - window.setStatus('error', 'Press "Save changes" to apply'); - }); - - $().on('click', '.facetwp-response-wrap', function () { - $('.facetwp-response').toggleClass('visible'); - }); - - // Export - $().on('click', '.export-submit', function () { - $('.import-code').val(FWP.__('Loading') + '...'); - - $.post(ajaxurl, { - action: 'facetwp_backup', - nonce: FWP.nonce, - action_type: 'export', - items: $('.export-items').val() - }, { - done: function (resp) { - $('.import-code').val(JSON.stringify(resp)); - } - }); - }); - - // Import - $().on('click', '.import-submit', function () { - window.setStatus('load', FWP.__('Importing') + '...'); - - try { - var code = JSON.parse($('.import-code').val()); - - $.post(ajaxurl, { - action: 'facetwp_backup', - nonce: FWP.nonce, - action_type: 'import', - import_code: code, - overwrite: $('.import-overwrite').nodes[0].checked ? 1 : 0 - }, { - dataType: 'text', - done: function (resp) { - window.setStatus('ok', resp); - setTimeout(function () { - window.location.reload(); - }, 1500); - } - }); - } - catch(err) { - window.setStatus('error', 'Invalid JSON'); - } - }); - - // Initialize tooltips - $().on('mouseover', '.facetwp-tooltip', function() { - if (!this.classList.contains('.ftip-enabled')) { - fTip(this, { - content: function (node) { return $(node).find('.facetwp-tooltip-content').html(); } - }).open(); - } - }); - - // fSelect - fSelect('.export-items'); - } - - })(fUtil); - -})(); diff --git a/wp/wp-content/plugins/facetwp/assets/js/dist/front.min.js b/wp/wp-content/plugins/facetwp/assets/js/dist/front.min.js deleted file mode 100644 index f8097d24..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/dist/front.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";var e;window.fUtil=(()=>{class e{constructor(e){if("string"==typeof e||e instanceof String)if(""===(e=e.replace(":selected",":checked")))this.nodes=[];else if(this.isValidSelector(e))this.nodes=Array.from(document.querySelectorAll(e));else{var a=document.createElement("template");a.innerHTML=e,this.nodes=[a.content]}else Array.isArray(e)?this.nodes=e:"object"==typeof e&&e.nodeName?this.nodes=[e]:"function"==typeof e?this.ready(e):e===window?this.nodes=[window]:this.nodes=[document];t.each(t.fn,((e,t)=>{this[t]=e}))}static isset(e){return void 0!==e}static post(e,a,s){(s=Object.assign({},{dataType:"json",contentType:"application/json",headers:{},done:()=>{},fail:()=>{}},s)).headers["Content-Type"]=s.contentType,a="application/json"===s.contentType?JSON.stringify(a):t.toEncoded(a),fetch(e,{method:"POST",headers:s.headers,body:a}).then((e=>e[s.dataType]())).then((e=>s.done(e))).catch((e=>s.fail(e)))}static toEncoded(e,a,s){s=s||[],a=a||"";return Array.isArray(e)?e.length?e.forEach((e=>{t.toEncoded(e,a+"[]",s)})):t.toEncoded("",a,s):"object"==typeof e&&null!==e?Object.keys(e).forEach((n=>{var o=a?a+"["+n+"]":n;t.toEncoded(e[n],o,s)})):s.push(encodeURIComponent(a)+"="+encodeURIComponent(e)),s.join("&")}static forEach(e,t){return"object"==typeof e&&null!==e&&(Array.isArray(e)?e.forEach(((e,a)=>t.bind(e)(e,a))):Object.keys(e).forEach((a=>{var s=e[a];t.bind(s)(s,a)}))),e}isValidSelector(e){try{document.createDocumentFragment().querySelector(e)}catch(e){return!1}return!0}clone(){return t(this.nodes)}len(){return this.nodes.length}each(e){return this.nodes.forEach(((t,a)=>{e.bind(t)(t,a)})),this}ready(e){if("function"==typeof e)return"complete"===document.readyState?e():void document.addEventListener("DOMContentLoaded",e,!1)}addClass(e){return this.each((t=>t.classList.add(e))),this}removeClass(e){return this.each((t=>t.classList.remove(e))),this}hasClass(e){return t.isset(this.nodes.find((t=>t.classList.contains(e))))}toggleClass(e){return this.each((t=>t.classList.toggle(e))),this}is(e){for(let t=0;t{t=t.concat(Array.from(a.querySelectorAll(e)))})),a.nodes=t,a}first(){let e=this.clone();return e.len()&&(e.nodes=this.nodes.slice(0,1)),e}last(){let e=this.clone();return e.len()&&(e.nodes=this.nodes.slice(-1)),e}prev(e){let a=[],s=this.clone();return s.each((s=>{let n=s.previousElementSibling;for(;n&&t.isset(e)&&!n.matches(e);)n=n.previousElementSibling;n&&a.push(n)})),s.nodes=a,s}next(e){let a=[],s=this.clone();return s.each((s=>{let n=s.nextElementSibling;for(;n&&t.isset(e)&&!n.matches(e);)n=n.nextElementSibling;n&&a.push(n)})),s.nodes=a,s}prepend(e){return this.each((t=>t.insertAdjacentHTML("afterbegin",e))),this}append(e){return this.each((t=>t.insertAdjacentHTML("beforeend",e))),this}parents(e){let t=[],a=this.clone();return a.each((a=>{let s=a.parentNode;for(;s&&s!==document;)s.matches(e)&&t.push(s),s=s.parentNode})),a.nodes=[...new Set(t)],a}closest(e){let t=[],a=this.clone();return a.each((a=>{let s=a.closest(e);s&&t.push(s)})),a.nodes=t,a}remove(){return this.each((e=>e.remove())),this}on(e,a,s){if(t.isset(a)){if(!t.isset(s))s=a,a=null;var n=e=>{if(null===a||e.target.matches(a))s.bind(e.target)(e);else if(e.target.closest(a)){var t=e.target.closest(a);s.bind(t)(e)}};return this.each((o=>{t.isset(o._id)||(o._id=t.event.count,t.event.store[t.event.count]=o,t.event.count++);var c=o._id;n._str=s.toString(),t.isset(t.event.map[c])||(t.event.map[c]={}),t.isset(t.event.map[c][e])||(t.event.map[c][e]={}),t.isset(t.event.map[c][e][a])||(t.event.map[c][e][a]=[]);let i=t.event.map[c][e][a].push(n);o.addEventListener(e,t.event.map[c][e][a][i-1])})),this}}off(e,a,s){if(!t.isset(s))s=a,a=null;return this.each((n=>{var o=n._id;t.each(t.event.map[o],((c,i)=>{t.each(c,((c,r)=>{t.each(c,((c,l)=>{e&&i!==e||a&&r!==a||s&&c._str!==s.toString()||(n.removeEventListener(i,t.event.map[o][i][r][l]),delete t.event.map[o][i][r][l])}))}))}))})),this}trigger(e,t){return this.each((a=>a.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0})))),this}attr(e,a){return t.isset(a)?(this.each((t=>t.setAttribute(e,a))),this):this.len()?this.nodes[0].getAttribute(e):null}data(e,a){return t.isset(a)?(this.each((t=>t._fdata[e]=a)),this):this.len()?this.nodes[0]._fdata[e]:null}html(e){return t.isset(e)?(this.each((t=>t.innerHTML=e)),this):this.len()?this.nodes[0].innerHTML:null}text(e){return t.isset(e)?(this.each((t=>t.textContent=e)),this):this.len()?this.nodes[0].textContent:null}val(e){if(t.isset(e))return this.each((t=>t.value=e)),this;if(this.len()){var a=this.nodes[0];return"select"===a.nodeName.toLowerCase()&&a.multiple?[...a.options].filter((e=>e.selected)).map((e=>e.value)):a.value}return null}}var t=t=>new e(t);return t.fn={},t.post=e.post,t.isset=e.isset,t.each=e.forEach,t.toEncoded=e.toEncoded,t.event={map:{},store:[],count:0},t})(),(e=window).FWP=e.FWP||{},e.FWP.hooks=e.FWP.hooks||new function(){function e(e,t,a,s){var n,c,i;if(o[e][t])if(a)if(n=o[e][t],s)for(i=n.length;i--;)(c=n[i]).callback===a&&c.context===s&&n.splice(i,1);else for(i=n.length;i--;)n[i].callback===a&&n.splice(i,1);else o[e][t]=[]}function t(e,t,a,s,n){var c={callback:a,priority:s,context:n},i=o[e][t];i?(i.push(c),i=function(e){for(var t,a,s,n=1,o=e.length;nt.priority;)e[a]=e[a-1],--a;e[a]=t}return e}(i)):i=[c],o[e][t]=i}function a(e,t,a){var s,n,c=o[e][t];if(!c)return"filters"===e&&a[0];if(n=c.length,"filters"===e)for(s=0;s{class t{constructor(){this.import(),this.bindEvents()}import(){"undefined"!=typeof FWP&&e.each(FWP,((e,t)=>this[t]=e))}init(){var t=this;if(this.setDefaults(),00)){var a=t.helper.detectLoop(document.body);if(!a)return;e(a).addClass("facetwp-template")}var s=e(".facetwp-template").first();t.template=s.attr("data-name")?s.attr("data-name"):"wp",s.find(".facetwp-facet").len()>0&&console.error('Facets should not be inside the "facetwp-template" container'),t.hooks.doAction("facetwp/ready"),t.extras.selections&&t.hooks.addAction("facetwp/loaded",(()=>{var a="",s=["pager","reset","sort"];e.each(t.facets,((n,o)=>{if(n.length<1||!e.isset(t.settings.labels[o])||s.includes(t.facet_type[o]))return!0;var c=n,i=e(".facetwp-facet-"+o),r=i.attr("data-ui")||i.attr("data-type");(c=t.hooks.applyFilters("facetwp/selections/"+r,c,{el:i,selected_values:c})).length&&("string"==typeof c?c=[{value:"",label:c}]:e.isset(c[0].label)||(c=[{value:"",label:c[0]}]));var l="";e.each(c,(e=>{l+=''+t.helper.escapeHtml(e.label)+""})),a+='
  • '+t.settings.labels[o]+": "+l+"
  • "})),""!==a&&(a="
      "+a+"
    "),e(".facetwp-selections").html(a)})),t.refresh()}setDefaults(){let t={facets:{},template:null,settings:{},is_reset:!1,is_refresh:!1,is_bfcache:!1,is_hash_click:!1,is_load_more:!1,auto_refresh:!0,soft_refresh:!1,frozen_facets:{},active_facet:null,facet_type:{},loaded:!1,extras:{},paged:1};for(var a in t)e.isset(this[a])||(this[a]=t[a])}refresh(){FWP.is_refresh=!0,FWP.toggleOverlay("on"),FWP.is_reset||FWP.parseFacets(),FWP.loaded||FWP.loadFromHash(),e().trigger("facetwp-refresh"),!FWP.loaded||FWP.is_popstate||FWP.is_load_more||FWP.setHash(),FWP.loaded||FWP.is_bfcache||!e.isset(FWP_JSON.preload_data)?FWP.fetchData():FWP.render(FWP_JSON.preload_data),e.each(FWP.frozen_facets,((e,t)=>{"hard"!==e&&delete FWP.frozen_facets[t]})),FWP.paged=1,FWP.soft_refresh=!1,FWP.is_refresh=!1,FWP.is_reset=!1}autoload(){FWP.auto_refresh&&!FWP.is_refresh&&FWP.refresh()}parseFacets(){FWP.facets={},e(".facetwp-facet").each((function(){var t=e(this),a=t.attr("data-name"),s=t.attr("data-type"),n=t.hasClass("facetwp-ignore");null!==t.attr("data-ui")&&(s=t.attr("data-ui")),FWP.facet_type[a]=s,n||FWP.hooks.doAction("facetwp/refresh/"+s,t,a)}))}buildQueryString(){var t="",a=[],s=window.location.search.replace("?","").split("&");e.each(s,(e=>{0!==e.split("=")[0].indexOf(FWP_JSON.prefix)&&a.push(e)})),a=a.join("&");var n=Object.assign({},FWP.facets);return 1{var t=e.split("=");""!=t[0]&&(FWP_HTTP.get[t[0]]=t[1])}))}loadFromHash(){var t=[],a=window.location.search.replace("?","").split("&");e.each(a,(e=>{0===e.split("=")[0].indexOf(FWP_JSON.prefix)&&t.push(e.replace(FWP_JSON.prefix,""))})),t=t.join("&"),e.each(FWP.facets,((e,t)=>{FWP.facets[t]=[]})),FWP.paged=1,FWP.extras.sort="default",""!==t&&(t=t.split("&"),e.each(t,(t=>{var a=t.split("=")[0],s=t.split("=")[1];if("paged"===a)FWP.paged=s;else if("per_page"===a||"sort"===a)FWP.extras[a]=s;else if(""!==s){var n=e.isset(FWP.facet_type[a])?FWP.facet_type[a]:"";FWP.facets[a]="search"===n||"autocomplete"===n?decodeURIComponent(s):decodeURIComponent(s).split(",")}})))}buildPostData(){return{facets:FWP.facets,frozen_facets:FWP.frozen_facets,http_params:FWP_HTTP,template:FWP.template,extras:FWP.extras,soft_refresh:FWP.soft_refresh?1:0,is_bfcache:FWP.is_bfcache?1:0,first_load:FWP.loaded?0:1,paged:FWP.paged}}fetchData(){var t="wp"===FWP.template?document.URL:FWP_JSON.ajaxurl,a={action:"facetwp_refresh",data:FWP.buildPostData()},s={dataType:"text",done:t=>{try{var a=JSON.parse(t);FWP.render(a)}catch(n){var s=t.indexOf('{"facets');if(-1{console.log(e)}};s=FWP.hooks.applyFilters("facetwp/ajax_settings",s),e.post(t,a,s)}render(t){if(FWP.response=t,"wp"!==FWP.template&&""!==t.template||FWP.loaded||FWP.is_bfcache){o=t.template;if("wp"===FWP.template){var a=e(t.template),s=a.find(".facetwp-template");if(s.len()<1){var n=FWP.helper.detectLoop(a.nodes[0]);n&&(s=e(n).addClass("facetwp-template"))}if(s.len()>0)o=s.html();else o=FWP_JSON.no_results_text}}else var o=!1;!1!==o&&(FWP.hooks.applyFilters("facetwp/template_html",!1,{response:t,html:o})||e(".facetwp-template").html(o)),e.each(t.facets,((t,a)=>{e(".facetwp-facet-"+a).html(t)})),e.isset(t.counts)&&e(".facetwp-counts").html(t.counts),e.isset(t.pager)&&e(".facetwp-pager").html(t.pager),e.isset(t.per_page)&&(e(".facetwp-per-page").html(t.per_page),"default"!==FWP.extras.per_page&&e(".facetwp-per-page-select").val(FWP.extras.per_page)),e.isset(t.sort)&&(e(".facetwp-sort").html(t.sort),e(".facetwp-sort-select").val(FWP.extras.sort)),e.each(t.settings,((e,t)=>{FWP.settings[t]=e})),"function"==typeof WPPlaylistView&&e(".facetwp-template .wp-playlist").each((e=>new WPPlaylistView({el:e}))),e().trigger("facetwp-loaded"),FWP.hooks.doAction("facetwp/loaded"),FWP.toggleOverlay("off"),FWP.active_facet=null,FWP.is_bfcache=!0,FWP.loaded=!0}reset(t){FWP.parseFacets();var a={};"string"==typeof t?a[t]="":Array.isArray(t)?e.each(t,(e=>{a[e]=""})):"object"==typeof t&&t&&(a=t);var s=Object.keys(a).length<1;e.each(FWP.facets,((t,n)=>{var o=e.isset(a[n]),c=Array.isArray(t)?t:[t];if(o&&-1{FWP.is_bfcache&&(FWP.loaded=!1),!FWP.loaded&&!FWP.is_bfcache||FWP.is_refresh||FWP.is_hash_click||(FWP.is_popstate=!0,FWP.refresh(),FWP.is_popstate=!1),FWP.is_hash_click=!1})),e().on("click",'a[href^="#"]',(()=>{FWP.is_hash_click=!0})),e().on("click",".facetwp-selections .facetwp-selection-value",(function(){if(!FWP.is_refresh){var t=e(this).closest("li").attr("data-facet"),a=e(this).attr("data-value");if(""!=a){var s={};s[t]=a,FWP.reset(s)}else FWP.reset(t)}})),e().on("click",".facetwp-page[data-page]",(function(){e(".facetwp-page").removeClass("active"),e(this).addClass("active"),FWP.paged=e(this).attr("data-page"),FWP.soft_refresh=!0,FWP.refresh()}));var t="function"==typeof jQuery?jQuery:fUtil;t(document).on("change",".facetwp-per-page-select",(function(){FWP.extras.per_page=e(this).val(),FWP.soft_refresh=!0,FWP.autoload()})),t(document).on("change",".facetwp-sort-select",(function(){FWP.extras.sort=e(this).val(),FWP.soft_refresh=!0,FWP.autoload()})),t((()=>{this.init()}))}}return t.prototype.helper={getUrlVar:e=>{e=FWP_JSON.prefix+e;for(var t=window.location.search.replace("?","").split("&"),a=0;a{var a;return function(...s){var n=e.bind(this,...s);clearTimeout(a),a=setTimeout(n,t)}},serialize:(t,a)=>{var s=[];a=e.isset(a)?a:"";for(var n in t)""!=t[n]&&s.push(a+encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return s.join("&")},escapeHtml:e=>{var t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,(e=>t[e])).trim()},detectLoop:e=>{for(var t=null,a=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,(()=>NodeFilter.FILTER_ACCEPT),!1);t=a.nextNode();)if(8===t.nodeType&&"fwp-loop"===t.nodeValue)return t.parentNode;return!1}},new t})(fUtil),function(e){function t(t){let a=e(t);return a.val()===a.attr("placeholder")?"":a.val()}FWP.logic=FWP.logic||{},e(".facetwp-facet").each((function(){this.addEventListener("click",(function(){var t=e(".facetwp-facet-"+e(this).attr("data-name"));1e.post(s,{action:"facetwp_autocomplete_load",facet_name:a,query:t.value,data:FWP.buildPostData()},{done:e=>{this.fcomplete.render(e)}}),n.onSelect=()=>FWP.autoload(),fComplete(t,n)}))})),e().on("keyup",".facetwp-autocomplete",(function(e){13!==e.which||FWP.is_refresh||FWP.autoload()})),e().on("click",".facetwp-autocomplete-update",(function(){FWP.autoload()})),FWP.hooks.addAction("facetwp/refresh/checkboxes",(function(t,a){var s=[];t.find(".facetwp-checkbox.checked").each((function(){s.push(e(this).attr("data-value"))})),FWP.facets[a]=s})),FWP.hooks.addFilter("facetwp/selections/checkboxes",(function(t,a){var s=[];return e.each(a.selected_values,(function(t){var n=a.el.find('.facetwp-checkbox[data-value="'+t+'"]');if(n.len()){var o=e(n.html());o.find(".facetwp-counter").remove(),o.find(".facetwp-expand").remove(),s.push({value:t,label:o.text()})}})),s})),e().on("click",".facetwp-type-checkboxes .facetwp-expand",(function(t){var a=e(this).closest(".facetwp-checkbox").next(".facetwp-depth");a.toggleClass("visible");var s=a.hasClass("visible")?FWP_JSON.collapse:FWP_JSON.expand;e(this).html(s),t.stopImmediatePropagation()})),e().on("click",".facetwp-type-checkboxes .facetwp-checkbox:not(.disabled)",(function(){var t=e(this),a=!t.hasClass("checked"),s=t.closest(".facetwp-depth").len()>0;t.next().hasClass("facetwp-depth")&&t.next(".facetwp-depth").find(".facetwp-checkbox").removeClass("checked"),s&&t.parents(".facetwp-depth").each((function(){e(this).prev(".facetwp-checkbox").removeClass("checked")})),t.toggleClass("checked",a),FWP.autoload()})),e().on("click",".facetwp-type-checkboxes .facetwp-toggle",(function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-toggle").toggleClass("facetwp-hidden"),t.find(".facetwp-overflow").toggleClass("facetwp-hidden")})),e().on("facetwp-loaded",(function(){e(".facetwp-type-checkboxes .facetwp-overflow").each((function(){var t=e(this).find(".facetwp-checkbox").len(),a=e(this).next(".facetwp-toggle");a.text(a.text().replace("{num}",t)),0t.find(".facetwp-expand").len()&&(t.find(".facetwp-checkbox.checked").each((function(){e(this).parents(".facetwp-depth").addClass("visible")})),t.find(".facetwp-depth").each((function(){var t=e(this).hasClass("visible")?"collapse":"expand";e(this).prev(".facetwp-checkbox").append(' '+FWP_JSON[t]+"")}))))}))})),FWP.hooks.addAction("facetwp/refresh/radio",(function(t,a){var s=[];t.find(".facetwp-radio.checked").each((function(){var t=e(this).attr("data-value");""!==t&&s.push(t)})),FWP.facets[a]=s})),FWP.hooks.addFilter("facetwp/selections/radio",(function(t,a){var s=[];return e.each(a.selected_values,(function(t){var n=a.el.find('.facetwp-radio[data-value="'+t+'"]');if(n.len()){var o=e(n.html());o.find(".facetwp-counter").remove(),s.push({value:t,label:o.text()})}})),s})),e().on("click",".facetwp-type-radio .facetwp-radio:not(.disabled)",(function(){var t=e(this).hasClass("checked");e(this).closest(".facetwp-facet").find(".facetwp-radio").removeClass("checked"),t||e(this).addClass("checked"),FWP.autoload()})),FWP.hooks.addAction("facetwp/refresh/date_range",(function(e,a){var s=e.find(".facetwp-date-min"),n=e.find(".facetwp-date-max"),o=s.len()?t(s.nodes[0]):"",c=n.len()?t(n.nodes[0]):"";FWP.facets[a]=""!==o||""!==c?[o,c]:[]})),FWP.hooks.addFilter("facetwp/selections/date_range",(function(e,t){var a=t.el,s=t.selected_values,n=a.attr("data-name"),o=FWP.settings[n].fields,c="";return"exact"==o?""!==s[0]&&(c=s[0]):"start_date"==o?""!==s[0]&&(c="[>=] "+s[0]):"end_date"==o?""!==s[1]&&(c="[<=] "+s[1]):"both"==o&&(""===s[0]&&""===s[1]||(""!==s[0]&&""!==s[1]?c=s[0]+" - "+s[1]:""!==s[0]?c="[>=] "+s[0]:""!==s[1]&&(c="[<=] "+s[1]))),c})),e().on("facetwp-loaded",(function(){var t=e(".facetwp-type-date_range .facetwp-date:not(.ready)");0!==t.len()&&t.each((function(){var t=e(this),a=t.closest(".facetwp-facet").attr("data-name"),s=FWP.settings[a],n={onChange:function(e){FWP.autoload()}};if(""!==s.locale&&(n.i18n=s.locale),""!==s.format&&(n.altFormat=s.format),"both"==s.fields){var o=t.hasClass("facetwp-date-min")?"min":"max";n.minDate=s.range[o].minDate,n.maxDate=s.range[o].maxDate}else n.minDate=s.range.minDate,n.maxDate=s.range.maxDate;n=FWP.hooks.applyFilters("facetwp/set_options/date_range",n,{facet_name:a,element:t}),t.addClass("ready"),new fDate(this,n)}))})),FWP.hooks.addAction("facetwp/refresh/dropdown",(function(e,t){var a=e.find(".facetwp-dropdown").val();FWP.facets[t]=a?[a]:[]})),FWP.hooks.addFilter("facetwp/selections/dropdown",(function(e,t){var a=t.el.find(".facetwp-dropdown");if(a.len()){var s=a.nodes[0];return s.options[s.selectedIndex].text.replace(/\(\d+\)$/,"")}return""})),("function"==typeof jQuery?jQuery:fUtil)(document).on("change",".facetwp-type-dropdown select",(function(){var t=e(this).closest(".facetwp-facet").attr("data-name");""!==e(this).val()&&(FWP.frozen_facets[t]="soft"),FWP.autoload()})),FWP.hooks.addAction("facetwp/refresh/fselect",(function(e,t){var a=e.find("select").val();null!==a&&""!==a||(a=[]),FWP.facets[t]=Array.isArray(a)?a:[a]})),FWP.hooks.addFilter("facetwp/selections/fselect",(function(t,a){var s=[];return e.each(a.selected_values,(e=>{var t=a.el.find('option[value="'+e+'"]');t.len()&&s.push({value:e,label:t.text()})})),s})),FWP.hooks.addAction("facetwp/loaded",(function(){if(null!==FWP.active_facet){var e=FWP.active_facet;if("fselect"==e.attr("data-type")){var t=e.find(".facetwp-dropdown").nodes[0];t.fselect.settings.multiple&&t.fselect.open()}}})),e().on("facetwp-loaded",(function(){e(".facetwp-type-fselect select:not(.fs-hidden)").each((function(){var t=e(this).closest(".facetwp-facet").attr("data-name"),a=FWP.settings[t];a.optionFormatter=function(e,t){var a=t.getAttribute("data-counter");return a?e+" ("+a+")":e};var s=FWP.hooks.applyFilters("facetwp/set_options/fselect",a,{facet_name:t});fSelect(this,s)}))})),e().on("fs:changed",(function(t){var a=e(t.detail[0]).closest(".facetwp-type-fselect").len()>0;!FWP.is_refresh&&a&&FWP.autoload()})),e().on("fs:closed",(function(){FWP.active_facet=null})),FWP.hooks.addAction("facetwp/refresh/hierarchy",(function(t,a){var s=[];t.find(".facetwp-link.checked").each((function(){s.push(e(this).attr("data-value"))})),FWP.facets[a]=s})),FWP.hooks.addFilter("facetwp/selections/hierarchy",(function(e,t){var a=t.el.find(".facetwp-link.checked");return a.len()?a.text():""})),e().on("click",".facetwp-type-hierarchy .facetwp-link",(function(){e(this).closest(".facetwp-facet").find(".facetwp-link").removeClass("checked"),""!==e(this).attr("data-value")&&e(this).addClass("checked"),FWP.autoload()})),e().on("click",".facetwp-type-hierarchy .facetwp-toggle",(function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-toggle").toggleClass("facetwp-hidden"),t.find(".facetwp-overflow").toggleClass("facetwp-hidden")})),FWP.hooks.addAction("facetwp/refresh/number_range",(function(e,t){var a=e.find(".facetwp-number-min").val()||"",s=e.find(".facetwp-number-max").val()||"";FWP.facets[t]=""!==a||""!==s?[a,s]:[]})),FWP.hooks.addFilter("facetwp/selections/number_range",(function(e,t){var a=t.el,s=t.selected_values,n=a.attr("data-name"),o=FWP.settings[n].fields,c="";return"exact"==o?""!==s[0]&&(c=s[0]):"min"==o?""!==s[0]&&(c="[>=] "+s[0]):"max"==o?""!==s[1]&&(c="[<=] "+s[1]):"both"==o&&(""===s[0]&&""===s[1]||(""!==s[0]&&""!==s[1]?c=s[0]+" - "+s[1]:""!==s[0]?c="[>=] "+s[0]:""!==s[1]&&(c="[<=] "+s[1]))),c})),e().on("keyup",".facetwp-type-number_range .facetwp-number",(function(e){13!==e.which||FWP.is_refresh||FWP.autoload()})),e().on("click",".facetwp-type-number_range .facetwp-submit",(function(){FWP.refresh()})),e().on("facetwp-loaded",(function(){var t=e(".facetwp-location");t.len()<1||(FWP.loaded||(window.FWP_MAP=window.FWP_MAP||{},FWP_MAP.sessionToken=new google.maps.places.AutocompleteSessionToken,FWP_MAP.autocompleteService=new google.maps.places.AutocompleteService,FWP_MAP.placesService=new google.maps.places.PlacesService(document.createElement("div")),e().on("input",".facetwp-location",FWP.helper.debounce((function(t){var a=e(t.target).val(),s=e(t.target).closest(".facetwp-facet");if(""==a||a.length',a+=''+e.structured_formatting.main_text+" ",a+=''+e.structured_formatting.secondary_text+"",a+=''+e.description+"",a+=""})),a+='
    ',s.find(".location-results").html(a).removeClass("facetwp-hidden")}}))}}),FWP_JSON.proximity.queryDelay))),t.each((function(t,a){e(this).trigger("keyup")})))})),e().on("click",".location-result",(function(){var t=e(this).closest(".facetwp-facet"),a=e(this).attr("data-id"),s=e(this).find(".result-description").text();FWP_MAP.placesService.getDetails({placeId:a,fields:["geometry"]},(function(e,a){a===google.maps.places.PlacesServiceStatus.OK&&(t.find(".facetwp-lat").val(e.geometry.location.lat()),t.find(".facetwp-lng").val(e.geometry.location.lng()),FWP.autoload())})),e(".facetwp-location").val(s),e(".location-results").addClass("facetwp-hidden")})),e().on("click",".facetwp-type-proximity .locate-me",(function(t){var a=e(this),s=a.closest(".facetwp-facet"),n=s.find(".facetwp-location"),o=s.find(".facetwp-lat"),c=s.find(".facetwp-lng");if(a.hasClass("f-reset"))return o.val(""),c.val(""),n.val(""),void FWP.autoload();a.addClass("f-loading"),navigator.geolocation.getCurrentPosition((function(e){var t=e.coords.latitude,i=e.coords.longitude;o.val(t),c.val(i);var r=new google.maps.Geocoder,l={lat:parseFloat(t),lng:parseFloat(i)};r.geocode({location:l},(function(e,t){t===google.maps.GeocoderStatus.OK?n.val(e[0].formatted_address):n.val("Your location"),a.addClass("f-reset"),FWP.autoload()})),a.removeClass("f-loading"),FWP.hooks.doAction("facetwp/geolocation/success",{facet:s,position:e})}),(function(e){a.removeClass("f-loading"),FWP.hooks.doAction("facetwp/geolocation/error",{facet:s,error:e})}))})),e().on("keyup",".facetwp-location",(function(t){var a=e(this).closest(".facetwp-facet"),s=""!==e(this).val()?"addClass":"removeClass";if(a.find(".locate-me")[s]("f-reset"),38===t.which||40===t.which||13===t.which)var n=parseInt(a.find(".location-result.active").attr("data-index")),o=parseInt(a.find(".location-result").last().attr("data-index"));if(38===t.which){var c=0e.removeAttribute("disabled")))})),FWP.hooks.addAction("facetwp/set_label/slider",(function(e){var t=e.attr("data-name"),a=FWP.settings[t].lower,s=FWP.settings[t].upper,n=FWP.settings[t].format,o={decimal_separator:FWP.settings[t].decimal_separator,thousands_separator:FWP.settings[t].thousands_separator},c=FWP.settings[t].prefix,i=FWP.settings[t].suffix;if(a===s)var r=c+nummy(a).format(n,o)+i;else r=c+nummy(a).format(n,o)+i+" — "+c+nummy(s).format(n,o)+i;e.find(".facetwp-slider-label").html(r)})),FWP.hooks.addFilter("facetwp/selections/slider",(function(e,t){var a=t.el.find(".facetwp-slider-label");return a.len()?a.text():""})),e().on("facetwp-loaded",(function(){e(".facetwp-type-slider .facetwp-slider").each((function(){var t=e(this),a=t.closest(".facetwp-facet"),s=a.attr("data-name"),n=FWP.settings[s],o=FWP.hooks.applyFilters("facetwp/set_options/slider",{range:n.range,start:n.start,step:parseFloat(n.step),connect:!0},{facet_name:s});if(t.hasClass("ready"))t.nodes[0].noUiSlider.updateOptions({range:o.range},!1);else{if(void 0!==this.noUiSlider)return;if(null===o.start[0])return;if(parseFloat(n.range.min)>parseFloat(n.range.max))return FWP.settings[s].lower=n.range.min,FWP.settings[s].upper=n.range.max,void FWP.hooks.doAction("facetwp/set_label/slider",a);parseFloat(n.range.min)==parseFloat(n.range.max)&&t.attr("data-disabled","true");var c=this;noUiSlider.create(c,o),c.noUiSlider.on("update",(function(e,t){FWP.settings[s].lower=e[0],FWP.settings[s].upper=e[1],FWP.hooks.doAction("facetwp/set_label/slider",a)})),c.noUiSlider.on("set",(function(){FWP.active_facet=t.closest(".facetwp-facet"),FWP.autoload()})),t.addClass("ready")}})),e(".facetwp-type-slider").each((function(){var t=e(this).attr("data-name");e(this).find(".facetwp-slider-reset")[FWP.facets[t].length?"removeClass":"addClass"]("facetwp-hidden")}))})),e().on("click",".facetwp-type-slider .facetwp-slider-reset",(function(){var t=e(this).closest(".facetwp-facet").attr("data-name");FWP.reset(t)})),FWP.hooks.addAction("facetwp/refresh/rating",(function(t,a){var s=[];t.find(".facetwp-star.selected").each((function(){var t=e(this).attr("data-value");""!=t&&s.push(t)})),FWP.facets[a]=s})),e().on("mouseover",".facetwp-star",(function(){var t=e(this).closest(".facetwp-facet");if(e(this).hasClass("selected"))t.find(".facetwp-star-label").text(FWP_JSON.rating.Undo);else{var a="5"==e(this).attr("data-value")?"":FWP_JSON.rating["& up"];t.find(".facetwp-star-label").text(a),t.find(".facetwp-counter").text("("+e(this).attr("data-counter")+")")}})),e().on("mouseout",".facetwp-star",(function(){var t=e(this).closest(".facetwp-facet");t.find(".facetwp-star-label").text(""),t.find(".facetwp-counter").text("")})),e().on("click",".facetwp-star",(function(){var t=e(this).closest(".facetwp-facet"),a=e(this).hasClass("selected");t.find(".facetwp-star").removeClass("selected"),a||e(this).addClass("selected"),FWP.autoload()})),FWP.hooks.addAction("facetwp/refresh/sort",(function(e,t){var a=e.find("select").val();FWP.facets[t]=a?[a]:[]})),e().on("change",".facetwp-type-sort select",(function(){var t=e(this).closest(".facetwp-facet").attr("data-name");""!==e(this).val()&&(FWP.frozen_facets[t]="hard"),FWP.autoload()})),FWP.hooks.addAction("facetwp/refresh/pager",(function(e,t){FWP.facets[t]=[]})),FWP.hooks.addFilter("facetwp/template_html",(function(t,a){if(FWP.is_load_more){if(FWP.is_load_more=!1,0!s.includes(e)))),t.nodes[0]._facets=s})),e(".facetwp-hide-empty").each((function(){let t=e(this),a=t.closest(".facetwp-facet");t.nodes[0]._facets.every((e=>FWP.facets[e].length<1))?a.addClass("facetwp-hidden"):a.removeClass("facetwp-hidden")}))}))}(fUtil)}(); diff --git a/wp/wp-content/plugins/facetwp/assets/js/src/accessibility.js b/wp/wp-content/plugins/facetwp/assets/js/src/accessibility.js deleted file mode 100644 index 74f70c2f..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/src/accessibility.js +++ /dev/null @@ -1,104 +0,0 @@ -(function($) { - var last_checked = null; - - if ('undefined' !== typeof FWP.hooks) { - FWP.hooks.addAction('facetwp/loaded', function() { - - // checkbox, radio, fselect - $('.facetwp-checkbox, .facetwp-radio, .fs-option').each(function() { - let $el = $(this); - if (! $el.hasClass('disabled')) { - $el.attr('role', 'checkbox'); - $el.attr('aria-checked', $el.hasClass('checked') ? 'true' : 'false'); - $el.attr('aria-label', $el.text()); - $el.attr('tabindex', 0); - } - }); - - // pager, show more, user selections, hierarchy - $('.facetwp-page, .facetwp-toggle, .facetwp-selection-value, .facetwp-link').each(function() { - let $el = $(this); - let label = $el.text(); - - if ($el.hasClass('facetwp-page')) { - label = FWP_JSON.a11y.label_page + ' ' + label; - - if ($el.hasClass('next')) { - label = FWP_JSON.a11y.label_page_next; - } - else if ($el.hasClass('prev')) { - label = FWP_JSON.a11y.label_page_prev; - } - } - - $el.attr('role', 'link'); - $el.attr('aria-label', label); - $el.attr('tabindex', 0); - }); - - // dropdown, sort facet, old sort feature - $('.facetwp-type-dropdown select, .facetwp-type-sort select, .facetwp-sort-select select').each(function() { - $(this).attr('aria-label', $(this).find('option:selected').text()); - }); - - // search, date - $('.facetwp-search, .facetwp-date').each(function() { - $(this).attr('aria-label', $(this).attr('placeholder')); - }); - - // checkbox group - $('.facetwp-type-checkboxes').each(function() { - let facet_name = $(this).attr('data-name'); - $(this).attr('aria-label', FWP.settings.labels[facet_name]); - $(this).attr('role', 'group'); - }); - - // fselect - $('.fs-wrap').each(function() { - $(this).attr('role', 'button'); - $(this).attr('aria-haspopup', 'true'); - $(this).attr('aria-expanded', $(this).hasClass('fs-open') ? 'true' : 'false'); - }); - - $('.facetwp-type-fselect .facetwp-dropdown').attr('aria-hidden', 'true'); - - // pager - $('.facetwp-pager').attr('role', 'navigation'); - $('.facetwp-page.active').attr('aria-current', 'true'); - - // focus on selection - if (null != last_checked) { - var $el = $('.facetwp-facet [data-value="' + last_checked + '"]'); - if ($el.len()) { - $el.nodes[0].focus(); - } - last_checked = null; - } - }, 999); - } - - // keyboard support - $().on('keydown', '.facetwp-checkbox, .facetwp-radio, .facetwp-link', function(e) { - if (32 == e.keyCode || 13 == e.keyCode) { - last_checked = $(this).attr('data-value'); - e.preventDefault(); - this.click(); - } - }); - - $().on('keydown', '.facetwp-page, .facetwp-toggle, .facetwp-selection-value', function(e) { - if (32 == e.keyCode || 13 == e.keyCode) { - e.preventDefault(); - this.click(); - } - }); - - // fselect - determine "aria-expanded" - function toggleExpanded(e) { - var $fs = $(e.detail[0]); - $fs.attr('aria-expanded', $fs.hasClass('fs-open') ? 'true' : 'false'); - } - - $().on('fs:opened', toggleExpanded); - $().on('fs:closed', toggleExpanded); -})(fUtil); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/js/src/admin.js b/wp/wp-content/plugins/facetwp/assets/js/src/admin.js deleted file mode 100644 index 47b5abd8..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/src/admin.js +++ /dev/null @@ -1,2189 +0,0 @@ -(($) => { - - $(() => { - init_vue(); - init_custom_js(); - }); - - function init_vue() { - - Vue.config.devtools = true; - - Vue.component('v-select', VueSelect.VueSelect); - - Vue.filter('i18n', str => FWP.__(str)); - - // Defaults mixin - const builder_defaults = { - methods: { - defaultLayout() { - return { - items: [this.defaultRow()], - settings: this.getDefaultSettings('layout') - }; - }, - defaultRow() { - return { - type: 'row', - items: [this.defaultCol()], - settings: this.getDefaultSettings('row') - }; - }, - defaultCol() { - return { - type: 'col', - items: [], - settings: this.getDefaultSettings('col') - }; - }, - defaultItem(source) { - return { - type: 'item', - source, - settings: this.getDefaultSettings('item', source) - }; - }, - mergeSettings(settings, type, source) { - let defaults = this.getDefaultSettings(type, source); - let default_keys = Object.keys(defaults); - let setting_keys = Object.keys(settings); - - // Automatically inject new settings - let missing_keys = default_keys.filter(name => !setting_keys.includes(name)); - - missing_keys.forEach((name, index) => { - Vue.set(settings, name, defaults[name]); - }); - - return settings; - }, - getSettingsMeta() { - let settings = { - num_columns: { - type: 'number', - title: FWP.__('Number of grid columns '), - defaultValue: 1 - }, - grid_gap: { - type: 'number', - title: FWP.__('Spacing between results'), - defaultValue: 10 - }, - no_results_text: { - type: 'textarea', - title: FWP.__('No results text') - }, - text_style: { - type: 'text-style', - title: FWP.__('Text style'), - tab: 'style', - defaultValue: { - align: '', - bold: false, - italic: false - } - }, - text_color: { - type: 'color', - title: FWP.__('Text color'), - tab: 'style' - }, - font_size: { - type: 'slider', - title: FWP.__('Font size'), - tab: 'style', - defaultValue: { - unit: 'px', - size: 0 - } - }, - background_color: { - type: 'color', - title: FWP.__('Background color'), - tab: 'style' - }, - border: { - type: 'border', - title: FWP.__('Border'), - tab: 'style', - defaultValue: { - style: 'none', - color: '', - width: { - unit: 'px', - top: 0, - right: 0, - bottom: 0, - left: 0 - } - }, - children: { - style: { - type: 'select', - title: FWP.__('Border style'), - choices: { - 'none': FWP.__('None'), - 'solid': FWP.__('Solid'), - 'dashed': FWP.__('Dashed'), - 'dotted': FWP.__('Dotted'), - 'double': FWP.__('Double') - } - }, - color: { - type: 'color', - title: FWP.__('Border color') - }, - width: { - type: 'utrbl', - title: FWP.__('Border width') - } - } - }, - button_text: { - type: 'text', - title: FWP.__('Button text') - }, - button_text_color: { - type: 'color', - title: FWP.__('Button text color') - }, - button_color: { - type: 'color', - title: FWP.__('Button color') - }, - button_padding: { - type: 'utrbl', - title: FWP.__('Button padding'), - defaultValue: { - unit: 'px', - top: 0, - right: 0, - bottom: 0, - left: 0 - } - }, - separator: { - type: 'text', - title: FWP.__('Separator'), - defaultValue: ', ' - }, - custom_css: { - type: 'textarea', - title: FWP.__('Custom CSS'), - tab: 'style' - }, - grid_template_columns: { - type: 'text', - title: FWP.__('Column widths'), - defaultValue: '1fr' - }, - content: { - type: 'textarea', - title: FWP.__('Content') - }, - image_size: { - type: 'select', - title: FWP.__('Image size'), - defaultValue: 'thumbnail', - choices: FWP.image_sizes, - v_show: [ - { type: 'source', value: 'featured_image' } - ] - }, - author_field: { - type: 'select', - title: FWP.__('Author field'), - defaultValue: 'display_name', - choices: { - 'display_name': FWP.__('Display name'), - 'user_login': FWP.__('User login'), - 'ID': FWP.__('User ID') - } - }, - field_type: { - type: 'select', - title: FWP.__('Field type'), - defaultValue: 'text', - choices: { - 'text': 'Text', - 'date': 'Date', - 'number': 'Number' - } - }, - date_format: { - type: 'text', - title: FWP.__('Date format'), - defaultValue: 'F j, Y', - v_show: [ - { type: 'field_type', value: 'date' }, - { type: 'source', value: 'post_date' }, - { type: 'source', value: 'post_modified' } - ] - }, - input_format: { - type: 'text', - title: FWP.__('Input format'), - defaultValue: 'Y-m-d', - v_show: [ - { type: 'field_type', value: 'date' }, - { type: 'source', value: 'post_date' }, - { type: 'source', value: 'post_modified' } - ] - }, - number_format: { - type: 'select', - title: FWP.__('Number format'), - choices: { - '': FWP.__('None'), - 'n': '1234', - 'n.n': '1234.5', - 'n.nn': '1234.56', - 'n,n': '1,234', - 'n,n.n': '1,234.5', - 'n,n.nn': '1,234.56' - }, - v_show: [ - { type: 'field_type', value: 'number' } - ] - }, - link: { - type: 'link', - title: FWP.__('Link'), - defaultValue: { - type: 'none', - href: '', - target: '' - }, - children: { - type: { - type: 'select', - title: FWP.__('Link type'), - choices: { - 'none': FWP.__('None'), - 'post': FWP.__('Post URL'), - 'custom': FWP.__('Custom URL') - } - } - } - }, - prefix: { - type: 'text', - title: FWP.__('Prefix') - }, - suffix: { - type: 'text', - title: FWP.__('Suffix') - }, - is_hidden: { - type: 'checkbox', - defaultValue: false, - suffix: FWP.__('Hide item?') - }, - padding: { - type: 'utrbl', - title: FWP.__('Padding'), - defaultValue: { - unit: 'px', - top: 0, - right: 0, - bottom: 0, - left: 0 - }, - tab: 'style' - }, - name: { - type: 'text', - title: FWP.__('Unique name'), - notes: '(Required) unique element name, without spaces' - }, - css_class: { - type: 'text', - title: FWP.__('CSS class'), - tab: 'style' - } - }; - - settings.button_border = this.$root.cloneObj(settings.border); - settings.button_border.title = FWP.__('Button border'); - settings.button_border.tab = 'basic'; - - settings.term_link = this.$root.cloneObj(settings.link); - settings.term_link.children.type.choices = { - 'none': FWP.__('None'), - 'term': FWP.__('Term URL'), - 'custom': FWP.__('Custom URL') - }; - - return settings; - }, - getDefaultFields(type, source) { - let fields = []; - - if ('layout' == type) { - fields.push('num_columns', 'grid_gap', 'no_results_text'); - } - - if ('row' == type) { - fields.push('grid_template_columns'); - } - - if ('item' == type) { - if ('html' == source) { - fields.push('content'); - } - if ('featured_image' == source) { - fields.push('image_size', 'link'); - } - if ('button' == source) { - fields.push('button_text', 'button_text_color', 'button_color', 'button_padding', 'button_border', 'link'); - } - if ('post_date' == source || 'post_modified' == source) { - fields.push('date_format'); - } - if ('post_title' == source) { - fields.push('link'); - } - if ('post_author' == source) { - fields.push('author_field'); - } - if (0 === source.indexOf('cf/')) { - fields.push('field_type', 'date_format', 'input_format', 'number_format', 'link'); - } - if (0 === source.indexOf('woo/')) { - fields.push('field_type', 'date_format', 'input_format', 'number_format'); - } - if (0 === source.indexOf('tax/')) { - fields.push('separator', 'term_link'); - } - if (!['html', 'button', 'featured_image'].includes(source)) { - fields.push('prefix', 'suffix'); - } - } - - fields.push('border', 'background_color', 'padding', 'text_color', 'text_style', 'font_size', 'name', 'css_class'); - - if ('layout' == type) { - fields.push('custom_css'); - } - - if ('item' == type) { - fields.push('is_hidden'); - } - - return fields; - }, - getDefaultSettings(type, source) { - let settings = {}; - let settings_meta = this.getSettingsMeta(); - let fields = this.getDefaultFields(type, source); - - fields.forEach(name => { - let defaultValue = settings_meta[name].defaultValue || ''; - - if ('name' == name) { - defaultValue = 'el-' + Math.random().toString(36).substring(7); - } - - settings[name] = defaultValue; - }); - - return settings; - } - } - }; - - /* ================ query builder ================ */ - - Vue.component('query-builder', { - props: { - query_obj: { - type: Object, - required: true - }, - template: { - type: Object, - required: true - } - }, - template: ` -
    -

    Which results should be in the listing?

    - -
    - {{ 'Fetch' | i18n }} - - - - {{ 'and show' | i18n }} - - {{ 'per page' | i18n }} -
    - -
    - {{ 'Sort by' | i18n }} -
    - -
    - - - - - - - - - - - - - - - - - - - -
    - -
    - {{ 'Narrow results by' | i18n }} -
    - -
    - - - - - - - - - - - -
    - Type a value, then press "Enter" to add it -
    -
    - - -
    - -
    - {{ 'Add query sort' | i18n }} - {{ 'Add query filter' | i18n }} - {{ 'Convert to query args' | i18n }} -
    -
    - `, - methods: { - addTag(newTag, value) { - value.push(newTag); - }, - getPlaceholder({key}) { - return ('tax/' == key.substr(0, 4)) ? FWP.__('Enter term slugs') : FWP.__('Enter values'); - }, - maybeShowValue(compare) { - return !['EXISTS', 'NOT EXISTS', 'EMPTY', 'NOT EMPTY'].includes(compare); - }, - showCompare(option, {key, type}) { - if ('tax/' == key.substr(0, 4)) { - if (!['IN', 'NOT IN', 'EXISTS', 'NOT EXISTS'].includes(option)) { - return false; - } - } - else if (['ID', 'post_author', 'post_status', 'post_name'].includes(key)) { - if (option != 'IN' && option != 'NOT IN') { - return false; - } - } - else if ('DATE' == type || 'post_date' == key || 'post_modified' == key) { - if (!['>', '>=', '<', '<='].includes(option)) { - return false; - } - } - else if ('CHAR' == type) { - if (['>', '>=', '<', '<='].includes(option)) { - return false; - } - } - return true; - }, - addSortCriteria() { - this.query_obj.orderby.push({ - key: 'title', - order: 'ASC', - type: 'CHAR' - }); - }, - addFilterCriteria() { - this.query_obj.filters.push({ - key: 'ID', - value: [], - compare: 'IN', - type: 'CHAR' - }); - }, - deleteSortCriteria(index) { - Vue.delete(this.query_obj.orderby, index); - }, - deleteFilterCriteria(index) { - Vue.delete(this.query_obj.filters, index); - } - } - }); - - Vue.component('fselect', { - data() { - return { - prev_key: '' - }; - }, - props: ['row'], - template: ` - - `, - mounted() { - fSelect(this.$el); - }, - /** - * fSelects won't refresh when deleting, so we need to - * manually reload() the changed elements - */ - beforeUpdate() { - this.prev_key = this.$el.getAttribute('data-key'); - }, - updated() { - if (this.row.key != this.prev_key) { - this.$el.fselect.reload(); - } - } - }); - - /* ================ layout builder ================ */ - - - Vue.component('builder', { - props: { - layout: Object - }, - template: ` -
    -
    -

    How should an individual result appear?

    -
    - - - - -
    -
    - -
    - ` - }); - - Vue.component('setting-wrap', { - mixins: [builder_defaults], - props: ['settings', 'name', 'source', 'tab'], - template: ` -
    -
    - {{ title }} -
    -
    -
    -
    -
    - `, - computed: { - getSettingComponent() { - return 'setting-' + this.type; - }, - isVisible() { - let ret = true; - let self = this; - - if ('undefined' === typeof this.meta.tab) { - this.meta.tab = 'basic'; - } - - if (this.meta.tab !== this.tab) { - ret = false; - } - else if ('undefined' !== typeof this.meta.v_show) { - ret = false; - this.meta.v_show.forEach((cond, index) => { - let type = cond.type; - let setting_val = ('source' == type) ? self[type] : self.settings[type]; - let cond_value = cond.value || ''; - let cond_compare = cond.compare || '=='; - let is_match = ('==' == cond_compare) - ? setting_val == cond_value - : setting_val != cond_value; - - if (is_match) { - ret = true; - } - }); - } - - return ret; - } - }, - created() { - this.settings_meta = this.getSettingsMeta(); - this.meta = this.settings_meta[this.name]; - this.type = this.meta.type; - this.title = this.meta.title; - } - }); - - Vue.component('setting-text', { - props: ['settings', 'name', 'meta'], - template: '' - }); - - Vue.component('setting-number', { - props: ['settings', 'name', 'meta'], - template: '' - }); - - Vue.component('setting-textarea', { - props: ['settings', 'name', 'meta'], - template: '' - }); - - Vue.component('setting-slider', { - props: ['settings', 'name', 'meta'], - template: ` -
    - - -
    - `, - computed: { - fontSizeLabel() { - let val = this.settings[this.name]; - return (0 === val.size) ? 'none' : val.size + val.unit; - } - } - }); - - Vue.component('setting-color', { - props: ['settings', 'name', 'meta'], - template: ` -
    -
    - - -
    - X -
    `, - mounted() { - let self = this; - let $canvas = self.$el.getElementsByClassName('color-canvas')[0]; - let $preview = self.$el.getElementsByClassName('color-preview')[0]; - let $input = self.$el.getElementsByClassName('color-input')[0]; - let $clear = self.$el.getElementsByClassName('color-clear')[0]; - $preview.style.backgroundColor = $input.value; - - let picker = new Picker({ - parent: $canvas, - popup: 'left', - alpha: false, - onDone(color) { - let hex = color.hex().substr(0, 7); - self.settings[self.name] = hex; - $preview.style.backgroundColor = hex; - } - }); - - picker.onOpen = function(color) { - picker.setColor($input.value); - }; - - $clear.addEventListener('click', function() { - self.settings[self.name] = ''; - $preview.style.backgroundColor = ''; - }); - } - }); - - Vue.component('setting-link', { - props: ['settings', 'name', 'meta'], - template: ` -
    - - - -
    - -
    -
    - - {{ 'Open in new tab?' | i18n }} -
    -
    - ` - }); - - Vue.component('setting-border', { - props: ['settings', 'name', 'meta'], - template: ` -
    - - - -
    -
    - - - - -
    - - - -
    -
    - ` - }); - - Vue.component('setting-checkbox', { - props: ['settings', 'name', 'meta'], - template: ` -
    - {{ meta.suffix }} -
    - ` - }); - - Vue.component('setting-select', { - props: ['settings', 'name', 'meta'], - template: ` - - ` - }); - - Vue.component('setting-utrbl', { - props: ['settings', 'name', 'meta'], - template: ` -
    -
    unit
    -
    top
    -
    right
    -
    bottom
    -
    left
    -
    - ` - }); - - Vue.component('setting-text-style', { - props: ['settings', 'name', 'meta'], - template: ` -
    - - - - - -
    - `, - methods: { - toggleChoice(opt, val) { - let old_val = this.settings[this.name][opt]; - - if ('undefined' !== typeof val) { - this.settings[this.name][opt] = (val !== old_val) ? val : ''; - } - else { - this.settings[this.name][opt] = ! old_val; - } - }, - isActive(opt, val) { - let new_val = ('undefined' !== typeof val) ? val : true; - return this.settings[this.name][opt] === new_val; - } - } - }); - - Vue.component('builder-settings', { - mixins: [builder_defaults], - props: { - layout: Object - }, - data() { - return { - title: '', - type: 'layout', - settings: this.layout.settings, - source: '', - active_tab: 'basic' - } - }, - template: ` -
    -

    - - {{ settingTitle }} -

    -
    -
    - {{ 'Basic' | i18n }} - {{ 'Style' | i18n }} -
    - - -
    -
    - `, - computed: { - settingTitle() { - return ('' === this.title) ? FWP.__('Settings') : this.title; - }, - settingsFields() { - return this.getDefaultFields(this.type, this.source); - } - }, - methods: { - uniqueKey() { - // method to prevent caching - return Math.floor(Math.random() * 999999); - }, - isActiveTab(which) { - return (this.active_tab === which) ? 'active' : ''; - }, - setActiveTab(which) { - this.active_tab = which; - } - }, - created() { - let self = this; - - this.$root.$on('edit-layout', () => { - self.title = ''; - self.type = 'layout'; - self.settings = self.mergeSettings(self.layout.settings, self.type); - self.source = ''; - }); - - this.$root.$on('edit-row', ({settings}, num) => { - self.title = FWP.__('Row') + ' ' + num; - self.type = 'row'; - self.settings = self.mergeSettings(settings, self.type); - self.source = ''; - }); - - this.$root.$on('edit-col', ({settings}, num) => { - self.title = FWP.__('Column') + ' ' + num; - self.type = 'col'; - self.settings = self.mergeSettings(settings, self.type); - self.source = ''; - }); - - this.$root.$on('edit-item', ({source, settings}) => { - self.title = FWP.layout_data[source]; - self.type = 'item'; - self.settings = self.mergeSettings(settings, self.type, source); - self.source = source; - }); - } - }); - - Vue.component('builder-row', { - mixins: [builder_defaults], - props: { - row: Object, - rows: Array, - index: Number, - is_child: Boolean - }, - template: ` -
    -
    - - - - -
    -
    - - -
    -
    - `, - computed: { - classIsChild() { - return this.is_child ? 'is-child' : 'not-child'; - } - }, - methods: { - addRow() { - this.rows.splice(this.index + 1, 0, this.defaultRow()); - - if (1 < this.rows.length) { - this.$root.$emit('edit-row', this.rows[this.index + 1], this.index + 2); - } - else { - this.$root.$emit('edit-layout'); - } - }, - addCol() { - let len = this.row.items.push(this.defaultCol()); - this.$root.$emit('edit-col', this.row.items[len - 1], len); - - let grid_str = '1fr '.repeat(this.row.items.length).trim(); - this.row.settings.grid_template_columns = grid_str; - }, - editRow() { - this.$root.$emit('edit-row', this.row, this.index + 1); - }, - deleteRow() { - Vue.delete(this.rows, this.index); - this.$root.$emit('edit-layout'); - - // Add default row - if (this.rows.length < 1) { - if (! this.is_child) { - this.addRow(); - } - } - } - } - }); - - Vue.component('builder-col', { - mixins: [builder_defaults], - props: { - col: Object, - cols: Array, - index: Number - }, - data() { - return { - adding_item: false - } - }, - template: ` -
    - - -
    - - -
    -
    - -
    - - - - -
    -
    -
    +
    -
    -
    -
    -
    - `, - methods: { - addItem() { - this.adding_item = ! this.adding_item; - }, - editCol() { - this.$root.$emit('edit-col', this.col, this.index + 1); - this.adding_item = false; - }, - deleteCol() { - // Remove the column - this.cols.splice(this.index, 1); - - // Show the "Layout" settings - this.$root.$emit('edit-layout'); - - // Add default column - if (this.cols.length < 1) { - this.cols.push(this.defaultCol()); - } - - // Adjust the row's `grid_template_columns` string - let grid_str = '1fr '.repeat(this.cols.length).trim(); - this.$parent.row.settings.grid_template_columns = grid_str; - }, - away() { - this.adding_item = false; - } - } - }); - - Vue.component('col-resizer', { - props: { - cols: Array, - index: Number - }, - data() { - return { - isResizing: false - } - }, - template: '
    ', - computed: { - classNames() { - return [ - 'resizer', - this.isResizing ? 'is-resizing' : '' - ]; - } - }, - methods: { - onMouseDown({ target: resizer, pageX: initialPageX, pageY: initialPageY }) { - if (! resizer.classList.contains('resizer')) { - return; - } - - let self = this; - let pane = resizer.parentElement; - let row_inner = pane.parentElement; - let initialPaneWidth = pane.offsetWidth; - - const resize = (initialSize, offset = 0) => { - let containerWidth = row_inner.clientWidth; - let paneWidth = initialSize + offset; - let width = ((paneWidth / containerWidth) * 100).toFixed(1) + '%'; - let gridColumns = this.$parent.$parent.row.settings.grid_template_columns.split(' '); - - gridColumns[this.index] = width; - - this.$parent.$parent.row.settings.grid_template_columns = gridColumns.join(' '); - }; - - // This adds is-resizing class to container - self.isResizing = true; - - const onMouseMove = ({ pageX, pageY }) => { - resize(initialPaneWidth, pageX - initialPageX); - }; - - const onMouseUp = () => { - // Run resize one more time to set computed width/height. - resize(pane.clientWidth); - - // This removes is-resizing class to container - self.isResizing = false; - - window.removeEventListener('mousemove', onMouseMove); - window.removeEventListener('mouseup', onMouseUp); - }; - - window.addEventListener('mousemove', onMouseMove); - window.addEventListener('mouseup', onMouseUp); - } - } - }); - - Vue.component('builder-item', { - props: { - item: Object, - items: Array, - index: Number - }, - template: ` -
    -
    - -
    -
    - - -
    -
    - `, - methods: { - editItem() { - this.$root.$emit('edit-item', this.item); - }, - deleteItem() { - this.items.splice(this.index, 1); - this.$root.$emit('edit-layout'); - } - } - }); - - Vue.component('popover', { - mixins: [builder_defaults], - props: { - col: Object - }, - data() { - return { - keywords: '' - } - }, - template: ` -
    - -
    -
    -
    -
    -
    - `, - methods: { - handleBlur(e) { - if (!e.currentTarget.contains(e.relatedTarget)) { - this.$parent.adding_item = false; - } - }, - isMatch(label) { - let bool = ('' == this.keywords) ? true : false; - - if (false === bool) { - let needle = this.keywords.toLowerCase(); - let haystack = label.toLowerCase(); - if (haystack.includes(needle)) { - bool = true; - } - } - - return bool; - }, - saveItem(source) { - if ('row' == source) { - let len = this.col.items.push(this.defaultRow()); - this.$root.$emit('edit-row', this.col.items[len - 1], len); - } - else { - let len = this.col.items.push(this.defaultItem(source)); - this.$root.$emit('edit-item', this.col.items[len - 1]); - } - - this.$parent.adding_item = false; - } - }, - mounted() { - this.$refs.keywords.focus(); - } - }); - - - /* ================ facets / templates ================ */ - - - Vue.component('facets', { - props: ['facets'], - template: ` - -
    -
    -
    - {{ facet.label }} - -
    -
    {{ facet.name }}
    -
    {{ facet.type }}
    -
    -
    {{ getRowCount(facet.name) }}
    -
    -
    -
    -
    -
    Copy shortcode
    -
    Duplicate
    -
    Delete
    -
    -
    -
    -
    -
    - `, - methods: { - getSource(source) { - return FWP.layout_data[source] || '-'; - }, - getRowCount(facet_name) { - if (this.$root.is_indexing) { - return '...'; - } - return this.$root.row_counts[facet_name] || '-'; - } - } - }); - - Vue.component('templates', { - props: ['templates'], - template: ` - -
    -
    -
    - {{ template.label }} - -
    -
    {{ template.name }}
    -
    {{ getDisplayMode(index) }}
    -
    {{ getPostTypes(index) }}
    -
    -
    -
    -
    -
    Copy shortcode
    -
    Duplicate
    -
    Delete
    -
    -
    -
    -
    -
    - `, - methods: { - getDisplayMode(index) { - let template = this.templates[index]; - return ('undefined' !== typeof template.modes) ? template.modes.display : 'advanced'; - }, - getPostTypes(index) { - let template = this.templates[index]; - if ('undefined' !== typeof template.modes) { - if ('visual' == template.modes.query) { - let post_types = template.query_obj.post_type; - if (0 === post_types.length) { - return ''; - } - else { - return post_types.map(type => type.label).join(', '); - } - } - } - return ''; - } - } - }); - - Vue.component('facet-edit', { - data() { - return { - facet: {} - } - }, - created() { - this.facet = this.$root.editing; - }, - methods: { - setName(e) { - this.facet.name = this.$root.sanitizeName(e.target.innerHTML); - }, - unlock() { - Vue.delete(this.facet, '_code'); - } - }, - template: ` -
    -
    - This facet is registered in code. Click to allow edits: - -
    -
    -
    -
    {{ 'Label' | i18n }}
    -
    - - - - {{ 'Copy shortcode' | i18n }} - -
    -
    -
    -
    {{ 'Facet type' | i18n }}
    -
    - - -
    -
    -
    -
    {{ 'Data source' | i18n }}
    -
    - -
    -
    - -
    -
    - ` - }); - - Vue.component('template-edit', { - mixins: [builder_defaults], - data() { - return { - template: {}, - tab: 'display' - } - }, - created() { - this.template = this.$root.editing; - - // Set defaults for the layout builder - if (! this.template.layout) { - Vue.set(this.template, 'layout', this.defaultLayout()); - } - - // Set defaults for the query builder - if (! this.template.query_obj) { - Vue.set(this.template, 'query_obj', { - post_type: [], - posts_per_page: 10, - orderby: [], - filters: [] - }); - } - - // Set the modes - if (! this.template.modes) { - Vue.set(this.template, 'modes', { - display: ('' !== this.template.template) ? 'advanced' : 'visual', - query: ('' !== this.template.query) ? 'advanced' : 'visual' - }); - } - }, - methods: { - setName(e) { - this.template.name = this.$root.sanitizeName(e.target.innerHTML); - }, - isMode(mode) { - return this.template.modes[this.tab] === mode; - }, - switchMode() { - const now = this.template.modes[this.tab]; - this.template.modes[this.tab] = ('visual' === now) ? 'advanced' : 'visual'; - }, - unlock() { - Vue.delete(this.template, '_code'); - } - }, - template: ` -
    -
    - This template is registered in code. Click to allow edits: - -
    -
    -
    - - - - {{ 'Copy shortcode' | i18n }} - -
    - - - -
    - {{ 'Display' | i18n }} - {{ 'Query' | i18n }} -
    - -
    -
    - -
    -
    -

    {{ 'Display Code' | i18n }} {{ 'Help' | i18n }}

    - -
    -
    - -
    -
    - -
    -
    -

    {{ 'Query Arguments' | i18n }} {{ 'Help' | i18n }}

    - -
    -
    -
    -
    - ` - }); - - Vue.component('facet-types', { - props: ['facet', 'selected', 'types'], - template: ` - - ` - }); - - Vue.component('facet-settings', { - props: ['facet'], - template: '', - methods: { - getFields(aliases) { - let output = []; - $.each(aliases, function(name) { - output = output.concat(FWP.facet_fields[name].names); - }); - return output; - } - }, - computed: { - // dynamic component so the data bindings (e.g. v-model) get compiled - dynComponent() { - return { - template: '
    ' + this.settingsHtml + '
    ', - props: ['facet'] - } - }, - settingsHtml() { - let self = this; - let facet_obj = FWP.facet_types[self.facet.type]; - let aliases = facet_obj.fields; - - // Support for settings_html() in < 3.9 - if ('undefined' === typeof aliases) { - if ('undefined' !== typeof FWP.clone[self.facet.type]) { - FWP.facet_fields[self.facet.type + '_fields'] = { - names: [], - html: FWP.clone[self.facet.type] - }; - - var $html = $(FWP.clone[self.facet.type]); - $.each($html.nodes[0].children, function(chunk) { - $(chunk).find('input, textarea, select, [setting-name]').each(function() { - let $el = $(this); - let setting_name = $el.attr('setting-name'); - - if (null === setting_name) { - setting_name = $el.attr('class').split(' ')[0].replace(/-/g, '_').substr(6); - } - - FWP.facet_fields[self.facet.type + '_fields'].names.push(setting_name); - }); - }); - - aliases = [self.facet.type + '_fields']; - } - } - - // Get the actual fields by parsing the aliases (groups) - let fields = self.getFields(aliases); - let html = ''; - - // Add UI-dependant fields - if ('undefined' !== typeof facet_obj.ui_fields) { - if ('undefined' !== typeof self.facet.ui_type && '' != self.facet.ui_type) { - let ui_fields = facet_obj.ui_fields[self.facet.ui_type]; - aliases = aliases.concat(ui_fields); - fields = fields.concat(this.getFields(ui_fields)); - } - } - - let combined = ['label', 'name', 'type', 'source', '_code'].concat(fields); - - // Remove irrelevant settings - $.each(Object.keys(self.facet), function(setting_name) { - if (-1 == combined.indexOf(setting_name)) { - Vue.delete(self.facet, setting_name); - } - }); - - // Add new settings - $.each(aliases, function(alias_name) { - let $parsed = $(FWP.facet_fields[alias_name].html); - - $.each(FWP.facet_fields[alias_name].names, function(setting_name) { - let name_dashed = setting_name.replace(/_/g, '-'); - let $input = $parsed.find('.facet-' + name_dashed); - let val = $input.val(); - - if (0 < $input.len()) { - $input.attr('v-model', 'facet.' + setting_name); - - if ('undefined' === typeof self.facet[setting_name]) { - if ($input.is('[type=checkbox]')) { - val = $input.nodes[0].checked ? 'yes' : 'no'; - } - if ('[]' === val) { - val = []; - } - } - else { - val = self.facet[setting_name]; - Vue.delete(self.facet, setting_name); - } - - Vue.set(self.facet, setting_name, val); - } - }); - - // Update the documentFragment HTML to include the "v-model" - $.each($parsed.nodes[0].children, function(el) { - html += el.outerHTML; - }); - }); - - return html; - } - }, - watch: { - 'facet.type': function(val) { - if ('search' == val || 'pager' == val || 'reset' == val || 'sort' == val) { - Vue.delete(this.facet, 'source'); - } - } - } - }); - - Vue.component('data-sources', { - props: { - facet: Object, - settingName: { - type: String, - default: 'source' - } - }, - template: ` - - `, - computed: { - className() { - return 'facet-' + this.settingName.replace(/_/g, '-'); - } - }, - mounted() { - fSelect(this.$el); - } - }); - - Vue.component('facet-names', { - props: { - facet: Object, - setting: String - }, - template: ` - - `, - computed: { - className() { - return 'facet-' + this.setting.replace(/_/g, '-'); - } - }, - methods: { - bindSelectedClass(name) { - return this.facet[this.setting].includes(name) ? 'selected' : ''; - } - }, - created() { - if ('undefined' === typeof this.facet[this.setting]) { - this.facet[this.setting] = []; - } - }, - mounted() { - fSelect(this.$el, { 'placeholder': 'Choose facets' }); - } - }); - - Vue.component('ui-type', { - props: { - facet: Object - }, - created() { - this.ui_fields = FWP.facet_types[this.facet.type].ui_fields || []; - this.sorted = Object.keys(this.ui_fields).reverse(); - }, - template: ` - - ` - }); - - Vue.component('sort-options', { - props: { - facet: Object - }, - template: ` -
    -
    -
    - - - -
    - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - -
    -
    - -
    - {{ 'Add sort' | i18n }} -
    -
    - `, - methods: { - addSort() { - this.facet.sort_options.push({ - label: 'New option', - name: 'new_option', - orderby: [{ - key: 'title', - order: 'ASC', - type: 'CHAR' - }] - }); - }, - addSortField(opts, index) { - opts.splice(index + 1, 0, { - key: 'title', - order: 'ASC', - type: 'CHAR' - }); - }, - moveUp(opts, index) { - opts.splice(index -1, 0, opts.splice(index, 1)[0]); - }, - removeItem(row, index) { - Vue.delete(row, index); - }, - setName(row, e) { - row.name = this.$root.sanitizeName(e.target.innerHTML); - } - } - }); - - // Vue instance - FWP.vue = new Vue({ - el: '#app', - data: { - app: FWP.data, - editing: {}, - editing_facet: false, - editing_template: false, - row_counts: {}, - active_tab: 'facets', - active_subnav: 'general', - is_support_loaded: false, - is_name_editable: false, - is_rebuild_open: false, - is_indexing: false, - timeout: null - }, - methods: { - addItem(type) { - if ('facet' == type) { - let len = this.app.facets.push({ - 'name': 'new_facet', - 'label': 'New Facet', - 'type': 'checkboxes', - 'source': 'post_type' - }); - this.editItem('facet', this.app.facets[len-1]); - } - else { - let len = this.app.templates.push({ - 'name': 'new_template', - 'label': 'New Template', - 'query': '', - 'template': '' - }); - this.editItem('template', this.app.templates[len-1]); - } - }, - duplicateItem(type, index) { - let facet = this.cloneObj(this.app[type + 's'][index]); - facet.label += ' (copy)'; - facet.name += '_copy'; - - this.app[type + 's'].splice(index+1, 0, facet) - this.editItem(type, facet); - }, - editItem(type, data) { - this['editing_' + type] = true; - this.editing = data; - window.scrollTo(0, 0); - }, - doneEditing() { - this.editing_template = false; - this.editing_facet = false; - this.editing = {}; - }, - tabClick(which) { - this.doneEditing(); - this.active_tab = which; - if ('support' === which) { - this.is_support_loaded = true; - } - }, - getItemLabel() { - return this.editing.label; - }, - deleteItem(type, index) { - this.app[type + 's'].splice(index, 1); - }, - saveChanges() { - window.setStatus('load', FWP.__('Saving') + '...'); - - let data = JSON.parse(JSON.stringify(FWP.data)); - - // Remove code-based facets and templates - data.facets = data.facets.filter(obj => 'undefined' === typeof obj['_code']); - data.templates = data.templates.filter(obj => 'undefined' === typeof obj['_code']); - - // Settings save hook - data = FWP.hooks.applyFilters('facetwp/save_settings', { - action: 'facetwp_save_settings', - nonce: FWP.nonce, - data: data - }); - - $.post(ajaxurl, data, { - done: ({code, message}) => { - var code = ('success' == code) ? 'ok' : code; - window.setStatus(code, message); - }, - fail: (err) => { - window.setStatus('error', err); - } - }); - }, - rebuildAction() { - this.is_indexing ? this.cancelReindex() : this.rebuildIndex(); - }, - rebuildIndex() { - let self = this; - - if (this.is_indexing) { - return; - } - - this.is_indexing = true; - - $.post(ajaxurl, { action: 'facetwp_rebuild_index', nonce: FWP.nonce }); - window.setStatus('load', FWP.__('Indexing') + '... 0%'); - this.timeout = setTimeout(() => { - self.getProgress(); - }, 5000); - }, - cancelReindex() { - let self = this; - - $.post(ajaxurl, { - action: 'facetwp_get_info', - type: 'cancel_reindex', - nonce: FWP.nonce - }, { - done: ({message}) => { - self.is_indexing = false; - clearTimeout(self.timeout); - window.setStatus('error', message); - } - }); - }, - getProgress() { - let self = this; - let isNumeric = (obj) => !Array.isArray(obj) && (obj - parseFloat(obj) + 1) >= 0; - - $.post(ajaxurl, { - action: 'facetwp_heartbeat', - nonce: FWP.nonce - }, { - done: (data) => { - if ('-1' == data.pct) { - self.is_indexing = false; - - if (data.rows.length < 1) { - window.setStatus('error', FWP.__('The index table is empty')); - } - else { - window.setStatus('ok', FWP.__('Indexing complete')); - - // Update the row counts - $.each(data.rows, function(count, facet_name) { - Vue.set(self.row_counts, facet_name, count); - }); - } - } - else if (isNumeric(data.pct)) { - window.setStatus('load', FWP.__('Indexing') + '... ' + data.pct + '%'); - self.is_indexing = true; - - self.timeout = setTimeout(() => { - self.getProgress(); - }, 5000); - } - else { - window.setStatus('error', data); - self.is_indexing = false; - } - } - }); - }, - getInfo(type, label) { - window.setStatus('load', FWP.__(label) + '...'); - - $.post(ajaxurl, { - action: 'facetwp_get_info', - type, - nonce: FWP.nonce - }, { - done: ({message}) => { - window.setStatus('error', message); - } - }); - }, - getQueryArgs(template) { - let self = this; - - template.modes.query = 'advanced'; - template.query = FWP.__('Loading') + '...'; - - $.post(ajaxurl, { - action: 'facetwp_get_query_args', - query_obj: template.query_obj, - nonce: FWP.nonce - }, { - done: (message) => { - var json = JSON.stringify(message, null, 2); - json = "'); - template.query = json; - } - }) - }, - showIndexerStats() { - this.getInfo('indexer_stats', 'Looking'); - }, - searchablePostTypes() { - this.getInfo('post_types', 'Looking'); - }, - purgeIndexTable() { - this.getInfo('purge_index_table', 'Purging'); - }, - copyToClipboard(name, type, {target}) { - const $this = $(target); - const $el = $('.facetwp-clipboard'); - const orig_text = $this.text(); - - try { - $el.removeClass('hidden'); - $el.val('[facetwp ' + type + '="' + name + '"]'); - $el.nodes[0].select(); - document.execCommand('copy'); - $el.addClass('hidden'); - $this.text(FWP.__('Copied!')); - } - catch(err) { - $this.text(FWP.__('Press CTRL+C to copy')); - } - - window.setTimeout(() => { - $this.text(orig_text); - }, 2000); - }, - activate() { - $('.facetwp-activation-status').html(FWP.__('Activating') + '...'); - - $.post(ajaxurl, { - action: 'facetwp_license', - nonce: FWP.nonce, - license: $('.facetwp-license').val() - }, { - done: ({message}) => { - $('.facetwp-activation-status').html(message); - } - }) - }, - isNameEditable({name}) { - this.is_name_editable = ('' == name || 'new_' == name.substr(0, 4)); - }, - maybeEditName(item) { - if (this.is_name_editable) { - item.name = this.sanitizeName(item.label); - } - }, - sanitizeName(name) { - let val = name.trim().toLowerCase(); - val = val.replace(/[^\w- ]/g, ''); // strip invalid characters - val = val.replace(/[- ]/g, '_'); // replace space and hyphen with underscore - val = val.replace(/[_]{2,}/g, '_'); // strip consecutive underscores - val = ('pager' == val || 'sort' == val || 'labels' == val) ? val + '_' : val; // reserved - return val; - }, - documentClick({target}) { - let el = target; - - if (! el.classList.contains('btn-caret')) { - this.is_rebuild_open = false; - } - }, - cloneObj(obj) { - return JSON.parse(JSON.stringify(obj)); - } - }, - computed: { - isEditing() { - return this.editing_facet || this.editing_template; - }, - indexButtonLabel() { - return this.is_indexing ? FWP.__('Stop indexer') : FWP.__('Re-index'); - } - }, - created() { - document.addEventListener('click', this.documentClick); - }, - mounted() { - this.getProgress(); - } - }); - } - - function init_custom_js() { - - window.setStatus = (code, message) => { - $('.facetwp-response').html(message); - $('.facetwp-response-icon').nodes[0].setAttribute('data-status', code); - - if ('error' == code) { - $('.facetwp-response').addClass('visible'); - } - }; - - $().on('click', '.facetwp-settings-section .facetwp-switch', () => { - window.setStatus('error', 'Press "Save changes" to apply'); - }); - - $().on('click', '.facetwp-response-wrap', () => { - $('.facetwp-response').toggleClass('visible'); - }); - - // Export - $().on('click', '.export-submit', () => { - $('.import-code').val(FWP.__('Loading') + '...'); - - $.post(ajaxurl, { - action: 'facetwp_backup', - nonce: FWP.nonce, - action_type: 'export', - items: $('.export-items').val() - }, { - done: (resp) => { - $('.import-code').val(JSON.stringify(resp)); - } - }) - }); - - // Import - $().on('click', '.import-submit', () => { - window.setStatus('load', FWP.__('Importing') + '...'); - - try { - var code = JSON.parse($('.import-code').val()); - - $.post(ajaxurl, { - action: 'facetwp_backup', - nonce: FWP.nonce, - action_type: 'import', - import_code: code, - overwrite: $('.import-overwrite').nodes[0].checked ? 1 : 0 - }, { - dataType: 'text', - done: (resp) => { - window.setStatus('ok', resp); - setTimeout(() => { - window.location.reload(); - }, 1500); - } - }); - } - catch(err) { - window.setStatus('error', 'Invalid JSON'); - } - }); - - // Initialize tooltips - $().on('mouseover', '.facetwp-tooltip', function() { - if (!this.classList.contains('.ftip-enabled')) { - fTip(this, { - content: (node) => $(node).find('.facetwp-tooltip-content').html() - }).open(); - } - }); - - // fSelect - fSelect('.export-items'); - } - -})(fUtil); diff --git a/wp/wp-content/plugins/facetwp/assets/js/src/deprecated.js b/wp/wp-content/plugins/facetwp/assets/js/src/deprecated.js deleted file mode 100644 index 30ae25ca..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/src/deprecated.js +++ /dev/null @@ -1,10 +0,0 @@ -FWP.deprecated = (old_method, new_method, ...args) => { - console.warn('FWP.' + old_method + '() has changed to FWP.' + new_method + '()'); - return FWP[new_method](...args); -}; -FWP.build_post_data = (...args) => FWP.deprecated('build_post_data', 'buildPostData', ...args); -FWP.build_query_string = (...args) => FWP.deprecated('build_query_string', 'buildQueryString', ...args); -FWP.fetch_data = (...args) => FWP.deprecated('fetch_data', 'fetchData', ...args); -FWP.load_from_hash = (...args) => FWP.deprecated('load_from_hash', 'loadFromHash', ...args); -FWP.parse_facets = (...args) => FWP.deprecated('parse_facets', 'parseFacets', ...args); -FWP.set_hash = (...args) => FWP.deprecated('set_hash', 'setHash', ...args); diff --git a/wp/wp-content/plugins/facetwp/assets/js/src/event-manager.js b/wp/wp-content/plugins/facetwp/assets/js/src/event-manager.js deleted file mode 100644 index 738ba6f3..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/src/event-manager.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * WP-JS-Hooks - * @version 1.0.0 - * @author Carl Danley & 10up - */ -!function(t,n){"use strict";t.FWP=t.FWP||{},t.FWP.hooks=t.FWP.hooks||new function(){function t(t,n,r,i){var e,o,c;if(f[t][n])if(r)if(e=f[t][n],i)for(c=e.length;c--;)(o=e[c]).callback===r&&o.context===i&&e.splice(c,1);else for(c=e.length;c--;)e[c].callback===r&&e.splice(c,1);else f[t][n]=[]}function n(t,n,i,e,o){var c={callback:i,priority:e,context:o},l=f[t][n];l?(l.push(c),l=r(l)):l=[c],f[t][n]=l}function r(t){for(var n,r,i,e=1,o=t.length;en.priority;)t[r]=t[r-1],--r;t[r]=n}return t}function i(t,n,r){var i,e,o=f[t][n];if(!o)return"filters"===t&&r[0];if(e=o.length,"filters"===t)for(i=0;i { - return $.post(endpoint, { - action: 'facetwp_autocomplete_load', - facet_name: facet_name, - query: el.value, - data: FWP.buildPostData() - }, { - done: (resp) => { - this.fcomplete.render(resp); - } - }); - }; - options.onSelect = () => FWP.autoload(); - - fComplete(el, options); - }); - }); - - $().on('keyup', '.facetwp-autocomplete', function(e) { - if (13 === e.which && ! FWP.is_refresh) { - FWP.autoload(); - } - }); - - $().on('click', '.facetwp-autocomplete-update', function() { - FWP.autoload(); - }); - - /* ======== Checkboxes ======== */ - - FWP.hooks.addAction('facetwp/refresh/checkboxes', function($this, facet_name) { - var selected_values = []; - $this.find('.facetwp-checkbox.checked').each(function() { - selected_values.push( - $(this).attr('data-value') - ); - }); - FWP.facets[facet_name] = selected_values; - }); - - FWP.hooks.addFilter('facetwp/selections/checkboxes', function(output, params) { - var choices = []; - $.each(params.selected_values, function(val) { - var $item = params.el.find('.facetwp-checkbox[data-value="' + val + '"]'); - if ($item.len()) { - var choice = $($item.html()); - choice.find('.facetwp-counter').remove(); - choice.find('.facetwp-expand').remove(); - choices.push({ - value: val, - label: choice.text() - }); - } - }); - return choices; - }); - - $().on('click', '.facetwp-type-checkboxes .facetwp-expand', function(e) { - var $wrap = $(this).closest('.facetwp-checkbox').next('.facetwp-depth'); - $wrap.toggleClass('visible'); - var content = $wrap.hasClass('visible') ? FWP_JSON['collapse'] : FWP_JSON['expand']; - $(this).html(content); - e.stopImmediatePropagation(); - }); - - $().on('click', '.facetwp-type-checkboxes .facetwp-checkbox:not(.disabled)', function() { - var $cb = $(this); - var is_checked = ! $cb.hasClass('checked'); - var is_child = $cb.closest('.facetwp-depth').len() > 0; - var is_parent = $cb.next().hasClass('facetwp-depth'); - - // if a parent is clicked, deselect all of its children - if (is_parent) { - $cb.next('.facetwp-depth').find('.facetwp-checkbox').removeClass('checked'); - } - // if a child is clicked, deselects all of its parents - if (is_child) { - $cb.parents('.facetwp-depth').each(function() { - $(this).prev('.facetwp-checkbox').removeClass('checked'); - }); - } - - $cb.toggleClass('checked', is_checked); - FWP.autoload(); - }); - - $().on('click', '.facetwp-type-checkboxes .facetwp-toggle', function() { - var $parent = $(this).closest('.facetwp-facet'); - $parent.find('.facetwp-toggle').toggleClass('facetwp-hidden'); - $parent.find('.facetwp-overflow').toggleClass('facetwp-hidden'); - }); - - $().on('facetwp-loaded', function() { - $('.facetwp-type-checkboxes .facetwp-overflow').each(function() { - var num = $(this).find('.facetwp-checkbox').len(); - var $el = $(this).next('.facetwp-toggle'); - $el.text($el.text().replace('{num}', num)); - - // auto-expand if a checkbox within the overflow is checked - if (0 < $(this).find('.facetwp-checkbox.checked').len()) { - $el.trigger('click'); - } - }); - - // hierarchy expand / collapse buttons - $('.facetwp-type-checkboxes').each(function() { - var $facet = $(this); - var name = $facet.attr('data-name'); - - // error handling - if (Object.keys(FWP.settings).length < 1) { - return; - } - - // expand children - if ('yes' === FWP.settings[name]['show_expanded']) { - $facet.find('.facetwp-depth').addClass('visible'); - } - - if (1 > $facet.find('.facetwp-expand').len()) { - - // expand groups with selected items - $facet.find('.facetwp-checkbox.checked').each(function() { - $(this).parents('.facetwp-depth').addClass('visible'); - }); - - // add the toggle button - $facet.find('.facetwp-depth').each(function() { - var which = $(this).hasClass('visible') ? 'collapse' : 'expand'; - $(this).prev('.facetwp-checkbox').append(' ' + FWP_JSON[which] + ''); - }); - } - }); - }); - - /* ======== Radio ======== */ - - FWP.hooks.addAction('facetwp/refresh/radio', function($this, facet_name) { - var selected_values = []; - $this.find('.facetwp-radio.checked').each(function() { - var val = $(this).attr('data-value'); - if ('' !== val) { - selected_values.push(val); - } - }); - FWP.facets[facet_name] = selected_values; - }); - - FWP.hooks.addFilter('facetwp/selections/radio', function(output, params) { - var choices = []; - $.each(params.selected_values, function(val) { - var $item = params.el.find('.facetwp-radio[data-value="' + val + '"]'); - if ($item.len()) { - var choice = $($item.html()); - choice.find('.facetwp-counter').remove(); - choices.push({ - value: val, - label: choice.text() - }); - } - }); - return choices; - }); - - $().on('click', '.facetwp-type-radio .facetwp-radio:not(.disabled)', function() { - var is_checked = $(this).hasClass('checked'); - $(this).closest('.facetwp-facet').find('.facetwp-radio').removeClass('checked'); - if (! is_checked) { - $(this).addClass('checked'); - } - FWP.autoload(); - }); - - /* ======== Date Range ======== */ - - FWP.hooks.addAction('facetwp/refresh/date_range', function($this, facet_name) { - var minNode = $this.find('.facetwp-date-min'); - var maxNode = $this.find('.facetwp-date-max'); - var min = (minNode.len()) ? pVal(minNode.nodes[0]) : ''; - var max = (maxNode.len()) ? pVal(maxNode.nodes[0]) : ''; - FWP.facets[facet_name] = ('' !== min || '' !== max) ? [min, max] : []; - }); - - FWP.hooks.addFilter('facetwp/selections/date_range', function(output, params) { - var $el = params.el; - var vals = params.selected_values; - var facet_name = $el.attr('data-name'); - var fields = FWP.settings[facet_name].fields; - var out = ''; - - if ('exact' == fields) { - if ('' !== vals[0]) { - out = vals[0]; - } - } - else if ('start_date' == fields) { - if ('' !== vals[0]) { - out = '[>=] ' + vals[0]; - } - } - else if ('end_date' == fields) { - if ('' !== vals[1]) { - out = '[<=] ' + vals[1]; - } - } - else if ('both' == fields) { - if ('' !== vals[0] || '' !== vals[1]) { - if ('' !== vals[0] && '' !== vals[1]) { - out = vals[0] + ' - ' + vals[1]; - } - else if ('' !== vals[0]) { - out = '[>=] ' + vals[0]; - } - else if ('' !== vals[1]) { - out = '[<=] ' + vals[1]; - } - } - } - - return out; - }); - - $().on('facetwp-loaded', function() { - var $dates = $('.facetwp-type-date_range .facetwp-date:not(.ready)'); - - if (0 === $dates.len()) { - return; - } - - $dates.each(function() { - var $this = $(this); - var facet_name = $this.closest('.facetwp-facet').attr('data-name'); - var settings = FWP.settings[facet_name]; - var opts = { - onChange: function(obj) { - FWP.autoload(); - } - }; - - if ('' !== settings.locale) { - opts.i18n = settings.locale; - } - - if ('' !== settings.format) { - opts.altFormat = settings.format; - } - - if ('both' == settings.fields) { - var which = $this.hasClass('facetwp-date-min') ? 'min' : 'max'; - opts.minDate = settings.range[which].minDate; - opts.maxDate = settings.range[which].maxDate; - } - else { - opts.minDate = settings.range.minDate; - opts.maxDate = settings.range.maxDate; - } - - opts = FWP.hooks.applyFilters('facetwp/set_options/date_range', opts, { - 'facet_name': facet_name, - 'element': $this - }); - - $this.addClass('ready'); // add class before fDate() - - new fDate(this, opts); - }); - }); - - /* ======== Dropdown ======== */ - - FWP.hooks.addAction('facetwp/refresh/dropdown', function($this, facet_name) { - var val = $this.find('.facetwp-dropdown').val(); - FWP.facets[facet_name] = val ? [val] : []; - }); - - FWP.hooks.addFilter('facetwp/selections/dropdown', function(output, params) { - var $item = params.el.find('.facetwp-dropdown'); - if ($item.len()) { - var dd = $item.nodes[0]; - var text = dd.options[dd.selectedIndex].text; - return text.replace(/\(\d+\)$/, ''); - } - return ''; - }); - - // Use jQuery if available for select2 - var $f = ('function' === typeof jQuery) ? jQuery : fUtil; - - $f(document).on('change', '.facetwp-type-dropdown select', function() { - var $facet = $(this).closest('.facetwp-facet'); - var facet_name = $facet.attr('data-name'); - - if ('' !== $(this).val()) { - FWP.frozen_facets[facet_name] = 'soft'; - } - FWP.autoload(); - }); - - /* ======== fSelect ======== */ - - FWP.hooks.addAction('facetwp/refresh/fselect', function($this, facet_name) { - var val = $this.find('select').val(); - if (null === val || '' === val) { - val = []; - } - FWP.facets[facet_name] = Array.isArray(val) ? val : [val]; - }); - - FWP.hooks.addFilter('facetwp/selections/fselect', function(output, params) { - var choices = []; - $.each(params.selected_values, (val) => { - var $item = params.el.find('option[value="' + val + '"]'); - if ($item.len()) { - choices.push({ - value: val, - label: $item.text() - }); - } - }); - return choices; - }); - - FWP.hooks.addAction('facetwp/loaded', function() { - if (null !== FWP.active_facet) { - var facet = FWP.active_facet; - if ('fselect' == facet.attr('data-type')) { - var input = facet.find('.facetwp-dropdown').nodes[0]; - if (input.fselect.settings.multiple) { - input.fselect.open(); - } - } - } - }); - - $().on('facetwp-loaded', function() { - $('.facetwp-type-fselect select:not(.fs-hidden)').each(function() { - var facet_name = $(this).closest('.facetwp-facet').attr('data-name'); - var settings = FWP.settings[facet_name]; - - settings.optionFormatter = function(label, node) { - var counter = node.getAttribute('data-counter'); - return (counter) ? label + ' (' + counter + ')' : label; - }; - - var opts = FWP.hooks.applyFilters('facetwp/set_options/fselect', settings, { - 'facet_name': facet_name - }); - - fSelect(this, opts); - }); - }); - - $().on('fs:changed', function(e) { - var is_facet = $(e.detail[0]).closest('.facetwp-type-fselect').len() > 0; - if (! FWP.is_refresh && is_facet) { - FWP.autoload(); - } - }); - - $().on('fs:closed', function() { - FWP.active_facet = null; - }); - - /* ======== Hierarchy ======== */ - - FWP.hooks.addAction('facetwp/refresh/hierarchy', function($this, facet_name) { - var selected_values = []; - $this.find('.facetwp-link.checked').each(function() { - selected_values.push( - $(this).attr('data-value') - ); - }); - FWP.facets[facet_name] = selected_values; - }); - - FWP.hooks.addFilter('facetwp/selections/hierarchy', function(output, params) { - var $item = params.el.find('.facetwp-link.checked'); - return $item.len() ? $item.text() : ''; - }); - - $().on('click', '.facetwp-type-hierarchy .facetwp-link', function() { - $(this).closest('.facetwp-facet').find('.facetwp-link').removeClass('checked'); - if ('' !== $(this).attr('data-value')) { - $(this).addClass('checked'); - } - FWP.autoload(); - }); - - $().on('click', '.facetwp-type-hierarchy .facetwp-toggle', function() { - var $parent = $(this).closest('.facetwp-facet'); - $parent.find('.facetwp-toggle').toggleClass('facetwp-hidden'); - $parent.find('.facetwp-overflow').toggleClass('facetwp-hidden'); - }); - - /* ======== Number Range ======== */ - - FWP.hooks.addAction('facetwp/refresh/number_range', function($this, facet_name) { - var min = $this.find('.facetwp-number-min').val() || ''; - var max = $this.find('.facetwp-number-max').val() || ''; - FWP.facets[facet_name] = ('' !== min || '' !== max) ? [min, max] : []; - }); - - FWP.hooks.addFilter('facetwp/selections/number_range', function(output, params) { - var $el = params.el; - var vals = params.selected_values; - var facet_name = $el.attr('data-name'); - var fields = FWP.settings[facet_name].fields; - var out = ''; - - if ('exact' == fields) { - if ('' !== vals[0]) { - out = vals[0]; - } - } - else if ('min' == fields) { - if ('' !== vals[0]) { - out = '[>=] ' + vals[0]; - } - } - else if ('max' == fields) { - if ('' !== vals[1]) { - out = '[<=] ' + vals[1]; - } - } - else if ('both' == fields) { - if ('' !== vals[0] || '' !== vals[1]) { - if ('' !== vals[0] && '' !== vals[1]) { - out = vals[0] + ' - ' + vals[1]; - } - else if ('' !== vals[0]) { - out = '[>=] ' + vals[0]; - } - else if ('' !== vals[1]) { - out = '[<=] ' + vals[1]; - } - } - } - - return out; - }); - - $().on('keyup', '.facetwp-type-number_range .facetwp-number', function(e) { - if (13 === e.which && ! FWP.is_refresh) { - FWP.autoload(); - } - }); - - $().on('click', '.facetwp-type-number_range .facetwp-submit', function() { - FWP.refresh(); - }); - - /* ======== Proximity ======== */ - - $().on('facetwp-loaded', function() { - var $locations = $('.facetwp-location'); - - if ($locations.len() < 1) { - return; - } - - if (! FWP.loaded) { - window.FWP_MAP = window.FWP_MAP || {}; - FWP_MAP.sessionToken = new google.maps.places.AutocompleteSessionToken(); - FWP_MAP.autocompleteService = new google.maps.places.AutocompleteService(); - FWP_MAP.placesService = new google.maps.places.PlacesService( - document.createElement('div') - ); - - // We need FWP_JSON available to grab the queryDelay - $().on('input', '.facetwp-location', FWP.helper.debounce(function(e) { - var val = $(e.target).val(); - var $facet = $(e.target).closest('.facetwp-facet'); - - if ('' == val || val.length < FWP_JSON['proximity']['minLength']) { - $facet.find('.location-results').addClass('facetwp-hidden'); - return; - } - - var options = FWP_JSON['proximity']['autocomplete_options']; - options.sessionToken = FWP_MAP.sessionToken; - options.input = val; - - FWP_MAP.autocompleteService.getPredictions(options, function(results, status) { - if (status === google.maps.places.PlacesServiceStatus.OK) { - var html = ''; - - results.forEach(function(result, index) { - var css = (0 === index) ? ' active' : ''; - html += '
    '; - html += '' + result.structured_formatting.main_text + ' '; - html += '' + result.structured_formatting.secondary_text + ''; - html += '' + result.description + ''; - html += '
    '; - }); - - html += '
    '; - - $facet.find('.location-results').html(html).removeClass('facetwp-hidden'); - } - }); - }, FWP_JSON['proximity']['queryDelay'])); - } - - $locations.each(function(el, idx) { - $(this).trigger('keyup'); - }); - }); - - $().on('click', '.location-result', function() { - var $facet = $(this).closest('.facetwp-facet'); - var place_id = $(this).attr('data-id'); - var description = $(this).find('.result-description').text(); - - FWP_MAP.placesService.getDetails({ - placeId: place_id, - fields: ['geometry'] - }, function(place, status) { - if (status === google.maps.places.PlacesServiceStatus.OK) { - $facet.find('.facetwp-lat').val(place.geometry.location.lat()); - $facet.find('.facetwp-lng').val(place.geometry.location.lng()); - FWP.autoload(); - } - }); - - $('.facetwp-location').val(description); - $('.location-results').addClass('facetwp-hidden'); - }); - - $().on('click', '.facetwp-type-proximity .locate-me', function(e) { - var $this = $(this); - var $facet = $this.closest('.facetwp-facet'); - var $input = $facet.find('.facetwp-location'); - var $lat = $facet.find('.facetwp-lat'); - var $lng = $facet.find('.facetwp-lng'); - - // reset - if ($this.hasClass('f-reset')) { - $lat.val(''); - $lng.val(''); - $input.val(''); - FWP.autoload(); - return; - } - - // loading icon - $this.addClass('f-loading'); - - // HTML5 geolocation - navigator.geolocation.getCurrentPosition(function(position) { - var lat = position.coords.latitude; - var lng = position.coords.longitude; - - $lat.val(lat); - $lng.val(lng); - - var geocoder = new google.maps.Geocoder(); - var latlng = {lat: parseFloat(lat), lng: parseFloat(lng)}; - geocoder.geocode({'location': latlng}, function(results, status) { - if (status === google.maps.GeocoderStatus.OK) { - $input.val(results[0].formatted_address); - } - else { - $input.val('Your location'); - } - $this.addClass('f-reset'); - FWP.autoload(); - }); - - $this.removeClass('f-loading'); - - FWP.hooks.doAction('facetwp/geolocation/success', { - 'facet': $facet, - 'position': position - }); - }, - function(error) { - $this.removeClass('f-loading'); - - FWP.hooks.doAction('facetwp/geolocation/error', { - 'facet': $facet, - 'error': error - }); - }); - }); - - $().on('keyup', '.facetwp-location', function(e) { - var $facet = $(this).closest('.facetwp-facet'); - var method = ('' !== $(this).val()) ? 'addClass' : 'removeClass'; - $facet.find('.locate-me')[method]('f-reset'); - - if (38 === e.which || 40 === e.which || 13 === e.which) { - var curr_index = parseInt($facet.find('.location-result.active').attr('data-index')); - var max_index = parseInt($facet.find('.location-result').last().attr('data-index')); - } - - if (38 === e.which) { // up - var new_index = (0 < curr_index) ? (curr_index - 1) : max_index; - $facet.find('.location-result.active').removeClass('active'); - $facet.find('.location-result[data-index="' + new_index + '"]').addClass('active'); - } - else if (40 === e.which) { // down - var new_index = (curr_index < max_index) ? (curr_index + 1) : 0; - $facet.find('.location-result.active').removeClass('active'); - $facet.find('.location-result[data-index="' + new_index + '"]').addClass('active'); - } - else if (13 === e.which) { // enter - $facet.find('.location-result.active').trigger('click'); - } - }); - - var hideDropdown = function(e) { - var $el = $(e.target); - var $wrap = $el.closest('.facetwp-input-wrap'); - - if ($wrap.len() < 1 || $el.hasClass('f-reset')) { - $('.location-results').addClass('facetwp-hidden'); - } - }; - - $().on('click', hideDropdown); - $().on('focusout', hideDropdown); - - $().on('focusin', '.facetwp-location', function() { - var $facet = $(this).closest('.facetwp-facet'); - if ('' != $(this).val()) { - $facet.find('.location-results').removeClass('facetwp-hidden'); - } - }); - - $().on('change', '.facetwp-radius', function() { - var $facet = $(this).closest('.facetwp-facet'); - if ('' !== $facet.find('.facetwp-location').val()) { - FWP.autoload(); - } - }); - - $().on('input', '.facetwp-radius-slider', function(e) { - var $facet = $(this).closest('.facetwp-facet'); - $facet.find('.facetwp-radius-dist').text(e.target.value); - }); - - FWP.hooks.addAction('facetwp/refresh/proximity', function($this, facet_name) { - var lat = $this.find('.facetwp-lat').val(); - var lng = $this.find('.facetwp-lng').val(); - var radius = $this.find('.facetwp-radius').val(); - var location = encodeURIComponent($this.find('.facetwp-location').val()); - FWP.frozen_facets[facet_name] = 'hard'; - FWP.facets[facet_name] = ('' !== lat && 'undefined' !== typeof lat) ? - [lat, lng, radius, location] : []; - }); - - FWP.hooks.addFilter('facetwp/selections/proximity', function(label, params) { - return FWP_JSON['proximity']['clearText']; - }); - - /* ======== Search ======== */ - - FWP.logic.search = { - delay_refresh: FWP.helper.debounce(function(facet_name) { - FWP.frozen_facets[facet_name] = 'soft'; - FWP.autoload(); - }, 500) - }; - - FWP.hooks.addAction('facetwp/refresh/search', function($this, facet_name) { - var $input = $this.find('.facetwp-search'); - FWP.facets[facet_name] = $input.val() || ''; - $this.find('.facetwp-icon').addClass('f-loading'); - }); - - FWP.hooks.addAction('facetwp/loaded', function() { - $('.facetwp-type-search .facetwp-icon').removeClass('f-loading'); - }); - - $().on('keyup', '.facetwp-type-search .facetwp-search', function(e) { - if (FWP.is_refresh) { - return; - } - - var $facet = $(this).closest('.facetwp-facet'); - var facet_name = $facet.attr('data-name'); - - if ('undefined' !== typeof FWP.settings[facet_name]) { - if ('yes' === FWP.settings[facet_name]['auto_refresh']) { - FWP.logic.search['delay_refresh'](facet_name); - } - else if (13 === e.keyCode) { - FWP.autoload(); - } - } - }); - - $().on('click', '.facetwp-type-search .facetwp-icon', function() { - if (! FWP.is_refresh) { - FWP.autoload(); - } - }); - - /* ======== Slider ======== */ - - FWP.hooks.addAction('facetwp/refresh/slider', function($this, facet_name) { - FWP.facets[facet_name] = []; - - var $active = FWP.active_facet; - var url_var = FWP.helper.getUrlVar(facet_name); - - if (null !== $active && facet_name === $active.attr('data-name')) { - var node = $active.find('.facetwp-slider').nodes[0]; - if ('undefined' !== typeof node.noUiSlider) { - FWP.facets[facet_name] = node.noUiSlider.get(); - } - } - else if (false !== url_var) { - FWP.facets[facet_name] = url_var.replace('%2C', ',').split(','); - } - - // prevent changes during loading - $this.find('.facetwp-slider').attr('disabled', true); - }); - - FWP.hooks.addAction('facetwp/loaded', function() { - $('.facetwp-type-slider .facetwp-slider').nodes.forEach(node => node.removeAttribute('disabled')); - }); - - FWP.hooks.addAction('facetwp/set_label/slider', function($this) { - var facet_name = $this.attr('data-name'); - var min = FWP.settings[facet_name]['lower']; - var max = FWP.settings[facet_name]['upper']; - var format = FWP.settings[facet_name]['format']; - var opts = { - decimal_separator: FWP.settings[facet_name]['decimal_separator'], - thousands_separator: FWP.settings[facet_name]['thousands_separator'] - }; - - var prefix = FWP.settings[facet_name]['prefix']; - var suffix = FWP.settings[facet_name]['suffix']; - - if ( min === max ) { - var label = prefix + nummy(min).format(format, opts) + suffix; - } - else { - var label = prefix + nummy(min).format(format, opts) + suffix + ' — ' + - prefix + nummy(max).format(format, opts) + suffix; - } - $this.find('.facetwp-slider-label').html(label); - }); - - FWP.hooks.addFilter('facetwp/selections/slider', function(output, params) { - var $item = params.el.find('.facetwp-slider-label'); - return $item.len() ? $item.text() : ''; - }); - - $().on('facetwp-loaded', function() { - $('.facetwp-type-slider .facetwp-slider').each(function() { - var $this = $(this); - var $parent = $this.closest('.facetwp-facet'); - var facet_name = $parent.attr('data-name'); - var opts = FWP.settings[facet_name]; - - // custom slider options - var slider_opts = FWP.hooks.applyFilters('facetwp/set_options/slider', { - range: opts.range, - start: opts.start, - step: parseFloat(opts.step), - connect: true - }, { 'facet_name': facet_name }); - - if ($this.hasClass('ready')) { - $this.nodes[0].noUiSlider.updateOptions({ - range: slider_opts.range - }, false); - } - else { - - // fail on slider already initialized - if ('undefined' !== typeof this.noUiSlider) { - return; - } - - // fail if start values are null - if (null === slider_opts.start[0]) { - return; - } - - // fail on invalid ranges - if (parseFloat(opts.range.min) > parseFloat(opts.range.max)) { - FWP.settings[facet_name]['lower'] = opts.range.min; - FWP.settings[facet_name]['upper'] = opts.range.max; - FWP.hooks.doAction('facetwp/set_label/slider', $parent); - return; - } - - // disable the UI if only 1 value - if (parseFloat(opts.range.min) == parseFloat(opts.range.max)) { - $this.attr('data-disabled', 'true'); - } - - var slider = this; - noUiSlider.create(slider, slider_opts); - slider.noUiSlider.on('update', function(values, handle) { - FWP.settings[facet_name]['lower'] = values[0]; - FWP.settings[facet_name]['upper'] = values[1]; - FWP.hooks.doAction('facetwp/set_label/slider', $parent); - }); - slider.noUiSlider.on('set', function() { - FWP.active_facet = $this.closest('.facetwp-facet'); - FWP.autoload(); - }); - - $this.addClass('ready'); - } - }); - - // hide reset buttons - $('.facetwp-type-slider').each(function() { - var name = $(this).attr('data-name'); - var $button = $(this).find('.facetwp-slider-reset'); - var method = FWP.facets[name].length ? 'removeClass' : 'addClass'; - $button[method]('facetwp-hidden'); - }); - }); - - $().on('click', '.facetwp-type-slider .facetwp-slider-reset', function() { - var facet_name = $(this).closest('.facetwp-facet').attr('data-name'); - FWP.reset(facet_name); - }); - - /* ======== Rating ======== */ - - FWP.hooks.addAction('facetwp/refresh/rating', function($this, facet_name) { - var selected_values = []; - $this.find('.facetwp-star.selected').each(function() { - var val = $(this).attr('data-value'); - if ('' != val) { - selected_values.push(val); - } - }); - FWP.facets[facet_name] = selected_values; - }); - - $().on('mouseover', '.facetwp-star', function() { - var $facet = $(this).closest('.facetwp-facet'); - - if ($(this).hasClass('selected')) { - $facet.find('.facetwp-star-label').text(FWP_JSON['rating']['Undo']); - } - else { - var label = ('5' == $(this).attr('data-value')) ? '' : FWP_JSON['rating']['& up']; - $facet.find('.facetwp-star-label').text(label); - $facet.find('.facetwp-counter').text('(' + $(this).attr('data-counter') + ')'); - } - }); - - $().on('mouseout', '.facetwp-star', function() { - var $facet = $(this).closest('.facetwp-facet'); - $facet.find('.facetwp-star-label').text(''); - $facet.find('.facetwp-counter').text(''); - }); - - $().on('click', '.facetwp-star', function() { - var $facet = $(this).closest('.facetwp-facet'); - var is_selected = $(this).hasClass('selected'); - $facet.find('.facetwp-star').removeClass('selected'); - if (! is_selected) { - $(this).addClass('selected'); - } - FWP.autoload(); - }); - - /* ======== Sort ======== */ - - FWP.hooks.addAction('facetwp/refresh/sort', function($this, facet_name) { - var val = $this.find('select').val(); - FWP.facets[facet_name] = val ? [val] : []; - }); - - $().on('change', '.facetwp-type-sort select', function() { - var $facet = $(this).closest('.facetwp-facet'); - var facet_name = $facet.attr('data-name'); - - if ('' !== $(this).val()) { - FWP.frozen_facets[facet_name] = 'hard'; - } - FWP.autoload(); - }); - - /* ======== Pager ======== */ - - FWP.hooks.addAction('facetwp/refresh/pager', function($this, facet_name) { - FWP.facets[facet_name] = []; - }); - - FWP.hooks.addFilter('facetwp/template_html', function(resp, params) { - if (FWP.is_load_more) { - FWP.is_load_more = false; - - // layout builder - if ( 0 < $('.fwpl-layout').len() ) { - var layout = $(params.html).find('.fwpl-layout').html(); - $('.fwpl-layout').append(layout); - } - // other - else { - $('.facetwp-template').append(params.html); - } - return true; - } - return resp; - }); - - $().on('click', '.facetwp-load-more', function() { - var loading_text = $(this).attr('data-loading'); - $(this).html(loading_text); - - FWP.is_load_more = true; // set the flag - FWP.load_more_paged += 1; // next page - FWP.paged = FWP.load_more_paged; // grab the next page of results - FWP.soft_refresh = true; // don't process facets - FWP.refresh(); - }); - - $().on('facetwp-loaded', function() { - var is_visible = (FWP.settings.pager.page < FWP.settings.pager.total_pages); - var method = is_visible ? 'removeClass' : 'addClass'; - $('.facetwp-load-more')[method]('facetwp-hidden'); - }); - - $().on('facetwp-refresh', function() { - if (! FWP.loaded || ! FWP.is_load_more) { - FWP.load_more_paged = 1; - } - }); - - /* ======== Reset ======== */ - - $().on('click', '.facetwp-reset', function() { - let values = $(this).nodes[0]._facets; - FWP.reset(values); - }); - - $().on('facetwp-loaded', function() { - if (! FWP.loaded) { - $('.facetwp-reset').each(function() { - let $this = $(this); - let mode = $this.attr('data-mode'); - let values = $this.attr('data-values'); - - values = (null == values) ? Object.keys(FWP.facets) : values.split(','); - - if ('exclude' == mode) { - values = Object.keys(FWP.facets).filter(name => { - return !values.includes(name); - }); - } - - // store the target facets (array) within the DOM element - $this.nodes[0]._facets = values; - }); - } - - // hide the reset if its target facets are all empty - $('.facetwp-hide-empty').each(function() { - let $this = $(this); - let $wrap = $this.closest('.facetwp-facet'); - let facets = $this.nodes[0]._facets; - let all_empty = facets.every(val => FWP.facets[val].length < 1); - all_empty ? $wrap.addClass('facetwp-hidden') : $wrap.removeClass('facetwp-hidden'); - }); - }); - -})(fUtil); diff --git a/wp/wp-content/plugins/facetwp/assets/js/src/front.js b/wp/wp-content/plugins/facetwp/assets/js/src/front.js deleted file mode 100644 index aaa1f70b..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/src/front.js +++ /dev/null @@ -1,659 +0,0 @@ -window.FWP = (($) => { - - class FacetWP { - constructor() { - this.import(); - this.bindEvents(); - } - - import() { - if ('undefined' !== typeof FWP) { - $.each(FWP, (val, key) => this[key] = val); - } - } - - init() { - var FWP = this; - - this.setDefaults(); - - if (0 < $('.facetwp-sort').len()) { - FWP.extras.sort = 'default'; - } - - if (0 < $('.facetwp-pager').len()) { - FWP.extras.pager = true; - } - - if (0 < $('.facetwp-per-page').len()) { - FWP.extras.per_page = 'default'; - } - - if (0 < $('.facetwp-counts').len()) { - FWP.extras.counts = true; - } - - if (0 < $('.facetwp-selections').len()) { - FWP.extras.selections = true; - } - - // Make sure there's a template - var has_template = $('.facetwp-template').len() > 0; - - if (! has_template) { - var has_loop = FWP.helper.detectLoop(document.body); - - if (has_loop) { - $(has_loop).addClass('facetwp-template'); - } - else { - return; - } - } - - var $div = $('.facetwp-template').first(); - FWP.template = $div.attr('data-name') ? $div.attr('data-name') : 'wp'; - - // Facets inside the template? - if ($div.find('.facetwp-facet').len() > 0) { - console.error('Facets should not be inside the "facetwp-template" container'); - } - - FWP.hooks.doAction('facetwp/ready'); - - // Generate the user selections - if (FWP.extras.selections) { - FWP.hooks.addAction('facetwp/loaded', () => { - - var selections = ''; - var skipped = ['pager', 'reset', 'sort']; - - $.each(FWP.facets, (val, key) => { - if (val.length < 1 || ! $.isset(FWP.settings.labels[key]) || skipped.includes(FWP.facet_type[key])) { - return true; // skip facet - } - - var choices = val; - var $el = $('.facetwp-facet-' + key); - var facet_type = $el.attr('data-ui') || $el.attr('data-type'); - choices = FWP.hooks.applyFilters('facetwp/selections/' + facet_type, choices, { - 'el': $el, - 'selected_values': choices - }); - - if (choices.length) { - if ('string' === typeof choices) { - choices = [{ value: '', label: choices }]; - } - else if (! $.isset(choices[0].label)) { - choices = [{ value: '', label: choices[0] }]; - } - } - - var values = ''; - $.each(choices, (choice) => { - values += '' + FWP.helper.escapeHtml(choice.label) + ''; - }); - - selections += '
  • ' + FWP.settings.labels[key] + ': ' + values + '
  • '; - }); - - if ('' !== selections) { - selections = '
      ' + selections + '
    '; - } - - $('.facetwp-selections').html(selections); - }); - } - - FWP.refresh(); - } - - setDefaults() { - let defaults = { - 'facets': {}, - 'template': null, - 'settings': {}, - 'is_reset': false, - 'is_refresh': false, - 'is_bfcache': false, - 'is_hash_click': false, - 'is_load_more': false, - 'auto_refresh': true, - 'soft_refresh': false, - 'frozen_facets': {}, - 'active_facet': null, - 'facet_type': {}, - 'loaded': false, - 'extras': {}, - 'paged': 1 - }; - - for (var prop in defaults) { - if (!$.isset(this[prop])) { - this[prop] = defaults[prop]; - } - } - } - - refresh() { - FWP.is_refresh = true; - - // Add the loading overlay - FWP.toggleOverlay('on'); - - // Load facet DOM values - if (! FWP.is_reset) { - FWP.parseFacets(); - } - - // Check the URL on pageload - if (! FWP.loaded) { - FWP.loadFromHash(); - } - - // Fire a notification event - $().trigger('facetwp-refresh'); - - // Trigger window.onpopstate - if (FWP.loaded && ! FWP.is_popstate && ! FWP.is_load_more) { - FWP.setHash(); - } - - // Preload? - if (! FWP.loaded && ! FWP.is_bfcache && $.isset(FWP_JSON.preload_data)) { - FWP.render(FWP_JSON.preload_data); - } - else { - FWP.fetchData(); - } - - // Unfreeze any soft-frozen facets - $.each(FWP.frozen_facets, (type, name) => { - if ('hard' !== type) { - delete FWP.frozen_facets[name]; - } - }); - - // Cleanup - FWP.paged = 1; - FWP.soft_refresh = false; - FWP.is_refresh = false; - FWP.is_reset = false; - } - - autoload() { - if (FWP.auto_refresh && ! FWP.is_refresh) { - FWP.refresh(); - } - } - - parseFacets() { - FWP.facets = {}; - - $('.facetwp-facet').each(function() { - var $this = $(this); - var facet_name = $this.attr('data-name'); - var facet_type = $this.attr('data-type'); - var is_ignored = $this.hasClass('facetwp-ignore'); - - if (null !== $this.attr('data-ui')) { - facet_type = $this.attr('data-ui'); - } - - // Store the facet type - FWP.facet_type[facet_name] = facet_type; - - // Plugin hook - if (! is_ignored) { - FWP.hooks.doAction('facetwp/refresh/' + facet_type, $this, facet_name); - } - }); - } - - buildQueryString() { - var query_string = ''; - - // Non-FacetWP URL variables - var hash = []; - var get_str = window.location.search.replace('?', '').split('&'); - $.each(get_str, (val) => { - var param_name = val.split('=')[0]; - if (0 !== param_name.indexOf(FWP_JSON.prefix)) { - hash.push(val); - } - }); - hash = hash.join('&'); - - // FacetWP URL variables - var fwp_vars = Object.assign({}, FWP.facets); - - // Add pagination to the URL hash - if (1 < FWP.paged) { - fwp_vars['paged'] = FWP.paged; - } - - // Add "per page" to the URL hash - if (FWP.extras.per_page && 'default' !== FWP.extras.per_page) { - fwp_vars['per_page'] = FWP.extras.per_page; - } - - // Add sorting to the URL hash - if (FWP.extras.sort && 'default' !== FWP.extras.sort) { - fwp_vars['sort'] = FWP.extras.sort; - } - - fwp_vars = FWP.helper.serialize(fwp_vars, FWP_JSON.prefix); - - if ('' !== hash) { - query_string += hash; - } - if ('' !== fwp_vars) { - query_string += ('' !== hash ? '&' : '') + fwp_vars; - } - - return query_string; - } - - setHash() { - var query_string = FWP.buildQueryString(); - - if ('' !== query_string) { - query_string = '?' + query_string; - } - - if (history.pushState) { - history.pushState(null, null, window.location.pathname + query_string); - } - - // Update FWP_HTTP.get - FWP_HTTP.get = {}; - window.location.search.replace('?', '').split('&').forEach((el) => { - var item = el.split('='); - - if ('' != item[0]) { - FWP_HTTP.get[item[0]] = item[1]; - } - }); - } - - loadFromHash() { - var hash = []; - var get_str = window.location.search.replace('?', '').split('&'); - $.each(get_str, (val) => { - var param_name = val.split('=')[0]; - if (0 === param_name.indexOf(FWP_JSON.prefix)) { - hash.push(val.replace(FWP_JSON.prefix, '')); - } - }); - hash = hash.join('&'); - - // Reset facet values - $.each(FWP.facets, (val, key) => { - FWP.facets[key] = []; - }); - - FWP.paged = 1; - FWP.extras.sort = 'default'; - - if ('' !== hash) { - hash = hash.split('&'); - $.each(hash, (chunk) => { - var obj = chunk.split('=')[0]; - var val = chunk.split('=')[1]; - - if ('paged' === obj) { - FWP.paged = val; - } - else if ('per_page' === obj || 'sort' === obj) { - FWP.extras[obj] = val; - } - else if ('' !== val) { - var type = $.isset(FWP.facet_type[obj]) ? FWP.facet_type[obj] : ''; - if ('search' === type || 'autocomplete' === type) { - FWP.facets[obj] = decodeURIComponent(val); - } - else { - FWP.facets[obj] = decodeURIComponent(val).split(','); - } - } - }); - } - } - - buildPostData() { - return { - 'facets': FWP.facets, - 'frozen_facets': FWP.frozen_facets, - 'http_params': FWP_HTTP, - 'template': FWP.template, - 'extras': FWP.extras, - 'soft_refresh': FWP.soft_refresh ? 1 : 0, - 'is_bfcache': FWP.is_bfcache ? 1 : 0, - 'first_load': FWP.loaded ? 0 : 1, - 'paged': FWP.paged - }; - } - - fetchData() { - var endpoint = ('wp' === FWP.template) ? document.URL : FWP_JSON.ajaxurl; - var data = { - action: 'facetwp_refresh', - data: FWP.buildPostData() - }; - - var settings = { - dataType: 'text', // better JSON error handling - done: (resp) => { - try { - var json = JSON.parse(resp); - FWP.render(json); - } - catch(e) { - var pos = resp.indexOf('{"facets'); - if (-1 < pos) { - var json = JSON.parse(resp.substr(pos)); - FWP.render(json); - } - else { - $('.facetwp-template').text('FacetWP was unable to auto-detect the post listing'); - console.log(resp); - } - } - }, - fail: (err) => { - console.log(err); - } - }; - - settings = FWP.hooks.applyFilters('facetwp/ajax_settings', settings); - - $.post(endpoint, data, settings); - } - - render(response) { - FWP.response = response; - - // Don't render CSS-based (or empty) templates on pageload - // The template has already been pre-loaded - if (('wp' === FWP.template || '' === response.template) && ! FWP.loaded && ! FWP.is_bfcache) { - var inject = false; - } - else { - var inject = response.template; - - if ('wp' === FWP.template) { - var obj = $(response.template); - var $tpl = obj.find('.facetwp-template'); - - if ($tpl.len() < 1) { - var loop = FWP.helper.detectLoop(obj.nodes[0]); - - if (loop) { - $tpl = $(loop).addClass('facetwp-template'); - } - } - - if ($tpl.len() > 0) { - var inject = $tpl.html(); - } - else { - // Fallback until "loop_no_results" action is added to WP core - var inject = FWP_JSON['no_results_text']; - } - } - } - - if (false !== inject) { - if (! FWP.hooks.applyFilters('facetwp/template_html', false, { 'response': response, 'html': inject })) { - $('.facetwp-template').html(inject); - } - } - - // Populate each facet box - $.each(response.facets, (val, name) => { - $('.facetwp-facet-' + name).html(val); - }); - - // Populate the counts - if ($.isset(response.counts)) { - $('.facetwp-counts').html(response.counts); - } - - // Populate the pager - if ($.isset(response.pager)) { - $('.facetwp-pager').html(response.pager); - } - - // Populate the "per page" box - if ($.isset(response.per_page)) { - $('.facetwp-per-page').html(response.per_page); - if ('default' !== FWP.extras.per_page) { - $('.facetwp-per-page-select').val(FWP.extras.per_page); - } - } - - // Populate the sort box - if ($.isset(response.sort)) { - $('.facetwp-sort').html(response.sort); - $('.facetwp-sort-select').val(FWP.extras.sort); - } - - // Populate the settings object (iterate to preserve static facet settings) - $.each(response.settings, (val, key) => { - FWP.settings[key] = val; - }); - - // WP Playlist support - if ('function' === typeof WPPlaylistView) { - $('.facetwp-template .wp-playlist').each((item) => { - return new WPPlaylistView({ el: item }); - }); - } - - // Fire a notification event - $().trigger('facetwp-loaded'); - - // Allow final actions - FWP.hooks.doAction('facetwp/loaded'); - - // Remove the loading overlay - FWP.toggleOverlay('off'); - - // Clear the active facet - FWP.active_facet = null; - - // Detect "back-forward" cache - FWP.is_bfcache = true; - - // Done loading? - FWP.loaded = true; - } - - reset(facets) { - FWP.parseFacets(); - - var opts = {}; - - if ('string' === typeof facets) { - opts[facets] = ''; - } - else if (Array.isArray(facets)) { - $.each(facets, (facet_name) => { - opts[facet_name] = ''; - }); - } - else if ('object' === typeof facets && !! facets) { - opts = facets; - } - - var reset_all = Object.keys(opts).length < 1; - - $.each(FWP.facets, (vals, facet_name) => { - var has_reset = $.isset(opts[facet_name]); - var selected_vals = Array.isArray(vals) ? vals : [vals]; - - if (has_reset && -1 < selected_vals.indexOf(opts[facet_name])) { - var pos = selected_vals.indexOf(opts[facet_name]); - selected_vals.splice(pos, 1); // splice() is mutable! - FWP.facets[facet_name] = selected_vals; - } - - if (has_reset && (selected_vals.length < 1 || '' === opts[facet_name])) { - delete FWP.frozen_facets[facet_name]; - } - - if (reset_all || (has_reset && '' === opts[facet_name])) { - FWP.facets[facet_name] = []; - } - }); - - if (reset_all) { - FWP.extras.per_page = 'default'; - FWP.extras.sort = 'default'; - FWP.frozen_facets = {}; - } - - FWP.hooks.doAction('facetwp/reset'); - FWP.is_reset = true; - FWP.refresh(); - } - - toggleOverlay(which) { - var method = ('on' === which) ? 'addClass' : 'removeClass'; - $('.facetwp-facet')[method]('is-loading'); - } - - bindEvents() { - window.addEventListener('popstate', () => { - - // Detect browser "back-foward" cache - if (FWP.is_bfcache) { - FWP.loaded = false; - } - - if ((FWP.loaded || FWP.is_bfcache) && ! FWP.is_refresh && ! FWP.is_hash_click) { - FWP.is_popstate = true; - FWP.refresh(); - FWP.is_popstate = false; - } - - FWP.is_hash_click = false; - }); - - // Prevent hash clicks from triggering a refresh - $().on('click', 'a[href^="#"]', () => { - FWP.is_hash_click = true; - }); - - // Click on a user selection - $().on('click', '.facetwp-selections .facetwp-selection-value', function() { - if (FWP.is_refresh) { - return; - } - - var facet_name = $(this).closest('li').attr('data-facet'); - var facet_value = $(this).attr('data-value'); - - if ('' != facet_value) { - var obj = {}; - obj[facet_name] = facet_value; - FWP.reset(obj); - } - else { - FWP.reset(facet_name); - } - }); - - // Pagination - $().on('click', '.facetwp-page[data-page]', function() { - $('.facetwp-page').removeClass('active'); - $(this).addClass('active'); - - FWP.paged = $(this).attr('data-page'); - FWP.soft_refresh = true; - FWP.refresh(); - }); - - // Use jQuery if available for select2 - var $f = ('function' === typeof jQuery) ? jQuery : fUtil; - - // Per page - $f(document).on('change', '.facetwp-per-page-select', function() { - FWP.extras.per_page = $(this).val(); - FWP.soft_refresh = true; - FWP.autoload(); - }); - - // Sorting - $f(document).on('change', '.facetwp-sort-select', function() { - FWP.extras.sort = $(this).val(); - FWP.soft_refresh = true; - FWP.autoload(); - }); - - $f(() => { - this.init(); - }); - } - } - - FacetWP.prototype.helper = { - getUrlVar: (name) => { - var name = FWP_JSON.prefix + name; - var url_vars = window.location.search.replace('?', '').split('&'); - for (var i = 0; i < url_vars.length; i++) { - var item = url_vars[i].split('='); - if (item[0] === name) { - return item[1]; - } - } - return false; - }, - debounce: (func, wait) => { - var timeout; - return function(...args) { - var boundFunc = func.bind(this, ...args); - clearTimeout(timeout); - timeout = setTimeout(boundFunc, wait); - }; - }, - serialize: (obj, prefix) => { - var str = []; - var prefix = $.isset(prefix) ? prefix : ''; - for (var p in obj) { - if ('' != obj[p]) { // Needs to be "!=" instead of "!==" - str.push(prefix + encodeURIComponent(p) + '=' + encodeURIComponent(obj[p])); - } - } - return str.join('&'); - }, - escapeHtml: (text) => { - var map = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - return text.replace(/[&<>"']/g,(m) => map[m]).trim(); - }, - detectLoop: (node) => { - var curNode = null; - var iterator = document.createNodeIterator(node, NodeFilter.SHOW_COMMENT, () => { - return NodeFilter.FILTER_ACCEPT; /* IE expects a function */ - }, false); - - while (curNode = iterator.nextNode()) { - if (8 === curNode.nodeType && 'fwp-loop' === curNode.nodeValue) { - return curNode.parentNode; - } - } - - return false; - } - }; - - return new FacetWP(); - -})(fUtil); diff --git a/wp/wp-content/plugins/facetwp/assets/js/src/sample.json b/wp/wp-content/plugins/facetwp/assets/js/src/sample.json deleted file mode 100644 index 33037851..00000000 --- a/wp/wp-content/plugins/facetwp/assets/js/src/sample.json +++ /dev/null @@ -1 +0,0 @@ -{"facets":[{"name":"categories","label":"Categories","type":"checkboxes","source":"tax/category","parent_term":"","hierarchical":"no","show_expanded":"no","ghosts":"no","preserve_ghosts":"no","operator":"and","orderby":"count","count":"10","soft_limit":"5"}],"templates":[{"name":"blog_posts","label":"Blog posts","query":"","template":"","layout":{"items":[{"type":"row","items":[{"type":"col","items":[{"type":"item","source":"post_title","settings":{"link":{"type":"post","href":"","target":""},"prefix":"","suffix":"","border":{"style":"none","color":"","width":{"unit":"px","top":0,"right":0,"bottom":0,"left":0}},"background_color":"","padding":{"unit":"px","top":0,"right":0,"bottom":0,"left":0},"text_color":"","text_style":{"align":"","bold":false,"italic":false},"font_size":{"unit":"px","size":0},"name":"el-fz703r","css_class":"","is_hidden":""}}],"settings":{"border":{"style":"none","color":"","width":{"unit":"px","top":0,"right":0,"bottom":0,"left":0}},"background_color":"","padding":{"unit":"px","top":0,"right":0,"bottom":0,"left":0},"text_color":"","text_style":{"align":"","bold":false,"italic":false},"font_size":{"unit":"px","size":0},"name":"el-1tvcxf","css_class":""}}],"settings":{"grid_template_columns":"1fr","border":{"style":"none","color":"","width":{"unit":"px","top":0,"right":0,"bottom":0,"left":0}},"background_color":"","padding":{"unit":"px","top":0,"right":0,"bottom":0,"left":0},"text_color":"","text_style":{"align":"","bold":false,"italic":false},"font_size":{"unit":"px","size":0},"name":"el-8cjrpw","css_class":""}}],"settings":{"num_columns":1,"grid_gap":10,"border":{"style":"none","color":"","width":{"unit":"px","top":0,"right":0,"bottom":0,"left":0}},"background_color":"","padding":{"unit":"px","top":0,"right":0,"bottom":0,"left":0},"text_color":"","text_style":{"align":"","bold":false,"italic":false},"font_size":{"unit":"px","size":0},"name":"el-hkhimk","css_class":"","custom_css":""}},"query_obj":{"post_type":[{"label":"Posts","value":"post"}],"posts_per_page":10,"orderby":[{"key":"date","order":"DESC","type":"CHAR"}],"filters":[]},"modes":{"display":"visual","query":"visual"}}],"settings":{"thousands_separator":",","decimal_separator":".","prefix":"_"}} \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.css b/wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.css deleted file mode 100644 index 1edbd6cb..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.css +++ /dev/null @@ -1,29 +0,0 @@ -.fcomplete-wrap { - position: absolute; - border: 1px solid #ddd; - border-top: none; - background-color: #fff; - max-width: 400px; -} - -.fcomplete-result, -.fcomplete-status { - padding: 6px 8px; -} - -.fcomplete-result { - cursor: pointer; -} - -.fcomplete-result:hover { - background-color: #f5f5f5; -} - -.fcomplete-status { - font-size: 13px; - font-style: italic; -} - -.fcomplete-hidden { - display: none; -} diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.js b/wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.js deleted file mode 100644 index 31fdd1e1..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fComplete/fComplete.js +++ /dev/null @@ -1,283 +0,0 @@ -window.fComplete = (() => { - - class fComplete { - - constructor(selector, options) { - let that = this; - - var defaults = { - data: [], - minChars: 3, - maxResults: 10, - searchDelay: 200, - loadingText: 'Loading...', - minCharsText: 'Enter {n} or more characters', - noResultsText: 'No results', - beforeRender: null, - onSelect: null - }; - - that.settings = Object.assign({}, defaults, options); - that.settings.minChars = Math.max(1, that.settings.minChars); - that.settings.maxResults = Math.max(1, that.settings.maxResults); - that.settings.searchDelay = Math.max(0, that.settings.searchDelay); - - if ('string' === typeof selector) { - var nodes = Array.from(document.querySelectorAll(selector)); - } - else if (selector instanceof Node) { - var nodes = [selector]; - } - else if (Array.isArray(selector)) { - var nodes = selector; - } - else { - var nodes = []; - } - - if ('undefined' === typeof window.fCompleteInit) { - window.fCompleteInit = { - lastFocus: null, - eventsBound: true - }; - that.bindEvents(); - } - - nodes.forEach((input) => { - that.input = input; - input.fcomplete = that; - input.classList.add('fcomplete-enabled'); - that.create(); - }); - } - - create() { - var that = this; - - var html = ` -
    -
    -
    -
    - `; - - var rect = that.input.getBoundingClientRect(); - - var tpl = document.createElement('template'); - tpl.innerHTML = html; - var wrap = tpl.content.querySelector('.fcomplete-wrap'); - wrap.style.minWidth = rect.width + 'px'; - that.input.parentNode.insertBefore(wrap, that.input.nextSibling); - - // add a relationship link - that.input._rel = wrap; - wrap._rel = that.input; - } - - destroy() { - this.input._rel.remove(); - delete this.input._rel; - } - - reload() { - this.destroy(); - this.create(); - } - - open() { - this.input._rel.classList.remove('fcomplete-hidden'); - } - - close() { - window.fCompleteInit.lastFocus = null; - this.input._rel.classList.add('fcomplete-hidden'); - } - - setStatus(text) { - var text = text.replace('{n}', this.settings.minChars); - var node = this.input._rel.querySelector('.fcomplete-status'); - node.innerHTML = text; - - var method = (text) ? 'remove' : 'add'; - node.classList[method]('fcomplete-hidden'); - } - - render(data) { - var data = (this.settings.beforeRender) ? this.settings.beforeRender(data) : data; - var wrap = this.input._rel; - - if (data.length) { - var html = ''; - var len = Math.min(data.length, this.settings.maxResults); - - for (var i = 0; i < len; i++) { - html += `
    ${data[i].label}
    `; - } - - wrap.querySelector('.fcomplete-results').innerHTML = html; - this.setStatus(''); - } - else { - wrap.querySelector('.fcomplete-results').innerHTML = ''; - this.setStatus(this.settings.noResultsText); - } - - this.input.fcomplete.open(); - } - - getAdjacentSibling(which) { - var that = this; - var which = which || 'next'; - var sibling = window.fCompleteInit.lastFocus; - var selector = '.fcomplete-result'; - - if (sibling) { - sibling = sibling[which + 'ElementSibling']; - - while (sibling) { - if (sibling.matches(selector)) break; - sibling = sibling[which + 'ElementSibling']; - } - - return sibling; - } - else if ('next' == which) { - sibling = that.input._rel.querySelector(selector); - } - - return sibling; - } - - debounce(func, wait) { - var timeout; - return (...args) => { - var boundFunc = func.bind(this, ...args); - clearTimeout(timeout); - timeout = setTimeout(boundFunc, wait); - } - } - - trigger(eventName, ...args) { - document.dispatchEvent(new CustomEvent(eventName, {detail: [...args]})); - } - - on(eventName, elementSelector, handler) { - document.addEventListener(eventName, function(e) { - // loop parent nodes from the target to the delegation node - for (var target = e.target; target && target != this; target = target.parentNode) { - if (target.matches(elementSelector)) { - handler.call(target, e); - break; - } - } - }, false); - } - - bindEvents() { - let that = this; - - that.on('click', '*', function(e) { - var wrap = this.closest('.fcomplete-wrap'); - var isInput = this.classList.contains('fcomplete-enabled'); - - if (isInput) { - var input = this; - var settings = input.fcomplete.settings; - var status = (settings.minChars > input.value.length) ? settings.minCharsText : ''; - input.fcomplete.setStatus(status); - this.fcomplete.open(); - } - else if (!wrap && !isInput) { - document.querySelectorAll('.fcomplete-wrap').forEach((node) => node.classList.add('fcomplete-hidden')); - } - }); - - that.on('click', '.fcomplete-result', function(e) { - var wrap = e.target.closest('.fcomplete-wrap'); - var input = wrap._rel; - input.value = e.target.getAttribute('data-value'); - - if (typeof input.fcomplete.settings.onSelect === 'function') { - input.fcomplete.settings.onSelect(); - } - - input.fcomplete.close(); - }); - that.on('keydown', '*', function(e) { - var wrap = this.closest('.fcomplete-wrap'); - var isInput = this.classList.contains('fcomplete-enabled'); - - if (!wrap && !isInput) return; - - var input = (wrap) ? wrap._rel : this; - wrap = (wrap) ? wrap : input._rel; - - if (-1 < [13, 38, 40, 27].indexOf(e.which)) { - e.preventDefault(); - } - - if (13 == e.which) { // enter - if (this.classList.contains('fcomplete-result')) { - this.click(); - } - } - else if (38 == e.which) { // up - if (this.classList.contains('fcomplete-result')) { - var sibling = wrap._rel.fcomplete.getAdjacentSibling('previous'); - window.fCompleteInit.lastFocus = sibling; // stop at the search box - (sibling) ? sibling.focus() : input.focus(); - } - } - else if (40 == e.which) { // down - if (this === input) { - var firstResult = wrap.querySelector('.fcomplete-result'); - - if (firstResult) { - firstResult.focus(); - window.fCompleteInit.lastFocus = firstResult; - } - } - else if (this.classList.contains('fcomplete-result')) { - var sibling = wrap._rel.fcomplete.getAdjacentSibling('next'); - - if (sibling) { - sibling.focus(); - window.fCompleteInit.lastFocus = sibling; // stop at the bottom - } - } - } - else if (9 == e.which || 27 == e.which) { // tab, esc - wrap._rel.fcomplete.close(); - } - }); - - that.on('keyup', '.fcomplete-enabled', that.debounce(function(e) { - if (-1 < [13, 38, 40, 27].indexOf(e.which)) { - return; - } - - var input = e.target; - var settings = input.fcomplete.settings; - - if (settings.minChars <= input.value.length) { - if (Array.isArray(settings.data)) { - input.fcomplete.render(settings.data); - } - else if (typeof settings.data === 'function') { - input.fcomplete.setStatus(settings.loadingText); - settings.data(); - } - } - else { - input.fcomplete.render([]); - input.fcomplete.setStatus(settings.minCharsText); - } - }, that.settings.searchDelay)); - } - } - - var $ = (selector, options) => new fComplete(selector, options); - - return $; - -})(); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/LICENSE.md b/wp/wp-content/plugins/facetwp/assets/vendor/fDate/LICENSE.md deleted file mode 100644 index 09116e9f..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2021 FacetWP, LLC - -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/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.css b/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.css deleted file mode 100644 index 48575cbf..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.css +++ /dev/null @@ -1,87 +0,0 @@ -.fdate-input { - outline: none; -} - -.fdate-wrap { - width: 300px; - display: none; - background: #fff; - border-radius: 5px; - border: 1px solid #ddd; - font-size: 14px; - user-select: none; - -webkit-user-select: none; - z-index: 10000; -} - -.fdate-wrap.opened { - display: block; -} - -.fdate-wrap .disabled { - opacity: 0.1; -} - -.fdate-nav { - display: grid; - grid-template-columns: 1fr 5fr 1fr; -} - -.fdate-nav > div, -.fdate-clear { - padding: 10px 0; - text-align: center; - cursor: pointer; -} - -.fdate-grid { - display: grid; - grid-template-columns: repeat(4, 1fr); - text-align: center; -} - -.fdate-grid.grid-day { - grid-template-columns: repeat(7, 1fr); -} - -.fdate-grid > div { - padding: 20px 0; - opacity: 0.3; -} - -.fdate-grid > div:hover { - background-color: #ddd; - cursor: pointer; -} - -.fdate-grid .fdate-day { - padding: 8px 0; -} - -.fdate-grid .weekday, -.fdate-grid .inner { - opacity: 1; -} - -.fdate-grid .today { - background-color: #F8F8F8; -} - -.fdate-grid .selected { - background-color: #DDD6FE; -} - -.fdate-day.weekday { - font-weight: bold; - padding-top: 0; -} - -.fdate-grid .weekday:hover, -.fdate-grid .disabled:hover { - background-color: transparent; - cursor: default; -} - -.fdate-wrap .disabled:hover { - cursor: not-allowed; -} diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.js b/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.js deleted file mode 100644 index 182d7727..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.js +++ /dev/null @@ -1,679 +0,0 @@ -window.fDate = (() => { - - var qs = (selector) => document.querySelector(selector); - var isset = (input) => 'undefined' !== typeof input; - var ymd = (...args) => { - var d = new Date(...args); - var zeroed = (num) => (num > 9) ? num : '0' + num; - // toJSON() produces unexpected results due to timezones - return d.getFullYear() + '-' + zeroed(d.getMonth() + 1) + '-' + zeroed(d.getDate()); - }; - - class fDate { - - constructor(selector, options) { - let that = this; - - var defaults = { - i18n: { - weekdays_short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], - months_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - clearText: 'Clear', - firstDayOfWeek: 0 - }, - minDate: '', - maxDate: '', - altFormat: '', - onChange: null - }; - - that.settings = Object.assign({}, defaults, options); - - if ('string' === typeof selector) { - var inputs = document.querySelectorAll(selector); - } - else if (selector instanceof Node) { - var inputs = [selector]; - } - else { - var inputs = selector; - } - - if (inputs.length) { - inputs.forEach(function(input) { - input.setAttribute('readonly', 'readonly'); - - if ('' !== that.settings.altFormat) { - that.el = input; - - let altInput = input.cloneNode(); - altInput.classList.add('fdate-alt-input'); - altInput.value = that.getAltDate(); - altInput._input = input; - - input._altInput = altInput; - input.setAttribute('type', 'hidden'); - input.parentNode.insertBefore(altInput, input.nextSibling); // append() - } - - input.classList.add('fdate-input'); - input._input = input; - input.fdate = { - settings: that.settings, - refresh() { - input.click(); - }, - open() { - input.click(); - }, - close() { - that.setCalVisibility('hide'); - }, - clear() { - input.value = ''; - - if (isset(input._altInput)) { - input._altInput.value = ''; - } - - that.triggerEvent('onChange'); - }, - destroy() { - input.classList.remove('fdate-input'); - delete input._altInput; - delete input._input; - delete input.fdate; - } - }; - }); - } - - if (null === qs('.fdate-wrap')) { - this.initCalendar(); - this.bindEvents(); - } - } - - initCalendar() { - var html = ` -
    -
    -
    <
    -
    -
    >
    -
    -
    -
    ${this.settings.i18n.clearText}
    -
    - `; - - document.body.insertAdjacentHTML('beforeend', html); - } - - setInput(input) { - this.el = input; - this.mode = 'day'; - this.settings = input.fdate.settings; - - this.setDateBounds(); - - // valid YYYY-MM-DD? - if (null !== input.value.match(/^\d{4}-\d{2}-\d{2}$/)) { - var date_str = input.value; - } - // use the min date or today, whichever is higher - else { - var today = ymd(); - var date_str = (this.min.str < today) ? today : this.min.str; - } - - // rewind the calendar if beyond the maxDate - if (date_str < this.max.str) { - var temp_date = new Date(date_str + 'T00:00'); - this.year = temp_date.getFullYear(); - this.month = temp_date.getMonth(); - } - else { - this.year = this.max.year; - this.month = this.max.month; - } - } - - setDateBounds() { - let min = this.settings.minDate || '1000-01-01'; - let max = this.settings.maxDate || '3000-01-01'; - let minDate = new Date(min + 'T00:00'); - let maxDate = new Date(max + 'T00:00'); - - this.min = { - year: minDate.getFullYear(), - month: minDate.getMonth(), - str: min - }; - - this.max = { - year: maxDate.getFullYear(), - month: maxDate.getMonth(), - str: max - }; - } - - isInBounds(val) { - if ('year' == this.mode) { - let year = parseInt(val); - - if (year < this.min.year || year > this.max.year) { - return false; - } - } - else if ('month' == this.mode) { - let month = parseInt(val); - let valStr = ymd(this.year, month).substr(0, 7); - let monthMin = this.min.str.substr(0, 7); - let monthMax = this.max.str.substr(0, 7); - - if (valStr < monthMin || valStr > monthMax) { - return false; - } - } - else if ('day' == this.mode) { - if (val < this.min.str || val > this.max.str) { - return false; - } - } - - return true; - } - - isNavAllowed(type) { - if ('year' == this.mode) { - let decade = parseInt(this.year.toString().substr(0, 3) + '0'); - - return ('next' == type) ? - decade < parseInt(this.max.str.substr(0, 4)) : - decade > parseInt(this.min.str.substr(0, 4)); - } - else if ('month' == this.mode) { - return ('next' == type) ? - ymd(this.year + 1, 0, 0) < this.max.str : - ymd(this.year, 0) > this.min.str; - } - else if ('day' == this.mode) { - return ('next' == type) ? - ymd(this.year, this.month + 1, 0) < this.max.str : - ymd(this.year, this.month) > this.min.str; - } - } - - setDisplay(which) { - var that = this; - - this.mode = which; - - qs('.fdate-grid').classList.remove('grid-day'); - - // show or hide the nav arrows - qs('.fdate-nav-prev').classList.add('disabled'); - qs('.fdate-nav-next').classList.add('disabled'); - - if (that.isNavAllowed('prev')) { - qs('.fdate-nav-prev').classList.remove('disabled'); - } - - if ( that.isNavAllowed('next')) { - qs('.fdate-nav-next').classList.remove('disabled'); - } - - // month - if ('month' == which) { - var output = ''; - this.settings.i18n.months_short.forEach(function(item, index) { - var css = that.isInBounds(index) ? ' inner' : ' disabled'; - output += '
    ' + item + '
    '; - }); - - qs('.fdate-grid').innerHTML = output; - qs('.fdate-nav-label').innerHTML = this.year; - } - // year - else if ('year' == which) { - var output = ''; - var decade = parseInt(this.year.toString().substr(0, 3) + '0'); - for (var i = 0; i < 10; i++) { - var css = that.isInBounds(decade + i) ? ' inner' : ' disabled'; - output += '
    ' + (decade + i) + '
    '; - } - - qs('.fdate-grid').innerHTML = output; - - var prefix = this.year.toString().substr(0, 3); - var decade = prefix + '0 - ' + prefix + '9'; - qs('.fdate-nav-label').innerHTML = decade; - } - // day - else { - qs('.fdate-grid').classList.add('grid-day'); - - var output = ''; - var days = this.generateDays(this.year, this.month); - days.forEach(function(item) { - output += '
    ' + item.text + '
    '; - }); - - qs('.fdate-grid').innerHTML = output; - qs('.fdate-nav-label').innerHTML = this.settings.i18n.months[this.month] + ' ' + this.year; - } - } - - generateDays(year, month) { - let that = this; - var output = []; - let i18n = that.settings.i18n; - let weekdays = i18n.weekdays_short; - let firstDayOfWeek = i18n.firstDayOfWeek; // 0 = Sunday - let firstDayNum = new Date(year, month).getDay(); // between 0 and 6 - let offset = firstDayNum - firstDayOfWeek; - offset = (offset < 0) ? 7 + offset : offset; // negative offset (e.g. August 2021) - let num_days = new Date(year, month + 1, 0).getDate(); - let today = ymd(); - - // shift weekdays according to firstDayOfWeek - if (0 < firstDayOfWeek) { - let temp = JSON.parse(JSON.stringify(weekdays)); - let append = temp.splice(0, firstDayOfWeek); - weekdays = temp.concat(append); - } - - // get weekdays - weekdays.forEach(function(item) { - output.push({ - text: item, - value: '', - class: ' weekday' - }); - }); - - // get days from the previous month - if (0 < offset) { - let year_prev = (0 == month) ? year - 1 : year; - let month_prev = (0 == month) ? 11 : month - 1; - let num_days_prev = new Date(year_prev, month_prev + 1, 0).getDate(); - - for (var i = (num_days_prev - offset + 1); i <= num_days_prev; i++) { - var val = ymd(year_prev, month_prev, i); - var css = that.isInBounds(val) ? '' : ' disabled'; - output.push({ - text: i, - value: val, - class: css - }); - } - } - - // get days from the current month - for (var i = 1; i <= num_days; i++) { - var val = ymd(year, month, i); - - if ( that.isInBounds(val)) { - var css = ' inner'; - css += (val == today) ? ' today' : ''; - css += (val == this.el.value) ? ' selected' : ''; - } - else { - var css = ' disabled'; - } - - output.push({ - text: i, - value: val, - class: css - }); - } - - // get days from the next month - let year_next = (11 == month) ? year + 1 : year; - let month_next = (11 == month) ? 0 : month + 1; - let num_filler = 42 - num_days - offset; - - for (var i = 1; i <= num_filler; i++) { - var val = ymd(year_next, month_next, i); - var css = that.isInBounds(val) ? '' : ' disabled'; - output.push({ - text: i, - value: val, - class: css - }); - } - - return output; - } - - adjustDate(increment, unit) { - var temp_year = ('year' == unit) ? this.year + increment : this.year; - var temp_month = ('month' == unit) ? this.month + increment : this.month; - var temp_date = new Date(temp_year, temp_month); - - this.year = temp_date.getFullYear(); - this.month = temp_date.getMonth(); - } - - on(eventName, elementSelector, handler) { - document.addEventListener(eventName, function(e) { - // loop parent nodes from the target to the delegation node - for (var target = e.target; target && target != this; target = target.parentNode) { - if (target.matches(elementSelector)) { - handler.call(target, e); - break; - } - } - }, false); - } - - getAltDate() { - let that = this; - - if ('' === that.el.value) { - return ''; - } - - let date_array = that.el.value.split('-'); - let format_array = that.settings.altFormat.split(''); - let output = ''; - - let escaped = false; - format_array.forEach(function(token) { - if ('\\' === token) { - escaped = true; - return; - } - - output += escaped ? token : that.parseDateToken(token, date_array); - escaped = false; - }); - - return output; - } - - parseDateToken(token, date_array) { - let i18n = this.settings.i18n; - - let tokens = { - 'd': () => date_array[2], - 'j': () => parseInt(date_array[2]), - 'm': () => date_array[1], - 'n': () => parseInt(date_array[1]), - 'F': () => i18n.months[parseInt(date_array[1]) - 1], - 'M': () => i18n.months_short[parseInt(date_array[1]) - 1], - 'y': () => date_array[0].substring(2), - 'Y': () => date_array[0] - }; - - return isset(tokens[token]) ? tokens[token]() : token; - } - - setPosition(input) { - let wrap = qs('.fdate-wrap'); - let inputBounds = input.getBoundingClientRect(); - let calendarWidth = wrap.getBoundingClientRect().width; - let calendarHeight = wrap.getBoundingClientRect().height; - let distanceFromRight = document.body.clientWidth - inputBounds.left; - let distanceFromBottom = document.body.clientHeight - inputBounds.bottom; - let showOnTop = (distanceFromBottom < calendarHeight && inputBounds.top > calendarHeight); - let showOnLeft = (distanceFromRight < calendarWidth && inputBounds.left > calendarWidth); - - let top = window.pageYOffset + inputBounds.top + (!showOnTop ? input.offsetHeight + 2 : -calendarHeight - 2); - let left = window.pageXOffset + inputBounds.left; - let right = window.pageXOffset + inputBounds.right - calendarWidth; - let pixels = showOnLeft ? right : left; - - wrap.style.position = 'absolute'; - wrap.style.top = top + 'px'; - wrap.style.left = pixels + 'px'; - } - - setCalVisibility(which) { - var wrap = qs('.fdate-wrap'); - - if ('hide' === which) { - if (wrap.classList.contains('opened')) { - wrap.classList.remove('opened'); - } - } - else { - if (! wrap.classList.contains('opened')) { - wrap.classList.add('opened'); - } - } - } - - triggerEvent(name) { - if (typeof this.settings[name] === 'function') { - this.settings[name](this); - } - } - - bindEvents() { - var that = this; - - that.on('click', '.fdate-day:not(.disabled):not(.weekday)', function(e) { - that.el.value = e.target.getAttribute('data-value'); - - if (isset(that.el._altInput)) { - that.el._altInput.value = that.getAltDate(); - } - - that.triggerEvent('onChange'); - that.setCalVisibility('hide'); - e.stopImmediatePropagation(); // important - }); - - that.on('click', '.fdate-month:not(.disabled)', function(e) { - that.month = parseInt(e.target.getAttribute('data-value')); - that.setDisplay('day'); - e.stopImmediatePropagation(); // important - }); - - that.on('click', '.fdate-year:not(.disabled)', function(e) { - that.year = parseInt(e.target.getAttribute('data-value')); - that.setDisplay('month'); - e.stopImmediatePropagation(); // important - }); - - that.on('click', '.fdate-nav-prev:not(.disabled)', function() { - var incr = ('year' == that.mode) ? -10 : -1; - var unit = ('day' == that.mode) ? 'month' : 'year'; - - that.adjustDate(incr, unit); - that.setDisplay(that.mode); - }); - - that.on('click', '.fdate-nav-next:not(.disabled)', function() { - var incr = ('year' == that.mode) ? 10 : 1; - var unit = ('day' == that.mode) ? 'month' : 'year'; - - that.adjustDate(incr, unit); - that.setDisplay(that.mode); - }); - - that.on('click', '.fdate-nav-label', function() { - if ('day' == that.mode) { - that.setDisplay('month'); - } - else if ('month' == that.mode) { - that.setDisplay('year'); - } - else if ('year' == that.mode) { - that.setDisplay('day'); - } - }); - - that.on('click', '.fdate-clear', function() { - that.el.fdate.clear(); - }); - - that.on('click', '*', function(e) { - var is_input = e.target.classList.contains('fdate-input') || e.target.classList.contains('fdate-alt-input'); - var is_cal = (null !== e.target.closest('.fdate-wrap')); - var is_clear = e.target.classList.contains('fdate-clear'); - - if (is_input || (is_cal && ! is_clear)) { - that.setCalVisibility('show'); - - // set position and render calendar - if (is_input) { - let visibleInput = e.target._altInput || e.target; - that.setInput(e.target._input); - that.setDisplay('day'); - that.setPosition(visibleInput); - } - } - else { - that.setCalVisibility('hide'); - } - }); - - // a11y support - window.addEventListener('keyup', function(e) { - if ('Tab' === e.key) { - if (e.target.classList.contains('fdate-input') || e.target.classList.contains('fdate-alt-input')) { - e.target._input.click(); - } - else { - that.setCalVisibility('hide'); - } - } - }); - - window.addEventListener('keydown', function(e) { - if ('Enter' === e.key) { - if (e.target.closest('.fdate-grid')) { - qs('.fdate-nav-label').focus(); - } - if (e.target.closest('.fdate-wrap')) { - e.target.click(); - } - } - else if ('Escape' === e.key) { - if (e.target.closest('.fdate-wrap') || e.target.classList.contains('fdate-input') || e.target.classList.contains('fdate-alt-input')) { - that.el.fdate.close(); - } - } - else if ('ArrowUp' === e.key) { - if (e.target.classList.contains('fdate-input') || e.target.classList.contains('fdate-alt-input')) { // from input - qs('.fdate-clear').focus(); - e.preventDefault(); - } - else if (e.target.classList.contains('fdate-nav-label')) { - that.el.focus(); - e.preventDefault(); - } - else if (e.target.classList.contains('fdate-clear')) { - let days = document.querySelectorAll('.fdate-day.inner'); - let item = (days.length) ? days[days.length - 1] : qs('.fdate-nav-label'); - item.focus(); - - e.preventDefault(); - } - else if (e.target.closest('.fdate-grid')) { - let offset = ('day' === that.mode) ? -7 : -4; - let el = that.getSibling(e.target, offset); - - if (el) { - el.focus(); - } - else { - qs('.fdate-nav-label').focus(); - } - e.preventDefault(); - } - } - else if ('ArrowDown' === e.key) { - if (e.target.classList.contains('fdate-input') || e.target.classList.contains('fdate-alt-input')) { // from input - let selected = qs('.fdate-grid .selected'); - let today = qs('.fdate-grid .today'); - - if (selected) { - selected.focus(); - } - else if (today) { - today.focus(); - } - else { - qs('.fdate-nav-label').focus(); - } - - e.preventDefault(); - } - else if (e.target.classList.contains('fdate-nav-label')) { // from nav - qs('.fdate-grid .inner').focus(); - e.preventDefault(); - } - else if (e.target.classList.contains('fdate-clear')) { - that.el.focus(); - e.preventDefault(); - } - else if (e.target.closest('.fdate-grid')) { // from grid - let offset = ('day' === that.mode) ? 7 : 4; - let el = that.getSibling(e.target, offset); - - if (el) { - el.focus(); - } - else { - qs('.fdate-clear').focus(); - } - e.preventDefault(); - } - } - else if ('ArrowLeft' === e.key) { - if (e.target.classList.contains('fdate-nav-label')) { // into the past - qs('.fdate-nav-prev').click(); - e.preventDefault(); - } - if (e.target.closest('.fdate-grid')) { // previous grid item - let prev = e.target.previousElementSibling; - if (prev && prev.classList.contains('inner')) { - prev.focus(); - } - else { - let days = document.querySelectorAll('.fdate-day.inner'); - days[days.length - 1].focus(); // last valid day of month - } - e.preventDefault(); - } - } - else if ('ArrowRight' === e.key) { - if (e.target.classList.contains('fdate-nav-label')) { // into the future - qs('.fdate-nav-next').click(); - e.preventDefault(); - } - if (e.target.closest('.fdate-grid')) { // next grid item - let next = e.target.nextElementSibling; - if (next && next.classList.contains('inner')) { - next.focus(); - } - else { - qs('.fdate-day.inner').focus(); // first valid day of month - } - e.preventDefault(); - } - } - }); - } - - getSibling(orig, offset) { - let el = orig; - for (var i = 0; i < Math.abs(offset); i++) { - el = (0 < offset) ? el.nextElementSibling : el.previousElementSibling; - if (null === el || !el.classList.contains('inner')) { - return null; - } - } - - return el; - } - } - - return fDate; -})(); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.min.js b/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.min.js deleted file mode 100644 index cef20a4c..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fDate/fDate.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";var t,e,a,n;window.fDate=(t=function(t){return document.querySelector(t)},e=function(t){return void 0!==t},a=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var a=new(Function.prototype.bind.apply(Date,[null].concat(t))),n=function(t){return t>9?t:"0"+t};return a.getFullYear()+"-"+n(a.getMonth()+1)+"-"+n(a.getDate())},(n=function(a,n){var s=this;if(s.settings=Object.assign({},{i18n:{weekdays_short:["Su","Mo","Tu","We","Th","Fr","Sa"],months_short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],clearText:"Clear",firstDayOfWeek:0},minDate:"",maxDate:"",altFormat:"",onChange:null},n),"string"==typeof a)var i=document.querySelectorAll(a);else i=a instanceof Node?[a]:a;i.length&&i.forEach((function(t){if(t.setAttribute("readonly","readonly"),""!==s.settings.altFormat){s.el=t;var a=t.cloneNode();a.classList.add("fdate-alt-input"),a.value=s.getAltDate(),a._input=t,t._altInput=a,t.setAttribute("type","hidden"),t.parentNode.insertBefore(a,t.nextSibling)}t.classList.add("fdate-input"),t._input=t,t.fdate={settings:s.settings,refresh:function(){t.click()},open:function(){t.click()},close:function(){s.setCalVisibility("hide")},clear:function(){t.value="",e(t._altInput)&&(t._altInput.value=""),s.triggerEvent("onChange")},destroy:function(){t.classList.remove("fdate-input"),delete t._altInput,delete t._input,delete t.fdate}}})),null===t(".fdate-wrap")&&(this.initCalendar(),this.bindEvents())}).prototype.initCalendar=function(){var t='\n
    \n
    \n
    <
    \n
    \n
    >
    \n
    \n
    \n
    '+this.settings.i18n.clearText+"
    \n
    \n ";document.body.insertAdjacentHTML("beforeend",t)},n.prototype.setInput=function(t){if(this.el=t,this.mode="day",this.settings=t.fdate.settings,this.setDateBounds(),null!==t.value.match(/^\d{4}-\d{2}-\d{2}$/))var e=t.value;else{var n=a();e=this.min.strthis.max.year)return!1}else if("month"==this.mode){var n=parseInt(t),s=a(this.year,n).substr(0,7),i=this.min.str.substr(0,7),r=this.max.str.substr(0,7);if(sr)return!1}else if("day"==this.mode&&(tthis.max.str))return!1;return!0},n.prototype.isNavAllowed=function(t){if("year"==this.mode){var e=parseInt(this.year.toString().substr(0,3)+"0");return"next"==t?eparseInt(this.min.str.substr(0,4))}return"month"==this.mode?"next"==t?a(this.year+1,0,0)this.min.str:"day"==this.mode?"next"==t?a(this.year,this.month+1,0)this.min.str:void 0},n.prototype.setDisplay=function(e){var a=this;if(this.mode=e,t(".fdate-grid").classList.remove("grid-day"),t(".fdate-nav-prev").classList.add("disabled"),t(".fdate-nav-next").classList.add("disabled"),a.isNavAllowed("prev")&&t(".fdate-nav-prev").classList.remove("disabled"),a.isNavAllowed("next")&&t(".fdate-nav-next").classList.remove("disabled"),"month"==e){var n="";this.settings.i18n.months_short.forEach((function(t,e){var s=a.isInBounds(e)?" inner":" disabled";n+='
    '+t+"
    "})),t(".fdate-grid").innerHTML=n,t(".fdate-nav-label").innerHTML=this.year}else if("year"==e){n="";for(var s=parseInt(this.year.toString().substr(0,3)+"0"),i=0;i<10;i++){var r=a.isInBounds(s+i)?" inner":" disabled";n+='
    '+(s+i)+"
    "}t(".fdate-grid").innerHTML=n;var o=this.year.toString().substr(0,3);s=o+"0 - "+o+"9",t(".fdate-nav-label").innerHTML=s}else t(".fdate-grid").classList.add("grid-day"),n="",this.generateDays(this.year,this.month).forEach((function(t){n+='
    '+t.text+"
    "})),t(".fdate-grid").innerHTML=n,t(".fdate-nav-label").innerHTML=this.settings.i18n.months[this.month]+" "+this.year},n.prototype.generateDays=function(t,e){var n=this,s=[],i=n.settings.i18n,r=i.weekdays_short,o=i.firstDayOfWeek,l=new Date(t,e).getDay()-o;l=l<0?7+l:l;var d=new Date(t,e+1,0).getDate(),c=a();if(0i,l=rs,d=window.pageYOffset+n.top+(o?-i-2:e.offsetHeight+2),c=window.pageXOffset+n.left,f=window.pageXOffset+n.right-s,u=l?f:c;a.style.position="absolute",a.style.top=d+"px",a.style.left=u+"px"},n.prototype.setCalVisibility=function(e){var a=t(".fdate-wrap");"hide"===e?a.classList.contains("opened")&&a.classList.remove("opened"):a.classList.contains("opened")||a.classList.add("opened")},n.prototype.triggerEvent=function(t){"function"==typeof this.settings[t]&&this.settings[t](this)},n.prototype.bindEvents=function(){var a=this;a.on("click",".fdate-day:not(.disabled):not(.weekday)",(function(t){a.el.value=t.target.getAttribute("data-value"),e(a.el._altInput)&&(a.el._altInput.value=a.getAltDate()),a.triggerEvent("onChange"),a.setCalVisibility("hide"),t.stopImmediatePropagation()})),a.on("click",".fdate-month:not(.disabled)",(function(t){a.month=parseInt(t.target.getAttribute("data-value")),a.setDisplay("day"),t.stopImmediatePropagation()})),a.on("click",".fdate-year:not(.disabled)",(function(t){a.year=parseInt(t.target.getAttribute("data-value")),a.setDisplay("month"),t.stopImmediatePropagation()})),a.on("click",".fdate-nav-prev:not(.disabled)",(function(){var t="year"==a.mode?-10:-1,e="day"==a.mode?"month":"year";a.adjustDate(t,e),a.setDisplay(a.mode)})),a.on("click",".fdate-nav-next:not(.disabled)",(function(){var t="year"==a.mode?10:1,e="day"==a.mode?"month":"year";a.adjustDate(t,e),a.setDisplay(a.mode)})),a.on("click",".fdate-nav-label",(function(){"day"==a.mode?a.setDisplay("month"):"month"==a.mode?a.setDisplay("year"):"year"==a.mode&&a.setDisplay("day")})),a.on("click",".fdate-clear",(function(){a.el.fdate.clear()})),a.on("click","*",(function(t){var e=t.target.classList.contains("fdate-input")||t.target.classList.contains("fdate-alt-input"),n=null!==t.target.closest(".fdate-wrap"),s=t.target.classList.contains("fdate-clear");if(e||n&&!s){if(a.setCalVisibility("show"),e){var i=t.target._altInput||t.target;a.setInput(t.target._input),a.setDisplay("day"),a.setPosition(i)}}else a.setCalVisibility("hide")})),window.addEventListener("keyup",(function(t){"Tab"===t.key&&(t.target.classList.contains("fdate-input")||t.target.classList.contains("fdate-alt-input")?t.target._input.click():a.setCalVisibility("hide"))})),window.addEventListener("keydown",(function(e){if("Enter"===e.key)e.target.closest(".fdate-grid")&&t(".fdate-nav-label").focus(),e.target.closest(".fdate-wrap")&&e.target.click();else if("Escape"===e.key)(e.target.closest(".fdate-wrap")||e.target.classList.contains("fdate-input")||e.target.classList.contains("fdate-alt-input"))&&a.el.fdate.close();else if("ArrowUp"===e.key){if(e.target.classList.contains("fdate-input")||e.target.classList.contains("fdate-alt-input"))t(".fdate-clear").focus(),e.preventDefault();else if(e.target.classList.contains("fdate-nav-label"))a.el.focus(),e.preventDefault();else if(e.target.classList.contains("fdate-clear")){var n=document.querySelectorAll(".fdate-day.inner");(n.length?n[n.length-1]:t(".fdate-nav-label")).focus(),e.preventDefault()}else if(e.target.closest(".fdate-grid")){var s="day"===a.mode?-7:-4,i=a.getSibling(e.target,s);i?i.focus():t(".fdate-nav-label").focus(),e.preventDefault()}}else if("ArrowDown"===e.key){if(e.target.classList.contains("fdate-input")||e.target.classList.contains("fdate-alt-input")){var r=t(".fdate-grid .selected"),o=t(".fdate-grid .today");r?r.focus():o?o.focus():t(".fdate-nav-label").focus(),e.preventDefault()}else if(e.target.classList.contains("fdate-nav-label"))t(".fdate-grid .inner").focus(),e.preventDefault();else if(e.target.classList.contains("fdate-clear"))a.el.focus(),e.preventDefault();else if(e.target.closest(".fdate-grid")){var l="day"===a.mode?7:4,d=a.getSibling(e.target,l);d?d.focus():t(".fdate-clear").focus(),e.preventDefault()}}else if("ArrowLeft"===e.key){if(e.target.classList.contains("fdate-nav-label")&&(t(".fdate-nav-prev").click(),e.preventDefault()),e.target.closest(".fdate-grid")){var c=e.target.previousElementSibling;if(c&&c.classList.contains("inner"))c.focus();else{var f=document.querySelectorAll(".fdate-day.inner");f[f.length-1].focus()}e.preventDefault()}}else if("ArrowRight"===e.key&&(e.target.classList.contains("fdate-nav-label")&&(t(".fdate-nav-next").click(),e.preventDefault()),e.target.closest(".fdate-grid"))){var u=e.target.nextElementSibling;u&&u.classList.contains("inner")?u.focus():t(".fdate-day.inner").focus(),e.preventDefault()}}))},n.prototype.getSibling=function(t,e){for(var a=t,n=0;n { - - var build = {}; - - class fSelect { - - constructor(selector, options) { - let that = this; - - var defaults = { - placeholder: 'Select some options', - numDisplayed: 3, - overflowText: '{n} selected', - searchText: 'Search', - noResultsText: 'No results found', - showSearch: true, - optionFormatter: false - }; - - that.settings = Object.assign({}, defaults, options); - build = {output: '', optgroup: 0, idx: 0}; - - if ('string' === typeof selector) { - var nodes = Array.from(document.querySelectorAll(selector)); - } - else if (selector instanceof Node) { - var nodes = [selector]; - } - else if (Array.isArray(selector)) { - var nodes = selector; - } - else { - var nodes = []; - } - - if ('undefined' === typeof window.fSelectInit) { - window.fSelectInit = { - searchCache: '', - lastChoice: null, - lastFocus: null, - activeEl: null - }; - that.bindEvents(); - } - - nodes.forEach((input) => { - if (typeof input.fselect === 'object') { - input.fselect.destroy(); - } - - that.settings.multiple = input.matches('[multiple]'); - input.fselect = that; - that.input = input; - that.create(); - }); - } - - create() { - var that = this; - var options = that.buildOptions(); - var label = that.getDropdownLabel(); - var mode = (that.settings.multiple) ? 'multiple' : 'single'; - var searchClass = (that.settings.showSearch) ? '' : ' fs-hidden'; - var noResultsClass = (build.idx < 2) ? '' : ' fs-hidden'; - - var html = ` -
    -
    -
    ${label}
    - -
    -
    -
    - -
    -
    ${that.settings.noResultsText}
    -
    ${options}
    -
    -
    - `; - - var tpl = document.createElement('template'); - tpl.innerHTML = html; - var wrap = tpl.content.querySelector('.fs-wrap'); - that.input.parentNode.insertBefore(wrap, that.input.nextSibling); - that.input.classList.add('fs-hidden'); - - // add a relationship link - that.input._rel = wrap; - wrap._rel = that.input; - } - - destroy() { - this.input._rel.remove(); - this.input.classList.remove('fs-hidden'); - delete this.input._rel; - } - - reload() { - this.destroy(); - this.create(); - } - - open() { - var wrap = this.input._rel; - wrap.classList.add('fs-open'); - wrap.querySelector('.fs-dropdown').classList.remove('fs-hidden'); - - // don't auto-focus for touch devices - if (! window.matchMedia("(pointer: coarse)").matches) { - wrap.querySelector('.fs-search input').focus(); - } - - window.fSelectInit.lastChoice = this.getSelectedOptions('value'); - window.fSelectInit.activeEl = wrap; - - this.trigger('fs:opened', wrap); - } - - close() { - this.input._rel.classList.remove('fs-open'); - this.input._rel.querySelector('.fs-dropdown').classList.add('fs-hidden'); - - window.fSelectInit.searchCache = ''; - window.fSelectInit.lastChoice = null; - window.fSelectInit.lastFocus = null; - window.fSelectInit.activeEl = null; - - this.trigger('fs:closed', this.input._rel); - } - - buildOptions(parent) { - var that = this; - var parent = parent || that.input; - - Array.from(parent.children).forEach((node) => { - if ('optgroup' === node.nodeName.toLowerCase()) { - var opt = `
    ${node.label}
    `; - build.output += opt; - that.buildOptions(node); - build.optgroup++; - } - else { - var val = node.value; - - // skip the first choice in multi-select mode - if (0 === build.idx && '' === val && that.settings.multiple) { - build.idx++; - return; - } - - var classes = ['fs-option', 'g' + build.optgroup]; - - // append existing classes - node.className.split(' ').forEach((className) => { - if ('' !== className) { - classes.push(className); - } - }); - - if (node.matches('[disabled]')) classes.push('disabled'); - if (node.matches('[selected]')) classes.push('selected'); - classes = classes.join(' '); - - if ('function' === typeof that.settings.optionFormatter) { - node.label = that.settings.optionFormatter(node.label, node); - } - - var opt = `
    ${node.label}
    `; - - build.output += opt; - build.idx++; - } - }); - - return build.output; - } - - getSelectedOptions(field, context) { - var context = context || this.input; - return Array.from(context.selectedOptions).map((opt) => { - return (field) ? opt[field] : opt; - }); - } - - getAdjacentSibling(which) { - var that = this; - var which = which || 'next'; - var sibling = window.fSelectInit.lastFocus; - var selector = '.fs-option:not(.fs-hidden):not(.disabled)'; - - if (sibling) { - sibling = sibling[which + 'ElementSibling']; - - while (sibling) { - if (sibling.matches(selector)) break; - sibling = sibling[which + 'ElementSibling']; - } - - return sibling; - } - else if ('next' == which) { - sibling = that.input._rel.querySelector(selector); - } - - return sibling; - } - - getDropdownLabel() { - var that = this; - var labelText = that.getSelectedOptions('text'); - - if (labelText.length < 1) { - labelText = that.settings.placeholder; - } - else if (labelText.length > that.settings.numDisplayed) { - labelText = that.settings.overflowText.replace('{n}', labelText.length); - } - else { - labelText = labelText.join(', '); - } - - return labelText; - } - - debounce(func, wait) { - var timeout; - return (...args) => { - var boundFunc = func.bind(this, ...args); - clearTimeout(timeout); - timeout = setTimeout(boundFunc, wait); - } - } - - trigger(eventName, ...args) { - document.dispatchEvent(new CustomEvent(eventName, {detail: [...args]})); - } - - on(eventName, elementSelector, handler) { - document.addEventListener(eventName, function(e) { - // loop parent nodes from the target to the delegation node - for (var target = e.target; target && target != this; target = target.parentNode) { - if (target.matches(elementSelector)) { - handler.call(target, e); - break; - } - } - }, false); - } - - bindEvents() { - var that = this; - var optionSelector = '.fs-option:not(.fs-hidden):not(.disabled)'; - var unaccented = (str) => str.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); - - // debounce search for better performance - that.on('keyup', '.fs-search input', that.debounce(function(e) { - var wrap = e.target.closest('.fs-wrap'); - var options = wrap._rel.options; - - var matchOperators = /[|\\{}()[\]^$+*?.]/g; - var keywords = e.target.value.replace(matchOperators, '\\$&'); - keywords = unaccented(keywords); - - // if the searchCache already has a prefixed version of this search - // then don't un-hide the existing exclusions - if (0 !== keywords.indexOf(window.fSelectInit.searchCache)) { - wrap.querySelectorAll('.fs-option, .fs-optgroup-label').forEach((node) => node.classList.remove('fs-hidden')); - } - - window.fSelectInit.searchCache = keywords; - - for (var i = 0; i < options.length; i++) { - if ('' === options[i].value) continue; - - var needle = new RegExp(keywords, 'gi'); - var haystack = unaccented(options[i].text); - - if (null === haystack.match(needle)) { - wrap.querySelector('.fs-option[data-idx="' + i + '"]').classList.add('fs-hidden'); - } - } - - // hide optgroups if no choices - wrap.querySelectorAll('.fs-optgroup-label').forEach((node) => { - var group = node.getAttribute('data-group'); - var container = node.closest('.fs-options'); - var count = container.querySelectorAll('.fs-option.g' + group + ':not(.fs-hidden)').length; - - if (count < 1) { - node.classList.add('fs-hidden'); - } - }); - - // toggle the noResultsText div - if (wrap.querySelectorAll('.fs-option:not(.fs-hidden').length) { - wrap.querySelector('.fs-no-results').classList.add('fs-hidden'); - } - else { - wrap.querySelector('.fs-no-results').classList.remove('fs-hidden'); - } - - }, 100)); - - that.on('click', optionSelector, function(e) { - var wrap = this.closest('.fs-wrap'); - var value = this.getAttribute('data-value'); - var input = wrap._rel; - var isMultiple = wrap.classList.contains('multiple'); - - if (!isMultiple) { - input.value = value; - wrap.querySelectorAll('.fs-option.selected').forEach((node) => node.classList.remove('selected')); - } - else { - var idx = parseInt(this.getAttribute('data-idx')); - input.options[idx].selected = !this.classList.contains('selected'); - } - - this.classList.toggle('selected'); - - var label = input.fselect.getDropdownLabel(); - wrap.querySelector('.fs-label').innerHTML = label; - - // fire a change event - input.dispatchEvent(new Event('change', { bubbles: true })); - input.fselect.trigger('fs:changed', wrap); - - if (!isMultiple) { - input.fselect.close(); - } - - e.stopImmediatePropagation(); - }); - - that.on('keydown', '*', function(e) { - var wrap = this.closest('.fs-wrap'); - - if (!wrap) return; - - if (-1 < [38, 40, 27].indexOf(e.which)) { - e.preventDefault(); - } - - if (32 == e.which || 13 == e.which) { // space, enter - if (e.target.closest('.fs-search')) { - // preserve spaces for search - } - else if (e.target.matches(optionSelector)) { - e.target.click(); - e.preventDefault(); - } - else { - wrap.querySelector('.fs-label').click(); - e.preventDefault(); - } - } - else if (38 == e.which) { // up - var sibling = wrap._rel.fselect.getAdjacentSibling('previous'); - window.fSelectInit.lastFocus = sibling; // stop at the search box - - if (sibling) { - sibling.focus(); - } - else { - wrap.querySelector('.fs-search input').focus(); - } - } - else if (40 == e.which) { // down - var sibling = wrap._rel.fselect.getAdjacentSibling('next'); - - if (sibling) { - sibling.focus(); - window.fSelectInit.lastFocus = sibling; // stop at the bottom - } - } - else if (9 == e.which || 27 == e.which) { // tab, esc - wrap._rel.fselect.close(); - } - }); - - that.on('click', '*', function(e) { - var wrap = this.closest('.fs-wrap'); - var lastActive = window.fSelectInit.activeEl; - - if (wrap) { - var labelWrap = this.closest('.fs-label-wrap'); - - if (labelWrap) { - if (lastActive) { - lastActive._rel.fselect.close(); - } - if (wrap !== lastActive) { - wrap._rel.fselect.open(); - } - } - } - else { - if (lastActive) { - lastActive._rel.fselect.close(); - } - } - }); - } - } - - var $ = (selector, options) => new fSelect(selector, options); - - return $; - -})(); - -if ('undefined' !== typeof fUtil) { - fUtil.fn.fSelect = function(opts) { - this.each(function() { // no arrow function to preserve "this" - fSelect(this, opts); - }); - return this; - }; -} diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.css b/wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.css deleted file mode 100644 index 23479a24..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.css +++ /dev/null @@ -1,18 +0,0 @@ -.ftip-wrap { - position: absolute; - display: none; - max-width: 400px; - padding: 6px 8px; - background-color: #222; - border-radius: 6px; - opacity: 0; - color: #fff; - cursor: default; - transition: height 0s, opacity 1s; -} - -.ftip-wrap.active { - height: auto; - display: inline-block; - opacity: 0.9; -} \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.js b/wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.js deleted file mode 100644 index b9011e7a..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fTip/fTip.js +++ /dev/null @@ -1,100 +0,0 @@ -window.fTip = (() => { - - var qs = (selector) => document.querySelector(selector); - - class fTip { - - constructor(selector, options) { - let that = this; - - var defaults = { - content: (node) => node.getAttribute('title') - }; - - that.settings = Object.assign({}, defaults, options); - - var inputs = []; - - if ('string' === typeof selector) { - var inputs = Array.from(document.querySelectorAll(selector)); - } - else if (selector instanceof Node) { - var inputs = [selector]; - } - else if (Array.isArray(selector)) { - var inputs = selector; - } - - if (null === qs('.ftip-wrap')) { - that.buildHtml(); - that.bindEvents(); - } - - inputs.forEach(function(input) { - that.input = input; - input.ftip = that; - input.classList.add('ftip-enabled'); - }); - } - - open() { - let input = this.input; - let wrap = qs('.ftip-wrap'); - - wrap.innerHTML = this.settings.content(input); - wrap.classList.add('active'); - - let wrapBounds = wrap.getBoundingClientRect(); - let inputBounds = input.getBoundingClientRect(); - let top = window.pageYOffset + inputBounds.top; - let left = window.pageXOffset + inputBounds.right; - let centered = ((inputBounds.height - wrapBounds.height) / 2); - - wrap.style.top = (top + centered) + 'px'; - wrap.style.left = (left + 10) + 'px'; - } - - buildHtml() { - let html = '
    '; - document.body.insertAdjacentHTML('beforeend', html); - } - - bindEvents() { - var that = this; - let wrap = qs('.ftip-wrap'); - - var delayHandler = () => { - that.delay = setTimeout(() => { - wrap.classList.remove('active'); - }, 250); - }; - - that.on('mouseover', '.ftip-enabled', function(e) { - clearTimeout(that.delay); - this.ftip.open(); - }); - - that.on('mouseout', '.ftip-enabled', delayHandler); - that.on('mouseout', '.ftip-wrap', delayHandler); - that.on('mouseover', '.ftip-wrap', () => { - clearTimeout(that.delay); - }); - } - - on(eventName, elementSelector, handler) { - document.addEventListener(eventName, function(e) { - // loop parent nodes from the target to the delegation node - for (var target = e.target; target && target != this; target = target.parentNode) { - if (target.matches(elementSelector)) { - handler.call(target, e); - break; - } - } - }, false); - } - } - - var $ = (selector, options) => new fTip(selector, options); - - return $; -})(); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/fUtil/LICENSE.md b/wp/wp-content/plugins/facetwp/assets/vendor/fUtil/LICENSE.md deleted file mode 100644 index 09116e9f..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fUtil/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2021 FacetWP, LLC - -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/wp-content/plugins/facetwp/assets/vendor/fUtil/fUtil.js b/wp/wp-content/plugins/facetwp/assets/vendor/fUtil/fUtil.js deleted file mode 100644 index 9264d15f..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/fUtil/fUtil.js +++ /dev/null @@ -1,451 +0,0 @@ -window.fUtil = (() => { - - class fUtil { - - constructor(selector) { - if (typeof selector === 'string' || selector instanceof String) { // string - var selector = selector.replace(':selected', ':checked'); - - if ('' === selector) { - this.nodes = []; - } - else if (this.isValidSelector(selector)) { - this.nodes = Array.from(document.querySelectorAll(selector)); - } - else { - var tpl = document.createElement('template'); - tpl.innerHTML = selector; - this.nodes = [tpl.content]; - } - } - else if (Array.isArray(selector)) { // array of nodes - this.nodes = selector; - } - else if (typeof selector === 'object' && selector.nodeName) { // node - this.nodes = [selector]; - } - else if (typeof selector === 'function') { // function - this.ready(selector); - } - else if (selector === window) { // window - this.nodes = [window]; - } - else { // document - this.nodes = [document]; - } - - // custom plugins - $.each($.fn, (handler, method) => { - this[method] = handler; - }); - } - - static isset(input) { - return typeof input !== 'undefined'; - } - - static post(url, data, settings) { - var settings = Object.assign({}, { - dataType: 'json', - contentType: 'application/json', - headers: {}, - done: () => {}, - fail: () => {} - }, settings); - - settings.headers['Content-Type'] = settings.contentType; - - data = ('application/json' === settings.contentType) ? JSON.stringify(data) : $.toEncoded(data); - - fetch(url, { - method: 'POST', - headers: settings.headers, - body: data - }) - .then(response => response[settings.dataType]()) - .then(json => settings.done(json)) - .catch(err => settings.fail(err)); - } - - static toEncoded(obj, prefix, out) { - var out = out || []; - var prefix = prefix || ''; - - if (Array.isArray(obj)) { - if (obj.length) { - obj.forEach((val) => { - $.toEncoded(val, prefix + '[]', out); - }); - } - else { - $.toEncoded('', prefix, out); - } - } - else if (typeof obj === 'object' && obj !== null) { - Object.keys(obj).forEach((key) => { - var new_prefix = prefix ? prefix + '[' + key + ']' : key; - $.toEncoded(obj[key], new_prefix, out); - }); - } - else { - out.push(encodeURIComponent(prefix) + '=' + encodeURIComponent(obj)); - } - - return out.join('&'); - } - - static forEach(items, callback) { - if (typeof items === 'object' && items !== null) { - if (Array.isArray(items)) { - items.forEach((val, key) => callback.bind(val)(val, key)); - } - else { - Object.keys(items).forEach(key => { - var val = items[key]; - callback.bind(val)(val, key); - }); - } - } - - return items; - } - - isValidSelector(string) { - try { - document.createDocumentFragment().querySelector(string); - } - catch(err) { - return false; - } - return true; - } - - clone() { - return $(this.nodes); - } - - len() { - return this.nodes.length; - } - - each(callback) { - this.nodes.forEach((node, key) => { - let func = callback.bind(node); // set "this" - func(node, key); - }); - - return this; - } - - ready(callback) { - if (typeof callback !== 'function') return; - - if (document.readyState === 'complete') { - return callback(); - } - - document.addEventListener('DOMContentLoaded', callback, false); - } - - addClass(className) { - this.each(node => node.classList.add(className)); - return this; - } - - removeClass(className) { - this.each(node => node.classList.remove(className)); - return this; - } - - hasClass(className) { - return $.isset(this.nodes.find(node => node.classList.contains(className))); - } - - toggleClass(className) { - this.each(node => node.classList.toggle(className)); - return this; - } - - is(selector) { - for (let i = 0; i < this.len(); i++) { // forEach prevents loop exiting - if (this.nodes[i].matches(selector)) { - return true; - } - } - return false; - } - - find(selector) { - var selector = selector.replace(':selected', ':checked'); - let nodes = []; - let clone = this.clone(); - - clone.each(node => { - nodes = nodes.concat(Array.from(node.querySelectorAll(selector))); - }); - - clone.nodes = nodes; - return clone; - } - - first() { - let clone = this.clone(); - if (clone.len()) { - clone.nodes = this.nodes.slice(0, 1); - } - return clone; - } - - last() { - let clone = this.clone(); - if (clone.len()) { - clone.nodes = this.nodes.slice(-1); - } - return clone; - } - - prev(selector) { - let nodes = []; - let clone = this.clone(); - - clone.each(node => { - let sibling = node.previousElementSibling; - - while (sibling) { - if (!$.isset(selector) || sibling.matches(selector)) break; - sibling = sibling.previousElementSibling; - } - - if (sibling) { - nodes.push(sibling); - } - }); - - clone.nodes = nodes; - return clone; - } - - next(selector) { - let nodes = []; - let clone = this.clone(); - - clone.each(node => { - let sibling = node.nextElementSibling; - - while (sibling) { - if (!$.isset(selector) || sibling.matches(selector)) break; - sibling = sibling.nextElementSibling; - } - - if (sibling) { - nodes.push(sibling); - } - }); - - clone.nodes = nodes; - return clone; - } - - prepend(html) { - this.each(node => node.insertAdjacentHTML('afterbegin', html)); - return this; - } - - append(html) { - this.each(node => node.insertAdjacentHTML('beforeend', html)); - return this; - } - - parents(selector) { - let parents = []; - let clone = this.clone(); - - clone.each(node => { - let parent = node.parentNode; - while (parent && parent !== document) { - if (parent.matches(selector)) parents.push(parent); - parent = parent.parentNode; - } - }); - - clone.nodes = [...new Set(parents)]; // remove dupes - return clone; - } - - closest(selector) { - let nodes = []; - let clone = this.clone(); - - clone.each(node => { - let closest = node.closest(selector); - - if (closest) { - nodes.push(closest); - } - }); - - clone.nodes = nodes; - return clone; - } - - remove() { - this.each(node => node.remove()); - return this; - } - - on(eventName, selector, callback) { - if (!$.isset(selector)) return; - if (!$.isset(callback)) { - var callback = selector; - var selector = null; - } - - // Reusable callback - var checkForMatch = (e) => { - if (null === selector || e.target.matches(selector)) { - callback.bind(e.target)(e); - } - else if (e.target.closest(selector)) { - var $this = e.target.closest(selector); - callback.bind($this)(e); - } - }; - - this.each(node => { - - // Attach a unique ID to each node - if (!$.isset(node._id)) { - node._id = $.event.count; - $.event.store[$.event.count] = node; - $.event.count++; - } - - var id = node._id; - - // Store the raw callback, needed for .off() - checkForMatch._str = callback.toString(); - - if (!$.isset($.event.map[id])) { - $.event.map[id] = {}; - } - if (!$.isset($.event.map[id][eventName])) { - $.event.map[id][eventName] = {}; - } - if (!$.isset($.event.map[id][eventName][selector])) { - $.event.map[id][eventName][selector] = []; - } - - // Use $.event.map to store event references - // removeEventListener needs named callbacks, so we're creating - // one for every handler - let length = $.event.map[id][eventName][selector].push(checkForMatch); - - node.addEventListener(eventName, $.event.map[id][eventName][selector][length - 1]); - }); - - return this; - } - - off(eventName, selector, callback) { - if (!$.isset(callback)) { - var callback = selector; - var selector = null; - } - - this.each(node => { - var id = node._id; - - $.each($.event.map[id], (selectors, theEventName) => { - $.each(selectors, (callbacks, theSelector) => { - $.each(callbacks, (theCallback, index) => { - if ( - (!eventName || theEventName === eventName) && - (!selector || theSelector === selector) && - (!callback || theCallback._str === callback.toString()) - ) { - node.removeEventListener(theEventName, $.event.map[id][theEventName][theSelector][index]); - delete $.event.map[id][theEventName][theSelector][index]; - } - }); - }); - }); - }); - - return this; - } - - trigger(eventName, extraData) { - this.each(node => node.dispatchEvent(new CustomEvent(eventName, { - detail: extraData, - bubbles: true - }))); - return this; - } - - attr(attributeName, value) { - if (!$.isset(value)) { - return (this.len()) ? this.nodes[0].getAttribute(attributeName) : null; - } - - this.each(node => node.setAttribute(attributeName, value)); - return this; - - } - - data(key, value) { - if (!$.isset(value)) { - return (this.len()) ? this.nodes[0]._fdata[key] : null; - } - - this.each(node => node._fdata[key] = value); - return this; - } - - html(htmlString) { - if (!$.isset(htmlString)) { - return (this.len()) ? this.nodes[0].innerHTML : null; - } - - this.each(node => node.innerHTML = htmlString); - return this; - } - - text(textString) { - if (!$.isset(textString)) { - return (this.len()) ? this.nodes[0].textContent : null; - } - else { - this.each(node => node.textContent = textString); - return this; - } - } - - val(value) { - if (!$.isset(value)) { - if (this.len()) { - var field = this.nodes[0]; - if (field.nodeName.toLowerCase() === 'select' && field.multiple) { - return [...field.options].filter((x) => x.selected).map((x) => x.value); - } - return field.value; - } - return null; - } - else { - this.each(node => node.value = value); - return this; - } - } - } - - var $ = selector => new fUtil(selector); - - // Set object methods - $.fn = {}; - $.post = fUtil.post; - $.isset = fUtil.isset; - $.each = fUtil.forEach; - $.toEncoded = fUtil.toEncoded; - $.event = {map: {}, store: [], count: 0}; - return $; -})(); diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.css b/wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.css deleted file mode 100644 index 7bdc08a4..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.css +++ /dev/null @@ -1,150 +0,0 @@ -.noUi-target, -.noUi-target * { - touch-action: none; - user-select: none; - box-sizing: border-box; -} -.noUi-target { - position: relative; -} -.noUi-base, -.noUi-connects { - width: 100%; - height: 100%; - position: relative; - z-index: 1; -} -.noUi-connects { - overflow: hidden; - z-index: 0; -} -.noUi-connect, -.noUi-origin { - will-change: transform; - position: absolute; - z-index: 1; - top: 0; - right: 0; - height: 100%; - width: 100%; - transform-origin: 0 0; - transform-style: flat; -} -.noUi-txt-dir-rtl.noUi-horizontal .noUi-origin { - left: 0; - right: auto; -} -.noUi-horizontal .noUi-origin { - height: 0; -} -.noUi-handle { - backface-visibility: hidden; - position: absolute; -} -.noUi-touch-area { - height: 100%; - width: 100%; -} -.noUi-state-tap .noUi-connect, -.noUi-state-tap .noUi-origin { - transition: transform 0.3s; -} -.noUi-horizontal { - height: 14px; -} -.noUi-horizontal .noUi-handle { - width: 20px; - height: 20px; - right: -10px; - top: -4px; -} -.noUi-target { - background: #FAFAFA; - border-radius: 4px; - border: 1px solid #D3D3D3; - padding: 0 8px; -} -.noUi-connects { - border-radius: 3px; -} -.noUi-connect { - background: #ddd; -} -.noUi-handle { - border: 1px solid #D9D9D9; - border-radius: 3px; - background: #FFF; - cursor: default; -} -.noUi-pips, -.noUi-pips * { - box-sizing: border-box; -} -.noUi-pips { - position: absolute; - color: #999; -} -.noUi-value { - position: absolute; - white-space: nowrap; - text-align: center; -} -.noUi-value-sub { - color: #ccc; - font-size: 10px; -} -.noUi-marker { - position: absolute; - background: #CCC; -} -.noUi-marker-sub { - background: #AAA; -} -.noUi-marker-large { - background: #AAA; -} -.noUi-pips-horizontal { - padding: 10px 0; - height: 80px; - top: 100%; - left: 0; - width: 100%; -} -.noUi-value-horizontal { - transform: translate(-50%, 50%); -} -.noUi-rtl .noUi-value-horizontal { - transform: translate(50%, 50%); -} -.noUi-marker-horizontal.noUi-marker { - margin-left: -1px; - width: 2px; - height: 5px; -} -.noUi-marker-horizontal.noUi-marker-sub { - height: 10px; -} -.noUi-marker-horizontal.noUi-marker-large { - height: 15px; -} -.noUi-tooltip { - display: block; - position: absolute; - border: 1px solid #D9D9D9; - border-radius: 3px; - background: #fff; - color: #000; - padding: 5px; - text-align: center; - white-space: nowrap; -} -.noUi-horizontal .noUi-tooltip { - transform: translate(-50%, 0); - left: 50%; - bottom: 120%; -} -.noUi-horizontal .noUi-origin > .noUi-tooltip { - transform: translate(50%, 0); - left: auto; - bottom: 10px; -} diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.min.js b/wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.min.js deleted file mode 100644 index e175fb27..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/noUiSlider/nouislider.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! noUiSlider - 15.6.1 custom - 2022-09-06 */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).noUiSlider={})}(this,function(ut){"use strict";function n(t){return"object"==typeof t&&"function"==typeof t.to}function ct(t){t.parentElement.removeChild(t)}function pt(t){return null!=t}function ft(t){t.preventDefault()}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function dt(t,e,r){0=e[r];)r+=1;return r}function r(t,e,r){var n,i,o;return r>=t.slice(-1)[0]?100:(o=l(r,t),n=t[o-1],t=t[o],i=e[o-1],e=e[o],i+(o=r,a(r=[n,t],r[0]<0?o+Math.abs(r[0]):o-r[0],0)/s(i,e)))}function o(t,e,r,n){var i,o,s;return 100===n?n:(o=t[(i=l(n,t))-1],s=t[i],r?(s-o)/2this.xPct[n+1];)n++;else t===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||t!==this.xPct[n+1]||n++;for(var i,o=1,s=(e=null===e?[]:e)[n],a=0,l=0,u=0,c=r?(t-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-t)/(this.xPct[n+1]-this.xPct[n]);0= 2) required for mode 'count'.");for(var e=t.values-1,r=100/e,n=[];e--;)n[e]=e*r;return n.push(100),q(n,t.stepped)}(d),m={},t=S.xVal[0],e=S.xVal[S.xVal.length-1],g=!1,v=!1,b=0;return(h=h.slice().sort(function(t,e){return t-e}).filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==t&&(h.unshift(t),g=!0),h[h.length-1]!==e&&(h.push(e),v=!0),h.forEach(function(t,e){var r,n,i,o,s,a,l,u,c=h[e+1],p=d.mode===ut.PipsMode.Steps,f=(f=p?S.xNumSteps[e]:f)||c-t;for(void 0===c&&(c=t),f=Math.max(f,1e-7),r=t;r<=c;r=Number((r+f).toFixed(7))){for(a=(s=(i=S.toStepping(r))-b)/(d.density||1),u=s/(l=Math.round(a)),n=1;n<=l;n+=1)m[(o=b+n*u).toFixed(5)]=[S.fromStepping(o),0];s=-1ut.PipsType.NoValue&&((n=y(a,!1)).className=p(t,f.cssClasses.value),n.setAttribute("data-value",String(r)),n.style[f.style]=e+"%",n.innerHTML=String(s.to(r))))}),a}function P(){n&&(ct(n),n=null)}function C(t){P();var e=X(t),r=t.filter,t=t.format||{to:function(t){return String(Math.round(t))}};return n=c.appendChild(Y(e,r,t))}function I(){var t=i.getBoundingClientRect(),e="offset"+["Width","Height"][f.ort];return 0===f.ort?t.width||i[e]:t.height||i[e]}function N(n,i,o,s){function e(t){var e,r;return!!(t=function(e,t,r){var n=0===e.type.indexOf("touch"),i=0===e.type.indexOf("mouse"),o=0===e.type.indexOf("pointer"),s=0,a=0;0===e.type.indexOf("MSPointer")&&(o=!0);if("mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(n){n=function(t){t=t.target;return t===r||r.contains(t)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){var l=Array.prototype.filter.call(e.touches,n);if(1r.stepAfter.startValue&&(n=r.stepAfter.startValue-t),i=t>r.thisStep.startValue?r.thisStep.step:!1!==r.stepBefore.step&&t-r.stepBefore.highestStep,100===e?n=null:0===e&&(i=null);t=S.countStepDecimals();return null!==n&&!1!==n&&(n=Number(n.toFixed(t))),[i=null!==i&&!1!==i?Number(i.toFixed(t)):i,n]}gt(t=c,f.cssClasses.target),0===f.dir?gt(t,f.cssClasses.ltr):gt(t,f.cssClasses.rtl),0===f.ort?gt(t,f.cssClasses.horizontal):gt(t,f.cssClasses.vertical),gt(t,"rtl"===getComputedStyle(t).direction?f.cssClasses.textDirectionRtl:f.cssClasses.textDirectionLtr),i=y(t,f.cssClasses.base);var O,st=f.connect,at=i,lt=y(at,f.cssClasses.connects);l=[],(a=[]).push(F(lt,st[0]));for(var L=0;L*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;transform:skew(45deg);transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}";var e=t.prototype;return e.setOptions=function(t){if(t){var e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(e.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(t,e,i){for(var o in t)i&&0<=i.indexOf(o)||(e[o]=t[o])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var i=t.color;i&&this._setColor(i)}var o=e.parent;o&&e.popup&&!this._popupInited?(a(o,"click",this._openProxy),p(o,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):t.parent&&!e.popup&&this.show()}},e.openHandler=function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&t.type===o?this._domEdit:this.domElement;setTimeout(function(){e.focus()},100),this.onOpen&&this.onOpen(this.color)}},e.closeHandler=function(t){var e,i=this.settings.parent,o=t&&t.type,r=!1;t?o===n||o===s?this.domElement.contains(t.target)||(r=!0):((e=t).preventDefault(),e.stopPropagation(),r=!0):r=!0,r&&this.hide()&&(i.style.pointerEvents="",o!==n&&i.focus(),this.onClose&&this.onClose(this.color))},e.movePopup=function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()},e.setColor=function(t,e){this._setColor(t,{silent:e})},e._setColor=function(t,e){if("string"==typeof t&&(t=t.trim()),t){var i;e=e||{};try{i=new r(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var o=i.hsla();o[3]=1,i.hsla(o)}this.color=i,this._setHSLA(null,null,null,null,e)}},e.show=function(){var t=this.settings;if(!t.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var i,o,r=t.template||'
    ',n=(i=r,(o=document.createElement("div")).innerHTML=i,o.firstElementChild);return this.domElement=n,this._domH=w(".picker_hue",n),this._domSL=w(".picker_sl",n),this._domA=w(".picker_alpha",n),this._domEdit=w(".picker_editor input",n),this._domSample=w(".picker_sample",n),this._domOkay=w(".picker_done button",n),n.classList.add("layout_"+t.layout),t.alpha||n.classList.add("no_alpha"),t.editor||n.classList.add("no_editor"),this._ifPopup(function(){n.classList.add("popup")}),this._setPosition(),this.color?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0},e.hide=function(){return this._toggleDOM(!1)},e._bindEvents=function(){var i=this,t=this.domElement;a(t,"click",function(t){t.preventDefault()}),l(this._domH,function(t,e){i._setHSLA(t)}),l(this._domSL,function(t,e){i._setHSLA(null,t,1-e)}),this.settings.alpha&&l(this._domA,function(t,e){i._setHSLA(null,null,null,1-e)});var e=this._domEdit;function o(t){i._ifPopup(function(){i.closeHandler(t)})}function r(t){i._ifPopup(function(){i.closeHandler(t)}),i.onDone&&i.onDone(i.color)}a(e,"input",function(t){i._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(e,"focus",function(t){this.selectionStart===this.selectionEnd&&this.select()}),a(window,n,o),a(window,s,o),p(t,["Esc","Escape"],o),a(this._domOkay,"click",r),p(t,["Enter"],r)},e._setPosition=function(){var i=this.settings.parent,o=this.domElement;i!==o.parentNode&&i.appendChild(o),this._ifPopup(function(t){"static"===getComputedStyle(i).position&&(i.style.position="relative");var e=!0===t?"popup_right":"popup_"+t;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(t){t===e?o.classList.add(t):o.classList.remove(t)}),o.classList.add(e)})},e._setHSLA=function(t,e,i,o,r){r=r||{};var n=this.color,s=n.hsla();[t,e,i,o].forEach(function(t,e){(t||0===t)&&(s[e]=t)}),n.hsla(s),this._updateUI(r),this.onChange&&!r.silent&&this.onChange(n)},e._updateUI=function(t){if(this.domElement){t=t||{};var e=this.color,i=e.hsla(),o="hsl("+360*i[0]+", 100%, 50%)",r=e.hslString(),n=e.hslaString(),s=this._domH,p=this._domSL,a=this._domA,l=w(".picker_selector",s),c=w(".picker_selector",p),u=w(".picker_selector",a);g(0,l,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=o,g(0,c,i[1]),m(0,c,1-i[2]),p.style.color=r,m(0,u,1-i[3]);var h=r,d=h.replace("hsl","hsla").replace(")",", 0)"),f="linear-gradient("+[h,d]+")";if(this._domA.style.backgroundImage=f+", url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",!t.fromEditor){var _=e.hex();this._domEdit.value=this.settings.alpha?_:_.substr(0,7)}this._domSample.style.color=n}function g(t,e,i){e.style.left=100*i+"%"}function m(t,e,i){e.style.top=100*i+"%"}},e._ifPopup=function(t,e){var i=this.settings;i.parent&&i.popup?t&&t(i.popup):e&&e()},e._toggleDOM=function(t){var e=this.domElement;if(!e)return!1;var i=t?"":"none",o=e.style.display!==i;return o&&(e.style.display=i),o},t}()}); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/vue/Sortable.min.js b/wp/wp-content/plugins/facetwp/assets/vendor/vue/Sortable.min.js deleted file mode 100644 index 17bb16c7..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/vue/Sortable.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! Sortable 1.15.0 - MIT | git://github.com/SortableJS/Sortable.git */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function M(o){for(var t=1;tt.length)&&(e=t.length);for(var n=0,o=new Array(e);n"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function N(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&p(t,e)||o&&t===n)return t}while(t!==n&&(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode))}var i;return null}var g,m=/\s+/g;function I(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(m," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(m," ")))}function P(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=P(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function b(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[j]._onDragOver(o)}}var i,r,a}function Yt(t){q&&q.parentNode[j]._isOutsideThisEl(t.target)}function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[j]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return It(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bt.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(n in K.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in Pt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Mt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),Et.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,x())}function Ft(t,e,n,o,i,r,a,l){var s,c,u=t[j],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||k(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function jt(t){t.draggable=!1}function Ht(){Ct=!1}function Lt(t){return setTimeout(t,0)}function Kt(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,q):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){Tt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Tt.push(o)}}(o),!q&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=N(l,t.draggable,o,!1))&&l.animated||J===l)){if(nt=B(l),it=B(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return U({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),z("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=N(s,t.trim(),o,!1))return U({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),z("filter",n,{evt:e}),!0}))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!N(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!q&&n.parentNode===r&&(o=k(n),$=r,V=(q=n).parentNode,Q=q.nextSibling,J=n,at=a.group,st={target:Bt.dragged=q,clientX:(e||t).clientX,clientY:(e||t).clientY},ht=st.clientX-o.left,ft=st.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,q.style["will-change"]="all",o=function(){z("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(q.draggable=!0),i._triggerDragStart(t,e),U({sortable:i,name:"choose",originalEvent:t}),I(q,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){b(q,t.trim(),jt)}),h(l,"dragover",Xt),h(l,"mousemove",Xt),h(l,"touchmove",Xt),h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),z("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():Bt.eventCanceled?this._onDrop():(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&jt(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;f(t,"mouseup",this._disableDelayedDrag),f(t,"touchend",this._disableDelayedDrag),f(t,"touchcancel",this._disableDelayedDrag),f(t,"mousemove",this._delayedDragTouchMoveHandler),f(t,"touchmove",this._delayedDragTouchMoveHandler),f(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(q,"dragend",this),h($,"dragstart",this._onDragStart));try{document.selection?Lt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;yt=!1,$&&q?(z("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Yt),n=this.options,t||I(q,n.dragClass,!1),I(q,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),U({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(ct){this._lastX=ct.clientX,this._lastY=ct.clientY,kt();for(var t=document.elementFromPoint(ct.clientX,ct.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ct.clientX,ct.clientY))!==e;)e=t;if(q.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j])if(e[j]._onDragOver({clientX:ct.clientX,clientY:ct.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Rt()}},_onTouchMove:function(t){if(st){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Z&&v(Z,!0),a=Z&&r&&r.a,l=Z&&r&&r.d,e=Ot&&bt&&E(bt),a=(i.clientX-st.clientX+o.x)/(a||1)+(e?e[0]-_t[0]:0)/(a||1),l=(i.clientY-st.clientY+o.y)/(l||1)+(e?e[1]-_t[1]:0)/(l||1);if(!Bt.active&&!yt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))n.right+10||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+10}(n,r,this)&&!g.animated){if(g===q)return O(!1);if((l=g&&a===n.target?g:l)&&(w=k(l)),!1!==Ft($,a,q,o,l,w,n,!!l))return x(),g&&g.nextSibling?a.insertBefore(q,g.nextSibling):a.appendChild(q),V=a,A(),O(!0)}else if(g&&function(t,e,n){n=k(X(n.el,0,n.options,!0));return e?t.clientX{t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},860:t=>{t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},206:t=>{t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},319:(t,e,n)=>{var o=n(646),i=n(860),s=n(206);t.exports=function(t){return o(t)||i(t)||s()}},8:e=>{function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(t){return typeof t}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}e.exports=n}},o={},y.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return y.d(e,{a:e}),e},y.d=(t,e)=>{for(var n in e)y.o(e,n)&&!y.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},y.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),y.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},b={},(()=>{"use strict";y.r(b),y.d(b,{VueSelect:()=>h,default:()=>f,mixins:()=>d});var t=y(319),o=y.n(t),t=y(8),i=y.n(t),t=y(713),s=y.n(t),t={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(t){var e=this;this.autoscroll&&t&&this.$nextTick(function(){return e.maybeAdjustScroll()})}},methods:{maybeAdjustScroll:function(){var t,e,n,o,i=(null==(i=this.$refs.dropdownMenu)?void 0:i.children[this.typeAheadPointer])||!1;if(i)return t=this.getDropdownViewport(),e=(o=i.getBoundingClientRect()).top,n=o.bottom,o=o.height,et.bottom?this.$refs.dropdownMenu.scrollTop=i.offsetTop-(t.height-o):void 0},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},e={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){for(var t=0;t=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,null,2):String(t)}function p(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function _(t,e){return y.call(t,e)}function b(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var $=/-(\w)/g,w=b((function(t){return t.replace($,(function(t,e){return e?e.toUpperCase():""}))})),x=b((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),C=/\B([A-Z])/g,k=b((function(t){return t.replace(C,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function A(t){for(var e={},n=0;n0,G=q&&q.indexOf("edge/")>0;q&&q.indexOf("android");var X=q&&/iphone|ipad|ipod|ios/.test(q);q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q);var Y,Q=q&&q.match(/firefox\/(\d+)/),tt={}.watch,et=!1;if(J)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===Y&&(Y=!J&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Y},ot=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,st="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);at="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ct=null;function ut(t){void 0===t&&(t=null),t||ct&&ct._scope.off(),ct=t,t&&t._scope.on()}var lt=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),ft=function(t){void 0===t&&(t="");var e=new lt;return e.text=t,e.isComment=!0,e};function dt(t){return new lt(void 0,void 0,void 0,String(t))}function pt(t){var e=new lt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var vt=0,ht=function(){function t(){this.id=vt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){g(this.subs,t)},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.slice(),n=0,r=e.length;n0&&(Xt((c=Yt(c,"".concat(a||"","_").concat(s)))[0])&&Xt(l)&&(f[u]=dt(l.text+c[0].text),c.shift()),f.push.apply(f,c)):i(c)?Xt(l)?f[u]=dt(l.text+c):""!==c&&f.push(dt(c)):Xt(c)&&Xt(l)?f[u]=dt(l.text+c.text):(o(t._isVList)&&r(c.tag)&&n(c.key)&&r(a)&&(c.key="__vlist".concat(a,"_").concat(s,"__")),f.push(c)));return f}function Qt(t,n,c,u,l,f){return(e(c)||i(c))&&(l=u,u=c,c=void 0),o(f)&&(l=2),function(t,n,o,i,c){if(r(o)&&r(o.__ob__))return ft();r(o)&&r(o.is)&&(n=o.is);if(!n)return ft();e(i)&&a(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);2===c?i=Gt(i):1===c&&(i=function(t){for(var n=0;n0,s=n?!!n.$stable:!a,c=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(s&&o&&o!==t&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},n)n[u]&&"$"!==u[0]&&(i[u]=be(e,r,u,n[u]))}else i={};for(var l in r)l in i||(i[l]=$e(r,l));return n&&Object.isExtensible(n)&&(n._normalized=i),z(i,"$stable",s),z(i,"$key",c),z(i,"$hasNormal",a),i}function be(t,n,r,o){var i=function(){var n=ct;ut(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:Gt(r))&&r[0];return ut(n),r&&(!i||1===r.length&&i.isComment&&!ye(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function $e(t,e){return function(){return t[e]}}function we(e){return{get attrs(){return function(e){if(!e._attrsProxy){var n=e._attrsProxy={};z(n,"_v_attr_proxy",!0),xe(n,e.$attrs,t,e)}return e._attrsProxy}(e)},get slots(){return function(t){t._slotsProxy||ke(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:S(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return Ht(e,t,n)}))}}}function xe(t,e,n,r){var o=!1;for(var i in e)i in t?e[i]!==n[i]&&(o=!0):(o=!0,Ce(t,i,r));for(var i in t)i in e||(o=!0,delete t[i]);return o}function Ce(t,e,n){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n.$attrs[e]}})}function ke(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function Se(){var t=ct;return t._setupContext||(t._setupContext=we(t))}var Oe,Te=null;function Ae(t,e){return(t.__esModule||st&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function je(t){if(e(t))for(var n=0;ndocument.createEvent("Event").timeStamp&&(We=function(){return Ze.now()})}var Ge=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Xe(){var t,e;for(qe=We(),Ke=!0,Be.sort(Ge),Je=0;JeJe&&Be[n].id>t.id;)n--;Be.splice(n+1,0,t)}else Be.push(t);Ve||(Ve=!0,xn(Xe))}}var Qe="watcher",tn="".concat(Qe," callback"),en="".concat(Qe," getter"),nn="".concat(Qe," cleanup");function rn(t,e){return sn(t,null,{flush:"post"})}var on,an={};function sn(n,r,o){var i=void 0===o?t:o,s=i.immediate,c=i.deep,u=i.flush,l=void 0===u?"pre":u;i.onTrack,i.onTrigger;var f,d,p=ct,v=function(t,e,n){return void 0===n&&(n=null),fn(t,null,n,p,e)},h=!1,m=!1;if(Rt(n)?(f=function(){return n.value},h=Mt(n)):Pt(n)?(f=function(){return n.__ob__.dep.depend(),n},c=!0):e(n)?(m=!0,h=n.some((function(t){return Pt(t)||Mt(t)})),f=function(){return n.map((function(t){return Rt(t)?t.value:Pt(t)?Hn(t):a(t)?v(t,en):void 0}))}):f=a(n)?r?function(){return v(n,en)}:function(){if(!p||!p._isDestroyed)return d&&d(),v(n,Qe,[y])}:j,r&&c){var g=f;f=function(){return Hn(g())}}var y=function(t){d=_.onStop=function(){v(t,nn)}};if(rt())return y=j,r?s&&v(r,tn,[f(),m?[]:void 0,y]):f(),j;var _=new zn(ct,f,j,{lazy:!0});_.noRecurse=!r;var b=m?[]:an;return _.run=function(){if(_.active||"pre"===l&&p&&p._isBeingDestroyed)if(r){var t=_.get();(c||h||(m?t.some((function(t,e){return I(t,b[e])})):I(t,b)))&&(d&&d(),v(r,tn,[t,b===an?void 0:b,y]),b=t)}else _.get()},"sync"===l?_.update=_.run:"post"===l?(_.post=!0,_.update=function(){return Ye(_)}):_.update=function(){if(p&&p===ct&&!p._isMounted){var t=p._preWatchers||(p._preWatchers=[]);t.indexOf(_)<0&&t.push(_)}else Ye(_)},r?s?_.run():b=_.get():"post"===l&&p?p.$once("hook:mounted",(function(){return _.get()})):_.get(),function(){_.teardown()}}var cn=function(){function t(t){void 0===t&&(t=!1),this.active=!0,this.effects=[],this.cleanups=[],!t&&on&&(this.parent=on,this.index=(on.scopes||(on.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=on;try{return on=this,t()}finally{on=e}}},t.prototype.on=function(){on=this},t.prototype.off=function(){on=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e1)return n&&a(e)?e.call(r):e}},h:function(t,e,n){return Qt(ct,t,e,n,2,!0)},getCurrentInstance:function(){return ct&&{proxy:ct}},useSlots:function(){return Se().slots},useAttrs:function(){return Se().attrs},mergeDefaults:function(t,n){var r=e(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var o in n){var i=r[o];i?e(i)||a(i)?r[o]={type:i,default:n[o]}:i.default=n[o]:null===i&&(r[o]={default:n[o]})}return r},nextTick:xn,set:At,del:jt,useCssModule:function(e){return t},useCssVars:function(t){if(J){var e=ct;e&&rn((function(){var n=e.$el,r=t(e,e._setupProxy);if(n&&1===n.nodeType){var o=n.style;for(var i in r)o.setProperty("--".concat(i),r[i])}}))}},defineAsyncComponent:function(t){a(t)&&(t={loader:t});var e=t.loader,n=t.loadingComponent,r=t.errorComponent,o=t.delay,i=void 0===o?200:o,s=t.timeout;t.suspensible;var c=t.onError,u=null,l=0,f=function(){var t;return u||(t=u=e().catch((function(t){if(t=t instanceof Error?t:new Error(String(t)),c)return new Promise((function(e,n){c(t,(function(){return e((l++,u=null,f()))}),(function(){return n(t)}),l+1)}));throw t})).then((function(e){return t!==u&&u?u:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e)})))};return function(){return{component:f(),delay:i,timeout:s,error:r,loading:n}}},onBeforeMount:kn,onMounted:Sn,onBeforeUpdate:On,onUpdated:Tn,onBeforeUnmount:An,onUnmounted:jn,onErrorCaptured:En,onActivated:Nn,onDeactivated:Dn,onServerPrefetch:Pn,onRenderTracked:Mn,onRenderTriggered:In}),Fn=new at;function Hn(t){return Bn(t,Fn),Fn.clear(),t}function Bn(t,n){var r,o,i=e(t);if(!(!i&&!s(t)||Object.isFrozen(t)||t instanceof lt)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)Bn(t[r],n);else if(Rt(t))Bn(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)Bn(t[o[r]],n)}}var Un=0,zn=function(){function t(t,e,n,r,o){!function(t,e){void 0===e&&(e=on),e&&e.active&&e.effects.push(t)}(this,on||(t?t._scope:void 0)),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Un,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new at,this.newDepIds=new at,this.expression="",a(e)?this.getter=e:(this.getter=function(t){if(!V.test(t)){var e=t.split(".");return function(t){for(var n=0;n-1)if(i&&!_(o,"default"))s=!1;else if(""===s||s===k(t)){var u=wr(String,o.type);(u<0||c-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===c.call(r)&&t.test(n));var r}function Or(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=a.name;s&&!e(s)&&Tr(n,i,r,o)}}}function Tr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,g(n,e)}!function(e){e.prototype._init=function(e){var n=this;n._uid=Qn++,n._isVue=!0,n.__v_skip=!0,n._scope=new cn(!0),e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=mr(tr(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Pe(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=me(n._renderChildren,o),e.$scopedSlots=r?_e(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,o){return Qt(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return Qt(e,t,n,r,o,!0)};var i=r&&r.data;Tt(e,"$attrs",i&&i.attrs||t,null,!0),Tt(e,"$listeners",n._parentListeners||t,null,!0)}(n),He(n,"beforeCreate",void 0,!1),function(t){var e=Yn(t.$options.inject,t);e&&(Ct(!1),Object.keys(e).forEach((function(n){Tt(t,n,e[n])})),Ct(!0))}(n),Jn(n),function(t){var e=t.$options.provide;if(e){var n=a(e)?e.call(t):e;if(!s(n))return;for(var r=un(t),o=st?Reflect.ownKeys(n):Object.keys(n),i=0;i1?O(n):n;for(var r=O(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&Tr(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Tr(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Or(t,(function(t){return Sr(e,t)}))})),this.$watch("exclude",(function(e){Or(t,(function(t){return!Sr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=je(t),n=e&&e.componentOptions;if(n){var r=kr(n),o=this.include,i=this.exclude;if(o&&(!r||!Sr(o,r))||i&&r&&Sr(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,g(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Er={KeepAlive:jr};!function(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:ur,extend:T,mergeOptions:mr,defineReactive:Tt},t.set=At,t.delete=jt,t.nextTick=xn,t.observable=function(t){return Ot(t),t},t.options=Object.create(null),R.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,T(t.options.components,Er),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),a(t.install)?t.install.apply(t,n):a(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=mr(this.options,t),this}}(t),Cr(t),function(t){R.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&a(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(xr),Object.defineProperty(xr.prototype,"$isServer",{get:rt}),Object.defineProperty(xr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(xr,"FunctionalRenderContext",{value:er}),xr.version=Ln;var Nr=v("style,class"),Dr=v("input,textarea,option,select,progress"),Pr=function(t,e,n){return"value"===n&&Dr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Mr=v("contenteditable,draggable,spellcheck"),Ir=v("events,caret,typing,plaintext-only"),Lr=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Rr="http://www.w3.org/1999/xlink",Fr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Hr=function(t){return Fr(t)?t.slice(6,t.length):""},Br=function(t){return null==t||!1===t};function Ur(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=zr(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=zr(e,n.data));return function(t,e){if(r(t)||r(e))return Vr(t,Kr(e));return""}(e.staticClass,e.class)}function zr(t,e){return{staticClass:Vr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Vr(t,e){return t?e?t+" "+e:t:e||""}function Kr(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o-1?yo(t,e,n):Lr(e)?Br(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Mr(e)?t.setAttribute(e,function(t,e){return Br(e)||"false"===e?"false":"contenteditable"===t&&Ir(e)?e:"true"}(e,n)):Fr(e)?Br(n)?t.removeAttributeNS(Rr,Hr(e)):t.setAttributeNS(Rr,e,n):yo(t,e,n)}function yo(t,e,n){if(Br(n))t.removeAttribute(e);else{if(W&&!Z&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var _o={create:mo,update:mo};function bo(t,e){var o=e.elm,i=e.data,a=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=Ur(e),c=o._transitionClasses;r(c)&&(s=Vr(s,Kr(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var $o,wo,xo,Co,ko,So,Oo={create:bo,update:bo},To=/[\w).+\-_$\]]/;function Ao(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r=0&&" "===(h=t.charAt(v));v--);h&&To.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==p&&m(),i)for(r=0;r-1?{exp:t.slice(0,Co),key:'"'+t.slice(Co+1)+'"'}:{exp:t,key:null};wo=t,Co=ko=So=0;for(;!Jo();)qo(xo=Ko())?Zo(xo):91===xo&&Wo(xo);return{exp:t.slice(0,ko),key:t.slice(ko+1,So)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function Ko(){return wo.charCodeAt(++Co)}function Jo(){return Co>=$o}function qo(t){return 34===t||39===t}function Wo(t){var e=1;for(ko=Co;!Jo();)if(qo(t=Ko()))Zo(t);else if(91===t&&e++,93===t&&e--,0===e){So=Co;break}}function Zo(t){for(var e=t;!Jo()&&(t=Ko())!==e;);}var Go,Xo="__r";function Yo(t,e,n){var r=Go;return function o(){var i=e.apply(null,arguments);null!==i&&ei(t,o,n,r)}}var Qo=hn&&!(Q&&Number(Q[1])<=53);function ti(t,e,n,r){if(Qo){var o=qe,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Go.addEventListener(t,e,et?{capture:n,passive:r}:n)}function ei(t,e,n,r){(r||Go).removeEventListener(t,e._wrapper||e,n)}function ni(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};Go=e.elm||t.elm,function(t){if(r(t.__r)){var e=W?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}r(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),qt(o,i,ti,ei,Yo,e.context),Go=void 0}}var ri,oi={create:ni,update:ni,destroy:function(t){return ni(t,oo)}};function ii(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,a,s=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(i in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.domProps=T({},u)),c)i in u||(s[i]="");for(i in u){if(a=u[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),a===c[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=a;var l=n(a)?"":String(a);ai(s,l)&&(s.value=l)}else if("innerHTML"===i&&Wr(s.tagName)&&n(s.innerHTML)){(ri=ri||document.createElement("div")).innerHTML="".concat(a,"");for(var f=ri.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}else if(a!==c[i])try{s[i]=a}catch(t){}}}}function ai(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return p(n)!==p(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var si={create:ii,update:ii},ci=b((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function ui(t){var e=li(t.style);return t.staticStyle?T(t.staticStyle,e):e}function li(t){return Array.isArray(t)?A(t):"string"==typeof t?ci(t):t}var fi,di=/^--/,pi=/\s*!important$/,vi=function(t,e,n){if(di.test(e))t.style.setProperty(e,n);else if(pi.test(n))t.style.setProperty(k(e),n.replace(pi,""),"important");else{var r=mi(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(_i).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function $i(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(_i).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function wi(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&T(e,xi(t.name||"v")),T(e,t),e}return"string"==typeof t?xi(t):void 0}}var xi=b((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),Ci=J&&!Z,ki="transition",Si="animation",Oi="transition",Ti="transitionend",Ai="animation",ji="animationend";Ci&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Oi="WebkitTransition",Ti="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ai="WebkitAnimation",ji="webkitAnimationEnd"));var Ei=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ni(t){Ei((function(){Ei(t)}))}function Di(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),bi(t,e))}function Pi(t,e){t._transitionClasses&&g(t._transitionClasses,e),$i(t,e)}function Mi(t,e,n){var r=Li(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===ki?Ti:ji,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=ki,l=a,f=i.length):e===Si?u>0&&(n=Si,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?ki:Si:null)?n===ki?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===ki&&Ii.test(r[Oi+"Property"])}}function Ri(t,e){for(;t.length1}function Vi(t,e){!0!==e.data.show&&Hi(e)}var Ki=function(t){var a,s,c={},u=t.modules,l=t.nodeOps;for(a=0;av?b(t,n(o[g+1])?null:o[g+1].elm,o,p,g,i):p>g&&w(e,f,v)}(f,h,m,i,u):r(m)?(r(t.text)&&l.setTextContent(f,""),b(f,null,m,0,m.length-1,i)):r(h)?w(h,0,h.length-1):r(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),r(v)&&r(p=v.hook)&&r(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i-1,a.selected!==i&&(a.selected=i);else if(D(Gi(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Zi(t,e){return e.every((function(e){return!D(e,t)}))}function Gi(t){return"_value"in t?t._value:t.value}function Xi(t){t.target.composing=!0}function Yi(t){t.target.composing&&(t.target.composing=!1,Qi(t.target,"input"))}function Qi(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function ta(t){return!t.componentInstance||t.data&&t.data.transition?t:ta(t.componentInstance._vnode)}var ea={bind:function(t,e,n){var r=e.value,o=(n=ta(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Hi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=ta(n)).data&&n.data.transition?(n.data.show=!0,r?Hi(n,(function(){t.style.display=t.__vOriginalDisplay})):Bi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},na={model:Ji,show:ea},ra={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function oa(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?oa(je(e.children)):t}function ia(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[w(r)]=o[r];return e}function aa(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var sa=function(t){return t.tag||ye(t)},ca=function(t){return"show"===t.name},ua={name:"transition",props:ra,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(sa)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var a=oa(o);if(!a)return o;if(this._leaving)return aa(t,o);var s="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ia(this),u=this._vnode,l=oa(u);if(a.data.directives&&a.data.directives.some(ca)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!ye(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,Wt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),aa(t,o);if("in-out"===r){if(ye(a))return u;var d,p=function(){d()};Wt(c,"afterEnter",p),Wt(c,"enterCancelled",p),Wt(f,"delayLeave",(function(t){d=t}))}}return o}}},la=T({tag:String,moveClass:String},ra);delete la.mode;var fa={props:la,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Ie(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ia(this),s=0;s-1?Xr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Xr[t]=/HTMLUnknownElement/.test(e.toString())},T(xr.options.directives,na),T(xr.options.components,ha),xr.prototype.__patch__=J?Ki:j,xr.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=ft),He(t,"beforeMount"),r=function(){t._update(t._render(),n)},new zn(t,r,j,{before:function(){t._isMounted&&!t._isDestroyed&&He(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Oa=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ta="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(B.source,"]*"),Aa="((?:".concat(Ta,"\\:)?").concat(Ta,")"),ja=new RegExp("^<".concat(Aa)),Ea=/^\s*(\/?)>/,Na=new RegExp("^<\\/".concat(Aa,"[^>]*>")),Da=/^]+>/i,Pa=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Fa=/&(?:lt|gt|quot|amp|#39);/g,Ha=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Ba=v("pre,textarea",!0),Ua=function(t,e){return t&&Ba(t)&&"\n"===e[0]};function za(t,e){var n=e?Ha:Fa;return t.replace(n,(function(t){return Ra[t]}))}function Va(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||E,s=e.canBeLeftOpenTag||E,c=0,u=function(){if(n=t,r&&Ia(r)){var u=0,d=r.toLowerCase(),p=La[d]||(La[d]=new RegExp("([\\s\\S]*?)(]*>)","i"));w=t.replace(p,(function(t,n,r){return u=r.length,Ia(d)||"noscript"===d||(n=n.replace(//g,"$1").replace(//g,"$1")),Ua(d,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-w.length,t=w,f(d,c-u,c)}else{var v=t.indexOf("<");if(0===v){if(Pa.test(t)){var h=t.indexOf("--\x3e");if(h>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,h),c,c+h+3),l(h+3),"continue"}if(Ma.test(t)){var m=t.indexOf("]>");if(m>=0)return l(m+2),"continue"}var g=t.match(Da);if(g)return l(g[0].length),"continue";var y=t.match(Na);if(y){var _=c;return l(y[0].length),f(y[1],_,c),"continue"}var b=function(){var e=t.match(ja);if(e){var n={tagName:e[1],attrs:[],start:c};l(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Ea))&&(o=t.match(Oa)||t.match(Sa));)o.start=c,l(o[0].length),o.end=c,n.attrs.push(o);if(r)return n.unarySlash=r[1],l(r[0].length),n.end=c,n}}();if(b)return function(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&ka(n)&&f(r),s(n)&&r===n&&f(n));for(var u=a(n)||!!c,l=t.attrs.length,d=new Array(l),p=0;p=0){for(w=t.slice(v);!(Na.test(w)||ja.test(w)||Pa.test(w)||Ma.test(w)||(x=w.indexOf("<",1))<0);)v+=x,w=t.slice(v);$=t.substring(0,v)}v<0&&($=t),$&&l($.length),e.chars&&$&&e.chars($,c-$.length,c)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===u())break}function l(e){c+=e,t=t.substring(e)}function f(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}f()}var Ka,Ja,qa,Wa,Za,Ga,Xa,Ya,Qa=/^@|^v-on:/,ts=/^v-|^@|^:|^#/,es=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ns=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,rs=/^\(|\)$/g,os=/^\[.*\]$/,is=/:(.*)$/,as=/^:|^\.|^v-bind:/,ss=/\.[^.\]]+(?=[^\]]*$)/g,cs=/^v-slot(:|$)|^#/,us=/[\r\n]/,ls=/[ \f\t\r\n]+/g,fs=b(wa),ds="_empty_";function ps(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:bs(e),rawAttrsMap:{},parent:n,children:[]}}function vs(t,e){Ka=e.warn||Eo,Ga=e.isPreTag||E,Xa=e.mustUseProp||E,Ya=e.getTagNamespace||E,e.isReservedTag,qa=No(e.modules,"transformNode"),Wa=No(e.modules,"preTransformNode"),Za=No(e.modules,"postTransformNode"),Ja=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=hs(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&gs(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),u&&u.if&&gs(u,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,u;t.children=t.children.filter((function(t){return!t.slotScope})),l(t),t.pre&&(s=!1),Ga(t.tag)&&(c=!1);for(var f=0;fc&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=Ao(r[1].trim());a.push("_s(".concat(u,")")),s.push({"@binding":u}),c=o+r[0].length}return c-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),Ro(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(a,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Vo(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Vo(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Vo(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Fo(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Do(t,"checked","_q(".concat(e,",").concat(o,")")),Ro(t,"change",Vo(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?Xo:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n(".concat(l,")"));var f=Vo(e,l);c&&(f="if($event.target.composing)return;".concat(f));Do(t,"value","(".concat(e,")")),Ro(t,u,f,null,!0),(s||a)&&Ro(t,"blur","$forceUpdate()")}(t,r,o);else if(!H.isReservedTag(i))return zo(t,r,o),!1;return!0},text:function(t,e){e.value&&Do(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Do(t,"innerHTML","_s(".concat(e.value,")"),e)}},Ts={expectHTML:!0,modules:Cs,directives:Os,isPreTag:function(t){return"pre"===t},isUnaryTag:xa,mustUseProp:Pr,canBeLeftOpenTag:Ca,isReservedTag:Zr,getTagNamespace:Gr,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(Cs)},As=b((function(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function js(t,e){t&&(ks=As(e.staticKeys||""),Ss=e.isReservedTag||E,Es(t),Ns(t,!1))}function Es(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||h(t.tag)||!Ss(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(ks)))}(t),1===t.type){if(!Ss(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e|^function(?:\s+[\w$]+)?\s*\(/,Ps=/\([^)]*?\);*$/,Ms=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Is={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ls={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Rs=function(t){return"if(".concat(t,")return null;")},Fs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Rs("$event.target !== $event.currentTarget"),ctrl:Rs("!$event.ctrlKey"),shift:Rs("!$event.shiftKey"),alt:Rs("!$event.altKey"),meta:Rs("!$event.metaKey"),left:Rs("'button' in $event && $event.button !== 0"),middle:Rs("'button' in $event && $event.button !== 1"),right:Rs("'button' in $event && $event.button !== 2")};function Hs(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=Bs(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(a,","):r+='"'.concat(i,'":').concat(a,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function Bs(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return Bs(t)})).join(","),"]");var e=Ms.test(t.value),n=Ds.test(t.value),r=Ms.test(t.value.replace(Ps,""));if(t.modifiers){var o="",i="",a=[],s=function(e){if(Fs[e])i+=Fs[e],Is[e]&&a.push(e);else if("exact"===e){var n=t.modifiers;i+=Rs(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else a.push(e)};for(var c in t.modifiers)s(c);a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(Us).join("&&"),")return null;")}(a)),i&&(o+=i);var u=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(u,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function Us(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Is[t],r=Ls[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var zs={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:j},Vs=function(t){this.options=t,this.warn=t.warn||Eo,this.transforms=No(t.modules,"transformCode"),this.dataGenFns=No(t.modules,"genData"),this.directives=T(T({},zs),t.directives);var e=t.isReservedTag||E;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Ks(t,e){var n=new Vs(e),r=t?"script"===t.tag?"null":Js(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function Js(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Ws(t,e);if(t.once&&!t.onceProcessed)return Zs(t,e);if(t.for&&!t.forProcessed)return Ys(t,e);if(t.if&&!t.ifProcessed)return Gs(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=nc(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?ic((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:w(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=",".concat(i));a&&(o+="".concat(i?"":",null",",").concat(a));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:nc(e,n,!0);return"_c(".concat(t,",").concat(Qs(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,o=e.maybeComponent(t);(!t.plain||t.pre&&o)&&(r=Qs(t,e));var i=void 0,a=e.options.bindings;o&&a&&!1!==a.__isScriptSetup&&(i=qs(a,t.tag)||qs(a,w(t.tag))||qs(a,x(w(t.tag)))),i||(i="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:nc(t,e,!0);n="_c(".concat(i).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var c=0;c>>0}(a)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=Ks(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(ic(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function tc(t){return 1===t.type&&("slot"===t.tag||t.children.some(tc))}function ec(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return Gs(t,e,ec,"null");if(t.for&&!t.forProcessed)return Ys(t,e,ec);var r=t.slotScope===ds?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(nc(t,e)||"undefined",":undefined"):nc(t,e)||"undefined":Js(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function nc(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return"".concat((r||Js)(a,e)).concat(s)}var c=n?function(t,e){for(var n=0,r=0;r':'
    ',lc.innerHTML.indexOf(" ")>0}var vc=!!J&&pc(!1),hc=!!J&&pc(!0),mc=b((function(t){var e=Qr(t);return e&&e.innerHTML})),gc=xr.prototype.$mount;return xr.prototype.$mount=function(t,e){if((t=t&&Qr(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=mc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=dc(r,{outputSourceRange:!1,shouldDecodeNewlines:vc,shouldDecodeNewlinesForHref:hc,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return gc.call(this,t,e)},xr.compile=dc,T(xr,Rn),xr.effect=function(t,e){var n=new zn(ct,t,j,{sync:!0});e&&(n.update=function(){e((function(){return n.run()}))})},xr})); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/assets/vendor/vue/vuedraggable.min.js b/wp/wp-content/plugins/facetwp/assets/vendor/vue/vuedraggable.min.js deleted file mode 100644 index c863726e..00000000 --- a/wp/wp-content/plugins/facetwp/assets/vendor/vue/vuedraggable.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* Vue.Draggable 2.24.3 */ -(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("sortablejs")):"function"===typeof define&&define.amd?define(["sortablejs"],e):"object"===typeof exports?exports["vuedraggable"]=e(require("sortablejs")):t["vuedraggable"]=e(t["Sortable"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),c=n("32e9"),u=n("84f2"),a=n("41a0"),s=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",h="keys",v="values",g=function(){return this};t.exports=function(t,e,n,b,m,y,x){a(n,e,b);var O,S,w,j=function(t){if(!d&&t in _)return _[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},M=e+" Iterator",C=m==v,T=!1,_=t.prototype,L=_[l]||_[p]||m&&_[m],I=L||j(m),E=m?C?j("entries"):I:void 0,P="Array"==e&&_.entries||L;if(P&&(w=f(P.call(new t)),w!==Object.prototype&&w.next&&(s(w,M,!0),r||"function"==typeof w[l]||c(w,l,g))),C&&L&&L.name!==v&&(T=!0,I=function(){return L.call(this)}),r&&!x||!d&&!T&&_[l]||c(_,l,I),u[e]=I,u[M]=g,m)if(O={values:C?I:j(v),keys:y?I:j(h),entries:E},x)for(S in O)S in _||i(_,S,O[S]);else o(o.P+o.F*(d||T),e,O);return O}},"02f4":function(t,e,n){var r=n("4588"),o=n("be13");t.exports=function(t){return function(e,n){var i,c,u=String(o(e)),a=r(n),s=u.length;return a<0||a>=s?t?"":void 0:(i=u.charCodeAt(a),i<55296||i>56319||a+1===s||(c=u.charCodeAt(a+1))<56320||c>57343?t?u.charAt(a):i:t?u.slice(a,a+2):c-56320+(i-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,c=i(e),u=c.length,a=0;while(u>a)r.f(t,n=c[a++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),c=n("be13"),u=n("2b4c"),a=n("520a"),s=u("species"),f=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var d=u(t),p=!i((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),h=p?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[d](""),!e})):void 0;if(!p||!h||"replace"===t&&!f||"split"===t&&!l){var v=/./[d],g=n(c,d,""[t],(function(t,e,n,r,o){return e.exec===a?p&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),b=g[0],m=g[1];r(String.prototype,t,b),o(RegExp.prototype,d,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),o))?n:i?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),c=n("ca5a")("src"),u=n("fa5b"),a="toString",s=(""+u).split(a);n("8378").inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,c)||o(n,c,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,a,(function(){return"function"==typeof this&&this[c]||u.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),c=n("613b")("IE_PROTO"),u=function(){},a="prototype",s=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",c=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),s=t.F;while(r--)delete s[a][i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[a]=r(t),n=new u,u[a]=null,n[c]=t):n=s(),void 0===e?n:o(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,c="function"==typeof i,u=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};u.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),o=n("d2c8"),i="includes";r(r.P+r.F*n("5147")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),c={};n("32e9")(c,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},"456d":function(t,e,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(t){return o(r(t))}}))},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},"520a":function(t,e,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,c=o,u="lastIndex",a=function(){var t=/a/,e=/b*/g;return o.call(t,"a"),o.call(e,"a"),0!==t[u]||0!==e[u]}(),s=void 0!==/()??/.exec("")[1],f=a||s;f&&(c=function(t){var e,n,c,f,l=this;return s&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),a&&(e=l[u]),c=o.call(l,t),a&&c&&(l[u]=l.global?c.index+c[0].length:e),s&&c&&c.length>1&&i.call(c[0],n,(function(){for(f=1;f1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},7333:function(t,e,n){"use strict";var r=n("0d58"),o=n("2621"),i=n("52a7"),c=n("4bf8"),u=n("626a"),a=Object.assign;t.exports=!a||n("79e5")((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=a({},t)[n]||Object.keys(a({},e)).join("")!=r}))?function(t,e){var n=c(t),a=arguments.length,s=1,f=o.f,l=i.f;while(a>s){var d,p=u(arguments[s++]),h=f?r(p).concat(f(p)):r(p),v=h.length,g=0;while(v>g)l.call(p,d=h[g++])&&(n[d]=p[d])}return n}:a},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),c=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(e,n){e.exports=t},a481:function(t,e,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),c=n("4588"),u=n("0390"),a=n("5f1b"),s=Math.max,f=Math.min,l=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g,h=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,(function(t,e,n,v){return[function(r,o){var i=t(this),c=void 0==r?void 0:r[e];return void 0!==c?c.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=v(n,t,this,e);if(o.done)return o.value;var l=r(t),d=String(this),p="function"===typeof e;p||(e=String(e));var b=l.global;if(b){var m=l.unicode;l.lastIndex=0}var y=[];while(1){var x=a(l,d);if(null===x)break;if(y.push(x),!b)break;var O=String(x[0]);""===O&&(l.lastIndex=u(d,i(l.lastIndex),m))}for(var S="",w=0,j=0;j=w&&(S+=d.slice(w,C)+E,w=C+M.length)}return S+d.slice(w)}];function g(t,e,r,i,c,u){var a=r+t.length,s=i.length,f=p;return void 0!==c&&(c=o(c),f=d),n.call(u,f,(function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":u=c[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>s){var d=l(f/10);return 0===d?n:d<=s?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):n}u=i[f-1]}return void 0===u?"":u}))}}))},aae3:function(t,e,n){var r=n("d3f4"),o=n("2d95"),i=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),c=n("7726"),u=n("32e9"),a=n("84f2"),s=n("2b4c"),f=s("iterator"),l=s("toStringTag"),d=a.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(p),v=0;vf)if(u=a[f++],u!=u)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},c649:function(t,e,n){"use strict";(function(t){n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return a}));n("a481");function r(){return"undefined"!==typeof window?window.console:t.console}var o=r();function i(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var c=/-(\w)/g,u=i((function(t){return t.replace(c,(function(t,e){return e?e.toUpperCase():""}))}));function a(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function s(t,e,n){var r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}}).call(this,n("c8ba"))},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),c=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),c=n("613b")("IE_PROTO");t.exports=function(t,e){var n,u=o(t),a=0,s=[];for(n in u)n!=c&&r(u,n)&&s.push(n);while(e.length>a)r(u,n=e[a++])&&(~i(s,n)||s.push(n));return s}},d2c8:function(t,e,n){var r=n("aae3"),o=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(t,e,n){"use strict";var r=n("5ca1"),o=n("9def"),i=n("d2c8"),c="startsWith",u=""[c];r(r.P+r.F*n("5147")(c),"String",{startsWith:function(t){var e=i(this,t,c),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return u?u.call(e,r,n):e.slice(n,n+r.length)===r}})},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("f751"),n("f559"),n("ac6a"),n("cadf"),n("456d");function o(t){if(Array.isArray(t))return t}function i(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,u=t[Symbol.iterator]();!(r=(c=u.next()).done);r=!0)if(n.push(c.value),e&&n.length===e)break}catch(a){o=!0,i=a}finally{try{r||null==u["return"]||u["return"]()}finally{if(o)throw i}}return n}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=i?o.length:o.indexOf(t)}));return n?c.filter((function(t){return-1!==t})):c}function x(t,e){var n=this;this.$nextTick((function(){return n.$emit(t.toLowerCase(),e)}))}function O(t){var e=this;return function(n){null!==e.realList&&e["onDrag"+t](n),x.call(e,t,n)}}function S(t){return["transition-group","TransitionGroup"].includes(t)}function w(t){if(!t||1!==t.length)return!1;var e=s(t,1),n=e[0].componentOptions;return!!n&&S(n.tag)}function j(t,e,n){return t[n]||(e[n]?e[n]():void 0)}function M(t,e,n){var r=0,o=0,i=j(e,n,"header");i&&(r=i.length,t=t?[].concat(p(i),p(t)):p(i));var c=j(e,n,"footer");return c&&(o=c.length,t=t?[].concat(p(t),p(c)):p(c)),{children:t,headerOffset:r,footerOffset:o}}function C(t,e){var n=null,r=function(t,e){n=b(n,t,e)},o=Object.keys(t).filter((function(t){return"id"===t||t.startsWith("data-")})).reduce((function(e,n){return e[n]=t[n],e}),{});if(r("attrs",o),!e)return n;var i=e.on,c=e.props,u=e.attrs;return r("on",i),r("props",c),Object.assign(n.attrs,u),n}var T=["Start","Add","Remove","Update","End"],_=["Choose","Unchoose","Sort","Filter","Clone"],L=["Move"].concat(T,_).map((function(t){return"on"+t})),I=null,E={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(t){return t}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},P={name:"draggable",inheritAttrs:!1,props:E,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(t){var e=this.$slots.default;this.transitionMode=w(e);var n=M(e,this.$slots,this.$scopedSlots),r=n.children,o=n.headerOffset,i=n.footerOffset;this.headerOffset=o,this.footerOffset=i;var c=C(this.$attrs,this.componentData);return t(this.getTag(),c,r)},created:function(){null!==this.list&&null!==this.value&&g["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&g["b"].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&g["b"].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var t=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var e={};T.forEach((function(n){e["on"+n]=O.call(t,n)})),_.forEach((function(n){e["on"+n]=x.bind(t,n)}));var n=Object.keys(this.$attrs).reduce((function(e,n){return e[Object(g["a"])(n)]=t.$attrs[n],e}),{}),r=Object.assign({},this.options,n,e,{onMove:function(e,n){return t.onDragMove(e,n)}});!("draggable"in r)&&(r.draggable=">*"),this._sortable=new v.a(this.rootContainer,r),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(t){this.updateOptions(t)},deep:!0},$attrs:{handler:function(t){this.updateOptions(t)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var t=this._vnode.fnOptions;return t&&t.functional},getTag:function(){return this.tag||this.element},updateOptions:function(t){for(var e in t){var n=Object(g["a"])(e);-1===L.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes:function(){var t=this;this.$nextTick((function(){t.visibleIndexes=y(t.getChildrenNodes(),t.rootContainer.children,t.transitionMode,t.footerOffset)}))},getUnderlyingVm:function(t){var e=m(this.getChildrenNodes()||[],t);if(-1===e)return null;var n=this.realList[e];return{index:e,element:n}},getUnderlyingPotencialDraggableComponent:function(t){var e=t.__vue__;return e&&e.$options&&S(e.$options._componentTag)?e.$parent:!("realList"in e)&&1===e.$children.length&&"realList"in e.$children[0]?e.$children[0]:e},emitChanges:function(t){var e=this;this.$nextTick((function(){e.$emit("change",t)}))},alterList:function(t){if(this.list)t(this.list);else{var e=p(this.value);t(e),this.$emit("input",e)}},spliceList:function(){var t=arguments,e=function(e){return e.splice.apply(e,p(t))};this.alterList(e)},updatePosition:function(t,e){var n=function(n){return n.splice(e,0,n.splice(t,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(t){var e=t.to,n=t.related,r=this.getUnderlyingPotencialDraggableComponent(e);if(!r)return{component:r};var o=r.realList,i={list:o,component:r};if(e!==n&&o&&r.getUnderlyingVm){var c=r.getUnderlyingVm(n);if(c)return Object.assign(c,i)}return i},getVmIndex:function(t){var e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){var e=this.getChildrenNodes();e[t].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),I=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){Object(g["d"])(t.item);var n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();var r={element:e,newIndex:n};this.emitChanges({added:r})}},onDragRemove:function(t){if(Object(g["c"])(this.rootContainer,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context.index;this.spliceList(e,1);var n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})}else Object(g["d"])(t.clone)},onDragUpdate:function(t){Object(g["d"])(t.item),Object(g["c"])(t.from,t.item,t.oldIndex);var e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);var r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty:function(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=p(e.to.children).filter((function(t){return"none"!==t.style["display"]})),r=n.indexOf(e.related),o=t.component.getVmIndex(r),i=-1!==n.indexOf(I);return i||!e.willInsertAfter?o:o+1},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var r=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(r,t);Object.assign(o,{futureIndex:i});var c=Object.assign({},t,{relatedContext:r,draggedContext:o});return n(c,e)},onDragEnd:function(){this.computeIndexes(),I=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",P);var $=P;e["default"]=$}})["default"]})); diff --git a/wp/wp-content/plugins/facetwp/includes/api/fetch.php b/wp/wp-content/plugins/facetwp/includes/api/fetch.php deleted file mode 100644 index 07334663..00000000 --- a/wp/wp-content/plugins/facetwp/includes/api/fetch.php +++ /dev/null @@ -1,180 +0,0 @@ - 'POST', - 'callback' => [ $this, 'callback' ], - 'permission_callback' => [ $this, 'permission_callback' ] - ] ); - } - - - // PHP < 5.3 - function callback( $request ) { - $data = $request->get_param( 'data' ); - - if ( ! $request->is_json_content_type()) { - $data = empty( $data ) ? [] : json_decode( $data, true ); - } - - return $this->process_request( $data ); - } - - - // PHP < 5.3 - function permission_callback( $request ) { - return apply_filters( 'facetwp_api_can_access', false, $request ); - } - - - function process_request( $params = [] ) { - global $wpdb; - - $defaults = [ - 'facets' => [ - // 'category' => [ 'acf' ] - ], - 'query_args' => [ - 'post_type' => 'post', - 'post_status' => 'publish', - 'posts_per_page' => 10, - 'paged' => 1, - ], - 'settings' => [ - 'first_load' => true - ] - ]; - - $params = array_merge( $defaults, $params ); - $facet_types = FWP()->helper->facet_types; - $valid_facets = []; - $facets = []; - - // Validate input - $page = (int) ( $params['query_args']['paged'] ?? 1 ); - $per_page = (int) ( $params['query_args']['posts_per_page'] ?? 10 ); - - $page = max( $page, 1 ); - $per_page = ( 0 === $per_page ) ? 10 : $per_page; - $per_page = ( -1 > $per_page ) ? absint( $per_page ) : $per_page; - - $params['query_args']['paged'] = $page; - $params['query_args']['posts_per_page'] = $per_page; - - // Generate FWP()->facet->facets - // Required by FWP()->helper->facet_setting_exists() - foreach ( $params['facets'] as $facet_name => $facet_value ) { - $facet = FWP()->helper->get_facet_by_name( $facet_name ); - if ( false !== $facet ) { - $facet['selected_values'] = (array) $facet_value; - $valid_facets[ $facet_name ] = $facet; - FWP()->facet->facets[ $facet_name ] = $facet; - } - } - - // Get bucket of post IDs - $query_args = $params['query_args']; - FWP()->facet->query_args = $query_args; - $post_ids = FWP()->facet->get_filtered_post_ids( $query_args ); - - // SQL WHERE used by facets - $where_clause = ' AND post_id IN (' . implode( ',', $post_ids ) . ')'; - - // Check if empty - if ( 0 === $post_ids[0] && 1 === count( $post_ids ) ) { - $post_ids = []; - } - - // get_where_clause() needs "found_posts" (keep this BELOW the empty check) - FWP()->facet->query = (object) [ 'found_posts' => count( $post_ids ) ]; - - // Get valid facets and their values - foreach ( $valid_facets as $facet_name => $facet ) { - $args = [ - 'facet' => $facet, - 'where_clause' => $where_clause, - 'selected_values' => $facet['selected_values'], - ]; - - $facet_data = [ - 'name' => $facet['name'], - 'label' => $facet['label'], - 'type' => $facet['type'], - 'selected' => $facet['selected_values'], - ]; - - // Load facet choices if available - if ( method_exists( $facet_types[ $facet['type'] ], 'load_values' ) ) { - $choices = $facet_types[ $facet['type'] ]->load_values( $args ); - foreach ( $choices as $key => $choice ) { - $row = [ - 'value' => $choice['facet_value'], - 'label' => $choice['facet_display_value'], - 'depth' => (int) $choice['depth'], - 'count' => (int) $choice['counter'], - ]; - - if ( isset( $choice['term_id'] ) ) { - $row['term_id'] = (int) $choice['term_id']; - } - - if ( isset( $choice['parent_id'] ) ) { - $row['parent_id'] = (int) $choice['parent_id']; - } - - $choices[ $key ] = $row; - } - - $facet_data['choices'] = $choices; - } - - // Load facet settings if available - if ( method_exists( $facet_types[ $facet['type'] ], 'settings_js' ) ) { - $facet_data['settings'] = $facet_types[ $facet['type'] ]->settings_js( $args ); - } - - $facets[ $facet_name ] = $facet_data; - } - - $total_rows = count( $post_ids ); - - // Paginate? - if ( 0 < $per_page ) { - $total_pages = ceil( $total_rows / $per_page ); - - if ( $page > $total_pages ) { - $post_ids = []; - } - else { - $offset = ( $per_page * ( $page - 1 ) ); - $post_ids = array_slice( $post_ids, $offset, $per_page ); - } - } - else { - $total_pages = ( 0 < $total_rows ) ? 1 : 0; - } - - // Generate the output - $output = [ - 'results' => $post_ids, - 'facets' => $facets, - 'pager' => [ - 'page' => $page, - 'per_page' => $per_page, - 'total_rows' => $total_rows, - 'total_pages' => $total_pages, - ] - ]; - - return apply_filters( 'facetwp_api_output', $output ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/api/refresh.php b/wp/wp-content/plugins/facetwp/includes/api/refresh.php deleted file mode 100644 index bbc08212..00000000 --- a/wp/wp-content/plugins/facetwp/includes/api/refresh.php +++ /dev/null @@ -1,27 +0,0 @@ - 'POST', - 'callback' => 'facetwp_api_refresh', - 'permission_callback' => '__return_true' - ] ); -}); - -function facetwp_api_refresh( $request ) { - $params = $request->get_params(); - $action = $params['action'] ?? ''; - - $valid_actions = [ - 'facetwp_refresh', - 'facetwp_autocomplete_load' - ]; - - $valid_actions = apply_filters( 'facetwp_api_valid_actions', $valid_actions ); - - if ( in_array( $action, $valid_actions ) ) { - do_action( $action ); - } - - return []; -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-ajax.php b/wp/wp-content/plugins/facetwp/includes/class-ajax.php deleted file mode 100644 index e8645b3b..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-ajax.php +++ /dev/null @@ -1,321 +0,0 @@ -$action(); - } - - // Authenticated - elseif ( current_user_can( 'manage_options' ) ) { - if ( wp_verify_nonce( $_POST['nonce'], 'fwp_admin_nonce' ) ) { - $this->$action(); - } - } - } - - // Listen for API refresh call - add_action( 'facetwp_refresh', [ $this, 'refresh' ] ); - - // Backwards compatibility - $this->url_vars = FWP()->request->url_vars; - $this->is_preload = FWP()->request->is_preload; - } - - - /** - * Save admin settings - */ - function save_settings() { - $settings = $_POST['data']; - - if ( isset( $settings['settings'] ) ) { - update_option( 'facetwp_settings', json_encode( $settings ), 'no' ); - - if ( FWP()->diff->is_reindex_needed() ) { - $response = [ - 'code' => 'error', - 'message' => __( 'Settings saved, please re-index', 'fwp' ) - ]; - } - else { - $response = [ - 'code' => 'success', - 'message' => __( 'Settings saved', 'fwp' ) - ]; - } - } - else { - $response = [ - 'code' => 'error', - 'message' => __( 'Error: invalid JSON', 'fwp' ) - ]; - } - - wp_send_json( $response ); - } - - - /** - * Rebuild the index table - */ - function rebuild_index() { - update_option( 'facetwp_indexing_cancelled', 'no', 'no' ); - FWP()->indexer->index(); - exit; - } - - - function get_info() { - $type = $_POST['type']; - - if ( 'post_types' == $type ) { - $post_types = get_post_types( [ 'exclude_from_search' => false, '_builtin' => false ] ); - $post_types = [ 'post', 'page' ] + $post_types; - sort( $post_types ); - - $response = [ - 'code' => 'success', - 'message' => implode( ', ', $post_types ) - ]; - } - elseif ( 'indexer_stats' == $type ) { - $last_indexed = get_option( 'facetwp_last_indexed' ); - $last_indexed = $last_indexed ? human_time_diff( $last_indexed ) . ' ago' : 'never'; - - $response = [ - 'code' => 'success', - 'message' => "last indexed: $last_indexed" - ]; - } - elseif ( 'cancel_reindex' == $type ) { - update_option( 'facetwp_indexing_cancelled', 'yes' ); - - $response = [ - 'code' => 'success', - 'message' => 'Indexing cancelled' - ]; - } - elseif ( 'purge_index_table' == $type ) { - global $wpdb; - - $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}facetwp_index" ); - delete_option( 'facetwp_version' ); - delete_option( 'facetwp_indexing' ); - delete_option( 'facetwp_transients' ); - - $response = [ - 'code' => 'success', - 'message' => __( 'Done, please re-index', 'fwp' ) - ]; - } - - wp_send_json( $response ); - } - - - /** - * Return query arguments based on a Query Builder object - */ - function get_query_args() { - $query_obj = $_POST['query_obj']; - - if ( is_array( $query_obj ) ) { - $query_args = FWP()->builder->parse_query_obj( $query_obj ); - } - - wp_send_json( $query_args ); - } - - - /** - * Keep track of indexing progress - */ - function heartbeat() { - $output = [ - 'pct' => FWP()->indexer->get_progress() - ]; - - if ( -1 == $output['pct'] ) { - $output['rows'] = FWP()->helper->get_row_counts(); - } - - wp_send_json( $output ); - } - - - /** - * License activation - */ - function license() { - $license = sanitize_key( $_POST['license'] ); - - $request = wp_remote_post( 'https://api.facetwp.com', [ - 'body' => [ - 'action' => 'activate', - 'slug' => 'facetwp', - 'license' => $license, - 'host' => FWP()->helper->get_http_host(), - ] - ] ); - - if ( ! is_wp_error( $request ) || 200 == wp_remote_retrieve_response_code( $request ) ) { - update_option( 'facetwp_license', $license ); - update_option( 'facetwp_activation', $request['body'] ); - update_option( 'facetwp_updater_last_checked', 0 ); - echo $request['body']; - } - else { - echo json_encode( [ - 'status' => 'error', - 'message' => __( 'Error', 'fwp' ) . ': ' . $request->get_error_message(), - ] ); - } - - exit; - } - - - /** - * Import / export functionality - */ - function backup() { - $action_type = $_POST['action_type']; - $output = []; - - if ( 'export' == $action_type ) { - $items = $_POST['items']; - - if ( ! empty( $items ) ) { - foreach ( $items as $item ) { - if ( 'facet' == substr( $item, 0, 5 ) ) { - $item_name = substr( $item, 6 ); - $output['facets'][] = FWP()->helper->get_facet_by_name( $item_name ); - } - elseif ( 'template' == substr( $item, 0, 8 ) ) { - $item_name = substr( $item, 9 ); - $output['templates'][] = FWP()->helper->get_template_by_name( $item_name ); - } - } - } - echo json_encode( $output ); - } - elseif ( 'import' == $action_type ) { - $settings = FWP()->helper->settings; - $import_code = $_POST['import_code']; - $overwrite = (int) $_POST['overwrite']; - - if ( empty( $import_code ) || ! is_array( $import_code ) ) { - _e( 'Nothing to import', 'fwp' ); - exit; - } - - $status = [ - 'imported' => [], - 'skipped' => [], - ]; - - foreach ( $import_code as $object_type => $object_items ) { - foreach ( $object_items as $object_item ) { - $is_match = false; - foreach ( $settings[$object_type] as $key => $settings_item ) { - if ( $object_item['name'] == $settings_item['name'] ) { - if ( $overwrite ) { - $settings[$object_type][$key] = $object_item; - $status['imported'][] = $object_item['label']; - } - else { - $status['skipped'][] = $object_item['label']; - } - $is_match = true; - break; - } - } - - if ( ! $is_match ) { - $settings[$object_type][] = $object_item; - $status['imported'][] = $object_item['label']; - } - } - } - - update_option( 'facetwp_settings', json_encode( $settings ) ); - - if ( ! empty( $status['imported'] ) ) { - echo ' [' . __( 'Imported', 'fwp' ) . '] ' . implode( ', ', $status['imported'] ); - } - if ( ! empty( $status['skipped'] ) ) { - echo ' [' . __( 'Skipped', 'fwp' ) . '] ' . implode( ', ', $status['skipped'] ); - } - } - - exit; - } - - - /** - * The AJAX facet refresh handler - */ - function refresh() { - global $wpdb; - - $params = FWP()->request->process_post_data(); - $output = FWP()->facet->render( $params ); - $data = stripslashes_deep( $_POST['data'] ); - - // Ignore invalid UTF-8 characters in PHP 7.2+ - if ( version_compare( phpversion(), '7.2', '<' ) ) { - $output = json_encode( $output ); - } - else { - $output = json_encode( $output, JSON_INVALID_UTF8_IGNORE ); - } - - echo apply_filters( 'facetwp_ajax_response', $output, [ - 'data' => $data - ] ); - - exit; - } - - - /** - * Resume stalled indexer - */ - function resume_index() { - $touch = (int) FWP()->indexer->get_transient( 'touch' ); - if ( 0 < $touch && $_POST['touch'] == $touch ) { - FWP()->indexer->index(); - } - exit; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-builder.php b/wp/wp-content/plugins/facetwp/includes/class-builder.php deleted file mode 100644 index 9f92289c..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-builder.php +++ /dev/null @@ -1,839 +0,0 @@ -custom_css = $settings['custom_css']; - - $selector = '.fwpl-layout'; - $selector .= empty( $settings['name'] ) ? '' : '.' . $settings['name']; - - $this->css = [ - '.fwpl-layout, .fwpl-row' => [ - 'display' => 'grid' - ], - $selector => [ - 'grid-template-columns' => 'repeat(' . $settings['num_columns'] . ', 1fr)', - 'grid-gap' => $settings['grid_gap'] . 'px' - ], - $selector . ' .fwpl-result' => $this->build_styles( $settings ) - ]; - - $classes = $this->get_classes( 'fwpl-layout', $settings ); - - $output = '
    '; - - if ( have_posts() ) { - while ( have_posts() ) : the_post(); - $counter++; - - // Default dynamic tags - $tags = [ - 'post:id' => $post->ID, - 'post:name' => $post->post_name, - 'post:type' => $post->post_type, - 'post:title' => $post->post_title, - 'post:url' => get_permalink() - ]; - - $params = [ - 'layout' => $layout, - 'post' => $post - ]; - - $this->data = apply_filters( 'facetwp_builder_dynamic_tags', $tags, $params ); - - $output .= '
    '; - - foreach ( $layout['items'] as $row ) { - $output .= $this->render_row( $row ); - } - - $output .= '
    '; - - $output = $this->parse_dynamic_tags( $output, $params ); - - endwhile; - } - else { - $no_results_text = $settings['no_results_text'] ?? ''; - $output .= do_shortcode( $no_results_text ); - } - - $output .= '
    '; - - $output .= $this->render_css(); - - return $output; - } - - - /** - * Generate the row HTML - * @since 3.2.0 - */ - function render_row( $row ) { - $settings = $row['settings']; - - $this->css['.fwpl-row.' . $settings['name'] ] = $this->build_styles( $settings ); - - $classes = $this->get_classes( 'fwpl-row', $settings ); - - $output = '
    '; - - foreach ( $row['items'] as $col ) { - $output .= $this->render_col( $col ); - } - - $output .= '
    '; - - return $output; - } - - - /** - * Generate the col HTML - * @since 3.2.0 - */ - function render_col( $col ) { - $settings = $col['settings']; - - $this->css['.fwpl-col.' . $settings['name'] ] = $this->build_styles( $settings ); - - $classes = $this->get_classes( 'fwpl-col', $settings ); - - $output = '
    '; - - foreach ( $col['items'] as $item ) { - if ( 'row' == $item['type'] ) { - $output .= $this->render_row( $item ); - } - elseif ( 'item' == $item['type'] ) { - $output .= $this->render_item( $item ); - } - } - - $output .= '
    '; - - return $output; - } - - - /** - * Generate the item HTML - * @since 3.2.0 - */ - function render_item( $item ) { - global $post; - - $settings = $item['settings']; - $name = $settings['name']; - $source = $item['source']; - $value = $source; - - $selector = '.fwpl-item.' . $name; - $selector = ( 'button' == $source ) ? $selector . ' button' : $selector; - $this->css[ $selector ] = $this->build_styles( $settings ); - - if ( 0 === strpos( $source, 'post_' ) || 'ID' == $source ) { - if ( 'post_title' == $source ) { - $value = $this->linkify( $post->$source, $settings['link'] ); - } - elseif ( 'post_excerpt' == $source ) { - $value = get_the_excerpt( $post->ID ); - } - elseif ( 'post_content' == $source ) { - $value = apply_filters( 'the_content', $post->post_content ); - } - elseif ( 'post_author' == $source ) { - $field = $settings['author_field']; - $user = get_user_by( 'id', $post->$source ); - $value = $user->$field; - } - elseif ( 'post_type' == $source ) { - $pt_obj = get_post_type_object( $post->$source ); - $value = $pt_obj->labels->singular_name ?? $post->$source; - } - else { - $value = $post->$source; - } - } - elseif ( 0 === strpos( $source, 'cf/' ) ) { - $value = get_post_meta( $post->ID, substr( $source, 3 ), true ); - $value = $this->linkify( $value, $settings['link'] ); - } - elseif ( 0 === strpos( $source, 'tax/' ) ) { - $temp = []; - $taxonomy = substr( $source, 4 ); - $terms = get_the_terms( $post->ID, $taxonomy ); - - if ( is_array( $terms ) ) { - foreach ( $terms as $term_obj ) { - $term = $this->linkify( $term_obj->name, $settings['term_link'], [ - 'term_id' => $term_obj->term_id, - 'taxonomy' => $taxonomy - ] ); - - $temp[] = '' . $term . ''; - } - } - - $value = implode( $settings['separator'], $temp ); - } - elseif ( 0 === strpos( $source, 'woo/' ) ) { - $field = substr( $source, 4 ); - $product = wc_get_product( $post->ID ); - - // Invalid product - if ( ! is_object( $product ) ) { - $value = ''; - } - - // Price - elseif ( 'price' == $field || 'sale_price' == $field || 'regular_price' == $field ) { - if ( $product->is_type( 'variable' ) ) { - $method_name = "get_variation_$field"; - $value = $product->$method_name( 'min' ); // get_variation_price() - } - else { - $method_name = "get_$field"; - $value = $product->$method_name(); // get_price() - } - } - - // Average Rating - elseif ( 'average_rating' == $field ) { - $value = $product->get_average_rating(); - } - - // Stock Status - elseif ( 'stock_status' == $field ) { - $value = $product->is_in_stock() ? __( 'In Stock', 'fwp' ) : __( 'Out of Stock', 'fwp' ); - } - - // On Sale - elseif ( 'on_sale' == $field ) { - $value = $product->is_on_sale() ? __( 'On Sale', 'fwp' ) : ''; - } - - // Product Type - elseif ( 'product_type' == $field ) { - $value = $product->get_type(); - } - } - elseif ( 0 === strpos( $source, 'acf/' ) && isset( FWP()->acf ) ) { - $value = FWP()->acf->get_field( $source, $post->ID ); - } - elseif ( 'featured_image' == $source ) { - $value = get_the_post_thumbnail( $post->ID, $settings['image_size'] ); - $value = $this->linkify( $value, $settings['link'] ); - } - elseif ( 'button' == $source ) { - $value = ''; - $value = $this->linkify( $value, $settings['link'] ); - } - elseif ( 'html' == $source ) { - $value = do_shortcode( $settings['content'] ); - } - - // Date format - if ( ! empty( $settings['date_format'] ) && ! empty( $value ) ) { - if ( ! empty( $settings['input_format'] ) ) { - $date = DateTime::createFromFormat( $settings['input_format'], $value ); - } - else { - $date = new DateTime( $value ); - } - - // Use wp_date() to support i18n - if ( $date ) { - $value = wp_date( $settings['date_format'], $date->getTimestamp(), new DateTimeZone( 'UTC' ) ); - } - } - - // Number format - if ( ! empty( $settings['number_format'] ) && ! empty( $value ) ) { - $decimals = 2; - $format = $settings['number_format']; - $decimal_sep = FWP()->helper->get_setting( 'decimal_separator' ); - $thousands_sep = FWP()->helper->get_setting( 'thousands_separator' ); - - // No thousands separator - if ( false === strpos( $format, ',' ) ) { - $thousands_sep = ''; - } - - // Handle decimals - if ( false === ( $pos = strpos( $format, '.' ) ) ) { - $decimals = 0; - } - else { - $decimals = strlen( $format ) - $pos - 1; - } - - $value = number_format( $value, $decimals, $decimal_sep, $thousands_sep ); - } - - $output = ''; - $prefix = $settings['prefix'] ?? ''; - $suffix = $settings['suffix'] ?? ''; - - // Allow value hooks - $value = apply_filters( 'facetwp_builder_item_value', $value, $item ); - - // Convert array to string - if ( is_array( $value ) ) { - $value = implode( ', ', $value ); - } - - // Store the RAW short-tag - $this->data[ "$name:raw" ] = $value; - - // Attach the prefix / suffix to the value - if ( '' != $value ) { - $value = $prefix . $value . $suffix; - } - - // Store the short-tag - $this->data[ $name ] = $value; - - // Build the list of CSS classes - $classes = $this->get_classes( 'fwpl-item', $settings ); - - if ( '' == $value ) { - $classes .= ' is-empty'; - } - - // Prevent output - if ( ! $settings['is_hidden'] ) { - $output = '
    ' . $value . '
    '; - } - - return $output; - } - - - /** - * Parse dynamic tags, e.g. {{ first_name }} - */ - function parse_dynamic_tags( $output, $params ) { - $pattern = '/({{[ ]?(.*?)[ ]?}})/s'; - - return preg_replace_callback( $pattern, function( $matches ) use( $params ) { - $tag_name = $matches[2]; - $tag_value = $this->data[ $tag_name ] ?? ''; - return apply_filters( 'facetwp_builder_dynamic_tag_value', $tag_value, $tag_name, $params ); - }, $output ); - } - - - /** - * Calculate some dynamic tag values on-the-fly, to prevent - * unnecessary queries and extra load time - */ - function dynamic_tag_value( $tag_value, $tag_name, $params ) { - if ( 'post:image' == $tag_name ) { - $tag_value = get_the_post_thumbnail_url( $params['post']->ID, 'full' ); - } - - return $tag_value; - } - - - /** - * Build the redundant styles (border, padding,etc) - * @since 3.2.0 - */ - function build_styles( $settings ) { - $styles = []; - - if ( isset( $settings['grid_template_columns'] ) ) { - $styles['grid-template-columns'] = $settings['grid_template_columns']; - } - if ( isset( $settings['border'] ) ) { - $styles['border-style'] = $settings['border']['style']; - $styles['border-color'] = $settings['border']['color']; - $styles['border-width'] = $this->get_widths( $settings['border']['width'] ); - } - if ( isset( $settings['background_color'] ) ) { - $styles['background-color'] = $settings['background_color']; - } - if ( isset( $settings['padding'] ) ) { - $styles['padding'] = $this->get_widths( $settings['padding'] ); - } - if ( isset( $settings['text_style'] ) ) { - $styles['text-align'] = $settings['text_style']['align']; - $styles['font-weight'] = $settings['text_style']['bold'] ? 'bold' : ''; - $styles['font-style'] = $settings['text_style']['italic'] ? 'italic' : ''; - } - if ( isset( $settings['font_size'] ) ) { - $styles['font-size'] = $settings['font_size']['size'] . $settings['font_size']['unit']; - } - if ( isset( $settings['text_color'] ) ) { - $styles['color'] = $settings['text_color']; - } - if ( isset( $settings['button_border'] ) ) { - $border = $settings['button_border']; - $width = $border['width']; - $unit = $width['unit']; - - $styles['color'] = $settings['button_text_color']; - $styles['background-color'] = $settings['button_color']; - $styles['padding'] = $this->get_widths( $settings['button_padding'] ); - $styles['border-style'] = $border['style']; - $styles['border-color'] = $border['color']; - $styles['border-top-width'] = $width['top'] . $unit; - $styles['border-right-width'] = $width['right'] . $unit; - $styles['border-bottom-width'] = $width['bottom'] . $unit; - $styles['border-left-width'] = $width['left'] . $unit; - } - - return $styles; - } - - - /** - * Build the CSS widths, e.g. for "padding" or "border-width" - * @since 3.2.0 - */ - function get_widths( $data ) { - $unit = $data['unit']; - $top = $data['top']; - $right = $data['right']; - $bottom = $data['bottom']; - $left = $data['left']; - - if ( $top == $right && $right == $bottom && $bottom == $left ) { - return "$top$unit"; - } - elseif ( $top == $bottom && $left == $right ) { - return "$top$unit $left$unit"; - } - - return "$top$unit $right$unit $bottom$unit $left$unit"; - } - - - /** - * Convert a value into a link - * @since 3.2.0 - */ - function linkify( $value, $link_data, $term_data = [] ) { - global $post; - - $type = $link_data['type']; - $href = $link_data['href']; - $target = $link_data['target']; - - if ( 'none' !== $type ) { - if ( 'post' == $type ) { - $href = get_permalink(); - } - if ( 'term' == $type ) { - $href = get_term_link( $term_data['term_id'], $term_data['taxonomy'] ); - } - - if ( ! empty( $target ) ) { - $target = ' target="' . $target . '"'; - } - - $value = '
    ' . $value . ''; - } - - return $value; - } - - - /** - * Turn the CSS array into valid CSS - * @since 3.2.0 - */ - function render_css() { - $output = "\n\n"; - - return $output; - } - - - /** - * Filter out empty or invalid rules - * @since 3.2.0 - */ - function get_valid_css_rules( $props ) { - $rules = []; - - foreach ( $props as $prop => $value ) { - if ( $this->is_valid_css_rule( $prop, $value ) ) { - $rules[ $prop ] = $value; - } - } - - return $rules; - } - - - /** - * Optimize CSS rules - * @since 3.2.0 - */ - function is_valid_css_rule( $prop, $value ) { - $return = true; - - if ( empty( $value ) || 'px' === $value || '0px' === $value || 'none' === $value ) { - $return = false; - } - - if ( 'font-size' === $prop && '0px' === $value ) { - $return = false; - } - - return $return; - } - - - /** - * Make sure the query is valid - * @since 3.2.0 - */ - function parse_query_obj( $query_obj ) { - $output = []; - $tax_query = []; - $meta_query = []; - $date_query = []; - $post_type = 'any'; - $post_status = [ 'publish' ]; - $posts_per_page = 10; - $post_in = []; - $post_not_in = []; - $author_in = []; - $author_not_in = []; - $orderby = []; - - if ( ! empty( $query_obj['posts_per_page'] ) ) { - $posts_per_page = (int) $query_obj['posts_per_page']; - } - - if ( ! empty( $query_obj['post_type'] ) ) { - $post_type = array_column( $query_obj['post_type'], 'value' ); - } - - if ( empty( $query_obj['filters'] ) ) { - $query_obj['filters'] = []; - } - - if ( empty( $query_obj['orderby'] ) ) { - $query_obj['orderby'] = []; - } - - foreach ( $query_obj['filters'] as $filter ) { - $key = $filter['key']; - $value = $filter['value']; - $compare = $filter['compare']; - $type = $filter['type']; - - // Cast as decimal for more accuracy - $type = ( 'NUMERIC' == $type ) ? 'DECIMAL(16,4)' : $type; - $exists_bypass = false; - $value_bypass = false; - - // Clear the value for certain compare types - if ( in_array( $compare, [ 'EXISTS', 'NOT EXISTS', 'EMPTY', 'NOT EMPTY' ] ) ) { - $value_bypass = true; - $value = ''; - } - - if ( in_array( $compare, [ 'EXISTS', 'NOT EXISTS' ] ) ) { - $exists_bypass = true; - } - - // If "EMPTY", use "=" compare type w/ empty string value - if ( in_array( $compare, [ 'EMPTY', 'NOT EMPTY' ] ) ) { - $compare = ( 'EMPTY' == $compare ) ? '=' : '!='; - } - - // Handle multiple values - if ( is_array( $value ) ) { - if ( in_array( $compare, [ '=', '!=' ] ) ) { - $compare = ( '=' == $compare ) ? 'IN' : 'NOT IN'; - } - - if ( ! in_array( $compare, [ 'IN', 'NOT IN' ] ) ) { - $value = $value[0]; - } - } - - if ( empty( $value ) && ! $value_bypass ) { - continue; - } - - // Support dynamic URL vars - $value = $this->parse_uri_tags( $value ); - - // Prepend with "date|" so we can populate with hydrate_date_values() - if ( 'DATE' == $type ) { - $value = 'date|' . $value; - } - - if ( 'ID' == $key ) { - $arg_name = ( 'IN' == $compare ) ? 'post_in' : 'post_not_in'; - $$arg_name = $value; - } - elseif ( 'post_author' == $key ) { - $arg_name = ( 'IN' == $compare ) ? 'author_in' : 'author_not_in'; - $$arg_name = $value; - } - elseif ( 'post_status' == $key ) { - $post_status = $value; - } - elseif ( 'post_date' == $key || 'post_modified' == $key ) { - if ( '>' == $compare || '>=' == $compare ) { - $date_query[] = [ - 'after' => $value, - 'inclusive' => ( '>=' == $compare ) - ]; - } - if ( '<' == $compare || '<=' == $compare ) { - $date_query[] = [ - 'before' => $value, - 'inclusive' => ( '<=' == $compare ) - ]; - } - } - elseif ( 0 === strpos( $key, 'tax/' ) ) { - $temp = [ - 'taxonomy' => substr( $key, 4 ), - 'field' => 'slug', - 'operator' => $compare - ]; - - if ( ! $exists_bypass ) { - $temp['terms'] = $value; - } - - $tax_query[] = $temp; - } - else { - $temp = [ - 'key' => substr( $key, strpos( $key, '/' ) + 1 ), - 'compare' => $compare, - 'type' => $type - ]; - - if ( ! $exists_bypass ) { - $temp['value'] = $value; - } - - $meta_query[] = $temp; - } - } - - foreach ( $query_obj['orderby'] as $index => $data ) { - if ( 'cf/' == substr( $data['key'], 0, 3 ) ) { - $type = $data['type']; - - // Cast as decimal for more accuracy - $type = ( 'NUMERIC' == $type ) ? 'DECIMAL(16,4)' : $type; - - $meta_query['sort_' . $index] = [ - 'key' => substr( $data['key'], 3 ), - 'type' => $type - ]; - - $orderby['sort_' . $index] = $data['order']; - } - else { - $orderby[ $data['key'] ] = $data['order']; - } - } - - $temp = [ - 'post_type' => $post_type, - 'post_status' => $post_status, - 'meta_query' => $meta_query, - 'tax_query' => $tax_query, - 'date_query' => $date_query, - 'post__in' => $post_in, - 'post__not_in' => $post_not_in, - 'author__in' => $author_in, - 'author__not_in' => $author_not_in, - 'orderby' => $orderby, - 'posts_per_page' => $posts_per_page - ]; - - foreach ( $temp as $key => $val ) { - if ( ! empty( $val ) ) { - $output[ $key ] = $val; - } - } - - return $output; - } - - - /** - * Get necessary values for the layout builder - * @since 3.2.0 - */ - function get_layout_data() { - $sources = FWP()->helper->get_data_sources(); - unset( $sources['post'] ); - - // Static options - $output = [ - 'row' => 'Child Row', - 'html' => 'HTML', - 'button' => 'Button', - 'featured_image' => 'Featured Image', - 'ID' => 'Post ID', - 'post_title' => 'Post Title', - 'post_name' => 'Post Name', - 'post_content' => 'Post Content', - 'post_excerpt' => 'Post Excerpt', - 'post_date' => 'Post Date', - 'post_modified' => 'Post Modified', - 'post_author' => 'Post Author', - 'post_type' => 'Post Type' - ]; - - foreach ( $sources as $group ) { - foreach ( $group['choices'] as $name => $label ) { - $output[ $name ] = $label; - } - } - - return $output; - } - - - /** - * Get necessary data for the query builder - * @since 3.0.0 - */ - function get_query_data() { - $builder_post_types = []; - - $post_types = get_post_types( [ 'public' => true ], 'objects' ); - $data_sources = FWP()->helper->get_data_sources( 'builder' ); - - // Remove ACF choices - unset( $data_sources['acf'] ); - - foreach ( $post_types as $type ) { - $builder_post_types[] = [ - 'label' => $type->labels->name, - 'value' => $type->name - ]; - } - - $data_sources['posts']['choices'] = [ - 'ID' => 'ID', - 'post_author' => 'Post Author', - 'post_status' => 'Post Status', - 'post_date' => 'Post Date', - 'post_modified' => 'Post Modified' - ]; - - return apply_filters( 'facetwp_builder_query_data', [ - 'post_types' => $builder_post_types, - 'filter_by' => $data_sources - ] ); - } - - - /** - * Replace "date|" placeholders with actual dates - */ - function hydrate_date_values( $query_args ) { - if ( isset( $query_args['meta_query'] ) ) { - foreach ( $query_args['meta_query'] as $index => $row ) { - if ( isset( $row['value'] ) && is_string( $row['value'] ) && 0 === strpos( $row['value'], 'date|' ) ) { - $value = trim( substr( $row['value'], 5 ) ); - $value = date( 'Y-m-d', strtotime( $value ) ); - $query_args['meta_query'][ $index ]['value'] = $value; - } - } - } - - return $query_args; - } - - - /** - * Let users pull URI or GET params into the query builder - * E.g. "http:uri", "http:uri:0", or "http:get:year" - * @since 3.6.0 - */ - function parse_uri_tags( $values ) { - $temp = (array) $values; - - foreach ( $temp as $key => $value ) { - if ( 0 === strpos( $value, 'http:uri' ) ) { - $uri = FWP()->helper->get_uri(); - $uri_parts = explode( '/', $uri ); - $tag_parts = explode( ':', $value ); - if ( isset( $tag_parts[2] ) ) { - $index = (int) $tag_parts[2]; - $index = ( $index < 0 ) ? count( $uri_parts ) + $index : $index; - $temp[ $key ] = $uri_parts[ $index ] ?? ''; - } - else { - $temp[ $key ] = $uri; - } - } - elseif ( 0 === strpos( $value, 'http:get:' ) ) { - $tag_parts = explode( ':', $value ); - $temp[ $key ] = $_GET[ $tag_parts[2] ] ?? ''; - } - } - - return is_array( $values ) ? $temp : $temp[0]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-diff.php b/wp/wp-content/plugins/facetwp/includes/class-diff.php deleted file mode 100644 index 1f16795e..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-diff.php +++ /dev/null @@ -1,73 +0,0 @@ -helper->load_settings(); - $s2 = FWP()->helper->load_settings( true ); - - // Compare settings - $to_check = [ 'thousands_separator', 'decimal_separator', 'wc_enable_variations', 'wc_index_all' ]; - - foreach ( $to_check as $name ) { - $attr1 = $this->get_attr( $name, $s1['settings'] ); - $attr2 = $this->get_attr( $name, $s2['settings'] ); - if ( $attr1 !== $attr2 ) { - return true; - } - } - - // Get facets, removing non-indexable ones - $f1 = array_filter( $s1['facets'], [ $this, 'is_indexable' ] ); - $f2 = array_filter( $s2['facets'], [ $this, 'is_indexable' ] ); - - // The facet count is different - if ( count( $f1 ) !== count( $f2 ) ) { - return true; - } - - // Sort the facets alphabetically - usort( $f1, function( $a, $b ) { - return strcmp( $a['name'], $b['name'] ); - }); - - usort( $f2, function( $a, $b ) { - return strcmp( $a['name'], $b['name'] ); - }); - - // Compare facet properties - $to_check = [ 'name', 'type', 'source', 'source_other', 'parent_term', 'hierarchical', 'modifier_type', 'modifier_values' ]; - - foreach ( $f1 as $index => $facet ) { - foreach ( $to_check as $attr ) { - $attr1 = $this->get_attr( $attr, $facet ); - $attr2 = $this->get_attr( $attr, $f2[ $index ] ); - if ( $attr1 !== $attr2 ) { - return true; - } - } - } - - return false; - } - - - function is_indexable( $facet ) { - return ! in_array( $facet['type'], [ 'search', 'pager', 'reset', 'sort' ] ); - } - - - /** - * Get an array element - * @since 3.0.9 - */ - function get_attr( $name, $collection ) { - return $collection[ $name ] ?? false; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-display.php b/wp/wp-content/plugins/facetwp/includes/class-display.php deleted file mode 100644 index d4cf1ea1..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-display.php +++ /dev/null @@ -1,244 +0,0 @@ -get( 'facetwp' ) && did_action( 'wp_head' ) ) { - echo "\n"; - } - } - - - /** - * Set default values for atts - * - * Old: [facetwp template="foo" static] - * New: [facetwp template="foo" static="true"] - */ - function normalize_atts( $atts ) { - foreach ( $atts as $key => $val ) { - if ( is_int( $key ) ) { - $atts[ $val ] = true; - unset( $atts[ $key ] ); - } - } - return $atts; - } - - - /** - * Register shortcodes - */ - function shortcode( $atts ) { - $atts = $this->normalize_atts( $atts ); - $this->shortcode_atts[] = $atts; - - $output = ''; - if ( isset( $atts['facet'] ) ) { - $facet = FWP()->helper->get_facet_by_name( $atts['facet'] ); - - if ( $facet ) { - $ui = empty( $facet['ui_type'] ) ? $facet['type'] : $facet['ui_type']; - $ui_attr = empty( $facet['ui_type'] ) ? '' : ' data-ui="' . $ui . '"'; - $output = '
    '; - - // Build list of active facet types - $this->active_types[ $facet['type'] ] = $facet['type']; - $this->active_facets[ $facet['name'] ] = $facet['name']; - $this->load_assets = true; - } - } - elseif ( isset( $atts['template'] ) ) { - $template = FWP()->helper->get_template_by_name( $atts['template'] ); - - if ( $template ) { - $class_name = 'facetwp-template'; - - // Static template - if ( isset( $atts['static'] ) ) { - $renderer = new FacetWP_Renderer(); - $renderer->template = $template; - $renderer->query_args = $renderer->get_query_args(); - $renderer->query = new WP_Query( $renderer->query_args ); - $html = $renderer->get_template_html(); - $class_name .= '-static'; - } - // Preload template (search engine visible) - else { - global $wp_query; - - $temp_query = $wp_query; - $args = FWP()->request->process_preload_data( $template['name'] ); - $preload_data = FWP()->facet->render( $args ); - $html = $preload_data['template']; - $wp_query = $temp_query; - } - - $output = '
    {html}
    '; - $output = str_replace( '{class}', $class_name, $output ); - $output = str_replace( '{name}', $atts['template'], $output ); - $output = str_replace( '{html}', $html, $output ); - - $this->load_assets = true; - } - } - elseif ( isset( $atts['sort'] ) ) { - $this->active_extras['sort'] = true; - $output = '
    '; - } - elseif ( isset( $atts['selections'] ) ) { - $output = '
    '; - } - elseif ( isset( $atts['counts'] ) ) { - $this->active_extras['counts'] = true; - $output = '
    '; - } - elseif ( isset( $atts['pager'] ) ) { - $this->active_extras['pager'] = true; - $output = '
    '; - } - elseif ( isset( $atts['per_page'] ) ) { - $this->active_extras['per_page'] = true; - $output = '
    '; - } - - $output = apply_filters( 'facetwp_shortcode_html', $output, $atts ); - - return $output; - } - - - /** - * Output facet scripts - */ - function front_scripts() { - - // Not enqueued - front.js needs to load before front_scripts() - if ( apply_filters( 'facetwp_load_assets', $this->load_assets ) ) { - - // Load CSS? - if ( apply_filters( 'facetwp_load_css', true ) ) { - $this->assets['front.css'] = FACETWP_URL . '/assets/css/front.css'; - } - - // Load required JS - $this->assets['front.js'] = FACETWP_URL . '/assets/js/dist/front.min.js'; - - // Backwards compat? - if ( apply_filters( 'facetwp_load_deprecated', false ) ) { - $this->assets['front-deprecated.js'] = FACETWP_URL . '/assets/js/src/deprecated.js'; - } - - // Load a11y? - $a11y = FWP()->helper->get_setting( 'load_a11y', 'no' ); - $a11y_hook = apply_filters( 'facetwp_load_a11y', false ); - - if ( 'yes' == $a11y || $a11y_hook ) { - $this->assets['accessibility.js'] = FACETWP_URL . '/assets/js/src/accessibility.js'; - $this->json['a11y'] = [ - 'label_page' => __( 'Go to page', 'fwp-front' ), - 'label_page_next' => __( 'Go to next page', 'fwp-front' ), - 'label_page_prev' => __( 'Go to previous page', 'fwp-front' ) - ]; - } - - // Pass GET and URI params - $http_params = [ - 'get' => $_GET, - 'uri' => FWP()->helper->get_uri(), - 'url_vars' => FWP()->request->url_vars, - ]; - - // See FWP()->facet->get_query_args() - if ( ! empty( FWP()->facet->archive_args ) ) { - $http_params['archive_args'] = FWP()->facet->archive_args; - } - - // Populate the FWP_JSON object - $this->json['prefix'] = FWP()->helper->get_setting( 'prefix' ); - $this->json['no_results_text'] = __( 'No results found', 'fwp-front' ); - $this->json['ajaxurl'] = get_rest_url() . 'facetwp/v1/refresh'; - $this->json['nonce'] = wp_create_nonce( 'wp_rest' ); - - if ( apply_filters( 'facetwp_use_preloader', true ) ) { - $overrides = FWP()->request->process_preload_overrides([ - 'facets' => $this->active_facets, - 'extras' => $this->active_extras, - ]); - $args = FWP()->request->process_preload_data( false, $overrides ); - $this->json['preload_data'] = FWP()->facet->render( $args ); - } - - ob_start(); - - foreach ( $this->active_types as $type ) { - $facet_class = FWP()->helper->facet_types[ $type ]; - if ( method_exists( $facet_class, 'front_scripts' ) ) { - $facet_class->front_scripts(); - } - } - - $inline_scripts = ob_get_clean(); - $assets = apply_filters( 'facetwp_assets', $this->assets ); - - foreach ( $assets as $slug => $data ) { - $data = (array) $data; - $is_css = ( 'css' == substr( $slug, -3 ) ); - $version = empty( $data[1] ) ? FACETWP_VERSION : $data[1]; - $url = $data[0]; - - if ( false !== strpos( $url, 'facetwp' ) ) { - $prefix = ( false !== strpos( $url, '?' ) ) ? '&' : '?'; - $url .= $prefix . 'ver=' . $version; - } - - $html = $is_css ? '' : ''; - $html = apply_filters( 'facetwp_asset_html', $html, $url ); - echo str_replace( '{url}', $url, $html ) . "\n"; - } - - echo $inline_scripts; -?> - -facet_types = $this->get_facet_types(); - $this->settings = $this->load_settings(); - } - - - /** - * Parse the URL hostname - */ - function get_http_host() { - return parse_url( get_option( 'home' ), PHP_URL_HOST ); - } - - - /** - * Get the current page URI - */ - function get_uri() { - if ( isset( FWP()->facet->http_params ) ) { - return FWP()->facet->http_params['uri']; - } - - $uri = parse_url( $_SERVER['REQUEST_URI'] ); - return isset( $uri['path'] ) ? trim( $uri['path'], '/' ) : ''; - } - - - /** - * Get available facet types - */ - function get_facet_types() { - if ( ! empty( $this->facet_types ) ) { - return $this->facet_types; - } - - include( FACETWP_DIR . '/includes/facets/base.php' ); - - $types = [ - 'checkboxes' => 'Facetwp_Facet_Checkboxes', - 'dropdown' => 'Facetwp_Facet_Dropdown', - 'radio' => 'Facetwp_Facet_Radio_Core', - 'fselect' => 'Facetwp_Facet_fSelect', - 'hierarchy' => 'Facetwp_Facet_Hierarchy', - 'slider' => 'Facetwp_Facet_Slider', - 'search' => 'Facetwp_Facet_Search', - 'autocomplete' => 'Facetwp_Facet_Autocomplete', - 'date_range' => 'Facetwp_Facet_Date_Range', - 'number_range' => 'Facetwp_Facet_Number_Range', - 'rating' => 'FacetWP_Facet_Rating', - 'proximity' => 'Facetwp_Facet_Proximity_Core', - 'pager' => 'FacetWP_Facet_Pager', - 'reset' => 'FacetWP_Facet_Reset', - 'sort' => 'FacetWP_Facet_Sort' - ]; - - $facet_types = []; - - foreach ( $types as $slug => $class_name ) { - include( FACETWP_DIR . "/includes/facets/$slug.php" ); - $facet_types[ $slug ] = new $class_name(); - } - - return apply_filters( 'facetwp_facet_types', $facet_types ); - } - - - /** - * Get settings and allow for developer hooks - */ - function load_settings( $last_index = false ) { - $name = $last_index ? 'facetwp_settings_last_index' : 'facetwp_settings'; - $option = get_option( $name ); - - $defaults = [ - 'facets' => [], - 'templates' => [], - 'settings' => [ - 'thousands_separator' => ',', - 'decimal_separator' => '.', - 'prefix' => '_', - 'load_jquery' => 'no' - ] - ]; - - $settings = ( false !== $option ) ? json_decode( $option, true ) : []; - $settings = array_merge( $defaults, $settings ); - $settings['settings'] = array_merge( $defaults['settings'], $settings['settings'] ); - - // Store DB-based facet & template names - $db_names = []; - - foreach ( $settings['facets'] as $facet ) { - $db_names[ 'facet-' . $facet['name'] ] = true; - } - - foreach ( $settings['templates'] as $template ) { - $db_names[ 'template-' . $template['name'] ] = true; - } - - // Programmatically registered - $facets = apply_filters( 'facetwp_facets', $settings['facets'] ); - $templates = apply_filters( 'facetwp_templates', $settings['templates'] ); - - $tmp_facets = []; - $tmp_templates = []; - - // Merge DB + code-based facets - foreach ( $facets as $facet ) { - $name = $facet['name']; - $is_db_based = isset( $db_names[ "facet-$name" ] ); - - if ( ! $is_db_based ) { - $facet['_code'] = true; - } - - if ( ! $is_db_based || empty( $tmp_facets[ $name ] ) ) { - - // Valid facet type? - if ( in_array( $facet['type'], array_keys( $this->facet_types ) ) ) { - $tmp_facets[ $name ] = $facet; - } - } - } - - // Merge DB + code-based templates - foreach ( $templates as $template ) { - $name = $template['name']; - $is_db_based = isset( $db_names[ "template-$name" ] ); - - if ( ! $is_db_based ) { - $template['_code'] = true; - } - - if ( ! $is_db_based || empty( $tmp_templates[ $name ] ) ) { - $tmp_templates[ $name ] = $template; - } - } - - // Convert back to numerical arrays - $settings['facets'] = array_values( $tmp_facets ); - $settings['templates'] = array_values( $tmp_templates ); - - // Filtered settings - return $settings; - } - - - /** - * Get a general setting value - * - * @param string $name The setting name - * @param mixed $default The default value - * @since 1.9 - */ - function get_setting( $name, $default = '' ) { - return $this->settings['settings'][ $name ] ?? $default; - } - - - /** - * Get an array of all facets - * @return array - */ - function get_facets() { - return $this->settings['facets']; - } - - - /** - * Get an array of all templates - * @return array - */ - function get_templates() { - return $this->settings['templates']; - } - - - /** - * Get all properties for a single facet - * @param string $facet_name - * @return mixed An array of facet info, or false - */ - function get_facet_by_name( $facet_name ) { - foreach ( $this->get_facets() as $facet ) { - if ( $facet_name == $facet['name'] ) { - return $facet; - } - } - - return false; - } - - - /** - * Get all properties for a single template - * - * @param string $template_name - * @return mixed An array of template info, or false - */ - function get_template_by_name( $template_name ) { - foreach ( $this->get_templates() as $template ) { - if ( $template_name == $template['name'] ) { - return $template; - } - } - - return false; - } - - - /** - * Fetch facets using one of its settings - * @param string $setting_name - * @param mixed $setting_value - * @return array - */ - function get_facets_by( $setting, $value ) { - $matches = []; - - foreach ( $this->get_facets() as $facet ) { - if ( isset( $facet[ $setting ] ) && $value === $facet[ $setting ] ) { - $matches[] = $facet; - } - } - - return $matches; - } - - - /** - * Get terms across all languages (thanks, WPML) - * @since 3.8.5 - */ - function get_terms( $taxonomy ) { - global $wpdb; - - $sql = " - SELECT t.term_id, t.name, t.slug, tt.parent FROM {$wpdb->term_taxonomy} tt - INNER JOIN {$wpdb->terms} t ON t.term_id = tt.term_id - WHERE tt.taxonomy = %s"; - - return $wpdb->get_results( $wpdb->prepare( $sql, $taxonomy ) ); - } - - - /** - * Get an array of term information, including depth - * @param string $taxonomy The taxonomy name - * @return array Term information - * @since 0.9.0 - */ - function get_term_depths( $taxonomy ) { - - if ( isset( $this->term_cache[ $taxonomy ] ) ) { - return $this->term_cache[ $taxonomy ]; - } - - $output = []; - $parents = []; - - $terms = $this->get_terms( $taxonomy ); - - // Get term parents - foreach ( $terms as $term ) { - $parents[ $term->term_id ] = $term->parent; - } - - // Build the term array - foreach ( $terms as $term ) { - $output[ $term->term_id ] = [ - 'term_id' => $term->term_id, - 'name' => $term->name, - 'slug' => $term->slug, - 'parent_id' => $term->parent, - 'depth' => 0 - ]; - - $current_parent = $term->parent; - while ( 0 < (int) $current_parent ) { - $current_parent = $parents[ $current_parent ]; - $output[ $term->term_id ]['depth']++; - - // Prevent an infinite loop - if ( 50 < $output[ $term->term_id ]['depth'] ) { - break; - } - } - } - - $this->term_cache[ $taxonomy ] = $output; - - return $output; - } - - - /** - * Finish sorting the facet values - * The results are already sorted by depth and (name OR count), we just need - * to move the children directly below their parents - */ - function sort_taxonomy_values( $values = [], $orderby = 'count' ) { - $final = []; - $cache = []; - - // Create an "order" sort value based on the top-level items - foreach ( $values as $key => $val ) { - if ( 0 == $val['depth'] ) { - $val['order'] = $key; - $cache[ $val['term_id'] ] = $key; - $final[] = $val; - } - elseif ( isset( $cache[ $val['parent_id'] ] ) ) { // skip orphans - $val['order'] = $cache[ $val['parent_id'] ] . ".$key"; // dot-separated hierarchy string - $cache[ $val['term_id'] ] = $val['order']; - $final[] = $val; - } - } - - // Sort the array based on the new "order" element - // Since this is a dot-separated hierarchy string, use version_compare - usort( $final, function( $a, $b ) { - return version_compare( $a['order'], $b['order'] ); - }); - - return $final; - } - - - /** - * Sanitize SQL data - * @return mixed The sanitized value(s) - * @since 3.0.7 - */ - function sanitize( $input ) { - global $wpdb; - - if ( is_array( $input ) ) { - $output = []; - - foreach ( $input as $key => $val ) { - $output[ $key ] = $this->sanitize( $val ); - } - } - else { - if ( $wpdb->dbh && $wpdb->use_mysqli ) { - $output = mysqli_real_escape_string( $wpdb->dbh, $input ); - } - else { - $output = addslashes( $input ); - } - } - - return $output; - } - - - /** - * Does an active facet with the specified setting exist? - * @return boolean - * @since 1.4.0 - */ - function facet_setting_exists( $setting_name, $setting_value ) { - foreach ( FWP()->facet->facets as $f ) { - if ( isset( $f[ $setting_name ] ) && $f[ $setting_name ] == $setting_value ) { - return true; - } - } - - return false; - } - - - /** - * Does this facet have a setting with the specified value? - * @return boolean - * @since 2.3.4 - */ - function facet_is( $facet, $setting_name, $setting_value ) { - if ( is_string( $facet ) ) { - $facet = $this->get_facet_by_name( $facet ); - } - - if ( isset( $facet[ $setting_name ] ) && $facet[ $setting_name ] == $setting_value ) { - return true; - } - - return false; - } - - - /** - * Hash a facet value if needed - * @return string - * @since 2.1 - */ - function safe_value( $value ) { - $value = remove_accents( $value ); - - if ( preg_match( '/[^a-z0-9_.\- ]/i', $value ) ) { - if ( ! preg_match( '/^\d{4}-(0[1-9]|1[012])-([012]\d|3[01])/', $value ) ) { - $value = md5( $value ); - } - } - - $value = str_replace( ' ', '-', strtolower( $value ) ); - $value = preg_replace( '/[-]{2,}/', '-', $value ); - $value = ( 50 < strlen( $value ) ) ? substr( $value, 0, 50 ) : $value; - return $value; - } - - - /** - * Properly format numbers, taking separators into account - * @return number - * @since 2.7.5 - */ - function format_number( $num ) { - $sep_decimal = $this->get_setting( 'decimal_separator' ); - $sep_thousands = $this->get_setting( 'thousands_separator' ); - - $num = str_replace( $sep_thousands, '', $num ); - $num = ( ',' == $sep_decimal ) ? str_replace( ',', '.', $num ) : $num; - $num = preg_replace( '/[^0-9-.]/', '', $num ); - - return $num; - } - - - /** - * Get facet data sources - * @return array - * @since 2.2.1 - */ - function get_data_sources( $context = 'default' ) { - global $wpdb; - - // Cached? - if ( ! empty( $this->data_sources ) ) { - $sources = $this->data_sources; - } - else { - - // Get excluded meta keys - $excluded_fields = apply_filters( 'facetwp_excluded_custom_fields', [ - '_edit_last', - '_edit_lock', - ] ); - - // Get taxonomies - $taxonomies = get_taxonomies( [], 'object' ); - - // Get custom fields - $meta_keys = $wpdb->get_col( "SELECT DISTINCT meta_key FROM {$wpdb->postmeta} ORDER BY meta_key" ); - $custom_fields = array_diff( $meta_keys, $excluded_fields ); - - $sources = [ - 'posts' => [ - 'label' => __( 'Posts', 'fwp' ), - 'choices' => [ - 'post_type' => __( 'Post Type', 'fwp' ), - 'post_date' => __( 'Post Date', 'fwp' ), - 'post_modified' => __( 'Post Modified', 'fwp' ), - 'post_title' => __( 'Post Title', 'fwp' ), - 'post_author' => __( 'Post Author', 'fwp' ) - ], - 'weight' => 10 - ], - 'taxonomies' => [ - 'label' => __( 'Taxonomies', 'fwp' ), - 'choices' => [], - 'weight' => 20 - ], - 'custom_fields' => [ - 'label' => __( 'Custom Fields', 'fwp' ), - 'choices' => [], - 'weight' => 30 - ] - ]; - - foreach ( $taxonomies as $tax ) { - $sources['taxonomies']['choices'][ 'tax/' . $tax->name ] = $tax->labels->name . ' (' . $tax->name . ')'; - } - - foreach ( $custom_fields as $cf ) { - if ( 0 !== strpos( $cf, '_oembed_' ) ) { - $sources['custom_fields']['choices'][ 'cf/' . $cf ] = $cf; - } - } - - $this->data_sources = $sources; - } - - $sources = apply_filters( 'facetwp_facet_sources', $sources, $context ); - - uasort( $sources, [ $this, 'sort_by_weight' ] ); - - return $sources; - } - - - /** - * Sort facetwp_facet_sources by weight - * @since 2.7.5 - */ - function sort_by_weight( $a, $b ) { - $a['weight'] = $a['weight'] ?? 10; - $b['weight'] = $b['weight'] ?? 10; - - if ( $a['weight'] == $b['weight'] ) { - return 0; - } - - return ( $a['weight'] < $b['weight'] ) ? -1 : 1; - } - - - /** - * Get row counts for all facets - * @since 3.3.4 - */ - function get_row_counts() { - if ( isset( $this->row_counts ) ) { - return $this->row_counts; - } - - global $wpdb; - - $output = []; - $results = $wpdb->get_results( "SELECT facet_name, COUNT(*) AS row_count FROM {$wpdb->prefix}facetwp_index GROUP BY facet_name" ); - - foreach ( $results as $result ) { - $output[ $result->facet_name ] = (int) $result->row_count; - } - - $this->row_counts = $output; - - return $output; - } - - - /** - * Grab the license key - * @since 3.0.3 - */ - function get_license_key() { - $license_key = defined( 'FACETWP_LICENSE_KEY' ) ? FACETWP_LICENSE_KEY : get_option( 'facetwp_license' ); - $license_key = apply_filters( 'facetwp_license_key', $license_key ); - return sanitize_key( trim( $license_key ) ); - } - - - /** - * Determine whether the license is active - * @since 3.3.0 - */ - function is_license_active() { - return ( 'success' == $this->get_license_meta( 'status' ) ); - } - - - /** - * Get a license meta value - * Possible keys: status, message, expiration, payment_id, price_id - * @since 3.5.3 - */ - function get_license_meta( $key = 'status' ) { - $activation = get_option( 'facetwp_activation' ); - - if ( ! empty( $activation ) ) { - $data = json_decode( $activation, true ); - - if ( isset( $data[ $key ] ) ) { - return $data[ $key ]; - } - } - - return false; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-indexer.php b/wp/wp-content/plugins/facetwp/includes/class-indexer.php deleted file mode 100644 index 851fcc77..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-indexer.php +++ /dev/null @@ -1,691 +0,0 @@ -set_table( 'auto' ); - $this->run_cron(); - - if ( apply_filters( 'facetwp_indexer_is_enabled', true ) ) { - $this->run_hooks(); - } - } - - - /** - * Event listeners - * @since 2.8.4 - */ - function run_hooks() { - add_action( 'save_post', [ $this, 'save_post' ] ); - add_action( 'delete_post', [ $this, 'delete_post' ] ); - add_action( 'edited_term', [ $this, 'edit_term' ], 10, 3 ); - add_action( 'delete_term', [ $this, 'delete_term' ], 10, 3 ); - add_action( 'set_object_terms', [ $this, 'set_object_terms' ] ); - add_action( 'facetwp_indexer_cron', [ $this, 'get_progress' ] ); - add_filter( 'wp_insert_post_parent', [ $this, 'is_wp_insert_post' ] ); - } - - - /** - * Cron task - * @since 2.8.5 - */ - function run_cron() { - if ( ! wp_next_scheduled( 'facetwp_indexer_cron' ) ) { - wp_schedule_single_event( time() + 300, 'facetwp_indexer_cron' ); - } - } - - - /** - * Update the index when posts get saved - * @since 0.1.0 - */ - function save_post( $post_id ) { - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { - return; - } - - if ( false !== wp_is_post_revision( $post_id ) ) { - return; - } - - if ( 'auto-draft' == get_post_status( $post_id ) ) { - return; - } - - $this->index( $post_id ); - $this->is_saving = false; - } - - - /** - * Update the index when posts get deleted - * @since 0.6.0 - */ - function delete_post( $post_id ) { - global $wpdb; - - $wpdb->query( "DELETE FROM {$this->table} WHERE post_id = $post_id" ); - } - - - /** - * Update the index when terms get saved - * @since 0.6.0 - */ - function edit_term( $term_id, $tt_id, $taxonomy ) { - global $wpdb; - - $term = get_term( $term_id, $taxonomy ); - $slug = FWP()->helper->safe_value( $term->slug ); - $matches = FWP()->helper->get_facets_by( 'source', "tax/$taxonomy" ); - - if ( ! empty( $matches ) ) { - $facet_names = wp_list_pluck( $matches, 'name' ); - $facet_names = implode( "','", esc_sql( $facet_names ) ); - - $wpdb->query( $wpdb->prepare( " - UPDATE {$this->table} - SET facet_value = %s, facet_display_value = %s - WHERE facet_name IN ('$facet_names') AND term_id = %d", - $slug, $term->name, $term_id - ) ); - } - } - - - /** - * Update the index when terms get deleted - * @since 0.6.0 - */ - function delete_term( $term_id, $tt_id, $taxonomy ) { - global $wpdb; - - $matches = FWP()->helper->get_facets_by( 'source', "tax/$taxonomy" ); - - if ( ! empty( $matches ) ) { - $facet_names = wp_list_pluck( $matches, 'name' ); - $facet_names = implode( "','", esc_sql( $facet_names ) ); - - $wpdb->query( " - DELETE FROM {$this->table} - WHERE facet_name IN ('$facet_names') AND term_id = $term_id" - ); - } - } - - - /** - * We're hijacking wp_insert_post_parent - * Prevent our set_object_terms() hook from firing within wp_insert_post - * @since 2.2.2 - */ - function is_wp_insert_post( $post_parent ) { - $this->is_saving = true; - return $post_parent; - } - - - /** - * Support for manual taxonomy associations - * @since 0.8.0 - */ - function set_object_terms( $object_id ) { - if ( ! $this->is_saving ) { - $this->index( $object_id ); - } - } - - - /** - * Rebuild the facet index - * @param mixed $post_id The post ID (set to FALSE to re-index everything) - */ - function index( $post_id = false ) { - global $wpdb; - - $this->index_all = ( false === $post_id ); - - // Index everything - if ( $this->index_all ) { - - // Store the pre-index settings (see FacetWP_Diff) - update_option( 'facetwp_settings_last_index', get_option( 'facetwp_settings' ), 'no' ); - - // PHP sessions are blocking, so close if active - if ( PHP_SESSION_ACTIVE === session_status() ) { - session_write_close(); - } - - // Bypass the PHP timeout - ini_set( 'max_execution_time', 0 ); - - // Prevent multiple indexing processes - $touch = (int) $this->get_transient( 'touch' ); - - if ( 0 < $touch ) { - // Run only if the indexer is inactive or stalled - if ( ( time() - $touch ) < 60 ) { - exit; - } - } - else { - // Create temp table - $this->manage_temp_table( 'create' ); - } - } - // Index a single post - elseif ( is_int( $post_id ) ) { - - // Clear table values - $wpdb->query( "DELETE FROM {$this->table} WHERE post_id = $post_id" ); - } - // Exit - else { - return; - } - - // Resume indexing? - $offset = (int) ( $_POST['offset'] ?? 0 ); - $attempt = (int) ( $_POST['retries'] ?? 0 ); - - if ( 0 < $offset ) { - $post_ids = json_decode( get_option( 'facetwp_indexing' ), true ); - } - else { - $post_ids = $this->get_post_ids_to_index( $post_id ); - - // Store post IDs - if ( $this->index_all ) { - update_option( 'facetwp_indexing', json_encode( $post_ids ) ); - } - } - - // Count total posts - $num_total = count( $post_ids ); - - // Get all facet sources - $facets = FWP()->helper->get_facets(); - - // Populate an array of facet value modifiers - $this->load_value_modifiers( $facets ); - - foreach ( $post_ids as $counter => $post_id ) { - - // Advance until we reach the offset - if ( $counter < $offset ) { - continue; - } - - // Update the progress bar - if ( $this->index_all ) { - if ( 0 == ( $counter % $this->chunk_size ) ) { - $num_retries = (int) $this->get_transient( 'retries' ); - - // Exit if newer retries exist - if ( $attempt < $num_retries ) { - exit; - } - - // Exit if the indexer was cancelled - wp_cache_delete( 'facetwp_indexing_cancelled', 'options' ); - - if ( 'yes' === get_option( 'facetwp_indexing_cancelled', 'no' ) ) { - update_option( 'facetwp_transients', '' ); - update_option( 'facetwp_indexing', '' ); - $this->manage_temp_table( 'delete' ); - exit; - } - - $transients = [ - 'num_indexed' => $counter, - 'num_total' => $num_total, - 'retries' => $attempt, - 'touch' => time(), - ]; - update_option( 'facetwp_transients', json_encode( $transients ) ); - } - } - - // If the indexer stalled, start from the last valid chunk - if ( 0 < $offset && ( $counter - $offset < $this->chunk_size ) ) { - $wpdb->query( "DELETE FROM {$this->table} WHERE post_id = $post_id" ); - } - - $this->index_post( $post_id, $facets ); - } - - // Indexing complete - if ( $this->index_all ) { - update_option( 'facetwp_last_indexed', time(), 'no' ); - update_option( 'facetwp_transients', '', 'no' ); - update_option( 'facetwp_indexing', '', 'no' ); - - $this->manage_temp_table( 'replace' ); - $this->manage_temp_table( 'delete' ); - } - - do_action( 'facetwp_indexer_complete' ); - } - - - /** - * Get an array of post IDs to index - * @since 3.6.8 - */ - function get_post_ids_to_index( $post_id = false ) { - $args = [ - 'post_type' => 'any', - 'post_status' => 'publish', - 'posts_per_page' => -1, - 'fields' => 'ids', - 'orderby' => 'ID', - 'cache_results' => false, - 'no_found_rows' => true, - ]; - - if ( is_int( $post_id ) ) { - $args['p'] = $post_id; - $args['posts_per_page'] = 1; - } - - $args = apply_filters( 'facetwp_indexer_query_args', $args ); - - $query = new WP_Query( $args ); - return (array) $query->posts; - } - - - /** - * Index an individual post - * @since 3.6.8 - */ - function index_post( $post_id, $facets ) { - - // Force WPML to change the language - do_action( 'facetwp_indexer_post', [ 'post_id' => $post_id ] ); - - // Loop through all facets - foreach ( $facets as $facet ) { - - // Do not index search facets - if ( 'search' == $facet['type'] ) { - continue; - } - - $this->facet = $facet; - $source = $facet['source'] ?? ''; - - // Set default index_row() params - $defaults = [ - 'post_id' => $post_id, - 'facet_name' => $facet['name'], - 'facet_source' => $source, - 'facet_value' => '', - 'facet_display_value' => '', - 'term_id' => 0, - 'parent_id' => 0, - 'depth' => 0, - 'variation_id' => 0, - ]; - - $defaults = apply_filters( 'facetwp_indexer_post_facet_defaults', $defaults, [ - 'facet' => $facet - ] ); - - // Set flag for custom handling - $this->is_overridden = true; - - // Bypass default indexing - $bypass = apply_filters( 'facetwp_indexer_post_facet', false, [ - 'defaults' => $defaults, - 'facet' => $facet - ] ); - - if ( $bypass ) { - continue; - } - - $this->is_overridden = false; - - // Get rows to insert - $rows = $this->get_row_data( $defaults ); - - foreach ( $rows as $row ) { - $this->index_row( $row ); - } - } - } - - - /** - * Get data for a table row - * @since 2.1.1 - */ - function get_row_data( $defaults ) { - $output = []; - - $facet = $this->facet; - $post_id = $defaults['post_id']; - $source = $defaults['facet_source']; - - if ( 'tax/' == substr( $source, 0, 4 ) ) { - $used_terms = []; - $taxonomy = substr( $source, 4 ); - $term_objects = wp_get_object_terms( $post_id, $taxonomy ); - if ( is_wp_error( $term_objects ) ) { - return $output; - } - - // Store the term depths - $hierarchy = FWP()->helper->get_term_depths( $taxonomy ); - - // Only index child terms - $children = false; - if ( ! empty( $facet['parent_term'] ) ) { - $children = get_term_children( $facet['parent_term'], $taxonomy ); - } - - foreach ( $term_objects as $term ) { - - // If "parent_term" is set, only index children - if ( false !== $children && ! in_array( $term->term_id, $children ) ) { - continue; - } - - // Prevent duplicate terms - if ( isset( $used_terms[ $term->term_id ] ) ) { - continue; - } - $used_terms[ $term->term_id ] = true; - - // Handle hierarchical taxonomies - $term_info = $hierarchy[ $term->term_id ]; - $depth = $term_info['depth']; - - // Adjust depth if parent_term is set - if ( ! empty( $facet['parent_term'] ) ) { - if ( isset( $hierarchy[ $facet['parent_term'] ] ) ) { - $anchor = (int) $hierarchy[ $facet['parent_term'] ]['depth'] + 1; - $depth = ( $depth - $anchor ); - } - } - - $params = $defaults; - $params['facet_value'] = $term->slug; - $params['facet_display_value'] = $term->name; - $params['term_id'] = $term->term_id; - $params['parent_id'] = $term_info['parent_id']; - $params['depth'] = $depth; - $output[] = $params; - - // Automatically index implicit parents - if ( 'hierarchy' == $facet['type'] || FWP()->helper->facet_is( $facet, 'hierarchical', 'yes' ) ) { - while ( $depth > 0 ) { - $term_id = $term_info['parent_id']; - $term_info = $hierarchy[ $term_id ]; - $depth = $depth - 1; - - if ( ! isset( $used_terms[ $term_id ] ) ) { - $used_terms[ $term_id ] = true; - - $params = $defaults; - $params['facet_value'] = $term_info['slug']; - $params['facet_display_value'] = $term_info['name']; - $params['term_id'] = $term_id; - $params['parent_id'] = $term_info['parent_id']; - $params['depth'] = $depth; - $output[] = $params; - } - } - } - } - } - elseif ( 'cf/' == substr( $source, 0, 3 ) ) { - $source_noprefix = substr( $source, 3 ); - $values = get_post_meta( $post_id, $source_noprefix, false ); - foreach ( $values as $value ) { - $params = $defaults; - $params['facet_value'] = $value; - $params['facet_display_value'] = $value; - $output[] = $params; - } - } - elseif ( 'post' == substr( $source, 0, 4 ) ) { - $post = get_post( $post_id ); - $value = $post->{$source}; - $display_value = $value; - if ( 'post_author' == $source ) { - $user = get_user_by( 'id', $value ); - $display_value = ( $user instanceof WP_User ) ? $user->display_name : $value; - } - elseif ( 'post_type' == $source ) { - $post_type = get_post_type_object( $value ); - if ( isset( $post_type->labels->name ) ) { - $display_value = $post_type->labels->name; - } - } - - $params = $defaults; - $params['facet_value'] = $value; - $params['facet_display_value'] = $display_value; - $output[] = $params; - } - - return apply_filters( 'facetwp_indexer_row_data', $output, [ - 'defaults' => $defaults, - 'facet' => $this->facet - ] ); - } - - - /** - * Index a facet value - * @since 0.6.0 - */ - function index_row( $params ) { - - // Allow for custom indexing - $params = apply_filters( 'facetwp_index_row', $params, $this ); - - // Allow hooks to bypass the row insertion - if ( is_array( $params ) ) { - $this->insert( $params ); - } - } - - - /** - * Save a facet value to DB - * This can be trigged by "facetwp_index_row" to handle multiple values - * @since 1.2.5 - */ - function insert( $params ) { - global $wpdb; - - $value = $params['facet_value']; - $display_value = $params['facet_display_value']; - - // Only accept scalar values - if ( '' === $value || ! is_scalar( $value ) ) { - return; - } - - // Apply UI-based modifiers - if ( isset( $this->modifiers[ $params['facet_name'] ] ) ) { - $mod = $this->modifiers[ $params['facet_name' ] ]; - $is_match = in_array( $display_value, $mod['values'] ); - - if ( ( 'exclude' == $mod['type'] && $is_match ) || ( 'include' == $mod['type'] && ! $is_match ) ) { - return; - } - } - - $wpdb->query( $wpdb->prepare( "INSERT INTO {$this->table} - (post_id, facet_name, facet_value, facet_display_value, term_id, parent_id, depth, variation_id) VALUES (%d, %s, %s, %s, %d, %d, %d, %d)", - $params['post_id'], - $params['facet_name'], - FWP()->helper->safe_value( $value ), - $display_value, - $params['term_id'], - $params['parent_id'], - $params['depth'], - $params['variation_id'] - ) ); - } - - - /** - * Get the indexing completion percentage - * @return mixed The decimal percentage, or -1 - * @since 0.1.0 - */ - function get_progress() { - $return = -1; - $num_indexed = (int) $this->get_transient( 'num_indexed' ); - $num_total = (int) $this->get_transient( 'num_total' ); - $retries = (int) $this->get_transient( 'retries' ); - $touch = (int) $this->get_transient( 'touch' ); - - if ( 0 < $num_total ) { - - // Resume a stalled indexer - if ( 60 < ( time() - $touch ) ) { - $post_data = [ - 'blocking' => false, - 'timeout' => 0.02, - 'body' => [ - 'action' => 'facetwp_resume_index', - 'offset' => $num_indexed, - 'retries' => $retries + 1, - 'touch' => $touch - ] - ]; - wp_remote_post( admin_url( 'admin-ajax.php' ), $post_data ); - } - - // Calculate the percent completion - if ( $num_indexed != $num_total ) { - $return = round( 100 * ( $num_indexed / $num_total ), 2 ); - } - } - - return $return; - } - - - /** - * Get indexer transient variables - * @since 1.7.8 - */ - function get_transient( $name = false ) { - $transients = get_option( 'facetwp_transients' ); - - if ( ! empty( $transients ) ) { - $transients = json_decode( $transients, true ); - if ( $name ) { - return $transients[ $name ] ?? false; - } - - return $transients; - } - - return false; - } - - - /** - * Set either the index or temp table - * @param string $table 'auto', 'index', or 'temp' - * @since 4.1.4 - */ - function set_table( $table = 'auto' ) { - global $wpdb; - - if ( 'auto' == $table ) { - $table = ( '' == get_option( 'facetwp_indexing', '' ) ) ? 'index' : 'temp'; - } - - $this->table = $wpdb->prefix . 'facetwp_' . $table; - } - - - /** - * Index table management - * @since 3.5 - */ - function manage_temp_table( $action = 'create' ) { - global $wpdb; - - $table = $wpdb->prefix . 'facetwp_index'; - $temp_table = $wpdb->prefix . 'facetwp_temp'; - - if ( 'create' == $action ) { - $wpdb->query( "CREATE TABLE $temp_table LIKE $table" ); - $this->set_table( 'temp' ); - } - elseif ( 'replace' == $action ) { - $wpdb->query( "TRUNCATE TABLE $table" ); - $wpdb->query( "INSERT INTO $table SELECT * FROM $temp_table" ); - } - elseif ( 'delete' == $action ) { - $wpdb->query( "DROP TABLE IF EXISTS $temp_table" ); - $this->set_table( 'index' ); - } - } - - - /** - * Populate an array of facet value modifiers (defined in the admin UI) - * @since 3.5.6 - */ - function load_value_modifiers( $facets ) { - $output = []; - - foreach ( $facets as $facet ) { - $name = $facet['name']; - $type = empty( $facet['modifier_type'] ) ? 'off' : $facet['modifier_type']; - - if ( 'include' == $type || 'exclude' == $type ) { - $temp = preg_split( '/\r\n|\r|\n/', trim( $facet['modifier_values'] ) ); - $values = []; - - // Compare using both original and encoded values - foreach ( $temp as $val ) { - $val = trim( $val ); - $val_encoded = htmlentities( $val ); - $val_decoded = html_entity_decode( $val ); - $values[ $val ] = true; - $values[ $val_encoded ] = true; - $values[ $val_decoded ] = true; - } - - $output[ $name ] = [ 'type' => $type, 'values' => array_keys( $values ) ]; - } - } - - $this->modifiers = $output; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-init.php b/wp/wp-content/plugins/facetwp/includes/class-init.php deleted file mode 100644 index 990f8e95..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-init.php +++ /dev/null @@ -1,157 +0,0 @@ -load_textdomain(); - - // is_plugin_active - include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); - - $includes = [ - 'api/fetch', - 'api/refresh', - 'class-helper', - 'class-ajax', - 'class-request', - 'class-renderer', - 'class-diff', - 'class-indexer', - 'class-display', - 'class-builder', - 'class-overrides', - 'class-settings', - 'class-upgrade', - 'functions' - ]; - - foreach ( $includes as $inc ) { - include ( FACETWP_DIR . "/includes/$inc.php" ); - } - - new FacetWP_Upgrade(); - new FacetWP_Overrides(); - - FWP()->api = new FacetWP_API_Fetch(); - FWP()->helper = new FacetWP_Helper(); - FWP()->facet = new FacetWP_Renderer(); - FWP()->settings = new FacetWP_Settings(); - FWP()->diff = new FacetWP_Diff(); - FWP()->indexer = new FacetWP_Indexer(); - FWP()->display = new FacetWP_Display(); - FWP()->builder = new FacetWP_Builder(); - FWP()->request = new FacetWP_Request(); - FWP()->ajax = new FacetWP_Ajax(); - - // integrations - include( FACETWP_DIR . '/includes/integrations/searchwp/searchwp.php' ); - include( FACETWP_DIR . '/includes/integrations/woocommerce/woocommerce.php' ); - include( FACETWP_DIR . '/includes/integrations/edd/edd.php' ); - include( FACETWP_DIR . '/includes/integrations/acf/acf.php' ); - include( FACETWP_DIR . '/includes/integrations/wp-cli/wp-cli.php' ); - include( FACETWP_DIR . '/includes/integrations/wp-rocket/wp-rocket.php' ); - - // update checks - include( FACETWP_DIR . '/includes/class-updater.php' ); - - // hooks - add_action( 'admin_menu', [ $this, 'admin_menu' ] ); - add_action( 'wp_enqueue_scripts', [ $this, 'front_scripts' ] ); - add_filter( 'redirect_canonical', [ $this, 'redirect_canonical' ], 10, 2 ); - add_filter( 'plugin_action_links_facetwp/index.php', [ $this, 'plugin_action_links' ] ); - - do_action( 'facetwp_init' ); - } - - - /** - * i18n support - */ - function load_textdomain() { - - // admin-facing - load_plugin_textdomain( 'fwp' ); - - // front-facing - load_plugin_textdomain( 'fwp-front', false, basename( FACETWP_DIR ) . '/languages' ); - } - - - /** - * Register the FacetWP settings page - */ - function admin_menu() { - add_options_page( 'FacetWP', 'FacetWP', 'manage_options', 'facetwp', [ $this, 'settings_page' ] ); - } - - - /** - * Enqueue jQuery - */ - function front_scripts() { - if ( 'yes' == FWP()->helper->get_setting( 'load_jquery', 'yes' ) ) { - wp_enqueue_script( 'jquery' ); - } - } - - - /** - * Route to the correct edit screen - */ - function settings_page() { - include( FACETWP_DIR . '/templates/page-settings.php' ); - } - - - /** - * Prevent WP from redirecting FWP pager to /page/X - */ - function redirect_canonical( $redirect_url, $requested_url ) { - if ( false !== strpos( $redirect_url, FWP()->helper->get_setting( 'prefix' ) . 'paged' ) ) { - return false; - } - return $redirect_url; - } - - - /** - * Add "Settings" link to plugin listing page - */ - function plugin_action_links( $links ) { - $settings_link = admin_url( 'options-general.php?page=facetwp' ); - $settings_link = '' . __( 'Settings', 'fwp' ) . ''; - array_unshift( $links, $settings_link ); - return $links; - } - - - /** - * WooCommerce 3.6+ doesn't load its frontend includes for REST API requests - * We need to force-load these includes for FacetWP refreshes - * See includes() within class-woocommerce.php - * - * This code isn't within /integrations/woocommerce/ because it runs *before* init - * - * @since 3.3.10 - */ - function is_rest_api_request( $request ) { - if ( false !== strpos( $_SERVER['REQUEST_URI'], 'facetwp' ) ) { - return false; - } - return $request; - } -} - -$this->init = new FacetWP_Init(); diff --git a/wp/wp-content/plugins/facetwp/includes/class-overrides.php b/wp/wp-content/plugins/facetwp/includes/class-overrides.php deleted file mode 100644 index b04edc9a..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-overrides.php +++ /dev/null @@ -1,103 +0,0 @@ -is_overridden ) { - return $params; - } - - $facet = FWP()->helper->get_facet_by_name( $params['facet_name'] ); - - // Store raw numbers to format later - if ( in_array( $facet['type'], [ 'number_range', 'slider' ] ) ) { - $this->raw = [ - 'value' => $params['facet_value'], - 'label' => $params['facet_display_value'] - ]; - } - - // Support "Other data source" values - if ( ! empty( $facet['source_other'] ) ) { - $other_params = $params; - $other_params['facet_source'] = $facet['source_other']; - $rows = $class->get_row_data( $other_params ); - $params['facet_display_value'] = $rows[0]['facet_display_value']; - } - - return $params; - } - - - /** - * Make sure that numbers are properly formatted - */ - function format_numbers( $params, $class ) { - - if ( empty( $this->raw ) ) { - return $params; - } - - $value = $params['facet_value']; - $label = $params['facet_display_value']; - - // Only format if un-altered - if ( $this->raw['value'] === $value && $this->raw['label'] === $label ) { - $params['facet_value'] = FWP()->helper->format_number( $this->raw['value'] ); - $params['facet_display_value'] = FWP()->helper->format_number( $this->raw['label'] ); - } - - $this->raw = null; - - return $params; - } - - - /** - * Ignore certain post types - */ - function ignore_post_types( $is_main_query, $query ) { - $blacklist = [ - 'acf-field', - 'acf-field-group', - 'advanced_ads', - 'carts', - 'cookielawinfo', - 'edd_wish_list', - 'ms_relationship', - 'nav_menu_item', - 'wc_user_membership', - 'wp_block', - 'wp_global_styles', - 'wp_navigation', - 'wp_template', - 'wp_template_part' - ]; - $post_type = $query->get( 'post_type' ); - - if ( is_string( $post_type ) && in_array( $post_type, $blacklist ) ) { - $is_main_query = false; - } - - // Ignore the "WP GDPR Compliance" plugin - if ( '[wpgdprc_access_request_form]' == $query->get( 's' ) ) { - $is_main_query = false; - } - - return $is_main_query; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-renderer.php b/wp/wp-content/plugins/facetwp/includes/class-renderer.php deleted file mode 100644 index 6b4d5879..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-renderer.php +++ /dev/null @@ -1,662 +0,0 @@ -facet_types = FWP()->helper->facet_types; - } - - - /** - * Generate the facet output - * @param array $params An array of arrays (see the FacetWP->refresh() method) - * @return array - */ - function render( $params ) { - - $output = [ - 'facets' => [], - 'template' => '', - 'settings' => [], - ]; - - // Hook params - $params = apply_filters( 'facetwp_render_params', $params ); - - // First ajax refresh? - $first_load = (bool) $params['first_load']; - $is_bfcache = (bool) $params['is_bfcache']; - - // Initial pageload? - $this->is_preload = isset( $params['is_preload'] ); - - // Set the AJAX and HTTP params - $this->ajax_params = $params; - $this->http_params = $params['http_params']; - - // Validate facets - $this->facets = []; - foreach ( $params['facets'] as $f ) { - $name = $f['facet_name']; - $facet = FWP()->helper->get_facet_by_name( $name ); - if ( $facet ) { - - // Default to "OR" mode - $facet['operator'] = $facet['operator'] ?? 'or'; - - // Support the "facetwp_preload_url_vars" hook - if ( $first_load && empty( $f['selected_values'] ) && ! empty( $this->http_params['url_vars'][ $name ] ) ) { - $f['selected_values'] = $this->http_params['url_vars'][ $name ]; - } - - // Support commas within search / autocomplete facets - if ( 'search' == $facet['type'] || 'autocomplete' == $facet['type'] ) { - $f['selected_values'] = implode( ',', (array) $f['selected_values'] ); - } - - $facet['selected_values'] = FWP()->helper->sanitize( $f['selected_values'] ); - - $this->facets[ $name ] = $facet; - } - } - - // Get the template from $helper->settings - if ( 'wp' == $params['template'] ) { - $this->template = [ 'name' => 'wp' ]; - $query_args = FWP()->request->query_vars ?? []; - } - else { - $this->template = FWP()->helper->get_template_by_name( $params['template'] ); - $query_args = $this->get_query_args(); - } - - // Detect search string - if ( ! empty( $query_args['s'] ) ) { - $this->is_search = true; - } - - // Run the query once (prevent duplicate queries when preloading) - if ( empty( $this->query_args ) ) { - - // Support "post__in" - if ( empty( $query_args['post__in'] ) ) { - $query_args['post__in'] = []; - } - - // Get the template "query" field - $query_args = apply_filters( 'facetwp_query_args', $query_args, $this ); - - // Pagination - $query_args['paged'] = empty( $params['paged'] ) ? 1 : (int) $params['paged']; - - // Preserve SQL_CALC_FOUND_ROWS - unset( $query_args['no_found_rows'] ); - - // Narrow posts based on facet selections - $post_ids = $this->get_filtered_post_ids( $query_args ); - - // Update the SQL query - if ( ! empty( $post_ids ) ) { - if ( FWP()->is_filtered ) { - $query_args['post__in'] = $post_ids; - } - - $this->where_clause = ' AND post_id IN (' . implode( ',', $post_ids ) . ')'; - } - - // Set the default limit - if ( empty( $query_args['posts_per_page'] ) ) { - $query_args['posts_per_page'] = (int) get_option( 'posts_per_page' ); - } - - // Adhere to the "per page" box - $per_page = isset( $params['extras']['per_page'] ) ? $params['extras']['per_page'] : ''; - if ( ! empty( $per_page ) && 'default' != $per_page ) { - $query_args['posts_per_page'] = (int) $per_page; - } - - $this->query_args = apply_filters( 'facetwp_filtered_query_args', $query_args, $this ); - - // Run the WP_Query - $this->query = new WP_Query( $this->query_args ); - } - - // Debug - if ( 'on' == FWP()->helper->get_setting( 'debug_mode', 'off' ) ) { - $output['settings']['debug'] = $this->get_debug_info(); - } - - // Generate the template HTML - // For performance gains, skip the template on pageload - if ( 'wp' != $this->template['name'] ) { - if ( ! $first_load || $is_bfcache || apply_filters( 'facetwp_template_force_load', false ) ) { - $output['template'] = $this->get_template_html(); - } - } - - // Don't render these facets - $frozen_facets = $params['frozen_facets']; - - // Calculate pager args - $pager_args = [ - 'page' => (int) $this->query_args['paged'], - 'per_page' => (int) $this->query_args['posts_per_page'], - 'total_rows' => (int) $this->query->found_posts, - 'total_pages' => 1, - ]; - - if ( 0 < $pager_args['per_page'] ) { - $pager_args['total_pages'] = ceil( $pager_args['total_rows'] / $pager_args['per_page'] ); - } - - $pager_args = apply_filters( 'facetwp_pager_args', $pager_args, $this ); - - $this->pager_args = $pager_args; - - // Stick the pager args into the JSON response - $output['settings']['pager'] = $pager_args; - - // Display the pagination HTML - if ( isset( $params['extras']['pager'] ) ) { - $output['pager'] = $this->paginate( $pager_args ); - } - - // Display the "per page" HTML - if ( isset( $params['extras']['per_page'] ) ) { - $output['per_page'] = $this->get_per_page_box(); - } - - // Display the counts HTML - if ( isset( $params['extras']['counts'] ) ) { - $output['counts'] = $this->get_result_count( $pager_args ); - } - - // Not paging - if ( 0 == $params['soft_refresh'] ) { - $output['settings']['num_choices'] = []; - } - - // Get facet data - foreach ( $this->facets as $facet_name => $the_facet ) { - $facet_type = $the_facet['type']; - $ui_type = empty( $the_facet['ui_type'] ) ? $facet_type : $the_facet['ui_type']; - - // Invalid facet type - if ( ! isset( $this->facet_types[ $facet_type ] ) ) { - continue; - } - - // Skip facets when paging - if ( 0 < $params['soft_refresh'] && 'pager' != $facet_type ) { - continue; - } - - // Get facet labels - if ( 0 == $params['soft_refresh'] ) { - $output['settings']['labels'][ $facet_name ] = facetwp_i18n( $the_facet['label'] ); - } - - // Load all facets on back / forward button press (first_load = true) - if ( ! $first_load ) { - - // Skip frozen facets - if ( isset( $frozen_facets[ $facet_name ] ) ) { - continue; - } - } - - $args = [ - 'facet' => $the_facet, - 'where_clause' => $this->where_clause, - 'selected_values' => $the_facet['selected_values'], - ]; - - // Load facet values if needed - if ( method_exists( $this->facet_types[ $facet_type ], 'load_values' ) ) { - - // Grab preloaded values if available - if ( isset( $this->preloaded_values[ $facet_name ] ) ) { - $args['values'] = $this->preloaded_values[ $facet_name ]; - } - else { - $args['values'] = $this->facet_types[ $facet_type ]->load_values( $args ); - - if ( $this->is_preload ) { - $this->preloaded_values[ $facet_name ] = $args['values']; - } - } - } - - // Filter the render args - $args = apply_filters( 'facetwp_facet_render_args', $args ); - - // Return the number of available choices - if ( isset( $args['values'] ) ) { - $num_choices = 0; - $is_ghost = FWP()->helper->facet_is( $the_facet, 'ghosts', 'yes' ); - - foreach ( $args['values'] as $choice ) { - if ( isset( $choice['counter'] ) && ( 0 < $choice['counter'] || $is_ghost ) ) { - $num_choices++; - } - } - - $output['settings']['num_choices'][ $facet_name ] = $num_choices; - } - - // Generate the facet HTML - $html = $this->facet_types[ $ui_type ]->render( $args ); - $output['facets'][ $facet_name ] = apply_filters( 'facetwp_facet_html', $html, $args ); - - // Return any JS settings - if ( method_exists( $this->facet_types[ $ui_type ], 'settings_js' ) ) { - $output['settings'][ $facet_name ] = $this->facet_types[ $ui_type ]->settings_js( $args ); - } - - // Grab num_choices for slider facets - if ( 'slider' == $the_facet['type'] ) { - $min = $output['settings'][ $facet_name ]['range']['min']; - $max = $output['settings'][ $facet_name ]['range']['max']; - $output['settings']['num_choices'][ $facet_name ] = ( $min == $max ) ? 0 : 1; - } - } - - return apply_filters( 'facetwp_render_output', $output, $params ); - } - - - /** - * Get WP_Query arguments by executing the template "query" field - * @return null - */ - function get_query_args() { - - $defaults = []; - - // Allow templates to piggyback archives - if ( apply_filters( 'facetwp_template_use_archive', false ) ) { - $main_query = $GLOBALS['wp_the_query']; - - // Initial pageload - if ( $main_query->is_archive || $main_query->is_search ) { - if ( $main_query->is_category ) { - $defaults['cat'] = $main_query->get( 'cat' ); - } - elseif ( $main_query->is_tag ) { - $defaults['tag_id'] = $main_query->get( 'tag_id' ); - } - elseif ( $main_query->is_tax ) { - $defaults['taxonomy'] = $main_query->get( 'taxonomy' ); - $defaults['term'] = $main_query->get( 'term' ); - } - elseif ( $main_query->is_search ) { - $defaults['s'] = $main_query->get( 's' ); - } - - $this->archive_args = $defaults; - } - // Subsequent ajax requests - elseif ( ! empty( $this->http_params['archive_args'] ) ) { - foreach ( $this->http_params['archive_args'] as $key => $val ) { - if ( in_array( $key, [ 'cat', 'tag_id', 'taxonomy', 'term', 's' ] ) ) { - $defaults[ $key ] = $val; - } - } - } - } - - // Use the query builder - if ( isset( $this->template['modes'] ) && 'visual' == $this->template['modes']['query'] ) { - $query_args = FWP()->builder->parse_query_obj( $this->template['query_obj'] ); - } - else { - - // remove UTF-8 non-breaking spaces - $query_args = preg_replace( "/\xC2\xA0/", ' ', $this->template['query'] ); - $query_args = (array) eval( '?>' . $query_args ); - } - - // Merge the two arrays - return array_merge( $defaults, $query_args ); - } - - - /** - * Get ALL post IDs for the matching query - * @return array An array of post IDs - */ - function get_filtered_post_ids( $query_args = [] ) { - - if ( empty( $query_args ) ) { - $query_args = $this->query_args; - } - - // Only get relevant post IDs - $args = array_merge( $query_args, [ - 'paged' => 1, - 'posts_per_page' => -1, - 'update_post_meta_cache' => false, - 'update_post_term_cache' => false, - 'cache_results' => false, - 'no_found_rows' => true, - 'nopaging' => true, // prevent "offset" issues - 'facetwp' => false, - 'fields' => 'ids', - ] ); - - $query = new WP_Query( $args ); - - // Allow hooks to modify the default post IDs - $post_ids = apply_filters( 'facetwp_pre_filtered_post_ids', $query->posts, $this ); - - // Store the unfiltered post IDs - FWP()->unfiltered_post_ids = $post_ids; - - foreach ( $this->facets as $facet_name => $the_facet ) { - $facet_type = $the_facet['type']; - - // Stop looping - if ( empty( $post_ids ) ) { - break; - } - - $matches = []; - $selected_values = $the_facet['selected_values']; - - if ( empty( $selected_values ) ) { - continue; - } - - // Handle each facet - if ( isset( $this->facet_types[ $facet_type ] ) ) { - - $hook_params = [ - 'facet' => $the_facet, - 'selected_values' => $selected_values, - ]; - - // Hook to support custom filter_posts() handler - $matches = apply_filters( 'facetwp_facet_filter_posts', false, $hook_params ); - - if ( false === $matches ) { - $matches = $this->facet_types[ $facet_type ]->filter_posts( $hook_params ); - } - } - - // Skip this facet - if ( 'continue' == $matches ) { - continue; - } - - // Force array - $matches = (array) $matches; - - // Store post IDs per facet (needed for "OR" mode) - FWP()->or_values[ $facet_name ] = $matches; - - if ( 'search' == $facet_type ) { - $this->is_search = true; - } - - // For search facets, loop through $matches to set order - // For other facets, loop through $post_ids to preserve the existing order - $needles = ( 'search' == $facet_type ) ? $matches : $post_ids; - $haystack = ( 'search' == $facet_type ) ? $post_ids : $matches; - $haystack = array_flip( $haystack ); - $intersected_ids = []; - - foreach ( $needles as $post_id ) { - if ( isset( $haystack[ $post_id ] ) ) { - $intersected_ids[] = $post_id; - } - } - - $post_ids = $intersected_ids; - } - - $post_ids = apply_filters( 'facetwp_filtered_post_ids', array_values( $post_ids ), $this ); - - // Store the filtered post IDs - FWP()->filtered_post_ids = $post_ids; - - // Set a flag for whether filtering is applied - FWP()->is_filtered = ( FWP()->filtered_post_ids !== FWP()->unfiltered_post_ids ); - - // Return a zero array if no matches - return empty( $post_ids ) ? [ 0 ] : $post_ids; - } - - - /** - * Run the template display code - * @return string (HTML) - */ - function get_template_html() { - global $post, $wp_query; - - $output = apply_filters( 'facetwp_template_html', false, $this ); - - if ( false === $output ) { - ob_start(); - - // Preserve globals - $temp_post = is_object( $post ) ? clone $post : $post; - $temp_wp_query = is_object( $wp_query ) ? clone $wp_query : $wp_query; - - $query = $this->query; - $wp_query = $query; // Make $query->blah() optional - - if ( isset( $this->template['modes'] ) && 'visual' == $this->template['modes']['display'] ) { - echo FWP()->builder->render_layout( $this->template['layout'] ); - } - else { - - // Remove UTF-8 non-breaking spaces - $display_code = $this->template['template']; - $display_code = preg_replace( "/\xC2\xA0/", ' ', $display_code ); - eval( '?>' . $display_code ); - } - - // Reset globals - $post = $temp_post; - $wp_query = $temp_wp_query; - - // Store buffered output - $output = ob_get_clean(); - } - - $output = preg_replace( "/\xC2\xA0/", ' ', $output ); - return $output; - } - - - /** - * Result count (1-10 of 234) - * @param array $params An array with "page", "per_page", and "total_rows" - * @return string - */ - function get_result_count( $params = [] ) { - $text_of = __( 'of', 'fwp-front' ); - - $page = (int) $params['page']; - $per_page = (int) $params['per_page']; - $total_rows = (int) $params['total_rows']; - - if ( $per_page < $total_rows ) { - $lower = ( 1 + ( ( $page - 1 ) * $per_page ) ); - $upper = ( $page * $per_page ); - $upper = ( $total_rows < $upper ) ? $total_rows : $upper; - $output = "$lower-$upper $text_of $total_rows"; - } - else { - $lower = ( 0 < $total_rows ) ? 1 : 0; - $upper = $total_rows; - $output = $total_rows; - } - - return apply_filters( 'facetwp_result_count', $output, [ - 'lower' => $lower, - 'upper' => $upper, - 'total' => $total_rows, - ] ); - } - - - /** - * Pagination - * @param array $params An array with "page", "per_page", and "total_rows" - * @return string - */ - function paginate( $params = [] ) { - $pager_class = FWP()->helper->facet_types['pager']; - $pager_class->pager_args = $params; - - $output = $pager_class->render_numbers([ - 'inner_size' => 2, - 'dots_label' => '…', - 'prev_label' => '<<', - 'next_label' => '>>', - ]); - - return apply_filters( 'facetwp_pager_html', $output, $params ); - } - - - /** - * "Per Page" dropdown box - * @return string - */ - function get_per_page_box() { - $pager_class = FWP()->helper->facet_types['pager']; - $pager_class->pager_args = $this->pager_args; - - $options = apply_filters( 'facetwp_per_page_options', [ 10, 25, 50, 100 ] ); - - $output = $pager_class->render_per_page([ - 'default_label' => __( 'Per page', 'fwp-front' ), - 'per_page_options' => implode( ',', $options ) - ]); - - return apply_filters( 'facetwp_per_page_html', $output, [ - 'options' => $options - ] ); - } - - - /** - * Get debug info for the browser console - * @since 3.5.7 - */ - function get_debug_info() { - $last_indexed = get_option( 'facetwp_last_indexed' ); - $last_indexed = $last_indexed ? human_time_diff( $last_indexed ) : 'never'; - - $debug = [ - 'query_args' => $this->query_args, - 'sql' => $this->query->request, - 'facets' => $this->facets, - 'template' => $this->template, - 'settings' => FWP()->helper->settings['settings'], - 'last_indexed' => $last_indexed, - 'row_counts' => FWP()->helper->get_row_counts(), - 'hooks_used' => $this->get_hooks_used() - ]; - - // Reduce debug payload - if ( ! empty( $this->query_args['post__in'] ) ) { - $debug['query_args']['post__in_count'] = count( $this->query_args['post__in'] ); - $debug['query_args']['post__in'] = array_slice( $this->query_args['post__in'], 0, 10 ); - - $debug['sql'] = preg_replace_callback( '/posts.ID IN \((.*?)\)/s', function( $matches ) { - $count = substr_count( $matches[1], ',' ) + 1; - return ( $count <= 10 ) ? $matches[0] : "posts.ID IN (<$count IDs>)"; - }, $debug['sql'] ); - } - - return $debug; - } - - - /** - * Display the location of relevant hooks (for Debug Mode) - * @since 3.5.7 - */ - function get_hooks_used() { - $relevant_hooks = []; - - foreach ( $GLOBALS['wp_filter'] as $tag => $hook_data ) { - if ( 0 === strpos( $tag, 'facetwp' ) || 'pre_get_posts' == $tag ) { - foreach ( $hook_data->callbacks as $callbacks ) { - foreach ( $callbacks as $cb ) { - if ( is_string( $cb['function'] ) && false !== strpos( $cb['function'], '::' ) ) { - $cb['function'] = explode( '::', $cb['function'] ); - } - - if ( is_array( $cb['function'] ) ) { - $class = is_object( $cb['function'][0] ) ? get_class( $cb['function'][0] ) : $cb['function'][0]; - $ref = new ReflectionMethod( $class, $cb['function'][1] ); - } - elseif ( is_object( $cb['function'] ) ) { - if ( is_a( $cb['function'], 'Closure' ) ) { - $ref = new ReflectionFunction( $cb['function'] ); - } - else { - $class = get_class( $cb['function'] ); - $ref = new ReflectionMethod( $class, '__invoke' ); - } - } - else { - $ref = new ReflectionFunction( $cb['function'] ); - } - - $filename = str_replace( ABSPATH, '', $ref->getFileName() ); - - // ignore built-in hooks - if ( false === strpos( $filename, 'plugins/facetwp' ) ) { - if ( false !== strpos( $filename, 'wp-content' ) ) { - $relevant_hooks[ $tag ][] = $filename . ':' . $ref->getStartLine(); - } - } - } - } - } - } - - return $relevant_hooks; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-request.php b/wp/wp-content/plugins/facetwp/includes/class-request.php deleted file mode 100644 index dfd78147..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-request.php +++ /dev/null @@ -1,379 +0,0 @@ -process_json(); - $this->intercept_request(); - } - - - /** - * application/json requires processing the raw PHP input stream - */ - function process_json() { - $json = file_get_contents( 'php://input' ); - if ( 0 === strpos( $json, '{' ) ) { - $post_data = json_decode( $json, true ); - $action = $post_data['action'] ?? ''; - - if ( is_string( $action ) && 0 === strpos( $action, 'facetwp' ) ) { - $_POST = $post_data; - } - } - } - - - /** - * If AJAX and the template is "wp", return the buffered HTML - * Otherwise, store the GET variables for later use - */ - function intercept_request() { - $action = isset( $_POST['action'] ) ? sanitize_key( $_POST['action'] ) : ''; - - $valid_actions = [ - 'facetwp_refresh', - 'facetwp_autocomplete_load' - ]; - - $this->is_refresh = ( 'facetwp_refresh' == $action ); - $this->is_preload = ! in_array( $action, $valid_actions ); - $prefix = FWP()->helper->get_setting( 'prefix' ); - $is_css_tpl = isset( $_POST['data']['template'] ) && 'wp' == $_POST['data']['template']; - - // Disable the admin bar to prevent JSON issues - if ( $this->is_refresh ) { - add_filter( 'show_admin_bar', '__return_false' ); - } - - // Pageload - if ( $this->is_preload ) { - $features = [ 'paged', 'per_page', 'sort' ]; - $valid_names = wp_list_pluck( FWP()->helper->get_facets(), 'name' ); - $valid_names = array_merge( $valid_names, $features ); - - // Store GET variables - foreach ( $valid_names as $name ) { - if ( isset( $_GET[ $prefix . $name ] ) && '' !== $_GET[ $prefix . $name ] ) { - $new_val = stripslashes_deep( $_GET[ $prefix . $name ] ); - $new_val = in_array( $name, $features ) ? $new_val : explode( ',', $new_val ); - $this->url_vars[ $name ] = $new_val; - } - } - - $this->url_vars = apply_filters( 'facetwp_preload_url_vars', $this->url_vars ); - } - // Populate $_GET - else { - $data = stripslashes_deep( $_POST['data'] ); - - if ( ! empty( $data['http_params']['get'] ) ) { - foreach ( $data['http_params']['get'] as $key => $val ) { - if ( ! isset( $_GET[ $key ] ) ) { - $_GET[ $key ] = $val; - } - } - } - } - - if ( $this->is_preload || $is_css_tpl ) { - add_filter( 'posts_pre_query', [ $this, 'maybe_abort_query' ], 10, 2 ); - add_action( 'pre_get_posts', [ $this, 'sacrificial_lamb' ], 998 ); - add_action( 'pre_get_posts', [ $this, 'update_query_vars' ], 999 ); - } - - if ( ! $this->is_preload && $is_css_tpl && 'facetwp_autocomplete_load' != $action ) { - add_action( 'shutdown', [ $this, 'inject_template' ], 0 ); - ob_start(); - } - } - - - /** - * FacetWP runs the archive query before WP gets the chance. - * This hook prevents the query from running twice, by letting us inject the - * first query's posts (and counts) into the "main" query. - */ - function maybe_abort_query( $posts, $query ) { - $do_abort = apply_filters( 'facetwp_archive_abort_query', true, $query ); - $has_query_run = ( ! empty( FWP()->facet->query ) ); - - if ( $do_abort && $has_query_run && isset( $this->query_vars ) ) { - - // New var; any changes to $query will cause is_main_query() to return false - $query_vars = $query->query_vars; - - // If paged = 0, set to 1 or the compare will fail - if ( empty( $query_vars['paged'] ) ) { - $query_vars['paged'] = 1; - } - - // Only intercept the identical query - if ( $query_vars === $this->query_vars ) { - $posts = FWP()->facet->query->posts; - $query->found_posts = FWP()->facet->query->found_posts; - $query->max_num_pages = FWP()->facet->query->max_num_pages; - } - } - - return $posts; - } - - - /** - * Fixes https://core.trac.wordpress.org/ticket/40393 - */ - function sacrificial_lamb( $query ) { - } - - - /** - * Force FacetWP to use the default WP query - */ - function update_query_vars( $query ) { - - if ( isset( $this->query_vars ) // Ran already - || $this->is_shortcode // Skip shortcode template - || ( is_admin() && ! wp_doing_ajax() ) // Skip admin - || ( wp_doing_ajax() && ! $this->is_refresh ) // Skip other ajax - || ! $this->is_main_query( $query ) // Not the main query - ) { - return; - } - - // Set the flag - $query->set( 'facetwp', true ); - - // If "s" is an empty string and no post_type is set, WP sets - // post_type = "any". We want to prevent this except on the search page. - if ( '' == $query->get( 's' ) && ! isset( $_GET['s'] ) ) { - $query->set( 's', null ); - } - - // Set the initial query vars, needed for render() - $this->query_vars = $query->query_vars; - - // Notify - do_action( 'facetwp_found_main_query' ); - - // Generate the FWP output - $data = ( $this->is_preload ) ? $this->process_preload_data() : $this->process_post_data(); - $this->output = FWP()->facet->render( $data ); - - // Set the updated query vars, needed for maybe_abort_query() - $this->query_vars = FWP()->facet->query->query_vars; - - // Set the updated query vars - $force_query = apply_filters( 'facetwp_preload_force_query', false, $query ); - - if ( ! $this->is_preload || ! empty( $this->url_vars ) || $force_query ) { - $query->query_vars = FWP()->facet->query_args; - } - - if ( 'product_query' == $query->get( 'wc_query' ) ) { - wc_set_loop_prop( 'total', FWP()->facet->pager_args['total_rows'] ); - wc_set_loop_prop( 'per_page', FWP()->facet->pager_args['per_page'] ); - wc_set_loop_prop( 'total_pages', FWP()->facet->pager_args['total_pages'] ); - wc_set_loop_prop( 'current_page', FWP()->facet->pager_args['page'] ); - } - } - - - /** - * Is this the main query? - */ - function is_main_query( $query ) { - if ( 'yes' == FWP()->helper->get_setting( 'strict_query_detection', 'no' ) ) { - $is_main_query = ( $query->is_main_query() ); - } - else { - $is_main_query = ( $query->is_main_query() || $query->is_archive ); - } - - $is_main_query = ( $query->is_singular || $query->is_feed ) ? false : $is_main_query; - $is_main_query = ( $query->get( 'suppress_filters', false ) ) ? false : $is_main_query; // skip get_posts() - $is_main_query = ( '' !== $query->get( 'facetwp' ) ) ? (bool) $query->get( 'facetwp' ) : $is_main_query; // flag - return apply_filters( 'facetwp_is_main_query', $is_main_query, $query ); - } - - - /** - * Process the AJAX $_POST data - * This gets passed into FWP()->facet->render() - */ - function process_post_data() { - $data = stripslashes_deep( $_POST['data'] ); - $facets = $data['facets']; - $extras = $data['extras'] ?? []; - $frozen_facets = $data['frozen_facets'] ?? []; - - $params = [ - 'facets' => [], - 'template' => $data['template'], - 'frozen_facets' => $frozen_facets, - 'http_params' => $data['http_params'], - 'extras' => $extras, - 'soft_refresh' => (int) $data['soft_refresh'], - 'is_bfcache' => (int) $data['is_bfcache'], - 'first_load' => (int) $data['first_load'], // skip the template? - 'paged' => (int) $data['paged'], - ]; - - foreach ( $facets as $facet_name => $selected_values ) { - $params['facets'][] = [ - 'facet_name' => $facet_name, - 'selected_values' => $selected_values, - ]; - } - - return $params; - } - - - /** - * On initial pageload, preload the data - * - * This gets called twice; once in the template shortcode (to grab only the template) - * and again in FWP()->display->front_scripts() to grab everything else. - * - * Two calls are needed for timing purposes; the template shortcode often renders - * before some or all of the other FacetWP-related shortcodes. - */ - function process_preload_data( $template_name = false, $overrides = [] ) { - - if ( false === $template_name ) { - $template_name = $this->template_name ?? 'wp'; - } - - $this->template_name = $template_name; - - // Is this a template shortcode? - $this->is_shortcode = ( 'wp' != $template_name ); - - $params = [ - 'facets' => [], - 'template' => $template_name, - 'http_params' => [ - 'get' => $_GET, - 'uri' => FWP()->helper->get_uri(), - 'url_vars' => $this->url_vars, - ], - 'frozen_facets' => [], - 'soft_refresh' => 1, // skip the facets - 'is_preload' => 1, - 'is_bfcache' => 0, - 'first_load' => 0, // load the template - 'extras' => [], - 'paged' => 1, - ]; - - // Support "/page/X/" on preload - if ( ! empty( $this->query_vars['paged'] ) ) { - $params['paged'] = (int) $this->query_vars['paged']; - } - - foreach ( $this->url_vars as $key => $val ) { - if ( 'paged' == $key ) { - $params['paged'] = $val; - } - elseif ( 'per_page' == $key || 'sort' == $key ) { - $params['extras'][ $key ] = $val; - } - else { - $params['facets'][] = [ - 'facet_name' => $key, - 'selected_values' => $val, - ]; - } - } - - // Override the defaults - $params = array_merge( $params, $overrides ); - - return $params; - } - - - /** - * This gets called from FWP()->display->front_scripts(), when we finally - * know which shortcodes are on the page. - * - * Since we already got the template HTML on the first process_preload_data() call, - * this time we're grabbing everything but the template. - * - * The return value of this method gets passed into the 2nd argument of - * process_preload_data(). - */ - function process_preload_overrides( $items ) { - $overrides = []; - $url_vars = FWP()->request->url_vars; - - foreach ( $items['facets'] as $name ) { - $overrides['facets'][] = [ - 'facet_name' => $name, - 'selected_values' => $url_vars[ $name ] ?? [], - ]; - } - - if ( isset( $items['extras']['counts'] ) ) { - $overrides['extras']['counts'] = true; - } - if ( isset( $items['extras']['pager'] ) ) { - $overrides['extras']['pager'] = true; - } - if ( isset( $items['extras']['per_page'] ) ) { - $overrides['extras']['per_page'] = $url_vars['per_page'] ?? 'default'; - } - if ( isset( $items['extras']['sort'] ) ) { - $overrides['extras']['sort'] = $url_vars['sort'] ?? 'default'; - } - - $overrides['soft_refresh'] = 0; // load the facets - $overrides['first_load'] = 1; // skip the template - - return $overrides; - } - - - /** - * Inject the page HTML into the JSON response - * We'll cherry-pick the content from the HTML using front.js - */ - function inject_template() { - $html = ob_get_clean(); - - // Throw an error - if ( empty( $this->output['settings'] ) ) { - $html = __( 'FacetWP was unable to auto-detect the post listing', 'fwp' ); - } - // Grab the contents - else { - preg_match( "/(.*?)<\/body>/s", $html, $matches ); - - if ( ! empty( $matches ) ) { - $html = trim( $matches[2] ); - } - } - - $this->output['template'] = $html; - do_action( 'facetwp_inject_template', $this->output ); - wp_send_json( $this->output ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-settings.php b/wp/wp-content/plugins/facetwp/includes/class-settings.php deleted file mode 100644 index 3ca509ad..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-settings.php +++ /dev/null @@ -1,646 +0,0 @@ - [ - 'label' => __( 'General', 'fwp' ), - 'fields' => [ - 'license_key' => [ - 'label' => __( 'License key', 'fwp' ), - 'html' => $this->get_setting_html( 'license_key' ) - ], - 'gmaps_api_key' => [ - 'label' => __( 'Google Maps API key', 'fwp' ), - 'html' => $this->get_setting_html( 'gmaps_api_key' ) - ], - 'separators' => [ - 'label' => __( 'Separators', 'fwp' ), - 'notes' => 'Enter the thousands and decimal separators, respectively', - 'html' => $this->get_setting_html( 'separators' ) - ], - 'prefix' => [ - 'label' => __( 'URL prefix', 'fwp' ), - 'html' => $this->get_setting_html( 'prefix', 'dropdown', [ - 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ] - ]) - ], - 'load_jquery' => [ - 'label' => __( 'Load jQuery', 'fwp' ), - 'notes' => 'FacetWP no longer requires jQuery, but enable if needed', - 'html' => $this->get_setting_html( 'load_jquery', 'toggle', [ - 'true_value' => 'yes', - 'false_value' => 'no' - ]) - ], - 'load_a11y' => [ - 'label' => __( 'Load a11y support', 'fwp' ), - 'notes' => 'Improved accessibility for users with disabilities', - 'html' => $this->get_setting_html( 'load_a11y', 'toggle', [ - 'true_value' => 'yes', - 'false_value' => 'no' - ]) - ], - 'strict_query_detection' => [ - 'label' => __( 'Strict query detection', 'fwp' ), - 'notes' => 'Enable if FacetWP auto-detects the wrong archive query', - 'html' => $this->get_setting_html( 'strict_query_detection', 'toggle', [ - 'true_value' => 'yes', - 'false_value' => 'no' - ]) - ], - 'debug_mode' => [ - 'label' => __( 'Debug mode', 'fwp' ), - 'notes' => 'After enabling, type "FWP.settings.debug" into the browser console on your front-end facet page', - 'html' => $this->get_setting_html( 'debug_mode', 'toggle', [ - 'true_value' => 'on', - 'false_value' => 'off' - ]) - ] - ] - ], - 'woocommerce' => [ - 'label' => __( 'WooCommerce', 'fwp' ), - 'fields' => [ - 'wc_enable_variations' => [ - 'label' => __( 'Support product variations?', 'fwp' ), - 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ), - 'html' => $this->get_setting_html( 'wc_enable_variations', 'toggle' ) - ], - 'wc_index_all' => [ - 'label' => __( 'Index out-of-stock products?', 'fwp' ), - 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ), - 'html' => $this->get_setting_html( 'wc_index_all', 'toggle' ) - ] - ] - ], - 'backup' => [ - 'label' => __( 'Import / Export', 'fwp' ), - 'fields' => [ - 'export' => [ - 'label' => __( 'Export', 'fwp' ), - 'html' => $this->get_setting_html( 'export' ) - ], - 'import' => [ - 'label' => __( 'Import', 'fwp' ), - 'html' => $this->get_setting_html( 'import' ) - ] - ] - ] - ]; - - if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - unset( $defaults['woocommerce'] ); - } - - if ( '_' == FWP()->helper->settings['settings']['prefix'] ) { - unset( $defaults['general']['fields']['prefix'] ); - } - - return apply_filters( 'facetwp_settings_admin', $defaults, $this ); - } - - - /** - * All facet admin fields - * @since 3.9 - */ - function get_registered_facet_fields() { - $settings = [ - 'label_any' => [ - 'label' => __( 'Default label', 'fwp' ), - 'notes' => 'Customize the "Any" label', - 'default' => __( 'Any', 'fwp' ) - ], - 'placeholder' => [ - 'label' => __( 'Placeholder text', 'fwp' ) - ], - 'parent_term' => [ - 'label' => __( 'Parent term', 'fwp' ), - 'notes' => 'To show only child terms, enter the parent term ID. Otherwise, leave blank.', - 'show' => "facet.source.substr(0, 3) == 'tax'" - ], - 'hierarchical' => [ - 'type' => 'toggle', - 'label' => __( 'Hierarchical', 'fwp' ), - 'notes' => 'Is this a hierarchical taxonomy?', - 'show' => "facet.source.substr(0, 3) == 'tax'" - ], - 'show_expanded' => [ - 'type' => 'toggle', - 'label' => __( 'Show expanded', 'fwp' ), - 'notes' => 'Should child terms be visible by default?', - 'show' => "facet.hierarchical == 'yes'" - ], - 'multiple' => [ - 'type' => 'toggle', - 'label' => __( 'Multi-select', 'fwp' ), - 'notes' => 'Allow multiple selections?' - ], - 'ghosts' => [ - 'type' => 'alias', - 'items' => [ - 'ghosts' => [ - 'type' => 'toggle', - 'label' => __( 'Show ghosts', 'fwp' ), - 'notes' => 'Show choices that would return zero results?' - ], - 'preserve_ghosts' => [ - 'type' => 'toggle', - 'label' => __( 'Preserve ghost order', 'fwp' ), - 'notes' => 'Keep ghost choices in the same order?', - 'show' => "facet.ghosts == 'yes'" - ] - ] - ], - 'modifiers' => [ - 'type' => 'alias', - 'items' => [ - 'modifier_type' => [ - 'type' => 'select', - 'label' => __( 'Value modifiers', 'fwp' ), - 'notes' => 'Include or exclude certain values?', - 'choices' => [ - 'off' => __( 'Off', 'fwp' ), - 'exclude' => __( 'Exclude these values', 'fwp' ), - 'include' => __( 'Show only these values', 'fwp' ) - ] - ], - 'modifier_values' => [ - 'type' => 'textarea', - 'label' => '', - 'placeholder' => 'Add one value per line', - 'show' => "facet.modifier_type != 'off'" - ] - ] - ], - 'operator' => [ - 'type' => 'select', - 'label' => __( 'Facet logic', 'fwp' ), - 'notes' => 'How should multiple selections affect the results?', - 'choices' => [ - 'and' => __( 'AND (match all)', 'fwp' ), - 'or' => __( 'OR (match any)', 'fwp' ) - ] - ], - 'orderby' => [ - 'type' => 'select', - 'label' => __( 'Sort by', 'fwp' ), - 'choices' => [ - 'count' => __( 'Highest count', 'fwp' ), - 'display_value' => __( 'Display value', 'fwp' ), - 'raw_value' => __( 'Raw value', 'fwp' ), - 'term_order' => __( 'Term order', 'fwp' ) - ] - ], - 'count' => [ - 'label' => __( 'Count', 'fwp' ), - 'notes' => 'The maximum number of choices to show (-1 for no limit)', - 'default' => 10 - ], - 'soft_limit' => [ - 'label' => __( 'Soft limit', 'fwp' ), - 'notes' => 'Show a toggle link after this many choices', - 'default' => 5, - 'show' => "facet.hierarchical != 'yes'" - ], - 'source_other' => [ - 'label' => __( 'Other data source', 'fwp' ), - 'notes' => 'Use a separate value for the upper limit?', - 'html' => '' - ], - 'compare_type' => [ - 'type' => 'select', - 'label' => __( 'Compare type', 'fwp' ), - 'notes' => "Basic - entered range surrounds the post's range
    Enclose - entered range is fully inside the post's range
    Intersect - entered range overlaps the post's range

    When in doubt, choose Basic", - 'choices' => [ - '' => __( 'Basic', 'fwp' ), - 'enclose' => __( 'Enclose', 'fwp' ), - 'intersect' => __( 'Intersect', 'fwp' ) - ] - ], - 'ui_type' => [ - 'label' => __( 'UI type', 'fwp' ), - 'html' => '' - ], - 'reset_text' => [ - 'label' => __( 'Reset text', 'fwp' ), - 'default' => 'Reset' - ] - ]; - - foreach ( FWP()->helper->facet_types as $name => $obj ) { - if ( method_exists( $obj, 'register_fields' ) ) { - $settings = array_merge( $settings, $obj->register_fields() ); - } - } - - return $settings; - } - - - /** - * Return HTML for a single facet field (supports aliases) - * @since 3.9 - */ - function get_facet_field_html( $name ) { - ob_start(); - - $fields = FWP()->settings->get_registered_facet_fields(); - - if ( isset( $fields[ $name ] ) ) { - $field = $fields[ $name ]; - - if ( isset( $field['type'] ) && 'alias' == $field['type'] ) { - foreach ( $field['items'] as $k => $v ) { - $v['name'] = $k; - $this->render_facet_field( $v ); - } - } - else { - $field['name'] = $name; - $this->render_facet_field( $field ); - } - } - - return ob_get_clean(); - } - - - /** - * Render a facet field - * @since 3.9 - */ - function render_facet_field( $field ) { - $name = str_replace( '_', '-', $field['name'] ); - $type = $field['type'] ?? 'text'; - $placeholder = $field['placeholder'] ?? ''; - $show = isset( $field['show'] ) ? ' v-show="' . $field['show'] . '"' : ''; - $default = isset( $field['default'] ) ? ' value="' . $field['default'] . '"' : ''; - $label = empty( $field['label'] ) ? '' : $field['label']; - - if ( isset( $field['notes'] ) ) { - $label = '
    ' . $label . '
    ' . $field['notes'] . '
    '; - } - - ob_start(); - - if ( isset( $field['html'] ) ) { - echo $field['html']; - } - elseif ( 'text' == $type ) { -?> - /> - - - - - - - -
    > -
    -
    -
    - - - /> -
    -
    get_activation_status(); ?>
    - - - - - - - - - Thousands: -   - Decimal: - - - - - -
    - -
    - - - -
    -
    -
    -
    -
    - - - - - - - - - -helper->settings; - - foreach ( $settings['facets'] as $facet ) { - $export['facet-' . $facet['name']] = 'Facet - ' . $facet['label']; - } - - foreach ( $settings['templates'] as $template ) { - $export['template-' . $template['name']] = 'Template - '. $template['label']; - } - - return $export; - } - - - /** - * Get the activation status - * @since 3.0.0 - */ - function get_activation_status() { - $message = __( 'Not yet activated', 'fwp' ); - $status = FWP()->helper->get_license_meta( 'status' ); - - if ( false !== $status ) { - if ( 'success' == $status ) { - $expiration = FWP()->helper->get_license_meta( 'expiration' ); - $expiration = date( 'M j, Y', strtotime( $expiration ) ); - $message = __( 'Valid until', 'fwp' ) . ' ' . $expiration; - } - else { - $message = FWP()->helper->get_license_meta( 'message' ); - } - } - - return $message; - } - - - /** - * Load i18n admin strings - * @since 3.2.0 - */ - function get_i18n_strings() { - return [ - 'Number of grid columns' => __( 'Number of grid columns', 'fwp' ), - 'Spacing between results' => __( 'Spacing between results', 'fwp' ), - 'No results text' => __( 'No results text', 'fwp' ), - 'Text style' => __( 'Text style', 'fwp' ), - 'Text color' => __( 'Text color', 'fwp' ), - 'Font size' => __( 'Font size', 'fwp' ), - 'Background color' => __( 'Background color', 'fwp' ), - 'Border' => __( 'Border', 'fwp' ), - 'Border style' => __( 'Border style', 'fwp' ), - 'None' => __( 'None', 'fwp' ), - 'Solid' => __( 'Solid', 'fwp' ), - 'Dashed' => __( 'Dashed', 'fwp' ), - 'Dotted' => __( 'Dotted', 'fwp' ), - 'Double' => __( 'Double', 'fwp' ), - 'Border color' => __( 'Border color', 'fwp' ), - 'Border width' => __( 'Border width', 'fwp' ), - 'Button text' => __( 'Button text', 'fwp' ), - 'Button text color' => __( 'Button text color', 'fwp' ), - 'Button padding' => __( 'Button padding', 'fwp' ), - 'Separator' => __( 'Separator', 'fwp' ), - 'Custom CSS' => __( 'Custom CSS', 'fwp' ), - 'Column widths' => __( 'Column widths', 'fwp' ), - 'Content' => __( 'Content', 'fwp' ), - 'Image size' => __( 'Image size', 'fwp' ), - 'Author field' => __( 'Author field', 'fwp' ), - 'Display name' => __( 'Display name', 'fwp' ), - 'User login' => __( 'User login', 'fwp' ), - 'User ID' => __( 'User ID', 'fwp' ), - 'Field type' => __( 'Field type', 'fwp' ), - 'Text' => __( 'Text', 'fwp' ), - 'Date' => __( 'Date', 'fwp' ), - 'Number' => __( 'Number', 'fwp' ), - 'Date format' => __( 'Date format', 'fwp' ), - 'Input format' => __( 'Input format', 'fwp' ), - 'Number format' => __( 'Number format', 'fwp' ), - 'Link' => __( 'Link', 'fwp' ), - 'Link type' => __( 'Link type', 'fwp' ), - 'Post URL' => __( 'Post URL', 'fwp' ), - 'Custom URL' => __( 'Custom URL', 'fwp' ), - 'Open in new tab?' => __( 'Open in new tab?', 'fwp' ), - 'Prefix' => __( 'Prefix', 'fwp' ), - 'Suffix' => __( 'Suffix', 'fwp' ), - 'Hide item?' => __( 'Hide item?', 'fwp' ), - 'Padding' => __( 'Padding', 'fwp' ), - 'CSS class' => __( 'CSS class', 'fwp' ), - 'Button Border' => __( 'Button border', 'fwp' ), - 'Term URL' => __( 'Term URL', 'fwp' ), - 'Fetch' => __( 'Fetch', 'fwp' ), - 'All post types' => __( 'All post types', 'fwp' ), - 'and show' => __( 'and show', 'fwp' ), - 'per page' => __( 'per page', 'fwp' ), - 'Sort by' => __( 'Sort by', 'fwp' ), - 'Posts' => __( 'Posts', 'fwp' ), - 'Post Title' => __( 'Post Title', 'fwp' ), - 'Post Name' => __( 'Post Name', 'fwp' ), - 'Post Type' => __( 'Post Type', 'fwp' ), - 'Post Date' => __( 'Post Date', 'fwp' ), - 'Post Modified' => __( 'Post Modified', 'fwp' ), - 'Comment Count' => __( 'Comment Count', 'fwp' ), - 'Menu Order' => __( 'Menu Order', 'fwp' ), - 'Custom Fields' => __( 'Custom Fields', 'fwp' ), - 'Narrow results by' => __( 'Narrow results by', 'fwp' ), - 'Hit Enter' => __( 'Hit Enter', 'fwp' ), - 'Add query sort' => __( 'Add query sort', 'fwp' ), - 'Add query filter' => __( 'Add query filter', 'fwp' ), - 'Clear' => __( 'Clear', 'fwp' ), - 'Enter term slugs' => __( 'Enter term slugs', 'fwp' ), - 'Enter values' => __( 'Enter values', 'fwp' ), - 'Layout' => __( 'Layout', 'fwp' ), - 'Content' => __( 'Content', 'fwp' ), - 'Style' => __( 'Style', 'fwp' ), - 'Row' => __( 'Row', 'fwp' ), - 'Column' => __( 'Column', 'fwp' ), - 'Start typing' => __( 'Start typing', 'fwp' ), - 'Label' => __( 'Label', 'fwp' ), - 'Unique name' => __( 'Unique name', 'fwp' ), - 'Facet type' => __( 'Facet type', 'fwp' ), - 'Copy shortcode' => __( 'Copy shortcode', 'fwp' ), - 'Data source' => __( 'Data source', 'fwp' ), - 'Switch to advanced mode' => __( 'Switch to advanced mode', 'fwp' ), - 'Switch to visual mode' => __( 'Switch to visual mode', 'fwp' ), - 'Display' => __( 'Display', 'fwp' ), - 'Query' => __( 'Query', 'fwp' ), - 'Help' => __( 'Help', 'fwp' ), - 'Display Code' => __( 'Display Code', 'fwp' ), - 'Query Arguments' => __( 'Query Arguments', 'fwp' ), - 'Saving' => __( 'Saving', 'fwp' ), - 'Indexing' => __( 'Indexing', 'fwp' ), - 'The index table is empty' => __( 'The index table is empty', 'fwp' ), - 'Indexing complete' => __( 'Indexing complete', 'fwp' ), - 'Looking' => __( 'Looking', 'fwp' ), - 'Purging' => __( 'Purging', 'fwp' ), - 'Copied!' => __( 'Copied!', 'fwp' ), - 'Press CTRL+C to copy' => __( 'Press CTRL+C to copy', 'fwp' ), - 'Activating' => __( 'Activating', 'fwp' ), - 'Re-index' => __( 'Re-index', 'fwp' ), - 'Stop indexer' => __( 'Stop indexer', 'fwp' ), - 'Loading' => __( 'Loading', 'fwp' ), - 'Importing' => __( 'Importing', 'fwp' ), - 'Convert to query args' => __( 'Convert to query args', 'fwp' ) - ]; - } - - - /** - * Get available image sizes - * @since 3.2.7 - */ - function get_image_sizes() { - global $_wp_additional_image_sizes; - - $sizes = []; - - $default_sizes = [ 'thumbnail', 'medium', 'medium_large', 'large', 'full' ]; - - foreach ( get_intermediate_image_sizes() as $size ) { - if ( in_array( $size, $default_sizes ) ) { - $sizes[ $size ]['width'] = (int) get_option( "{$size}_size_w" ); - $sizes[ $size ]['height'] = (int) get_option( "{$size}_size_h" ); - } - elseif ( isset( $_wp_additional_image_sizes[ $size ] ) ) { - $sizes[ $size ] = $_wp_additional_image_sizes[ $size ]; - } - } - - return $sizes; - } - - - /** - * Return an array of formatted image sizes - * @since 3.2.7 - */ - function get_image_size_labels() { - $labels = []; - $sizes = $this->get_image_sizes(); - - foreach ( $sizes as $size => $data ) { - $height = ( 0 === $data['height'] ) ? 'w' : 'x' . $data['height']; - $label = $size . ' (' . $data['width'] . $height . ')'; - $labels[ $size ] = $label; - } - - $labels['full'] = __( 'full', 'fwp' ); - - return $labels; - } - - - /** - * Create SVG images (based on Font Awesome) - * @license https://fontawesome.com/license/free CC BY 4.0 - * @since 3.6.5 - */ - function get_svg() { - $output = []; - - $icons = [ - // [viewBox width, viewBox height, icon width, svg data] - "align-center" => [448, 512, 14, "M432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM108.1 96h231.81A12.09 12.09 0 0 0 352 83.9V44.09A12.09 12.09 0 0 0 339.91 32H108.1A12.09 12.09 0 0 0 96 44.09V83.9A12.1 12.1 0 0 0 108.1 96zm231.81 256A12.09 12.09 0 0 0 352 339.9v-39.81A12.09 12.09 0 0 0 339.91 288H108.1A12.09 12.09 0 0 0 96 300.09v39.81a12.1 12.1 0 0 0 12.1 12.1z"], - "align-left" => [448, 512, 14, "M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"], - "align-right" => [448, 512, 14, "M16 224h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm416 192H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm3.17-384H172.83A12.82 12.82 0 0 0 160 44.83v38.34A12.82 12.82 0 0 0 172.83 96h262.34A12.82 12.82 0 0 0 448 83.17V44.83A12.82 12.82 0 0 0 435.17 32zm0 256H172.83A12.82 12.82 0 0 0 160 300.83v38.34A12.82 12.82 0 0 0 172.83 352h262.34A12.82 12.82 0 0 0 448 339.17v-38.34A12.82 12.82 0 0 0 435.17 288z"], - "arrow-circle-up" => [512, 512, 16, "M8 256C8 119 119 8 256 8s248 111 248 248-111 248-248 248S8 393 8 256zm143.6 28.9l72.4-75.5V392c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V209.4l72.4 75.5c9.3 9.7 24.8 9.9 34.3.4l10.9-11c9.4-9.4 9.4-24.6 0-33.9L273 107.7c-9.4-9.4-24.6-9.4-33.9 0L106.3 240.4c-9.4 9.4-9.4 24.6 0 33.9l10.9 11c9.6 9.5 25.1 9.3 34.4-.4z"], - "bold" => [384, 512, 12, "M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z"], - "caret-down" => [320, 512, 10, "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"], - "cog" => [512, 512, 16, "M487.4 315.7l-42.6-24.6c4.3-23.2 4.3-47 0-70.2l42.6-24.6c4.9-2.8 7.1-8.6 5.5-14-11.1-35.6-30-67.8-54.7-94.6-3.8-4.1-10-5.1-14.8-2.3L380.8 110c-17.9-15.4-38.5-27.3-60.8-35.1V25.8c0-5.6-3.9-10.5-9.4-11.7-36.7-8.2-74.3-7.8-109.2 0-5.5 1.2-9.4 6.1-9.4 11.7V75c-22.2 7.9-42.8 19.8-60.8 35.1L88.7 85.5c-4.9-2.8-11-1.9-14.8 2.3-24.7 26.7-43.6 58.9-54.7 94.6-1.7 5.4.6 11.2 5.5 14L67.3 221c-4.3 23.2-4.3 47 0 70.2l-42.6 24.6c-4.9 2.8-7.1 8.6-5.5 14 11.1 35.6 30 67.8 54.7 94.6 3.8 4.1 10 5.1 14.8 2.3l42.6-24.6c17.9 15.4 38.5 27.3 60.8 35.1v49.2c0 5.6 3.9 10.5 9.4 11.7 36.7 8.2 74.3 7.8 109.2 0 5.5-1.2 9.4-6.1 9.4-11.7v-49.2c22.2-7.9 42.8-19.8 60.8-35.1l42.6 24.6c4.9 2.8 11 1.9 14.8-2.3 24.7-26.7 43.6-58.9 54.7-94.6 1.5-5.5-.7-11.3-5.6-14.1zM256 336c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"], - "columns" => [512, 512, 16, "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"], - "eye-slash" => [640, 512, 20, "M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"], - "italic" => [320, 512, 10, "M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z"], - "lock" => [448, 512, 14, "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"], - "lock-open" => [576, 512, 18, "M423.5 0C339.5.3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z"], - "minus-circle" => [512, 512, 16, "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"], - "plus" => [448, 512, 14, "M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"], - "plus-circle" => [512, 512, 16, "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"], - "times" => [352, 512, 11, "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"] - ]; - - foreach ( $icons as $name => $attr ) { - $svg = ''; - $search = [ '{name}', '{w}', '{h}', '{faw}', '{d}' ]; - $replace = [ $name, $attr[0], $attr[1], $attr[2], $attr[3] ]; - $output[ $name ] = str_replace( $search, $replace, $svg ); - } - - return $output; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/class-updater.php b/wp/wp-content/plugins/facetwp/includes/class-updater.php deleted file mode 100644 index cd1483b3..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-updater.php +++ /dev/null @@ -1,183 +0,0 @@ - path - } - else { - $active_plugins = get_option( 'active_plugins', [] ); - } - - foreach ( $active_plugins as $plugin_path ) { - if ( is_multisite() ) { - $plugin_path = str_replace( WP_PLUGIN_DIR, '', $plugin_path ); - } - - if ( isset( $plugins[ $plugin_path ] ) ) { - $info = $plugins[ $plugin_path ]; - $slug = trim( dirname( $plugin_path ), '/' ); - - // only intercept FacetWP and its add-ons - $is_valid = in_array( $slug, [ 'facetwp', 'user-post-type' ] ); - $is_valid = ( 0 === strpos( $slug, 'facetwp-' ) ) ? true : $is_valid; - - if ( $is_valid ) { - $output[ $slug ] = [ - 'name' => $info['Name'], - 'version' => $info['Version'], - 'description' => $info['Description'], - 'plugin_path' => $plugin_path, - ]; - } - } - } - - return $output; - } - - - /** - * Handle the "View Details" popup - * - * $args->slug = "facetwp-flyout" - * plugin_path = "facetwp-flyout/facetwp-flyout.php" - */ - function plugins_api( $result, $action, $args ) { - if ( 'plugin_information' == $action ) { - $slug = $args->slug; - $to_check = $this->get_plugins_to_check(); - - $response = get_option( 'facetwp_updater_response', '' ); - $response = json_decode( $response, true ); - - if ( isset( $to_check[ $slug ] ) && isset( $response[ $slug ] ) ) { - $local_data = $to_check[ $slug ]; - $remote_data = $response[ $slug ]; - - return (object) [ - 'name' => $local_data['name'], - 'slug' => $local_data['plugin_path'], - 'version' => $remote_data['version'], - 'last_updated' => $remote_data['last_updated'], - 'download_link' => $remote_data['package'], - 'sections' => [ - 'description' => $local_data['description'], - 'changelog' => $remote_data['sections']['changelog'] - ], - 'homepage' => 'https://facetwp.com/', - 'rating' => 100, - 'num_ratings' => 1 - ]; - } - } - - return $result; - } - - - /** - * Grab (and cache) plugin update data - */ - function check_update( $transient ) { - if ( empty( $transient->checked ) ) { - return $transient; - } - - $now = strtotime( 'now' ); - $response = get_option( 'facetwp_updater_response', '' ); - $ts = (int) get_option( 'facetwp_updater_last_checked' ); - $plugins = $this->get_plugins_to_check(); - - if ( empty( $response ) || $ts + 14400 < $now ) { - - $request = wp_remote_post( 'https://api.facetwp.com', [ - 'body' => [ - 'action' => 'check_plugins', - 'slugs' => array_keys( $plugins ), - 'license' => FWP()->helper->get_license_key(), - 'host' => FWP()->helper->get_http_host(), - 'wp_v' => get_bloginfo( 'version' ), - 'fwp_v' => FACETWP_VERSION, - 'php_v' => phpversion(), - ] - ] ); - - if ( ! is_wp_error( $request ) || 200 == wp_remote_retrieve_response_code( $request ) ) { - $body = json_decode( $request['body'], true ); - $activation = json_encode( $body['activation'] ); - $response = json_encode( $body['slugs'] ); - } - - update_option( 'facetwp_activation', $activation ); - update_option( 'facetwp_updater_response', $response, 'no' ); - update_option( 'facetwp_updater_last_checked', $now, 'no' ); - } - - if ( ! empty( $response ) ) { - $response = json_decode( $response, true ); - - foreach ( $response as $slug => $info ) { - if ( isset( $plugins[ $slug ] ) ) { - $plugin_path = $plugins[ $slug ]['plugin_path']; - $response_obj = (object) [ - 'slug' => $slug, - 'plugin' => $plugin_path, - 'new_version' => $info['version'], - 'package' => $info['package'], - 'requires' => $info['requires'], - 'tested' => $info['tested'] - ]; - - if ( version_compare( $plugins[ $slug ]['version'], $info['version'], '<' ) ) { - $transient->response[ $plugin_path ] = $response_obj; - } - else { - $transient->no_update[ $plugin_path ] = $response_obj; - } - } - } - } - - return $transient; - } - - - /** - * Display a license reminder on the plugin list screen - */ - function in_plugin_update_message( $plugin_data, $response ) { - if ( ! FWP()->helper->is_license_active() ) { - $price_id = (int) FWP()->helper->get_license_meta( 'price_id' ); - $license = FWP()->helper->get_license_key(); - - if ( 0 < $price_id ) { - echo '
    ' . sprintf( - __( 'Please renew your license for automatic updates.', 'fwp' ), - esc_url( "https://facetwp.com/checkout/?edd_action=add_to_cart&download_id=24&edd_options[price_id]=$price_id&discount=$license" ) - ); - } - else { - echo '
    ' . __( 'Please activate your FacetWP license for automatic updates.', 'fwp' ); - } - } - } -} - -new FacetWP_Updater(); diff --git a/wp/wp-content/plugins/facetwp/includes/class-upgrade.php b/wp/wp-content/plugins/facetwp/includes/class-upgrade.php deleted file mode 100644 index bf5c1ee6..00000000 --- a/wp/wp-content/plugins/facetwp/includes/class-upgrade.php +++ /dev/null @@ -1,106 +0,0 @@ -version = FACETWP_VERSION; - $this->last_version = get_option( 'facetwp_version' ); - - if ( version_compare( $this->last_version, $this->version, '<' ) ) { - if ( version_compare( $this->last_version, '0.1.0', '<' ) ) { - require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); - $this->clean_install(); - } - else { - $this->run_upgrade(); - } - - update_option( 'facetwp_version', $this->version ); - } - } - - - private function clean_install() { - global $wpdb; - - $int = apply_filters( 'facetwp_use_bigint', false ) ? 'BIGINT' : 'INT'; - - $charset_collate = $wpdb->get_charset_collate(); - - $sql = " - CREATE TABLE IF NOT EXISTS {$wpdb->prefix}facetwp_index ( - id BIGINT unsigned not null auto_increment, - post_id $int unsigned, - facet_name VARCHAR(50), - facet_value VARCHAR(50), - facet_display_value VARCHAR(200), - term_id $int unsigned default '0', - parent_id $int unsigned default '0', - depth INT unsigned default '0', - variation_id $int unsigned default '0', - PRIMARY KEY (id), - INDEX post_id_idx (post_id), - INDEX facet_name_idx (facet_name), - INDEX facet_name_value_idx (facet_name, facet_value) - ) $charset_collate"; - dbDelta( $sql ); - - // Add default settings - $settings = file_get_contents( FACETWP_DIR . '/assets/js/src/sample.json' ); - add_option( 'facetwp_settings', $settings ); - } - - - private function run_upgrade() { - global $wpdb; - - $table = sanitize_key( $wpdb->prefix . 'facetwp_index' ); - - if ( version_compare( $this->last_version, '3.1.0', '<' ) ) { - $wpdb->query( "ALTER TABLE $table MODIFY facet_name VARCHAR(50)" ); - $wpdb->query( "ALTER TABLE $table MODIFY facet_value VARCHAR(50)" ); - $wpdb->query( "ALTER TABLE $table MODIFY facet_display_value VARCHAR(200)" ); - $wpdb->query( "CREATE INDEX facet_name_value_idx ON $table (facet_name, facet_value)" ); - } - - if ( version_compare( $this->last_version, '3.3.2', '<' ) ) { - $wpdb->query( "CREATE INDEX post_id_idx ON $table (post_id)" ); - $wpdb->query( "DROP INDEX facet_source_idx ON $table" ); - $wpdb->query( "ALTER TABLE $table DROP COLUMN facet_source" ); - } - - if ( version_compare( $this->last_version, '3.3.3', '<' ) ) { - if ( function_exists( 'SWP' ) ) { - $engines = array_keys( SWP()->settings['engines'] ); - $settings = get_option( 'facetwp_settings' ); - $settings = json_decode( $settings, true ); - - foreach ( $settings['facets'] as $key => $facet ) { - if ( 'search' == $facet['type'] ) { - if ( in_array( $facet['search_engine'], $engines ) ) { - $settings['facets'][ $key ]['search_engine'] = 'swp_' . $facet['search_engine']; - } - } - } - - update_option( 'facetwp_settings', json_encode( $settings ) ); - } - } - - if ( version_compare( $this->last_version, '3.5.3', '<' ) ) { - update_option( 'facetwp_updater_response', '', 'no' ); - update_option( 'facetwp_updater_last_checked', '', 'no' ); - } - - if ( version_compare( $this->last_version, '3.5.4', '<' ) ) { - $settings = get_option( 'facetwp_settings' ); - $settings = json_decode( $settings, true ); - - if ( ! isset( $settings['settings']['prefix'] ) ) { - $settings['settings']['prefix'] = 'fwp_'; - - update_option( 'facetwp_settings', json_encode( $settings ) ); - } - } - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/autocomplete.php b/wp/wp-content/plugins/facetwp/includes/facets/autocomplete.php deleted file mode 100644 index a03774d5..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/autocomplete.php +++ /dev/null @@ -1,163 +0,0 @@ -label = __( 'Autocomplete', 'fwp' ); - $this->fields = [ 'placeholder' ]; - - // ajax - add_action( 'facetwp_autocomplete_load', [ $this, 'ajax_load' ] ); - - // css-based template - add_action( 'facetwp_init', [ $this, 'maybe_buffer_output' ] ); - add_action( 'facetwp_found_main_query', [ $this, 'template_handler' ] ); - - // result limit - $this->limit = (int) apply_filters( 'facetwp_facet_autocomplete_limit', 10 ); - } - - - /** - * For page templates with a custom WP_Query, we need to prevent the - * page header from being output with the autocomplete JSON - */ - function maybe_buffer_output() { - if ( isset( $_POST['action'] ) && 'facetwp_autocomplete_load' == $_POST['action'] ) { - $this->is_buffering = true; - ob_start(); - } - } - - - /** - * For CSS-based templates, the "facetwp_autocomplete_load" action isn't fired - * so we need to manually check the action - */ - function template_handler() { - if ( isset( $_POST['action'] ) && 'facetwp_autocomplete_load' == $_POST['action'] ) { - if ( $this->is_buffering ) { - while ( ob_get_level() ) { - ob_end_clean(); - } - } - $this->ajax_load(); - } - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $value = (array) $params['selected_values']; - $value = empty( $value ) ? '' : stripslashes( $value[0] ); - $placeholder = empty( $facet['placeholder'] ) ? __( 'Start typing', 'fwp-front' ) : $facet['placeholder']; - $placeholder = facetwp_i18n( $placeholder ); - $output .= ''; - $output .= ''; - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - global $wpdb; - - $facet = $params['facet']; - $selected_values = $params['selected_values']; - $selected_values = is_array( $selected_values ) ? $selected_values[0] : $selected_values; - $selected_values = stripslashes( $selected_values ); - - if ( empty( $selected_values ) ) { - return 'continue'; - } - - $sql = " - SELECT DISTINCT post_id FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = %s AND facet_display_value LIKE %s"; - - $sql = $wpdb->prepare( $sql, $facet['name'], '%' . $selected_values . '%' ); - return facetwp_sql( $sql, $facet ); - } - - - /** - * Output any front-end scripts - */ - function front_scripts() { - FWP()->display->json['no_results'] = __( 'No results', 'fwp-front' ); - FWP()->display->assets['fComplete.js'] = FACETWP_URL . '/assets/vendor/fComplete/fComplete.js'; - FWP()->display->assets['fComplete.css'] = FACETWP_URL . '/assets/vendor/fComplete/fComplete.css'; - } - - - /** - * Load facet values via AJAX - */ - function ajax_load() { - global $wpdb; - - // optimizations - $_POST['data']['soft_refresh'] = 1; - $_POST['data']['extras'] = []; - - $query = stripslashes( $_POST['query'] ); - $query = FWP()->helper->sanitize( $wpdb->esc_like( $query ) ); - $facet_name = FWP()->helper->sanitize( $_POST['facet_name'] ); - $output = []; - - // simulate a refresh - FWP()->facet->render( - FWP()->request->process_post_data() - ); - - // then grab the matching post IDs - $where_clause = $this->get_where_clause( [ 'name' => $facet_name ] ); - - if ( ! empty( $query ) && ! empty( $facet_name ) ) { - $sql = " - SELECT DISTINCT facet_display_value - FROM {$wpdb->prefix}facetwp_index - WHERE - facet_name = '$facet_name' AND - facet_display_value LIKE '%$query%' - $where_clause - ORDER BY facet_display_value ASC - LIMIT $this->limit"; - - $results = $wpdb->get_results( $sql ); - - foreach ( $results as $result ) { - $output[] = [ - 'value' => $result->facet_display_value, - 'label' => $result->facet_display_value, - ]; - } - } - - wp_send_json( $output ); - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - return [ - 'loadingText' => __( 'Loading', 'fwp-front' ) . '...', - 'minCharsText' => __( 'Enter {n} or more characters', 'fwp-front' ), - 'noResultsText' => __( 'No results', 'fwp-front' ), - 'maxResults' => $this->limit - ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/base.php b/wp/wp-content/plugins/facetwp/includes/facets/base.php deleted file mode 100644 index f338708c..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/base.php +++ /dev/null @@ -1,106 +0,0 @@ - str_replace( 'tax/', '', $facet['source'] ), - 'term_order' => true, // Custom flag - 'fields' => 'ids', - ] ); - - if ( ! empty( $term_ids ) && ! is_wp_error( $term_ids ) ) { - $term_ids = implode( ',', $term_ids ); - $orderby = "FIELD(f.term_id, $term_ids)"; - } - } - - // Sort by depth - if ( FWP()->helper->facet_is( $facet, 'hierarchical', 'yes' ) ) { - $orderby = "f.depth, $orderby"; - } - - return $orderby; - } - - - /** - * Grab the limit, and support -1 - * @since 3.5.4 - */ - function get_limit( $facet, $default = 10 ) { - $count = $facet['count']; - - if ( '-1' == $count ) { - return 1000; - } - elseif ( ctype_digit( $count ) ) { - return $count; - } - - return $default; - } - - - /** - * Adjust the $where_clause for facets in "OR" mode - * - * FWP()->or_values contains EVERY facet and their matching post IDs - * FWP()->unfiltered_post_ids contains original post IDs - * - * @since 3.2.0 - */ - function get_where_clause( $facet ) { - - // Ignore the current facet's selections - if ( isset( FWP()->or_values ) && ( 1 < count( FWP()->or_values ) || ! isset( FWP()->or_values[ $facet['name'] ] ) ) ) { - $post_ids = []; - $or_values = FWP()->or_values; // Preserve original - unset( $or_values[ $facet['name'] ] ); - - $counter = 0; - foreach ( $or_values as $name => $vals ) { - $post_ids = ( 0 == $counter ) ? $vals : array_intersect( $post_ids, $vals ); - $counter++; - } - - $post_ids = array_intersect( $post_ids, FWP()->unfiltered_post_ids ); - } - else { - $post_ids = FWP()->unfiltered_post_ids; - } - - $post_ids = empty( $post_ids ) ? [ 0 ] : $post_ids; - return ' AND post_id IN (' . implode( ',', $post_ids ) . ')'; - } - - - /** - * Render some commonly used admin settings - * @since 3.5.6 - * @deprecated 3.9 - */ - function render_setting( $name ) { - echo FWP()->settings->get_facet_field_html( $name ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/checkboxes.php b/wp/wp-content/plugins/facetwp/includes/facets/checkboxes.php deleted file mode 100644 index a72ac356..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/checkboxes.php +++ /dev/null @@ -1,258 +0,0 @@ -label = __( 'Checkboxes', 'fwp' ); - $this->fields = [ 'parent_term', 'modifiers', 'hierarchical', 'show_expanded', - 'ghosts', 'operator', 'orderby', 'count', 'soft_limit' ]; - } - - - /** - * Load the available choices - */ - function load_values( $params ) { - global $wpdb; - - $facet = $params['facet']; - $from_clause = $wpdb->prefix . 'facetwp_index f'; - $where_clause = $params['where_clause']; - - // Orderby - $orderby = $this->get_orderby( $facet ); - - // Limit - $limit = $this->get_limit( $facet ); - - // Use "OR" mode when necessary - $is_single = FWP()->helper->facet_is( $facet, 'multiple', 'no' ); - $using_or = FWP()->helper->facet_is( $facet, 'operator', 'or' ); - - // Facet in "OR" mode - if ( $is_single || $using_or ) { - $where_clause = $this->get_where_clause( $facet ); - } - - $orderby = apply_filters( 'facetwp_facet_orderby', $orderby, $facet ); - $from_clause = apply_filters( 'facetwp_facet_from', $from_clause, $facet ); - $where_clause = apply_filters( 'facetwp_facet_where', $where_clause, $facet ); - - $sql = " - SELECT f.facet_value, f.facet_display_value, f.term_id, f.parent_id, f.depth, COUNT(DISTINCT f.post_id) AS counter - FROM $from_clause - WHERE f.facet_name = '{$facet['name']}' $where_clause - GROUP BY f.facet_value - ORDER BY $orderby - LIMIT $limit"; - - $output = $wpdb->get_results( $sql, ARRAY_A ); - - // Show "ghost" facet choices - // For performance gains, only run if facets are in use - $show_ghosts = FWP()->helper->facet_is( $facet, 'ghosts', 'yes' ); - - if ( $show_ghosts && FWP()->is_filtered ) { - $raw_post_ids = implode( ',', FWP()->unfiltered_post_ids ); - - $sql = " - SELECT f.facet_value, f.facet_display_value, f.term_id, f.parent_id, f.depth, 0 AS counter - FROM $from_clause - WHERE f.facet_name = '{$facet['name']}' AND post_id IN ($raw_post_ids) - GROUP BY f.facet_value - ORDER BY $orderby - LIMIT $limit"; - - $ghost_output = $wpdb->get_results( $sql, ARRAY_A ); - $tmp = []; - - $preserve_ghosts = FWP()->helper->facet_is( $facet, 'preserve_ghosts', 'yes' ); - $orderby_count = FWP()->helper->facet_is( $facet, 'orderby', 'count' ); - - // Keep the facet placement intact - if ( $preserve_ghosts && ! $orderby_count ) { - foreach ( $ghost_output as $row ) { - $tmp[ $row['facet_value'] . ' ' ] = $row; - } - - foreach ( $output as $row ) { - $tmp[ $row['facet_value'] . ' ' ] = $row; - } - - $output = $tmp; - } - else { - // Make the array key equal to the facet_value (for easy lookup) - foreach ( $output as $row ) { - $tmp[ $row['facet_value'] . ' ' ] = $row; // Force a string array key - } - - $output = $tmp; - - foreach ( $ghost_output as $row ) { - $facet_value = $row['facet_value']; - if ( ! isset( $output[ "$facet_value " ] ) ) { - $output[ "$facet_value " ] = $row; - } - } - } - - $output = array_splice( $output, 0, $limit ); - $output = array_values( $output ); - } - - return $output; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - $facet = $params['facet']; - - if ( FWP()->helper->facet_is( $facet, 'hierarchical', 'yes' ) ) { - return $this->render_hierarchy( $params ); - } - - $output = ''; - $values = (array) $params['values']; - $soft_limit = empty( $facet['soft_limit'] ) ? 0 : (int) $facet['soft_limit']; - - $key = 0; - foreach ( $values as $key => $row ) { - if ( 0 < $soft_limit && $key == $soft_limit ) { - $output .= '
    '; - } - $output .= $this->render_choice( $row, $params ); - } - - if ( 0 < $soft_limit && $soft_limit <= $key ) { - $output .= '
    '; - $output .= '' . __( 'See {num} more', 'fwp-front' ) . ''; - $output .= '' . __( 'See less', 'fwp-front' ) . ''; - } - - return $output; - } - - - /** - * Generate the facet HTML (hierarchical taxonomies) - */ - function render_hierarchy( $params ) { - - $output = ''; - $facet = $params['facet']; - $values = FWP()->helper->sort_taxonomy_values( $params['values'], $facet['orderby'] ); - - $init_depth = -1; - $last_depth = -1; - - foreach ( $values as $row ) { - $depth = (int) $row['depth']; - - if ( -1 == $last_depth ) { - $init_depth = $depth; - } - elseif ( $depth > $last_depth ) { - $output .= '
    '; - } - elseif ( $depth < $last_depth ) { - for ( $i = $last_depth; $i > $depth; $i-- ) { - $output .= '
    '; - } - } - - $output .= $this->render_choice( $row, $params ); - - $last_depth = $depth; - } - - for ( $i = $last_depth; $i > $init_depth; $i-- ) { - $output .= '
    '; - } - - return $output; - } - - - /** - * Render a single facet choice - */ - function render_choice( $row, $params ) { - $label = esc_html( $row['facet_display_value'] ); - - $output = ''; - $selected_values = (array) $params['selected_values']; - $selected = in_array( $row['facet_value'], $selected_values ) ? ' checked' : ''; - $selected .= ( '' != $row['counter'] && 0 == $row['counter'] && '' == $selected ) ? ' disabled' : ''; - $output .= '
    '; - $output .= ''; - $output .= apply_filters( 'facetwp_facet_display_value', $label, [ - 'selected' => ( '' !== $selected ), - 'facet' => $params['facet'], - 'row' => $row - ]); - $output .= ''; - $output .= '(' . $row['counter'] . ')'; - $output .= '
    '; - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - global $wpdb; - - $output = []; - $facet = $params['facet']; - $selected_values = $params['selected_values']; - - $sql = $wpdb->prepare( "SELECT DISTINCT post_id - FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = %s", - $facet['name'] - ); - - // Match ALL values - if ( 'and' == $facet['operator'] ) { - foreach ( $selected_values as $key => $value ) { - $results = facetwp_sql( $sql . " AND facet_value IN ('$value')", $facet ); - $output = ( $key > 0 ) ? array_intersect( $output, $results ) : $results; - - if ( empty( $output ) ) { - break; - } - } - } - // Match ANY value - else { - $selected_values = implode( "','", $selected_values ); - $output = facetwp_sql( $sql . " AND facet_value IN ('$selected_values')", $facet ); - } - - return $output; - } - - - /** - * Output any front-end scripts - */ - function front_scripts() { - FWP()->display->json['expand'] = '[+]'; - FWP()->display->json['collapse'] = '[-]'; - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - $expand = empty( $params['facet']['show_expanded'] ) ? 'no' : $params['facet']['show_expanded']; - return [ 'show_expanded' => $expand ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/date_range.php b/wp/wp-content/plugins/facetwp/includes/facets/date_range.php deleted file mode 100644 index e1507dfe..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/date_range.php +++ /dev/null @@ -1,292 +0,0 @@ -label = __( 'Date Range', 'fwp' ); - $this->fields = [ 'source_other', 'compare_type', 'date_fields', 'date_format' ]; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $value = $params['selected_values']; - $value = empty( $value ) ? [ '', '' ] : $value; - $fields = empty( $params['facet']['fields'] ) ? 'both' : $params['facet']['fields']; - - $text_date = facetwp_i18n( __( 'Date', 'fwp-front' ) ); - $text_start_date = facetwp_i18n( __( 'Start Date', 'fwp-front' ) ); - $text_end_date = facetwp_i18n( __( 'End Date', 'fwp-front' ) ); - - if ( 'exact' == $fields ) { - $output .= ''; - } - if ( 'both' == $fields || 'start_date' == $fields ) { - $output .= ''; - } - if ( 'both' == $fields || 'end_date' == $fields ) { - $output .= ''; - } - - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - global $wpdb; - - $facet = $params['facet']; - $values = $params['selected_values']; - $where = ''; - - $min = empty( $values[0] ) ? false : $values[0]; - $max = empty( $values[1] ) ? false : $values[1]; - - $fields = $facet['fields'] ?? 'both'; - $compare_type = empty( $facet['compare_type'] ) ? 'basic' : $facet['compare_type']; - $is_dual = ! empty( $facet['source_other'] ); - - if ( $is_dual && 'basic' != $compare_type ) { - if ( 'exact' == $fields ) { - $max = $min; - } - - $min = ( false !== $min ) ? $min : '0000-00-00'; - $max = ( false !== $max ) ? $max : '3000-12-31'; - - /** - * Enclose compare - * The post's range must surround the user-defined range - */ - if ( 'enclose' == $compare_type ) { - $where .= " AND LEFT(facet_value, 10) <= '$min'"; - $where .= " AND LEFT(facet_display_value, 10) >= '$max'"; - } - - /** - * Intersect compare - * @link http://stackoverflow.com/a/325964 - */ - if ( 'intersect' == $compare_type ) { - $where .= " AND LEFT(facet_value, 10) <= '$max'"; - $where .= " AND LEFT(facet_display_value, 10) >= '$min'"; - } - } - - /** - * Basic compare - * The user-defined range must surround the post's range - */ - else { - if ( 'exact' == $fields ) { - $max = $min; - } - if ( false !== $min ) { - $where .= " AND LEFT(facet_value, 10) >= '$min'"; - } - if ( false !== $max ) { - $where .= " AND LEFT(facet_display_value, 10) <= '$max'"; - } - } - - $sql = " - SELECT DISTINCT post_id FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = '{$facet['name']}' $where"; - return facetwp_sql( $sql, $facet ); - } - - - /** - * Output any front-end scripts - */ - function front_scripts() { - FWP()->display->assets['fDate.css'] = FACETWP_URL . '/assets/vendor/fDate/fDate.css'; - FWP()->display->assets['fDate.js'] = FACETWP_URL . '/assets/vendor/fDate/fDate.min.js'; - } - - - function register_fields() { - return [ - 'date_fields' => [ - 'type' => 'alias', - 'items' => [ - 'fields' => [ - 'type' => 'select', - 'label' => __( 'Fields to show', 'fwp' ), - 'choices' => [ - 'both' => __( 'Start + End Dates', 'fwp' ), - 'exact' => __( 'Exact Date', 'fwp' ), - 'start_date' => __( 'Start Date', 'fwp' ), - 'end_date' => __( 'End Date', 'fwp' ) - ] - ] - ] - ], - 'date_format' => [ - 'type' => 'alias', - 'items' => [ - 'format' => [ - 'label' => __( 'Display format', 'fwp' ), - 'notes' => 'See available formatting tokens', - 'placeholder' => 'Y-m-d' - ] - ] - ] - ]; - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - global $wpdb; - - $facet = $params['facet']; - $selected_values = $params['selected_values']; - $fields = empty( $facet['fields'] ) ? 'both' : $facet['fields']; - $format = empty( $facet['format'] ) ? '' : $facet['format']; - - // Use "OR" mode by excluding the facet's own selection - $where_clause = $this->get_where_clause( $facet ); - - $sql = " - SELECT MIN(facet_value) AS `minDate`, MAX(facet_display_value) AS `maxDate` FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = '{$facet['name']}' AND facet_display_value != '' $where_clause"; - $row = $wpdb->get_row( $sql ); - - $min = substr( $row->minDate, 0, 10 ); - $max = substr( $row->maxDate, 0, 10 ); - - if ( 'both' == $fields ) { - $min_upper = ! empty( $selected_values[1] ) ? $selected_values[1] : $max; - $max_lower = ! empty( $selected_values[0] ) ? $selected_values[0] : $min; - - $range = [ - 'min' => [ - 'minDate' => $min, - 'maxDate' => $min_upper - ], - 'max' => [ - 'minDate' => $max_lower, - 'maxDate' => $max - ] - ]; - } - else { - $range = [ - 'minDate' => $min, - 'maxDate' => $max - ]; - } - - return [ - 'locale' => $this->get_i18n_labels(), - 'format' => $format, - 'fields' => $fields, - 'range' => $range - ]; - } - - - function get_i18n_labels() { - $locale = get_locale(); - $locale = empty( $locale ) ? 'en' : substr( $locale, 0, 2 ); - - $locales = [ - 'ca' => [ - 'weekdays_short' => ['Dg', 'Dl', 'Dt', 'Dc', 'Dj', 'Dv', 'Ds'], - 'months_short' => ['Gen', 'Febr', 'Març', 'Abr', 'Maig', 'Juny', 'Jul', 'Ag', 'Set', 'Oct', 'Nov', 'Des'], - 'months' => ['Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'Juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre'], - 'firstDayOfWeek' => 1 - ], - 'da' => [ - 'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tors', 'fre', 'lør'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'], - 'firstDayOfWeek' => 1 - ], - 'de' => [ - 'weekdays_short' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], - 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], - 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], - 'firstDayOfWeek' => 1 - ], - 'es' => [ - 'weekdays_short' => ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'], - 'months_short' => ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'], - 'months' => ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], - 'firstDayOfWeek' => 1 - ], - 'fr' => [ - 'weekdays_short' => ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'], - 'months_short' => ['janv', 'févr', 'mars', 'avr', 'mai', 'juin', 'juil', 'août', 'sept', 'oct', 'nov', 'déc'], - 'months' => ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], - 'firstDayOfWeek' => 1 - ], - 'it' => [ - 'weekdays_short' => ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'], - 'months_short' => ['Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'], - 'months' => ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'], - 'firstDayOfWeek' => 1 - ], - 'nb' => [ - 'weekdays_short' => ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], - 'months' => ['Januar', 'Februar', 'Mars', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Desember'], - 'firstDayOfWeek' => 1 - ], - 'nl' => [ - 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sept', 'okt', 'nov', 'dec'], - 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - 'firstDayOfWeek' => 1 - ], - 'pl' => [ - 'weekdays_short' => ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], - 'months_short' => ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'], - 'months' => ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'], - 'firstDayOfWeek' => 1 - ], - 'pt' => [ - 'weekdays_short' => ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'], - 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'], - 'months' => ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'], - 'firstDayOfWeek' => 0 - ], - 'ro' => [ - 'weekdays_short' => ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], - 'months_short' => ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'], - 'months' => ['Ianuarie', 'Februarie', 'Martie', 'Aprilie', 'Mai', 'Iunie', 'Iulie', 'August', 'Septembrie', 'Octombrie', 'Noiembrie', 'Decembrie'], - 'firstDayOfWeek' => 1 - ], - 'ru' => [ - 'weekdays_short' => ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'], - 'months_short' => ['Янв', 'Фев', 'Март', 'Апр', 'Май', 'Июнь', 'Июль', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], - 'months' => ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'], - 'firstDayOfWeek' => 1 - ], - 'sv' => [ - 'weekdays_short' => ['Sön', 'Mån', 'Tis', 'Ons', 'Tor', 'Fre', 'Lör'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'], - 'months' => ['Januari', 'Februari', 'Mars', 'April', 'Maj', 'Juni', 'Juli', 'Augusti', 'September', 'Oktober', 'November', 'December'], - 'firstDayOfWeek' => 1 - ] - ]; - - if ( isset( $locales[ $locale ] ) ) { - $locales[ $locale ]['clearText'] = __( 'Clear', 'fwp-front' ); - return $locales[ $locale ]; - } - - return ''; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/dropdown.php b/wp/wp-content/plugins/facetwp/includes/facets/dropdown.php deleted file mode 100644 index 5d8b1dc1..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/dropdown.php +++ /dev/null @@ -1,73 +0,0 @@ -label = __( 'Dropdown', 'fwp' ); - $this->fields = [ 'label_any', 'parent_term', 'modifiers', 'hierarchical', 'orderby', 'count' ]; - } - - - /** - * Load the available choices - */ - function load_values( $params ) { - return FWP()->helper->facet_types['checkboxes']->load_values( $params ); - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $values = (array) $params['values']; - $selected_values = (array) $params['selected_values']; - $is_hierarchical = FWP()->helper->facet_is( $facet, 'hierarchical', 'yes' ); - - if ( $is_hierarchical ) { - $values = FWP()->helper->sort_taxonomy_values( $params['values'], $facet['orderby'] ); - } - - $label_any = empty( $facet['label_any'] ) ? __( 'Any', 'fwp-front' ) : $facet['label_any']; - $label_any = facetwp_i18n( $label_any ); - - $output .= ''; - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - return FWP()->helper->facet_types['checkboxes']->filter_posts( $params ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/fselect.php b/wp/wp-content/plugins/facetwp/includes/facets/fselect.php deleted file mode 100644 index fd530803..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/fselect.php +++ /dev/null @@ -1,100 +0,0 @@ -label = __( 'fSelect', 'fwp' ); - $this->fields = [ 'label_any', 'parent_term', 'modifiers', 'hierarchical', 'multiple', - 'ghosts', 'operator', 'orderby', 'count' ]; - } - - - /** - * Load the available choices - */ - function load_values( $params ) { - return FWP()->helper->facet_types['checkboxes']->load_values( $params ); - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $values = (array) $params['values']; - $selected_values = (array) $params['selected_values']; - $is_hierarchical = FWP()->helper->facet_is( $facet, 'hierarchical', 'yes' ); - - if ( $is_hierarchical ) { - $values = FWP()->helper->sort_taxonomy_values( $params['values'], $facet['orderby'] ); - } - - $multiple = FWP()->helper->facet_is( $facet, 'multiple', 'yes' ) ? ' multiple="multiple"' : ''; - $label_any = empty( $facet['label_any'] ) ? __( 'Any', 'fwp-front' ) : $facet['label_any']; - $label_any = facetwp_i18n( $label_any ); - - $output .= ''; - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - return FWP()->helper->facet_types['checkboxes']->filter_posts( $params ); - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - $facet = $params['facet']; - - $label_any = empty( $facet['label_any'] ) ? __( 'Any', 'fwp-front' ) : $facet['label_any']; - $label_any = facetwp_i18n( $label_any ); - - return [ - 'placeholder' => $label_any, - 'overflowText' => __( '{n} selected', 'fwp-front' ), - 'searchText' => __( 'Search', 'fwp-front' ), - 'noResultsText' => __( 'No results found', 'fwp-front' ), - 'operator' => $facet['operator'] - ]; - } - - - /** - * Output any front-end scripts - */ - function front_scripts() { - FWP()->display->assets['fSelect.css'] = FACETWP_URL . '/assets/vendor/fSelect/fSelect.css'; - FWP()->display->assets['fSelect.js'] = FACETWP_URL . '/assets/vendor/fSelect/fSelect.js'; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/hierarchy.php b/wp/wp-content/plugins/facetwp/includes/facets/hierarchy.php deleted file mode 100644 index a9ff1c49..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/hierarchy.php +++ /dev/null @@ -1,179 +0,0 @@ -label = __( 'Hierarchy', 'fwp' ); - $this->fields = [ 'label_any', 'modifiers', 'orderby', 'count' ]; - } - - - /** - * Load the available choices - */ - function load_values( $params ) { - global $wpdb; - - $facet = $params['facet']; - $from_clause = $wpdb->prefix . 'facetwp_index f'; - $where_clause = $params['where_clause']; - - $selected_values = (array) $params['selected_values']; - $facet_parent_id = 0; - $output = []; - - $label_any = empty( $facet['label_any'] ) ? __( 'Any', 'fwp-front' ) : $facet['label_any']; - $label_any = facetwp_i18n( $label_any ); - - // Orderby - $orderby = $this->get_orderby( $facet ); - - // Determine the parent_id and depth - if ( ! empty( $selected_values[0] ) ) { - - // Get term ID from slug - $sql = " - SELECT t.term_id - FROM {$wpdb->terms} t - INNER JOIN {$wpdb->term_taxonomy} tt ON tt.term_id = t.term_id AND tt.taxonomy = %s - WHERE t.slug = %s - LIMIT 1"; - - $value = $selected_values[0]; - $taxonomy = str_replace( 'tax/', '', $facet['source'] ); - $facet_parent_id = (int) $wpdb->get_var( $wpdb->prepare( $sql, $taxonomy, $value ) ); - - // Invalid term - if ( $facet_parent_id < 1 ) { - return []; - } - - // Create term lookup array - $depths = FWP()->helper->get_term_depths( $taxonomy ); - $max_depth = (int) $depths[ $facet_parent_id ]['depth']; - $last_parent_id = $facet_parent_id; - - // Loop backwards - for ( $i = 0; $i <= $max_depth; $i++ ) { - $output[] = [ - 'facet_value' => $depths[ $last_parent_id ]['slug'], - 'facet_display_value' => $depths[ $last_parent_id ]['name'], - 'depth' => $depths[ $last_parent_id ]['depth'] + 1, - 'counter' => 1, // FWP.settings.num_choices - ]; - - $last_parent_id = (int) $depths[ $last_parent_id ]['parent_id']; - } - - $output[] = [ - 'facet_value' => '', - 'facet_display_value' => $label_any, - 'depth' => 0, - 'counter' => 1, - ]; - - // Reverse it - $output = array_reverse( $output ); - } - - // Update the WHERE clause - $where_clause .= " AND parent_id = '$facet_parent_id'"; - - $orderby = apply_filters( 'facetwp_facet_orderby', $orderby, $facet ); - $from_clause = apply_filters( 'facetwp_facet_from', $from_clause, $facet ); - $where_clause = apply_filters( 'facetwp_facet_where', $where_clause, $facet ); - - $sql = " - SELECT f.facet_value, f.facet_display_value, COUNT(DISTINCT f.post_id) AS counter - FROM $from_clause - WHERE f.facet_name = '{$facet['name']}' $where_clause - GROUP BY f.facet_value - ORDER BY $orderby"; - - $results = $wpdb->get_results( $sql, ARRAY_A ); - $new_depth = empty( $output ) ? 0 : $output[ count( $output ) - 1 ]['depth'] + 1; - - foreach ( $results as $result ) { - $result['depth'] = $new_depth; - $result['is_choice'] = true; - $output[] = $result; - } - - return $output; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - $facet = $params['facet']; - $values = (array) $params['values']; - $selected_values = (array) $params['selected_values']; - - $output = ''; - $num_visible = $this->get_limit( $facet ); - $num = 0; - - if ( ! empty( $values ) ) { - foreach ( $values as $row ) { - $last_depth = $last_depth ?? $row['depth']; - $selected = ( ! empty( $selected_values ) && $row['facet_value'] == $selected_values[0] ); - - $label = esc_html( $row['facet_display_value'] ); - $label = apply_filters( 'facetwp_facet_display_value', $label, [ - 'selected' => $selected, - 'facet' => $facet, - 'row' => $row - ]); - - if ( $row['depth'] > $last_depth ) { - $output .= '
    '; - } - - if ( $num == $num_visible ) { - $output .= '
    '; - } - - if ( ! $selected ) { - if ( isset( $row['is_choice'] ) ) { - $label .= ' (' . $row['counter'] . ')'; - } - else { - $arrow = apply_filters( 'facetwp_facet_hierarchy_arrow', '‹ ' ); - $label = $arrow . $label; - } - } - - $output .= '
    ' . $label . '
    '; - - if ( isset( $row['is_choice'] ) ) { - $num++; - } - - $last_depth = $row['depth']; - } - - if ( $num_visible < $num ) { - $output .= '
    '; - $output .= '' . __( 'See more', 'fwp-front' ) . ''; - $output .= '' . __( 'See less', 'fwp-front' ) . ''; - } - - for ( $i = 0; $i <= $last_depth; $i++ ) { - $output .= '
    '; - } - } - - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - return FWP()->helper->facet_types['checkboxes']->filter_posts( $params ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/number_range.php b/wp/wp-content/plugins/facetwp/includes/facets/number_range.php deleted file mode 100644 index 889c2233..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/number_range.php +++ /dev/null @@ -1,137 +0,0 @@ -label = __( 'Number Range', 'fwp' ); - $this->fields = [ 'source_other', 'compare_type', 'number_fields' ]; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $value = $params['selected_values']; - $value = empty( $value ) ? [ '', '', ] : $value; - $fields = empty( $params['facet']['fields'] ) ? 'both' : $params['facet']['fields']; - - if ( 'exact' == $fields ) { - $output .= ''; - } - if ( 'both' == $fields || 'min' == $fields ) { - $output .= ''; - } - if ( 'both' == $fields || 'max' == $fields ) { - $output .= ''; - } - - $output .= ''; - - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - global $wpdb; - - $facet = $params['facet']; - $values = $params['selected_values']; - $where = ''; - - $min = ( '' == $values[0] ) ? false : $values[0]; - $max = ( '' == $values[1] ) ? false : $values[1]; - - $fields = $facet['fields'] ?? 'both'; - $compare_type = empty( $facet['compare_type'] ) ? 'basic' : $facet['compare_type']; - $is_dual = ! empty( $facet['source_other'] ); - - if ( $is_dual && 'basic' != $compare_type ) { - if ( 'exact' == $fields ) { - $max = $min; - } - - $min = ( false !== $min ) ? $min : -999999999999; - $max = ( false !== $max ) ? $max : 999999999999; - - /** - * Enclose compare - * The post's range must surround the user-defined range - */ - if ( 'enclose' == $compare_type ) { - $where .= " AND (facet_value + 0) <= '$min'"; - $where .= " AND (facet_display_value + 0) >= '$max'"; - } - - /** - * Intersect compare - * @link http://stackoverflow.com/a/325964 - */ - if ( 'intersect' == $compare_type ) { - $where .= " AND (facet_value + 0) <= '$max'"; - $where .= " AND (facet_display_value + 0) >= '$min'"; - } - } - - /** - * Basic compare - * The user-defined range must surround the post's range - */ - else { - if ( 'exact' == $fields ) { - $max = $min; - } - if ( false !== $min ) { - $where .= " AND (facet_value + 0) >= '$min'"; - } - if ( false !== $max ) { - $where .= " AND (facet_display_value + 0) <= '$max'"; - } - } - - $sql = " - SELECT DISTINCT post_id FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = '{$facet['name']}' $where"; - return facetwp_sql( $sql, $facet ); - } - - - function register_fields() { - return [ - 'number_fields' => [ - 'type' => 'alias', - 'items' => [ - 'fields' => [ - 'type' => 'select', - 'label' => __( 'Fields to show', 'fwp' ), - 'choices' => [ - 'both' => __( 'Min + Max', 'fwp' ), - 'exact' => __( 'Exact', 'fwp' ), - 'min' => __( 'Min', 'fwp' ), - 'max' => __( 'Max', 'fwp' ) - ] - ] - ] - ] - ]; - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - $facet = $params['facet']; - $fields = empty( $facet['fields'] ) ? 'both' : $facet['fields']; - - return [ - 'fields' => $fields - ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/pager.php b/wp/wp-content/plugins/facetwp/includes/facets/pager.php deleted file mode 100644 index 8162c79d..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/pager.php +++ /dev/null @@ -1,277 +0,0 @@ -label = __( 'Pager', 'fwp' ); - $this->fields = [ 'pager_type', 'inner_size', 'dots_label', 'prev_label', 'next_label', - 'count_text_plural', 'count_text_singular', 'count_text_none', 'load_more_text', - 'loading_text', 'default_label', 'per_page_options' ]; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - $facet = $params['facet']; - $pager_type = $facet['pager_type']; - $this->pager_args = FWP()->facet->pager_args; - - $method = 'render_' . $pager_type; - if ( method_exists( $this, $method ) ) { - return $this->$method( $facet ); - } - } - - - function render_numbers( $facet ) { - $inner_size = (int) $facet['inner_size']; - $dots_label = facetwp_i18n( $facet['dots_label'] ); - $prev_label = facetwp_i18n( $facet['prev_label'] ); - $next_label = facetwp_i18n( $facet['next_label'] ); - - $output = ''; - $page = (int) $this->pager_args['page']; - $total_pages = (int) $this->pager_args['total_pages']; - $inner_first = max( $page - $inner_size, 2 ); - $inner_last = min( $page + $inner_size, $total_pages - 1 ); - - if ( 1 < $total_pages ) { - - // Prev button - if ( 1 < $page && '' != $prev_label ) { - $output .= $this->render_page( $page - 1, $prev_label, 'prev' ); - } - - // First page - $output .= $this->render_page( 1, false, 'first' ); - - // Dots - if ( 2 < $inner_first && '' != $dots_label ) { - $output .= $this->render_page( '', $dots_label, 'dots' ); - } - - for ( $i = $inner_first; $i <= $inner_last; $i++ ) { - $output .= $this->render_page( $i ); - } - - // Dots - if ( $inner_last < $total_pages - 1 && '' != $dots_label ) { - $output .= $this->render_page( '', $dots_label, 'dots' ); - } - - // Last page - $output .= $this->render_page( $total_pages, false, 'last' ); - - // Next button - if ( $page < $total_pages && '' != $next_label ) { - $output .= $this->render_page( $page + 1, $next_label, 'next' ); - } - } - - return '
    ' . $output . '
    '; - } - - - function render_page( $page, $label = false, $extra_class = false ) { - $label = ( false === $label ) ? $page : $label; - $class = 'facetwp-page'; - - if ( ! empty( $extra_class ) ) { - $class .= ' ' . $extra_class; - } - - if ( $page == $this->pager_args['page'] ) { - $class .= ' active'; - } - - $data = empty( $page ) ? '' : ' data-page="' . $page . '"'; - $html = '' . $label . ''; - - return apply_filters( 'facetwp_facet_pager_link', $html, [ - 'page' => $page, - 'label' => $label, - 'extra_class' => $extra_class - ]); - } - - - function render_counts( $facet ) { - $text_singular = facetwp_i18n( $facet['count_text_singular'] ); - $text_plural = facetwp_i18n( $facet['count_text_plural'] ); - $text_none = facetwp_i18n( $facet['count_text_none'] ); - - $page = $this->pager_args['page']; - $per_page = $this->pager_args['per_page']; - $total_rows = $this->pager_args['total_rows']; - $total_pages = $this->pager_args['total_pages']; - - if ( -1 == $per_page ) { - $per_page = $total_rows; - } - - if ( 1 < $total_rows ) { - $lower = ( 1 + ( ( $page - 1 ) * $per_page ) ); - $upper = ( $page * $per_page ); - $upper = ( $total_rows < $upper ) ? $total_rows : $upper; - - // If a load_more pager is in use, force $lower = 1 - if ( FWP()->helper->facet_setting_exists( 'pager_type', 'load_more' ) ) { - $lower = 1; - } - - $output = $text_plural; - $output = str_replace( '[lower]', $lower, $output ); - $output = str_replace( '[upper]', $upper, $output ); - $output = str_replace( '[total]', $total_rows, $output ); - $output = str_replace( '[page]', $page, $output ); - $output = str_replace( '[per_page]', $per_page, $output ); - $output = str_replace( '[total_pages]', $total_pages, $output ); - } - else { - $output = ( 0 < $total_rows ) ? $text_singular : $text_none; - } - - return $output; - } - - - function render_load_more( $facet ) { - $text = facetwp_i18n( $facet['load_more_text'] ); - $loading_text = facetwp_i18n( $facet['loading_text'] ); - - return ''; - } - - - function render_per_page( $facet ) { - $default = facetwp_i18n( $facet['default_label'] ); - $options = explode( ',', $facet['per_page_options'] ); - $options = array_map( 'trim', $options ); - $output = ''; - - if ( ! empty( $default ) ) { - $output .= ''; - } - - $per_page = $this->pager_args['per_page']; - $var_exists = isset( FWP()->request->url_vars['per_page'] ); - - foreach ( $options as $option ) { - $val = $label = $option; - - // Support "All" option - if ( ! ctype_digit( $val ) ) { - $val = -1; - $label = facetwp_i18n( $label ); - } - - $selected = ( $var_exists && $val == $per_page ) ? ' selected' : ''; - $output .= ''; - } - - return ''; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - return 'continue'; - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - $facet = $params['facet']; - - return [ - 'pager_type' => $facet['pager_type'] - ]; - } - - - function register_fields() { - return [ - 'pager_type' => [ - 'type' => 'select', - 'label' => __( 'Pager type', 'fwp' ), - 'choices' => [ - 'numbers' => __( 'Page numbers', 'fwp' ), - 'counts' => __( 'Result counts', 'fwp' ), - 'load_more' => __( 'Load more', 'fwp' ), - 'per_page' => __( 'Per page', 'fwp' ) - ] - ], - 'inner_size' => [ - 'label' => __( 'Inner size', 'fwp' ), - 'notes' => 'Number of pages to show on each side of the current page', - 'default' => 2, - 'show' => "facet.pager_type == 'numbers'" - ], - 'dots_label' => [ - 'label' => __( 'Dots label', 'fwp' ), - 'notes' => 'The filler between the inner and outer pages', - 'default' => '…', - 'show' => "facet.pager_type == 'numbers'" - ], - 'prev_label' => [ - 'label' => __( 'Prev button label', 'fwp' ), - 'notes' => 'Leave blank to hide', - 'default' => '« Prev', - 'show' => "facet.pager_type == 'numbers'" - ], - 'next_label' => [ - 'label' => __( 'Next button label', 'fwp' ), - 'notes' => 'Leave blank to hide', - 'default' => 'Next »', - 'show' => "facet.pager_type == 'numbers'" - ], - 'count_text_plural' => [ - 'label' => __( 'Count text (plural)', 'fwp' ), - 'notes' => 'Available tags: [lower], [upper], [total], [page], [per_page], [total_pages]', - 'default' => '[lower] - [upper] of [total] results', - 'show' => "facet.pager_type == 'counts'" - ], - 'count_text_singular' => [ - 'label' => __( 'Count text (singular)', 'fwp' ), - 'default' => '1 result', - 'show' => "facet.pager_type == 'counts'" - ], - 'count_text_none' => [ - 'label' => __( 'Count text (no results)', 'fwp' ), - 'default' => 'No results', - 'show' => "facet.pager_type == 'counts'" - ], - 'load_more_text' => [ - 'label' => __( 'Load more text', 'fwp' ), - 'default' => 'Load more', - 'show' => "facet.pager_type == 'load_more'" - ], - 'loading_text' => [ - 'label' => __( 'Loading text', 'fwp' ), - 'default' => 'Loading...', - 'show' => "facet.pager_type == 'load_more'" - ], - 'default_label' => [ - 'label' => __( 'Default label', 'fwp' ), - 'default' => 'Per page', - 'show' => "facet.pager_type == 'per_page'" - ], - 'per_page_options' => [ - 'label' => __( 'Per page options', 'fwp' ), - 'notes' => 'A comma-separated list of choices. Optionally add a non-numeric choice to be used as a "Show all" option.', - 'default' => '10, 25, 50, 100', - 'show' => "facet.pager_type == 'per_page'" - ] - ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/proximity.php b/wp/wp-content/plugins/facetwp/includes/facets/proximity.php deleted file mode 100644 index f9f23dfc..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/proximity.php +++ /dev/null @@ -1,354 +0,0 @@ - distance */ - public $distance = []; - - /* (array) Associative array containing post_id => [lat, lng] */ - public $post_latlng = []; - - - function __construct() { - $this->label = __( 'Proximity', 'fwp' ); - $this->fields = [ 'longitude', 'unit', 'radius_ui', 'radius_options', 'radius_min', 'radius_max', 'radius_default' ]; - - add_filter( 'facetwp_index_row', [ $this, 'index_latlng' ], 1, 2 ); - add_filter( 'facetwp_sort_options', [ $this, 'sort_options' ], 1, 2 ); - add_filter( 'facetwp_filtered_post_ids', [ $this, 'sort_by_distance' ], 10, 2 ); - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $value = $params['selected_values']; - $unit = empty( $facet['unit'] ) ? 'mi' : $facet['unit']; - - $lat = empty( $value[0] ) ? '' : $value[0]; - $lng = empty( $value[1] ) ? '' : $value[1]; - $chosen_radius = empty( $value[2] ) ? '' : (float) $value[2]; - $location_name = empty( $value[3] ) ? '' : urldecode( $value[3] ); - - $radius_options = [ 10, 25, 50, 100, 250 ]; - - // Grab the radius UI - $radius_ui = empty( $facet['radius_ui'] ) ? 'dropdown' : $facet['radius_ui']; - - // Grab radius options from the UI - if ( ! empty( $facet['radius_options'] ) ) { - $radius_options = explode( ',', preg_replace( '/\s+/', '', $facet['radius_options'] ) ); - } - - // Grab default radius from the UI - if ( empty( $chosen_radius ) && ! empty( $facet['radius_default'] ) ) { - $chosen_radius = (float) $facet['radius_default']; - } - - // Support dynamic radius - if ( ! empty( $chosen_radius ) && 0 < $chosen_radius ) { - if ( ! in_array( $chosen_radius, $radius_options ) ) { - $radius_options[] = $chosen_radius; - } - } - - $radius_options = apply_filters( 'facetwp_proximity_radius_options', $radius_options ); - - ob_start(); -?> - - - - -
    -
    - - - - - - - -
    - -
    - - -
    -
    - - - - - - - - - -prefix}facetwp_index - WHERE facet_name = '{$facet['name']}'"; - - $results = $wpdb->get_results( $sql ); - - foreach ( $results as $row ) { - $lat2 = (float) $row->lat; - $lng2 = (float) $row->lng; - - if ( ( $lat1 == $lat2 ) && ( $lng1 == $lng2 ) ) { - $dist = 0; - } - else { - $calc = sin( $lat1 * $rad ) * sin( $lat2 * $rad ) + - cos( $lat1 * $rad ) * cos( $lat2 * $rad ) * - cos( $lng2 * $rad - $lng1 * $rad ); - - // acos() must be between -1 and 1 - $dist = acos( max( -1, min( 1, $calc ) ) ) * $earth_radius; - } - - if ( $dist <= $radius ) { - $existing = $this->distance[ $row->post_id ] ?? -1; - - if ( -1 == $existing || $dist < $existing ) { - $this->distance[ $row->post_id ] = $dist; - - if ( apply_filters( 'facetwp_proximity_store_latlng', false ) ) { - $this->post_latlng[ $row->post_id ] = [ $lat2, $lng2 ]; - } - } - } - } - - asort( $this->distance, SORT_NUMERIC ); - - return array_keys( $this->distance ); - } - - - /** - * Output front-end scripts - */ - function front_scripts() { - if ( apply_filters( 'facetwp_proximity_load_js', true ) ) { - - // hard-coded - $api_key = defined( 'GMAPS_API_KEY' ) ? GMAPS_API_KEY : ''; - - // admin ui - $tmp_key = FWP()->helper->get_setting( 'gmaps_api_key' ); - $api_key = empty( $tmp_key ) ? $api_key : $tmp_key; - - // hook - $api_key = apply_filters( 'facetwp_gmaps_api_key', $api_key ); - - FWP()->display->assets['gmaps'] = '//maps.googleapis.com/maps/api/js?libraries=places&key=' . trim( $api_key ) . '&callback=Function.prototype'; - } - - // Pass extra options into Places Autocomplete - $options = apply_filters( 'facetwp_proximity_autocomplete_options', [] ); - FWP()->display->json['proximity']['autocomplete_options'] = $options; - FWP()->display->json['proximity']['clearText'] = __( 'Clear location', 'fwp-front' ); - FWP()->display->json['proximity']['queryDelay'] = 250; - FWP()->display->json['proximity']['minLength'] = 3; - } - - - function register_fields() { - return [ - 'longitude' => [ - 'type' => 'alias', - 'items' => [ - 'source_other' => [ - 'label' => __( 'Longitude', 'fwp' ), - 'notes' => '(Optional) use a separate longitude field', - 'html' => '' - ] - ] - ], - 'unit' => [ - 'type' => 'select', - 'label' => __( 'Unit of measurement', 'fwp' ), - 'choices' => [ - 'mi' => __( 'Miles', 'fwp' ), - 'km' => __( 'Kilometers', 'fwp' ) - ] - ], - 'radius_ui' => [ - 'type' => 'select', - 'label' => __( 'Radius UI', 'fwp' ), - 'choices' => [ - 'dropdown' => __( 'Dropdown', 'fwp' ), - 'slider' => __( 'Slider', 'fwp' ), - 'none' => __( 'None', 'fwp' ) - ] - ], - 'radius_options' => [ - 'label' => __( 'Radius options', 'fwp' ), - 'notes' => 'A comma-separated list of radius choices', - 'default' => '10, 25, 50, 100, 250', - 'show' => "facet.radius_ui == 'dropdown'" - ], - 'radius_min' => [ - 'label' => __( 'Range (min)', 'fwp' ), - 'default' => 1, - 'show' => "facet.radius_ui == 'slider'" - ], - 'radius_max' => [ - 'label' => __( 'Range (max)', 'fwp' ), - 'default' => 50, - 'show' => "facet.radius_ui == 'slider'" - ], - 'radius_default' => [ - 'label' => __( 'Default radius', 'fwp' ), - 'default' => 25 - ] - ]; - } - - - /** - * Index the coordinates - * We expect a comma-separated "latitude, longitude" - */ - function index_latlng( $params, $class ) { - - $facet = FWP()->helper->get_facet_by_name( $params['facet_name'] ); - - if ( false !== $facet && 'proximity' == $facet['type'] ) { - $latlng = $params['facet_value']; - - // Only handle "lat, lng" strings - if ( ! empty( $latlng ) && is_string( $latlng ) ) { - $latlng = preg_replace( '/[^0-9.,-]/', '', $latlng ); - - if ( ! empty( $facet['source_other'] ) ) { - $other_params = $params; - $other_params['facet_source'] = $facet['source_other']; - $rows = $class->get_row_data( $other_params ); - - if ( ! empty( $rows ) && false === strpos( $latlng, ',' ) ) { - $lng = $rows[0]['facet_display_value']; - $lng = preg_replace( '/[^0-9.,-]/', '', $lng ); - $latlng .= ',' . $lng; - } - } - - if ( preg_match( "/^([\d.-]+),([\d.-]+)$/", $latlng ) ) { - $latlng = explode( ',', $latlng ); - $params['facet_value'] = $latlng[0]; - $params['facet_display_value'] = $latlng[1]; - } - } - } - - return $params; - } - - - /** - * Add "Distance" to the sort box - */ - function sort_options( $options, $params ) { - - if ( FWP()->helper->facet_setting_exists( 'type', 'proximity' ) ) { - $options['distance'] = [ - 'label' => __( 'Distance', 'fwp-front' ), - 'query_args' => [ - 'orderby' => 'post__in', - 'order' => 'ASC', - ], - ]; - } - - return $options; - } - - - /** - * Sort the final (filtered) post IDs by distance - */ - function sort_by_distance( $post_ids, $class ) { - - $distance = FWP()->helper->facet_types['proximity']->distance; - - if ( ! empty( $distance ) ) { - $ordered_posts = array_keys( $distance ); - $filtered_posts = array_flip( $post_ids ); - $intersected_ids = []; - - foreach ( $ordered_posts as $p ) { - if ( isset( $filtered_posts[ $p ] ) ) { - $intersected_ids[] = $p; - } - } - - $post_ids = $intersected_ids; - } - - return $post_ids; - } -} - - -/** - * Get a post's distance - */ -function facetwp_get_distance( $post_id = false ) { - global $post; - - // Get the post ID - $post_id = ( false === $post_id ) ? $post->ID : $post_id; - - // Get the proximity class - $facet_type = FWP()->helper->facet_types['proximity']; - - // Get the distance - $distance = $facet_type->distance[ $post_id ] ?? -1; - - if ( -1 < $distance ) { - return apply_filters( 'facetwp_proximity_distance_output', $distance ); - } - - return false; -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/radio.php b/wp/wp-content/plugins/facetwp/includes/facets/radio.php deleted file mode 100644 index 9407ecb6..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/radio.php +++ /dev/null @@ -1,64 +0,0 @@ -label = __( 'Radio', 'fwp' ); - $this->fields = [ 'label_any', 'parent_term', 'modifiers', 'ghosts', 'orderby', 'count' ]; - } - - - /** - * Load the available choices - */ - function load_values( $params ) { - $params['facet']['operator'] = 'or'; - return FWP()->helper->facet_types['checkboxes']->load_values( $params ); - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $values = (array) $params['values']; - $selected_values = (array) $params['selected_values']; - $label_any = empty( $facet['label_any'] ) ? false : facetwp_i18n( $facet['label_any'] ); - - if ( $label_any ) { - $selected = empty( $selected_values ) ? ' checked' : ''; - $output .= '
    ' . esc_attr( $label_any ) . '
    '; - } - - foreach ( $values as $row ) { - $label = esc_html( $row['facet_display_value'] ); - $selected = in_array( $row['facet_value'], $selected_values ) ? ' checked' : ''; - $selected .= ( 0 == $row['counter'] && '' == $selected ) ? ' disabled' : ''; - $output .= '
    '; - $output .= ''; - $output .= apply_filters( 'facetwp_facet_display_value', $label, [ - 'selected' => ( '' !== $selected ), - 'facet' => $facet, - 'row' => $row - ]); - $output .= ''; - $output .= '(' . $row['counter'] . ')'; - $output .= '
    '; - } - - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - $params['facet']['operator'] = 'or'; - return FWP()->helper->facet_types['checkboxes']->filter_posts( $params ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/rating.php b/wp/wp-content/plugins/facetwp/includes/facets/rating.php deleted file mode 100644 index e644a981..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/rating.php +++ /dev/null @@ -1,114 +0,0 @@ -label = __( 'Star Rating', 'fwp' ); - $this->fields = []; - } - - - /** - * Load the available choices - */ - function load_values( $params ) { - global $wpdb; - - $facet = $params['facet']; - $from_clause = $wpdb->prefix . 'facetwp_index f'; - - // Facet in "OR" mode - $where_clause = $this->get_where_clause( $facet ); - - $output = [ - 1 => [ 'counter' => 0 ], - 2 => [ 'counter' => 0 ], - 3 => [ 'counter' => 0 ], - 4 => [ 'counter' => 0 ], - 5 => [ 'counter' => 0 ] - ]; - - $sql = " - SELECT COUNT(*) AS `count`, FLOOR(f.facet_value) AS `rating` - FROM $from_clause - WHERE f.facet_name = '{$facet['name']}' AND FLOOR(f.facet_value) >= 1 $where_clause - GROUP BY rating"; - - $results = $wpdb->get_results( $sql ); - - foreach ( $results as $result ) { - $output[ $result->rating ]['counter'] = $result->count; - } - - $total = 0; - - // The lower rating should include higher rating counts - for ( $i = 5; $i > 0; $i-- ) { - $output[ $i ]['counter'] += $total; - $total = $output[ $i ]['counter']; - } - - return $output; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $values = (array) $params['values']; - $selected_values = (array) $params['selected_values']; - - $num_stars = 0; - foreach ( $values as $val ) { - if ( 0 < $val['counter'] ) { - $num_stars++; - } - } - - if ( 0 < $num_stars ) { - $output .= ''; - - for ( $i = $num_stars; $i >= 1; $i-- ) { - $class = in_array( $i, $selected_values ) ? ' selected' : ''; - $output .= ''; - } - - $output .= ''; - $output .= ' '; - $output .= ' '; - } - - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - global $wpdb; - - $facet = $params['facet']; - $selected_values = $params['selected_values']; - $selected_values = is_array( $selected_values ) ? $selected_values[0] : $selected_values; - - $sql = " - SELECT DISTINCT post_id FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = '{$facet['name']}' AND facet_value >= '$selected_values'"; - return $wpdb->get_col( $sql ); - } - - - /** - * Output front-end scripts - */ - function front_scripts() { - FWP()->display->json['rating']['& up'] = __( '& up', 'fwp-front' ); - FWP()->display->json['rating']['Undo'] = __( 'Undo', 'fwp-front' ); - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/reset.php b/wp/wp-content/plugins/facetwp/includes/facets/reset.php deleted file mode 100644 index 75048d85..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/reset.php +++ /dev/null @@ -1,85 +0,0 @@ -label = __( 'Reset', 'fwp' ); - $this->fields = [ 'reset_ui', 'reset_text', 'reset_mode', 'reset_facets', 'auto_hide' ]; - } - - - function render( $params ) { - $facet = $params['facet']; - $reset_ui = $facet['reset_ui']; - $reset_text = empty( $facet['reset_text'] ) ? __( 'Reset', 'fwp-front' ) : $facet['reset_text']; - $reset_text = facetwp_i18n( $reset_text ); - - $classes = [ 'facetwp-reset' ]; - $attrs = ''; - - if ( ! FWP()->helper->facet_is( $facet, 'reset_mode', 'off' ) ) { - if ( ! empty( $facet['reset_facets'] ) ) { - $vals = implode( ',', $facet['reset_facets'] ); - $attrs = ' data-mode="{mode}" data-values="{vals}"'; - $attrs = str_replace( '{mode}', $facet['reset_mode'], $attrs ); - $attrs = str_replace( '{vals}', esc_attr( $vals ), $attrs ); - } - } - - if ( FWP()->helper->facet_is( $facet, 'auto_hide', 'yes' ) ) { - $classes[] = 'facetwp-hide-empty'; - } - - if ( 'button' == $reset_ui ) { - $output = ''; - } - else { - $output = '{label}'; - } - - $output = str_replace( '{classes}', implode( ' ', $classes ), $output ); - $output = str_replace( '{label}', esc_attr( $reset_text ), $output ); - $output = str_replace( '{attrs}', $attrs, $output ); - return $output; - } - - - function filter_posts( $params ) { - return 'continue'; - } - - - function register_fields() { - return [ - 'reset_ui' => [ - 'type' => 'select', - 'label' => __( 'Reset UI', 'fwp' ), - 'choices' => [ - 'button' => __( 'Button', 'fwp' ), - 'link' => __( 'Link', 'fwp' ) - ] - ], - 'reset_mode' => [ - 'type' => 'select', - 'label' => __( 'Include / exclude', 'fwp' ), - 'notes' => 'Include or exclude certain facets?', - 'choices' => [ - 'off' => __( 'Reset everything', 'fwp' ), - 'include' => __( 'Reset only these facets', 'fwp' ), - 'exclude' => __( 'Reset all except these facets', 'fwp' ) - ] - ], - 'reset_facets' => [ - 'label' => '', - 'html' => '', - 'show' => "facet.reset_mode != 'off'" - ], - 'auto_hide' => [ - 'type' => 'toggle', - 'label' => __( 'Auto-hide', 'fwp' ), - 'notes' => 'Hide when no facets have selected values' - ] - ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/search.php b/wp/wp-content/plugins/facetwp/includes/facets/search.php deleted file mode 100644 index eaacf422..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/search.php +++ /dev/null @@ -1,89 +0,0 @@ -label = __( 'Search', 'fwp' ); - $this->fields = [ 'search_engine', 'placeholder', 'auto_refresh' ]; - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - - $output = ''; - $facet = $params['facet']; - $value = (array) $params['selected_values']; - $value = empty( $value ) ? '' : stripslashes( $value[0] ); - $placeholder = empty( $facet['placeholder'] ) ? __( 'Enter keywords', 'fwp-front' ) : $facet['placeholder']; - $placeholder = facetwp_i18n( $placeholder ); - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - - $facet = $params['facet']; - $selected_values = $params['selected_values']; - $selected_values = is_array( $selected_values ) ? $selected_values[0] : $selected_values; - - if ( empty( $selected_values ) ) { - return 'continue'; - } - - // Default WP search - $search_args = [ - 's' => $selected_values, - 'posts_per_page' => 200, - 'fields' => 'ids', - ]; - - $search_args = apply_filters( 'facetwp_search_query_args', $search_args, $params ); - - $query = new WP_Query( $search_args ); - - return (array) $query->posts; - } - - - function register_fields() { - $engines = apply_filters( 'facetwp_facet_search_engines', [] ); - $choices = [ '' => __( 'WP Default', 'fwp' ) ]; - - foreach ( $engines as $key => $label ) { - $choices[ $key ] = $label; - } - - return [ - 'search_engine' => [ - 'type' => 'select', - 'label' => __( 'Search engine', 'fwp' ), - 'choices' => $choices - ], - 'auto_refresh' => [ - 'type' => 'toggle', - 'label' => __( 'Auto refresh', 'fwp' ), - 'notes' => 'Automatically refresh the results while typing?' - ] - ]; - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - $auto_refresh = empty( $params['facet']['auto_refresh'] ) ? 'no' : $params['facet']['auto_refresh']; - return [ 'auto_refresh' => $auto_refresh ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/slider.php b/wp/wp-content/plugins/facetwp/includes/facets/slider.php deleted file mode 100644 index 24462cee..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/slider.php +++ /dev/null @@ -1,160 +0,0 @@ -label = __( 'Slider', 'fwp' ); - $this->fields = [ 'source_other', 'compare_type', 'prefix', 'suffix', - 'reset_text', 'slider_format', 'step' ]; - - add_filter( 'facetwp_render_output', [ $this, 'maybe_prevent_facet_html' ], 10, 2 ); - } - - - /** - * Generate the facet HTML - */ - function render( $params ) { - $facet = $params['facet']; - $reset_text = __( 'Reset', 'fwp-front' ); - - if ( ! empty( $facet['reset_text'] ) ) { - $reset_text = facetwp_i18n( $facet['reset_text'] ); - } - - $output = '
    '; - $output .= '
    '; - $output .= '
    '; - $output .= ''; - $output .= '
    '; - return $output; - } - - - /** - * Filter the query based on selected values - */ - function filter_posts( $params ) { - return FWP()->helper->facet_types['number_range']->filter_posts( $params ); - } - - - /** - * (Front-end) Attach settings to the AJAX response - */ - function settings_js( $params ) { - global $wpdb; - - $facet = $params['facet']; - $where_clause = $this->get_where_clause( $facet ); - $selected_values = $params['selected_values']; - - // Set default slider values - $defaults = [ - 'format' => '', - 'prefix' => '', - 'suffix' => '', - 'step' => 1, - ]; - $facet = array_merge( $defaults, $facet ); - - $sql = " - SELECT MIN(facet_value + 0) AS `min`, MAX(facet_display_value + 0) AS `max` FROM {$wpdb->prefix}facetwp_index - WHERE facet_name = '{$facet['name']}' AND facet_display_value != '' $where_clause"; - $row = $wpdb->get_row( $sql ); - - $range_min = (float) $row->min; - $range_max = (float) $row->max; - - $selected_min = (float) ( $selected_values[0] ?? $range_min ); - $selected_max = (float) ( $selected_values[1] ?? $range_max ); - - return [ - 'range' => [ // outer (bar) - 'min' => min( $range_min, $selected_min ), - 'max' => max( $range_max, $selected_max ) - ], - 'decimal_separator' => FWP()->helper->get_setting( 'decimal_separator' ), - 'thousands_separator' => FWP()->helper->get_setting( 'thousands_separator' ), - 'start' => [ $selected_min, $selected_max ], // inner (handles) - 'format' => $facet['format'], - 'prefix' => facetwp_i18n( $facet['prefix'] ), - 'suffix' => facetwp_i18n( $facet['suffix'] ), - 'step' => $facet['step'] - ]; - } - - - /** - * Prevent the slider HTML from refreshing when active - * @since 3.8.11 - */ - function maybe_prevent_facet_html( $output, $params ) { - if ( ! empty( $output['facets'] && 0 === $params['first_load' ] ) ) { - foreach ( FWP()->facet->facets as $name => $facet ) { - if ( 'slider' == $facet['type'] && ! empty( $facet['selected_values'] ) ) { - unset( $output['facets'][ $name ] ); - } - } - } - return $output; - } - - - /** - * Output any front-end scripts - */ - function front_scripts() { - FWP()->display->assets['nouislider.css'] = FACETWP_URL . '/assets/vendor/noUiSlider/nouislider.css'; - FWP()->display->assets['nouislider.js'] = FACETWP_URL . '/assets/vendor/noUiSlider/nouislider.min.js'; - FWP()->display->assets['nummy.js'] = FACETWP_URL . '/assets/vendor/nummy/nummy.min.js'; - } - - - function register_fields() { - $thousands = FWP()->helper->get_setting( 'thousands_separator' ); - $decimal = FWP()->helper->get_setting( 'decimal_separator' ); - $choices = []; - - if ( '' != $thousands ) { - $choices['0,0'] = "5{$thousands}280"; - $choices['0,0.0'] = "5{$thousands}280{$decimal}4"; - $choices['0,0.00'] = "5{$thousands}280{$decimal}42"; - } - - $choices['0'] = '5280'; - $choices['0.0'] = "5280{$decimal}4"; - $choices['0.00'] = "5280{$decimal}42"; - $choices['0a'] = '5k'; - $choices['0.0a'] = "5{$decimal}3k"; - $choices['0.00a'] = "5{$decimal}28k"; - - return [ - 'prefix' => [ - 'label' => __( 'Prefix', 'fwp' ), - 'notes' => 'Text that appears before each slider value', - ], - 'suffix' => [ - 'label' => __( 'Suffix', 'fwp' ), - 'notes' => 'Text that appears after each slider value', - ], - 'slider_format' => [ - 'type' => 'alias', - 'items' => [ - 'format' => [ - 'type' => 'select', - 'label' => __( 'Format', 'fwp' ), - 'notes' => 'If the number separators are wrong, change the [Separators] setting in the Settings tab, then save and reload the page', - 'choices' => $choices - ] - ] - ], - 'step' => [ - 'label' => __( 'Step', 'fwp' ), - 'notes' => 'The amount of increase between intervals', - 'default' => 1 - ] - ]; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/facets/sort.php b/wp/wp-content/plugins/facetwp/includes/facets/sort.php deleted file mode 100644 index 6c56c98e..00000000 --- a/wp/wp-content/plugins/facetwp/includes/facets/sort.php +++ /dev/null @@ -1,226 +0,0 @@ -label = __( 'Sort', 'fwp' ); - $this->fields = [ 'sort_default_label', 'sort_options' ]; - - add_filter( 'facetwp_filtered_query_args', [ $this, 'apply_sort' ], 1, 2 ); - add_filter( 'facetwp_render_output', [ $this, 'render_sort_feature' ], 1, 2 ); - } - - - /** - * Render the sort facet - */ - function render( $params ) { - $facet = $this->parse_sort_facet( $params['facet'] ); - $selected_values = (array) $params['selected_values']; - - $label = facetwp_i18n( $facet['default_label'] ); - $output = ''; - - foreach ( $facet['sort_options'] as $key => $choice ) { - $label = facetwp_i18n( $choice['label'] ); - $selected = in_array( $key, $selected_values ) ? ' selected' : ''; - $output .= ''; - } - - return ''; - } - - - /** - * Sort facets don't narrow results - */ - function filter_posts( $params ) { - return 'continue'; - } - - - /** - * Register admin settings - */ - function register_fields() { - return [ - 'sort_default_label' => [ - 'type' => 'alias', - 'items' => [ - 'default_label' => [ - 'label' => __( 'Default label', 'fwp' ), - 'notes' => 'The sort box placeholder text', - 'default' => __( 'Sort by', 'fwp' ) - ] - ] - ], - 'sort_options' => [ - 'label' => __( 'Sort options', 'fwp' ), - 'notes' => 'Define the choices that appear in the sort box', - 'html' => '' - ] - ]; - } - - - /** - * Convert a sort facet's sort options into WP_Query arguments - * @since 4.0.8 - */ - function parse_sort_facet( $facet ) { - $sort_options = []; - - foreach ( $facet['sort_options'] as $row ) { - $parsed = FWP()->builder->parse_query_obj([ 'orderby' => $row['orderby'] ]); - - $sort_options[ $row['name'] ] = [ - 'label' => $row['label'], - 'query_args' => array_intersect_key( $parsed, [ - 'meta_query' => true, - 'orderby' => true - ]) - ]; - } - - $sort_options = apply_filters( 'facetwp_facet_sort_options', $sort_options, [ - 'facet' => $facet, - 'template_name' => FWP()->facet->template['name'] - ]); - - $facet['sort_options'] = $sort_options; - - return $facet; - } - - - /** - * Handle both sort facets and the (old) sort feature - * @since 4.0.6 - */ - function apply_sort( $query_args, $class ) { - - foreach ( $class->facets as $facet ) { - if ( 'sort' == $facet['type'] ) { - $sort_facet = $this->parse_sort_facet( $facet ); - break; - } - } - - // Support the (old) sort feature - $sort_value = 'default'; - $this->sort_options = $this->get_sort_options(); - - if ( ! empty( $class->ajax_params['extras']['sort'] ) ) { - $sort_value = $class->ajax_params['extras']['sort']; - - if ( ! empty( $this->sort_options[ $sort_value ] ) ) { - $args = $this->sort_options[ $sort_value ]['query_args']; - $query_args = array_merge( $query_args, $args ); - } - } - - // Preserve relevancy sort - $use_relevancy = apply_filters( 'facetwp_use_search_relevancy', true, $class ); - $is_default_sort = ( 'default' == $sort_value && empty( $class->http_params['get']['orderby'] ) ); - if ( $class->is_search && $use_relevancy && $is_default_sort && FWP()->is_filtered ) { - $query_args['orderby'] = 'post__in'; - } - - // Support the (new) sort facet - if ( ! empty( $sort_facet['selected_values'] ) ) { - $chosen = $sort_facet['selected_values'][0]; - $sort_options = $sort_facet['sort_options']; - - if ( isset( $sort_options[ $chosen ] ) ) { - $qa = $sort_options[ $chosen ]['query_args']; - - if ( isset( $qa['meta_query'] ) ) { - $meta_query = $query_args['meta_query'] ?? []; - $query_args['meta_query'] = array_merge( $meta_query, $qa['meta_query'] ); - } - - $query_args['orderby'] = $qa['orderby']; - } - } - - return $query_args; - } - - - /** - * Generate choices for the (old) sort feature - * @since 4.0.6 - */ - function get_sort_options() { - - $options = [ - 'default' => [ - 'label' => __( 'Sort by', 'fwp-front' ), - 'query_args' => [] - ], - 'title_asc' => [ - 'label' => __( 'Title (A-Z)', 'fwp-front' ), - 'query_args' => [ - 'orderby' => 'title', - 'order' => 'ASC', - ] - ], - 'title_desc' => [ - 'label' => __( 'Title (Z-A)', 'fwp-front' ), - 'query_args' => [ - 'orderby' => 'title', - 'order' => 'DESC', - ] - ], - 'date_desc' => [ - 'label' => __( 'Date (Newest)', 'fwp-front' ), - 'query_args' => [ - 'orderby' => 'date', - 'order' => 'DESC', - ] - ], - 'date_asc' => [ - 'label' => __( 'Date (Oldest)', 'fwp-front' ), - 'query_args' => [ - 'orderby' => 'date', - 'order' => 'ASC', - ] - ] - ]; - - return apply_filters( 'facetwp_sort_options', $options, [ - 'template_name' => FWP()->facet->template['name'], - ] ); - } - - - /** - * Render the (old) sort feature - * @since 4.0.6 - */ - function render_sort_feature( $output, $params ) { - $has_sort = isset( $params['extras']['sort'] ); - $has_choices = isset( $this->sort_options ); - - if ( 0 == $params['soft_refresh'] && $has_sort && $has_choices ) { - $html = ''; - - foreach ( $this->sort_options as $key => $atts ) { - $html .= ''; - } - - $html = ''; - - $output['sort'] = apply_filters( 'facetwp_sort_html', $html, [ - 'sort_options' => $this->sort_options, - 'template_name' => FWP()->facet->template['name'], - ]); - } - - return $output; - } -} diff --git a/wp/wp-content/plugins/facetwp/includes/functions.php b/wp/wp-content/plugins/facetwp/includes/functions.php deleted file mode 100644 index 25ea10dc..00000000 --- a/wp/wp-content/plugins/facetwp/includes/functions.php +++ /dev/null @@ -1,43 +0,0 @@ - true ] ); - * - * @since 1.7.5 - */ -function facetwp_display() { - $args = array_replace( [ 'pager', true, [] ], func_get_args() ); - - $atts = (array) $args[2]; - $atts[ $args[0] ] = $args[1]; - - return FWP()->display->shortcode( $atts ); -} - - -/** - * Allow for translation of dynamic strings - * @since 2.1 - */ -function facetwp_i18n( $string ) { - return apply_filters( 'facetwp_i18n', $string ); -} - - -/** - * Support SQL modifications - * @since 2.7 - */ -function facetwp_sql( $sql, $facet ) { - global $wpdb; - - $sql = apply_filters( 'facetwp_wpdb_sql', $sql, $facet ); - return apply_filters( 'facetwp_wpdb_get_col', $wpdb->get_col( $sql ), $sql, $facet ); -} diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/acf/acf.php b/wp/wp-content/plugins/facetwp/includes/integrations/acf/acf.php deleted file mode 100644 index 893303db..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/acf/acf.php +++ /dev/null @@ -1,517 +0,0 @@ -get_fields(); - $choices = []; - - foreach ( $fields as $field ) { - $field_id = $field['hierarchy']; - $field_name = $field['name']; - $field_label = '[' . $field['group_title'] . '] ' . $field['parents'] . $field['label']; - $choices[ "acf/$field_id" ] = $field_label; - - // remove "hidden" ACF fields - unset( $sources['custom_fields']['choices'][ "cf/_$field_name" ] ); - } - - if ( ! empty( $choices ) ) { - $sources['acf'] = [ - 'label' => 'ACF', - 'choices' => $choices, - 'weight' => 5 - ]; - } - - return $sources; - } - - - /** - * If the facet "Sort by" value is "Term order", then preserve - * the custom order of certain ACF fields (checkboxes, radio, etc.) - */ - function facet_orderby( $orderby, $facet ) { - if ( isset( $facet['source'] ) && isset( $facet['orderby'] ) ) { - if ( 0 === strpos( $facet['source'], 'acf/' ) && 'term_order' == $facet['orderby'] ) { - $source_parts = explode( '/', $facet['source'] ); - $field_id = array_pop( $source_parts ); - $field_object = get_field_object( $field_id ); - if ( ! empty( $field_object['choices'] ) ) { - $choices = $field_object['choices']; - $choices = implode( "','", esc_sql( $choices ) ); - $orderby = "FIELD(f.facet_display_value, '$choices')"; - } - } - } - - return $orderby; - } - - - /** - * Index ACF field data - */ - function index_acf_values( $return, $params ) { - $defaults = $params['defaults']; - $facet = $params['facet']; - - if ( isset( $facet['source'] ) && 'acf/' == substr( $facet['source'], 0, 4 ) ) { - $hierarchy = explode( '/', substr( $facet['source'], 4 ) ); - - // support "User Post Type" plugin - $object_id = apply_filters( 'facetwp_acf_object_id', $defaults['post_id'] ); - - // get values (for sub-fields, use the parent repeater) - $value = get_field( $hierarchy[0], $object_id, false ); - - // handle repeater values - if ( 1 < count( $hierarchy ) ) { - - $parent_field_key = array_shift( $hierarchy ); - $value = $this->process_field_value( $value, $hierarchy, $parent_field_key ); - - // get the sub-field properties - $sub_field = get_field_object( $hierarchy[0], $object_id, false, false ); - - foreach ( $value as $key => $val ) { - $this->repeater_row = $key; - $rows = $this->get_values_to_index( $val, $sub_field, $defaults ); - $this->index_field_values( $rows ); - } - } - else { - - // get the field properties - $field = get_field_object( $hierarchy[0], $object_id, false, false ); - - // index values - $rows = $this->get_values_to_index( $value, $field, $defaults ); - $this->index_field_values( $rows ); - } - - return true; - } - - return $return; - } - - - /** - * Hijack the "facetwp_indexer_query_args" hook to lookup the fields once - */ - function lookup_acf_fields( $args ) { - $this->get_fields(); - return $args; - } - - - /** - * Grab all ACF fields - */ - function get_fields() { - - add_action( 'pre_get_posts', [ $this, 'disable_wpml' ] ); - $field_groups = acf_get_field_groups(); - remove_action( 'pre_get_posts', [ $this, 'disable_wpml' ] ); - - foreach ( $field_groups as $field_group ) { - $fields = acf_get_fields( $field_group ); - - if ( ! empty( $fields ) ) { - $this->flatten_fields( $fields, $field_group ); - } - } - - return $this->fields; - } - - - /** - * We need to get field groups in ALL languages - */ - function disable_wpml( $query ) { - $query->set( 'suppress_filters', true ); - $query->set( 'lang', '' ); - } - - - /** - * Extract field values from the repeater array - */ - function process_field_value( $value, $hierarchy, $parent_field_key ) { - $temp_val = []; - - // prevent PHP8 fatal error on invalid lookup field - $parent_field_type = $this->parent_type_lookup[ $parent_field_key ] ?? 'none'; - - if ( ! is_array( $value ) || 'none' == $parent_field_type ) { - return $temp_val; - } - - // reduce the hierarchy array - $field_key = array_shift( $hierarchy ); - - // group - if ( 'group' == $parent_field_type ) { - if ( 0 == count( $hierarchy ) ) { - $temp_val[] = $value[ $field_key ]; - } - else { - return $this->process_field_value( $value[ $field_key ], $hierarchy, $field_key ); - } - } - // repeater - else { - if ( 0 == count( $hierarchy ) ) { - foreach ( $value as $val ) { - $temp_val[] = $val[ $field_key ]; - } - } - else { - foreach ( $value as $outer ) { - if ( isset( $outer[ $field_key ] ) ) { - foreach ( $outer[ $field_key ] as $inner ) { - $temp_val[] = $inner; - } - } - } - - return $this->process_field_value( $temp_val, $hierarchy, $field_key ); - } - } - - return $temp_val; - } - - - /** - * Get an array of $params arrays - * Useful for indexing and grabbing values for the Layout Builder - * @since 3.4.0 - */ - function get_values_to_index( $value, $field, $params ) { - $value = maybe_unserialize( $value ); - $type = $field['type']; - $output = []; - - // checkboxes - if ( 'checkbox' == $type || 'select' == $type || 'radio' == $type ) { - if ( false !== $value ) { - foreach ( (array) $value as $val ) { - $display_value = isset( $field['choices'][ $val ] ) ? - $field['choices'][ $val ] : - $val; - - $params['facet_value'] = $val; - $params['facet_display_value'] = $display_value; - $output[] = $params; - } - } - } - - // relationship - elseif ( 'relationship' == $type || 'post_object' == $type || 'page_link' == $type ) { - if ( false !== $value ) { - foreach ( (array) $value as $val ) { - - // does the post exist? - if ( false !== get_post_type( $val ) ) { - $params['facet_value'] = $val; - $params['facet_display_value'] = get_the_title( $val ); - $output[] = $params; - } - } - } - } - - // user - elseif ( 'user' == $type ) { - if ( false !== $value ) { - foreach ( (array) $value as $val ) { - $user = get_user_by( 'id', $val ); - - // does the user exist? - if ( false !== $user ) { - $params['facet_value'] = $val; - $params['facet_display_value'] = $user->display_name; - $output[] = $params; - } - } - } - } - - // taxonomy - elseif ( 'taxonomy' == $type ) { - if ( ! empty( $value ) ) { - foreach ( (array) $value as $val ) { - global $wpdb; - - $term_id = (int) $val; - $term = $wpdb->get_row( "SELECT name, slug FROM {$wpdb->terms} WHERE term_id = '$term_id' LIMIT 1" ); - - // does the term exist? - if ( null !== $term ) { - $params['facet_value'] = $term->slug; - $params['facet_display_value'] = $term->name; - $params['term_id'] = $term_id; - $output[] = $params; - } - } - } - } - - // date_picker - elseif ( 'date_picker' == $type ) { - $formatted = $this->format_date( $value ); - $params['facet_value'] = $formatted; - $params['facet_display_value'] = apply_filters( 'facetwp_acf_display_value', $formatted, $params ); - $output[] = $params; - } - - // true_false - elseif ( 'true_false' == $type ) { - $display_value = ( 0 < (int) $value ) ? __( 'Yes', 'fwp-front' ) : __( 'No', 'fwp-front' ); - $params['facet_value'] = $value; - $params['facet_display_value'] = $display_value; - $output[] = $params; - } - - // google_map - elseif ( 'google_map' == $type ) { - if ( isset( $value['lat'] ) && isset( $value['lng'] ) ) { - $params['facet_value'] = $value['lat']; - $params['facet_display_value'] = $value['lng']; - $params['place_details'] = $value; - $output[] = $params; - } - } - - // text - else { - $params['facet_value'] = $value; - $params['facet_display_value'] = apply_filters( 'facetwp_acf_display_value', $value, $params ); - $output[] = $params; - } - - return $output; - } - - - /** - * Index values - */ - function index_field_values( $rows ) { - foreach ( $rows as $params ) { - FWP()->indexer->index_row( $params ); - } - } - - - /** - * Handle "source_other" setting - */ - function index_source_other( $value, $params ) { - if ( ! empty( $params['facet_name'] ) ) { - $facet = FWP()->helper->get_facet_by_name( $params['facet_name'] ); - - if ( ! empty( $facet['source_other'] ) ) { - $hierarchy = explode( '/', substr( $facet['source_other'], 4 ) ); - - // support "User Post Type" plugin - $object_id = apply_filters( 'facetwp_acf_object_id', $params['post_id'] ); - - // get the value - $value = get_field( $hierarchy[0], $object_id, false ); - - // handle repeater values - if ( 1 < count( $hierarchy ) ) { - $parent_field_key = array_shift( $hierarchy ); - $value = $this->process_field_value( $value, $hierarchy, $parent_field_key ); - $value = $value[ $this->repeater_row ]; - } - } - - if ( 'date_range' == $facet['type'] ) { - $value = $this->format_date( $value ); - } - } - - return $value; - } - - - /** - * Format dates in YYYY-MM-DD - */ - function format_date( $str ) { - if ( 8 == strlen( $str ) && ctype_digit( $str ) ) { - $str = substr( $str, 0, 4 ) . '-' . substr( $str, 4, 2 ) . '-' . substr( $str, 6, 2 ); - } - - return $str; - } - - - /** - * Generates a flat array of fields within a specific field group - */ - function flatten_fields( $fields, $field_group, $hierarchy = '', $parents = '' ) { - foreach ( $fields as $field ) { - - // append the hierarchy string - $new_hierarchy = $hierarchy . '/' . $field['key']; - - // loop again for repeater or group fields - if ( 'repeater' == $field['type'] || 'group' == $field['type'] ) { - $new_parents = $parents . $field['label'] . ' → '; - - $this->parent_type_lookup[ $field['key'] ] = $field['type']; - $this->flatten_fields( $field['sub_fields'], $field_group, $new_hierarchy, $new_parents ); - } - else { - $this->fields[] = [ - 'key' => $field['key'], - 'name' => $field['name'], - 'label' => $field['label'], - 'hierarchy' => trim( $new_hierarchy, '/' ), - 'parents' => $parents, - 'group_title' => $field_group['title'], - ]; - } - } - } - - - /** - * Get the field value (support User Post Type) - * @since 3.4.1 - */ - function get_field( $source, $post_id ) { - $hierarchy = explode( '/', substr( $source, 4 ) ); - $object_id = apply_filters( 'facetwp_acf_object_id', $post_id ); - return get_field( $hierarchy[0], $object_id ); - } - - - /** - * Fallback values for the layout builder - * @since 3.4.0 - * - * ACF return formats: - * [image, file] = array, url, id - * [select, checkbox, radio, button_group] = value, label, array (both) - * [post_object, relationship, taxonomy] = object, id - * [user] = array, object, id - * [link] = array, url - */ - function layout_builder_values( $value, $item ) { - global $post; - - // exit if not an object or array - if ( is_scalar( $value ) || is_null( $value ) ) { - return $value; - } - - $hierarchy = explode( '/', substr( $item['source'], 4 ) ); - - // support "User Post Type" plugin - $object_id = apply_filters( 'facetwp_acf_object_id', $post->ID ); - - // get the field properties - $field = get_field_object( $hierarchy[0], $object_id, false, false ); - - $type = $field['type']; - $format = $field['return_format'] ?? ''; - $is_multiple = (bool) ( $field['multiple'] ?? false ); - - if ( ( 'post_object' == $type || 'relationship' == $type ) && 'object' == $format ) { - $output = []; - - $value = is_array( $value ) ? $value : [ $value ]; - - foreach ( $value as $val ) { - $output[] = '' . esc_html( $val->post_title ) . ''; - } - - $value = $output; - } - - if ( 'taxonomy' == $type && 'object' == $format ) { - $output = []; - - foreach ( $value as $val ) { - $output[] = $val->name; - } - - $value = $output; - } - - if ( ( 'select' == $type || 'checkbox' == $type || 'radio' == $type || 'button_group' == $type ) && 'array' == $format ) { - $value = $value['label'] ?? wp_list_pluck( $value, 'label' ); - } - - if ( ( 'image' == $type || 'gallery' == $type ) && 'array' == $format ) { - $value = ( 'image' == $type ) ? [ $value ] : $value; - - foreach ( $value as $val ) { - $value = '' . esc_attr( $val['alt'] ) . ''; - } - } - - if ( 'file' == $type && 'array' == $format ) { - $value = '' . esc_html( $value['filename'] ) . ' (' . size_format( $value['filesize'], 1 ) . ')'; - } - - if ( 'link' == $type && 'array' == $format ) { - $value = '' . esc_html( $value['title'] ) . ''; - } - - if ( 'google_map' == $type ) { - $value = '' . esc_html( $value['address'] ) . ''; - } - - if ( 'user' == $type && ( 'object' == $format || 'array' == $format ) ) { - $output = []; - - $value = $is_multiple ? $value : [ $value ]; - - foreach ( $value as $val ) { - if ( 'object' == $format ) { - $output[] = $val->display_name; - } - elseif ( 'array' == $format ) { - $output[] = $val['display_name']; - } - } - $value = $output; - } - - return $value; - } -} - - -if ( function_exists( 'acf' ) && version_compare( acf()->settings['version'], '5.0', '>=' ) ) { - FWP()->acf = new FacetWP_Integration_ACF(); -} diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.js b/wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.js deleted file mode 100644 index f7745467..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.js +++ /dev/null @@ -1,6 +0,0 @@ -(function($) { - $().on('facetwp-loaded', function() { - $('.edd-no-js').addClass('facetwp-hidden'); - $('a.edd-add-to-cart').addClass('edd-has-js'); - }); -})(fUtil); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.php b/wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.php deleted file mode 100644 index 77d0caa3..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/edd/edd.php +++ /dev/null @@ -1,51 +0,0 @@ - $val ) { - if ( 0 === strpos( $val, '_edd_' ) ) { - unset( $sources['custom_fields']['choices'][ $key ] ); - } - } - - return $sources; - } -} - - -if ( is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) ) { - new FacetWP_Integration_EDD(); -} diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/searchwp/searchwp.php b/wp/wp-content/plugins/facetwp/includes/integrations/searchwp/searchwp.php deleted file mode 100644 index c7573d33..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/searchwp/searchwp.php +++ /dev/null @@ -1,215 +0,0 @@ -is_search() && ! empty( $query->get( 's' ) ) ) { - $args = stripslashes_deep( $this->get_valid_args( $query ) ); - $this->keywords = $args['s']; - $this->swp_query = $this->run_query( $args ); - $query->set( 'using_searchwp', true ); - $query->set( 'searchwp', false ); - } - - return $is_main_query; - } - - - /** - * Whitelist supported SWP_Query arguments - * - * @link https://searchwp.com/documentation/classes/swp_query/#arguments - */ - function get_valid_args( $query ) { - $output = []; - - $valid = [ - 's', 'engine', 'post__in', 'post__not_in', 'post_type', 'post_status', - 'tax_query', 'meta_query', 'date_query', 'order', 'orderby' - ]; - - foreach ( $valid as $arg ) { - $val = $query->get( $arg ); - if ( ! empty( $val ) ) { - $output[ $arg ] = $val; - } - } - - return $output; - } - - - /** - * Modify FacetWP's render() query to use SearchWP's results while bypassing - * WP core search. We're using this additional query to support custom query - * modifications, such as for FacetWP's sort box. - * - * The hook priority (1000) is important because this needs to run after - * FacetWP_Request->update_query_vars() - */ - function pre_get_posts( $query ) { - if ( true === $query->get( 'using_searchwp' ) ) { - if ( true === $query->get( 'facetwp' ) && ! $this->first_run ) { - $query->set( 's', '' ); - - $post_ids = FWP()->filtered_post_ids; - $post_ids = empty( $post_ids ) ? [ 0 ] : $post_ids; - $query->set( 'post__in', $post_ids ); - - if ( '' === $query->get( 'post_type' ) ) { - $query->set( 'post_type', 'any' ); - $query->set( 'post_status', 'any' ); - } - - if ( '' === $query->get( 'orderby' ) ) { - $query->set( 'orderby', 'post__in' ); - } - } - } - } - - - /** - * If [facetwp => false] then it's the get_filtered_post_ids() query. Return - * the raw SearchWP results to prevent the additional query. - * - * If [facetwp => true] and [first_run => true] then it's the main WP query. Return - * a non-null value to kill the query, since we don't use the results. - * - * If [facetwp => true] and [first_run => false] then it's the FacetWP render() query. - */ - function posts_pre_query( $posts, $query ) { - if ( true === $query->get( 'using_searchwp' ) ) { - if ( true === $query->get( 'facetwp' ) ) { - $query->set( 's', $this->keywords ); - - // kill the main WP query - if ( $this->first_run ) { - $this->first_run = false; - - $page = max( $query->get( 'paged' ), 1 ); - $per_page = (int) $query->get( 'posts_per_page', get_option( 'posts_per_page' ) ); - $query->found_posts = count( FWP()->filtered_post_ids ); - $query->max_num_pages = ( 0 < $per_page ) ? ceil( $query->found_posts / $per_page ) : 0; - - return []; - } - } - else { - return $this->swp_query->posts; - } - } - - return $posts; - } - - - /** - * Apply highlighting if available - */ - function posts_results( $posts, $query ) { - if ( true === $query->get( 'using_searchwp' ) ) { - if ( true === $query->get( 'facetwp' ) && ! $this->first_run ) { - - // SearchWP 4.1+ - if ( isset( $this->swp_query->query ) ) { - foreach ( $posts as $index => $post ) { - $source = \SearchWP\Utils::get_post_type_source_name( $post->post_type ); - $entry = new \SearchWP\Entry( $source, $post->ID, false ); - $posts[ $index ] = $entry->native( $this->swp_query->query ); - } - } - } - } - - return $posts; - } - - - /** - * For search facets, run \SWP_Query and return matching post IDs - */ - function search_facet( $return, $params ) { - $facet = $params['facet']; - $selected_values = $params['selected_values']; - $selected_values = is_array( $selected_values ) ? $selected_values[0] : $selected_values; - $engine = $facet['search_engine'] ?? ''; - - if ( 'search' == $facet['type'] && 0 === strpos( $engine, 'swp_' ) ) { - $return = []; - - if ( empty( $selected_values ) ) { - $return = 'continue'; - } - elseif ( ! empty( FWP()->unfiltered_post_ids ) ) { - $swp_query = $this->run_query([ - 's' => $selected_values, - 'engine' => substr( $engine, 4 ), - 'post__in' => FWP()->unfiltered_post_ids - ]); - $return = $swp_query->posts; - } - } - - return $return; - } - - - /** - * Run a search and return the \SWP_Query object - */ - function run_query( $args ) { - $overrides = [ 'posts_per_page' => 200, 'fields' => 'ids', 'facetwp' => true ]; - $args = array_merge( $args, $overrides ); - return new \SWP_Query( $args ); - } - - - /** - * Add engines to the search facet - */ - function search_engines( $engines ) { - - if ( version_compare( SEARCHWP_VERSION, '4.0', '>=' ) ) { - $settings = get_option( SEARCHWP_PREFIX . 'engines' ); - - foreach ( $settings as $key => $info ) { - $engines[ 'swp_' . $key ] = 'SearchWP - ' . $info['label']; - } - } - else { - $settings = get_option( SEARCHWP_PREFIX . 'settings' ); - - foreach ( $settings['engines'] as $key => $info ) { - $label = $info['searchwp_engine_label'] ?? __( 'Default', 'fwp' ); - $engines[ 'swp_' . $key ] = 'SearchWP - ' . $label; - } - } - - return $engines; - } -} - - -if ( defined( 'SEARCHWP_VERSION' ) ) { - new FacetWP_Integration_SearchWP(); -} diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/taxonomy.php b/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/taxonomy.php deleted file mode 100644 index f75fa4d4..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/taxonomy.php +++ /dev/null @@ -1,85 +0,0 @@ -\n"; - } - } - - - /** - * Adjust the category listing counts when facets are selected - * @since 3.3.10 - */ - function adjust_term_counts( $terms, $taxonomy, $query_vars ) { - if ( FWP()->request->is_refresh || ! empty( FWP()->request->url_vars ) ) { - if ( 'product_cat' == reset( $taxonomy ) ) { - global $wpdb, $wp_query; - - $sql = $wp_query->request; - if ( false !== ( $pos = strpos( $sql, ' ORDER BY' ) ) ) { - $sql = substr( $sql, 0, $pos ); - } - - $post_ids = $wpdb->get_col( $sql ); - - if ( ! empty( $post_ids ) ) { - $term_counts = []; - $post_ids_str = implode( ',', $post_ids ); - - $query = " - SELECT term_id, COUNT(term_id) AS term_count - FROM {$wpdb->prefix}facetwp_index - WHERE post_id IN ($post_ids_str) - GROUP BY term_id"; - - $results = $wpdb->get_results( $query ); - - foreach ( $results as $row ) { - $term_counts[ $row->term_id ] = (int) $row->term_count; - } - - foreach ( $terms as $term ) { - $term->count = $term_counts[ $term->term_id ] ?? 0; - } - } - } - } - - return $terms; - } - - - /** - * Append facet URL variables to the category archive links - * @since 3.3.10 - */ - function append_url_vars( $term_link, $term, $taxonomy ) { - if ( 'product_cat' == $taxonomy ) { - $query_string = filter_var( $_SERVER['QUERY_STRING'], FILTER_SANITIZE_URL ); - - if ( ! empty( $query_string ) ) { - $prefix = ( false !== strpos( $query_string, '?' ) ) ? '&' : '?'; - $term_link .= $prefix . $query_string; - } - } - - return $term_link; - } -} - -new FacetWP_Integration_WooCommerce_Taxonomy(); diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.js b/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.js deleted file mode 100644 index cf8b1dfc..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.js +++ /dev/null @@ -1,34 +0,0 @@ -(function($) { - - $().on('facetwp-refresh', function() { - if (! FWP.loaded) { - setup_woocommerce(); - } - }); - - function setup_woocommerce() { - - // Intercept WooCommerce pagination - $().on('click', '.woocommerce-pagination a', function(e) { - e.preventDefault(); - var matches = $(this).attr('href').match(/\/page\/(\d+)/); - if (null !== matches) { - FWP.paged = parseInt(matches[1]); - FWP.soft_refresh = true; - FWP.refresh(); - } - }); - - // Disable sort handler - $('.woocommerce-ordering').attr('onsubmit', 'event.preventDefault()'); - - // Intercept WooCommerce sorting - $().on('change', '.woocommerce-ordering .orderby', function(e) { - var qs = new URLSearchParams(window.location.search); - qs.set('orderby', $(this).val()); - history.pushState(null, null, window.location.pathname + '?' + qs.toString()); - FWP.soft_refresh = true; - FWP.refresh(); - }); - } -})(fUtil); \ No newline at end of file diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.php b/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.php deleted file mode 100644 index 529c34a1..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/woocommerce/woocommerce.php +++ /dev/null @@ -1,570 +0,0 @@ -helper->get_setting( 'wc_enable_variations', 'no' ) ); - - if ( apply_filters( 'facetwp_enable_product_variations', $is_enabled ) ) { - add_filter( 'facetwp_indexer_post_facet_defaults', [ $this, 'force_taxonomy' ], 10, 2 ); - add_filter( 'facetwp_indexer_query_args', [ $this, 'index_variations' ] ); - add_filter( 'facetwp_index_row', [ $this, 'attribute_variations' ], 1 ); - add_filter( 'facetwp_wpdb_sql', [ $this, 'wpdb_sql' ], 10, 2 ); - add_filter( 'facetwp_wpdb_get_col', [ $this, 'wpdb_get_col' ], 10, 3 ); - add_filter( 'facetwp_filtered_post_ids', [ $this, 'process_variations' ] ); - add_filter( 'facetwp_facet_where', [ $this, 'facet_where' ], 10, 2 ); - } - - // Preserve the WooCommerce sort - add_filter( 'posts_clauses', [ $this, 'preserve_sort' ], 20, 2 ); - - // Prevent WooCommerce from redirecting to a single result page - add_filter( 'woocommerce_redirect_single_search_result', [ $this, 'redirect_single_search_result' ] ); - - // Prevent WooCommerce sort (posts_clauses) when doing FacetWP sort - add_filter( 'woocommerce_default_catalog_orderby', [ $this, 'default_catalog_orderby' ] ); - - // Dynamic counts when Shop Page Display = "Categories" or "Both" - if ( apply_filters( 'facetwp_woocommerce_support_categories_display', false ) ) { - include( FACETWP_DIR . '/includes/integrations/woocommerce/taxonomy.php' ); - } - } - - - /** - * Run WooCommerce handlers on facetwp-refresh - * @since 2.0.9 - */ - function assets( $assets ) { - $assets['woocommerce.js'] = FACETWP_URL . '/includes/integrations/woocommerce/woocommerce.js'; - return $assets; - } - - - /** - * Add WooCommerce-specific data sources - * @since 2.1.4 - */ - function facet_sources( $sources ) { - $sources['woocommerce'] = [ - 'label' => __( 'WooCommerce', 'fwp' ), - 'choices' => [ - 'woo/price' => __( 'Price' ), - 'woo/sale_price' => __( 'Sale Price' ), - 'woo/regular_price' => __( 'Regular Price' ), - 'woo/average_rating' => __( 'Average Rating' ), - 'woo/stock_status' => __( 'Stock Status' ), - 'woo/on_sale' => __( 'On Sale' ), - 'woo/featured' => __( 'Featured' ), - 'woo/product_type' => __( 'Product Type' ), - ], - 'weight' => 5 - ]; - - // Move WC taxonomy choices - foreach ( $sources['taxonomies']['choices'] as $key => $label ) { - if ( 'tax/product_cat' == $key || 'tax/product_tag' == $key || 0 === strpos( $key, 'tax/pa_' ) ) { - $sources['woocommerce']['choices'][ $key ] = $label; - unset( $sources['taxonomies']['choices'][ $key ] ); - } - } - - return $sources; - } - - - /** - * Attributes for WC product variations are stored in postmeta - * @since 2.7.2 - */ - function force_taxonomy( $defaults, $params ) { - if ( 0 === strpos( $defaults['facet_source'], 'tax/pa_' ) ) { - $post_id = (int) $defaults['post_id']; - - if ( 'product_variation' == get_post_type( $post_id ) ) { - $defaults['facet_source'] = str_replace( 'tax/', 'cf/attribute_', $defaults['facet_source'] ); - } - } - - return $defaults; - } - - - /** - * Index product variations - * @since 2.7 - */ - function index_variations( $args ) { - - // Saving a single product - if ( ! empty( $args['p'] ) ) { - $post_id = (int) $args['p']; - if ( 'product' == get_post_type( $post_id ) ) { - if ( 'variable' == $this->get_product_type( $post_id ) ) { - $product = wc_get_product( $post_id ); - - if ( false !== $product ) { - $children = $product->get_children(); - $args['post_type'] = [ 'product', 'product_variation' ]; - $args['post__in'] = $children; - $args['post__in'][] = $post_id; - $args['posts_per_page'] = -1; - unset( $args['p'] ); - } - } - } - } - // Force product variations to piggyback products - else { - $pt = (array) $args['post_type']; - - if ( in_array( 'any', $pt ) ) { - $pt = get_post_types(); - } - if ( in_array( 'product', $pt ) ) { - $pt[] = 'product_variation'; - } - - $args['post_type'] = $pt; - } - - return $args; - } - - - /** - * When indexing product variations, attribute its parent product - * @since 2.7 - */ - function attribute_variations( $params ) { - $post_id = (int) $params['post_id']; - - // Set variation_id for all posts - $params['variation_id'] = $post_id; - - if ( 'product_variation' == get_post_type( $post_id ) ) { - $params['post_id'] = wp_get_post_parent_id( $post_id ); - - // Lookup the term name for variation values - if ( 0 === strpos( $params['facet_source'], 'cf/attribute_pa_' ) ) { - $taxonomy = str_replace( 'cf/attribute_', '', $params['facet_source'] ); - $term = get_term_by( 'slug', $params['facet_value'], $taxonomy ); - - if ( false !== $term ) { - $params['term_id'] = $term->term_id; - $params['facet_display_value'] = $term->name; - } - } - } - - return $params; - } - - - /** - * Hijack filter_posts() to grab variation IDs - * @since 2.7 - */ - function wpdb_sql( $sql, $facet ) { - $sql = str_replace( - 'DISTINCT post_id', - 'DISTINCT post_id, GROUP_CONCAT(variation_id) AS variation_ids', - $sql - ); - - $sql .= ' GROUP BY post_id'; - - return $sql; - } - - - /** - * Store a facet's variation IDs - * @since 2.7 - */ - function wpdb_get_col( $result, $sql, $facet ) { - global $wpdb; - - $facet_name = $facet['name']; - $post_ids = $wpdb->get_col( $sql, 0 ); // arrays of product IDs - $variations = $wpdb->get_col( $sql, 1 ); // variation IDs as arrays of comma-separated strings - - foreach ( $post_ids as $index => $post_id ) { - $variations_array = explode( ',', $variations[ $index ] ); - $type = in_array( $post_id, $variations_array ) ? 'products' : 'variations'; - - if ( isset( $this->cache[ $facet_name ][ $type ] ) ) { - foreach ( $variations_array as $id ) { - $this->cache[ $facet_name ][ $type ][] = $id; - } - } - else { - $this->cache[ $facet_name ][ $type ] = $variations_array; - } - } - - return $result; - } - - - /** - * We need lookup arrays for both products and variations - * @since 2.7.1 - */ - function generate_lookup_array( $post_ids ) { - global $wpdb; - - $output = []; - - if ( ! empty( $post_ids ) ) { - $sql = " - SELECT DISTINCT post_id, variation_id - FROM {$wpdb->prefix}facetwp_index - WHERE post_id IN (" . implode( ',', $post_ids ) . ")"; - $results = $wpdb->get_results( $sql ); - - foreach ( $results as $result ) { - $output['get_variations'][ $result->post_id ][] = $result->variation_id; - $output['get_product'][ $result->variation_id ] = $result->post_id; - } - } - - return $output; - } - - - /** - * Determine valid variation IDs - * @since 2.7 - */ - function process_variations( $post_ids ) { - if ( empty( $this->cache ) ) { - return $post_ids; - } - - $this->lookup = $this->generate_lookup_array( FWP()->unfiltered_post_ids ); - - // Loop through each facet's data - foreach ( $this->cache as $facet_name => $groups ) { - $this->storage[ $facet_name ] = []; - - // Create an array of variation IDs - foreach ( $groups as $type => $ids ) { // products or variations - foreach ( $ids as $id ) { - $this->storage[ $facet_name ][] = $id; - - // Lookup variation IDs for each product - if ( 'products' == $type ) { - if ( ! empty( $this->lookup['get_variations'][ $id ] ) ) { - foreach ( $this->lookup['get_variations'][ $id ] as $variation_id ) { - $this->storage[ $facet_name ][] = $variation_id; - } - } - } - } - } - } - - $result = $this->calculate_variations(); - $this->variations = $result['variations']; - $post_ids = array_intersect( $post_ids, $result['products'] ); - $post_ids = empty( $post_ids ) ? [ 0 ] : $post_ids; - return $post_ids; - } - - - /** - * Calculate variation IDs - * @param mixed $facet_name Facet name to ignore, or FALSE - * @return array Associative array of product IDs + variation IDs - * @since 2.8 - */ - function calculate_variations( $facet_name = false ) { - - $new = true; - $final_products = []; - $final_variations = []; - - // Intersect product + variation IDs across facets - foreach ( $this->storage as $name => $variation_ids ) { - - // Skip facets in "OR" mode - if ( $facet_name === $name ) { - continue; - } - - $final_variations = ( $new ) ? $variation_ids : array_intersect( $final_variations, $variation_ids ); - $new = false; - } - - // Lookup each variation's product ID - foreach ( $final_variations as $variation_id ) { - if ( isset( $this->lookup['get_product'][ $variation_id ] ) ) { - $final_products[ $this->lookup['get_product'][ $variation_id ] ] = true; // prevent duplicates - } - } - - // Append product IDs to the variations array - $final_products = array_keys( $final_products ); - - foreach ( $final_products as $id ) { - $final_variations[] = $id; - } - - return [ - 'products' => $final_products, - 'variations' => array_unique( $final_variations ) - ]; - } - - - /** - * Apply variation IDs to load_values() method - * @since 2.7 - */ - function facet_where( $where_clause, $facet ) { - - // Support facets in "OR" mode - if ( FWP()->helper->facet_is( $facet, 'operator', 'or' ) ) { - $result = $this->calculate_variations( $facet['name'] ); - $variations = $result['variations']; - } - else { - $variations = $this->variations; - } - - if ( ! empty( $variations ) ) { - $where_clause .= ' AND variation_id IN (' . implode( ',', $variations ) . ')'; - } - - return $where_clause; - } - - - /** - * Efficiently grab the product type without wc_get_product() - * @since 3.3.8 - */ - function get_product_type( $post_id ) { - global $wpdb; - - $sql = " - SELECT t.name - FROM $wpdb->terms t - INNER JOIN $wpdb->term_taxonomy tt ON tt.term_id = t.term_id AND tt.taxonomy = 'product_type' - INNER JOIN $wpdb->term_relationships tr ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tr.object_id = %d"; - - $type = $wpdb->get_var( - $wpdb->prepare( $sql, $post_id ) - ); - - return ( null !== $type ) ? $type : 'simple'; - } - - - /** - * Index WooCommerce-specific values - * @since 2.1.4 - */ - function index_woo_values( $return, $params ) { - $facet = $params['facet']; - $defaults = $params['defaults']; - $post_id = (int) $defaults['post_id']; - $post_type = get_post_type( $post_id ); - - // Index out of stock products? - $index_all = ( 'yes' === FWP()->helper->get_setting( 'wc_index_all', 'no' ) ); - $index_all = apply_filters( 'facetwp_index_all_products', $index_all ); - - if ( 'product' == $post_type || 'product_variation' == $post_type ) { - $product = wc_get_product( $post_id ); - - if ( ! $product || ( ! $index_all && ! $product->is_in_stock() ) ) { - return true; // skip - } - } - - // Default handling - if ( 'product' != $post_type || empty( $facet['source'] ) ) { - return $return; - } - - // Ignore product attributes with "Used for variations" ticked - if ( 0 === strpos( $facet['source'], 'tax/pa_' ) ) { - if ( 'variable' == $this->get_product_type( $post_id ) ) { - $attrs = $product->get_attributes(); - $attr_name = str_replace( 'tax/', '', $facet['source'] ); - if ( isset( $attrs[ $attr_name ] ) && 1 === $attrs[ $attr_name ]['is_variation'] ) { - return true; // skip - } - } - } - - // Custom woo fields - if ( 0 === strpos( $facet['source'], 'woo/' ) ) { - $source = substr( $facet['source'], 4 ); - - // Price - if ( 'price' == $source || 'sale_price' == $source || 'regular_price' == $source ) { - if ( $product->is_type( 'variable' ) ) { - $method_name = "get_variation_$source"; - $price_min = $product->$method_name( 'min' ); // get_variation_price() - $price_max = $product->$method_name( 'max' ); - } - else { - $method_name = "get_$source"; - $price_min = $price_max = $product->$method_name(); // get_price() - } - - $defaults['facet_value'] = $price_min; - $defaults['facet_display_value'] = $price_max; - FWP()->indexer->index_row( $defaults ); - } - - // Average Rating - elseif ( 'average_rating' == $source ) { - $rating = $product->get_average_rating(); - $defaults['facet_value'] = $rating; - $defaults['facet_display_value'] = $rating; - FWP()->indexer->index_row( $defaults ); - } - - // Stock Status - elseif ( 'stock_status' == $source ) { - $in_stock = $product->is_in_stock(); - $defaults['facet_value'] = (int) $in_stock; - $defaults['facet_display_value'] = $in_stock ? 'In Stock' : 'Out of Stock'; - FWP()->indexer->index_row( $defaults ); - } - - // On Sale - elseif ( 'on_sale' == $source ) { - if ( $product->is_on_sale() ) { - $defaults['facet_value'] = 1; - $defaults['facet_display_value'] = 'On Sale'; - FWP()->indexer->index_row( $defaults ); - } - } - - // Featured - elseif ( 'featured' == $source ) { - if ( $product->is_featured() ) { - $defaults['facet_value'] = 1; - $defaults['facet_display_value'] = 'Featured'; - FWP()->indexer->index_row( $defaults ); - } - } - - // Product Type - elseif ( 'product_type' == $source ) { - $type = $product->get_type(); - $defaults['facet_value'] = $type; - $defaults['facet_display_value'] = $type; - FWP()->indexer->index_row( $defaults ); - } - - return true; // skip - } - - return $return; - } - - - /** - * Allow certain hard-coded choices to be translated dynamically - * instead of stored as translated in the index table - * @since 3.9.6 - */ - function translate_hardcoded_choices( $label, $params ) { - $source = $params['facet']['source']; - - if ( 'woo/stock_status' == $source ) { - $label = ( 'In Stock' == $label ) ? __( 'In Stock', 'fwp-front' ) : __( 'Out of Stock', 'fwp-front' ); - } - elseif ( 'woo/on_sale' == $source ) { - $label = __( 'On Sale', 'fwp-front' ); - } - elseif ( 'woo/featured' == $source ) { - $label = __( 'Featured', 'fwp-front' ); - } - - return $label; - } - - - /** - * WooCommerce removes its sort hooks after the main product_query runs - * We need to preserve the sort for FacetWP to work - * - * @since 3.2.8 - */ - function preserve_sort( $clauses, $query ) { - - if ( ! apply_filters( 'facetwp_woocommerce_preserve_sort', true ) ) { - return $clauses; - } - - $prefix = FWP()->helper->get_setting( 'prefix' ); - $using_sort = isset( FWP()->facet->http_params['get'][ $prefix . 'sort' ] ); - - if ( 'product_query' == $query->get( 'wc_query' ) && true === $query->get( 'facetwp' ) && ! $using_sort ) { - if ( false === $this->post_clauses ) { - $this->post_clauses = $clauses; - } - else { - $clauses['join'] = $this->post_clauses['join']; - $clauses['where'] = $this->post_clauses['where']; - $clauses['orderby'] = $this->post_clauses['orderby']; - - // Narrow the main query results - $where_clause = FWP()->facet->where_clause; - - if ( ! empty( $where_clause ) ) { - $column = $GLOBALS['wpdb']->posts; - $clauses['where'] .= str_replace( 'post_id', "$column.ID", $where_clause ); - } - } - } - - return $clauses; - } - - - /** - * Prevent WooCommerce from redirecting to single result page - * @since 3.3.7 - */ - function redirect_single_search_result( $bool ) { - $using_facetwp = ( FWP()->request->is_refresh || ! empty( FWP()->request->url_vars ) ); - return $using_facetwp ? false : $bool; - } - - - /** - * Prevent WooCommerce sort when a FacetWP sort is active - * @since 3.6.8 - */ - function default_catalog_orderby( $orderby ) { - $sort = FWP()->helper->get_setting( 'prefix' ) . 'sort'; - return isset( $_GET[ $sort ] ) ? 'menu_order' : $orderby; - } -} - - -if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - new FacetWP_Integration_WooCommerce(); -} diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/wp-cli/wp-cli.php b/wp/wp-content/plugins/facetwp/includes/integrations/wp-cli/wp-cli.php deleted file mode 100644 index 9cf36073..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/wp-cli/wp-cli.php +++ /dev/null @@ -1,150 +0,0 @@ -] - * : Index specific post IDs (comma-separated). - * - * [--facets=] - * : Index specific facet names (comma-separated). - */ - function index( $args, $assoc_args ) { - $index_all = true; - - if ( isset( $assoc_args['ids'] ) ) { - if ( empty( $assoc_args['ids'] ) ) { - WP_CLI::error( 'IDs empty.' ); - } - - $ids = preg_replace( '/\s+/', '', $assoc_args['ids'] ); - $ids = explode( ',', $ids ); - $post_ids = array_filter( $ids, 'ctype_digit' ); - $index_all = false; - } - else { - $post_ids = FWP()->indexer->get_post_ids_to_index(); - } - - if ( isset( $assoc_args['facets'] ) ) { - if ( empty( $assoc_args['facets'] ) ) { - WP_CLI::error( 'Facets empty.' ); - } - - $facets = []; - $facet_names = preg_replace( '/\s+/', '', $assoc_args['facets'] ); - $facet_names = explode( ',', $facet_names ); - foreach ( $facet_names as $name ) { - $facet = FWP()->helper->get_facet_by_name( $name ); - if ( false !== $facet ) { - $facets[] = $facet; - } - } - - $index_all = false; - } - else { - $facets = FWP()->helper->get_facets(); - } - - $progress = WP_CLI\Utils\make_progress_bar( 'Indexing:', count( $post_ids ) ); - - // prep - if ( $index_all ) { - FWP()->indexer->manage_temp_table( 'create' ); - } - else { - $assoc_args['pre_index'] = true; - $this->purge( $args, $assoc_args ); - } - - // manually load value modifiers - FWP()->indexer->load_value_modifiers( $facets ); - - // index - foreach ( $post_ids as $post_id ) { - FWP()->indexer->index_post( $post_id, $facets ); - $progress->tick(); - } - - // cleanup - if ( $index_all ) { - update_option( 'facetwp_last_indexed', time(), 'no' ); - FWP()->indexer->manage_temp_table( 'replace' ); - FWP()->indexer->manage_temp_table( 'delete' ); - } - - $progress->finish(); - - WP_CLI::success( 'Indexing complete.' ); - } - - - /** - * Purge facet data. - * - * ## OPTIONS - * - * [--ids=] - * : Purge specific post IDs (comma-separated). - * - * [--facets=] - * : Purge specific facet names (comma-separated). - */ - function purge( $args, $assoc_args ) { - global $wpdb; - - $table = FWP()->indexer->table; - - if ( ! isset( $assoc_args['ids'] ) && ! isset( $assoc_args['facets'] ) ) { - $sql = "TRUNCATE TABLE $table"; - } - else { - $where = []; - - if ( isset( $assoc_args['ids'] ) ) { - if ( empty( $assoc_args['ids'] ) ) { - WP_CLI::error( 'IDs empty.' ); - } - - $ids = preg_replace( '/\s+/', '', ',' . $assoc_args['ids'] ); - $ids = explode( ',', $ids ); - $post_ids = array_filter( $ids, 'ctype_digit' ); - $post_ids = implode( "','", $post_ids ); - $where[] = "post_id IN ('$post_ids')"; - } - - if ( isset( $assoc_args['facets'] ) ) { - if ( empty( $assoc_args['facets'] ) ) { - WP_CLI::error( 'Facets empty.' ); - } - - $facet_names = preg_replace( '/\s+/', '', $assoc_args['facets'] ); - $facet_names = explode( ',', $facet_names ); - $facet_names = array_map( 'esc_sql', $facet_names ); - $facet_names = implode( "','", $facet_names ); - $where[] = "facet_name IN ('$facet_names')"; - } - - $sql = "DELETE FROM $table WHERE " . implode( ' AND ', $where ); - } - - $wpdb->query( $sql ); - - if ( ! isset( $assoc_args['pre_index'] ) ) { - WP_CLI::success( 'Purge complete.' ); - } - } -} - -if ( defined( 'WP_CLI' ) && WP_CLI ) { - WP_CLI::add_command( 'facetwp', 'FacetWP_Integration_WP_CLI' ); -} diff --git a/wp/wp-content/plugins/facetwp/includes/integrations/wp-rocket/wp-rocket.php b/wp/wp-content/plugins/facetwp/includes/integrations/wp-rocket/wp-rocket.php deleted file mode 100644 index b0799aae..00000000 --- a/wp/wp-content/plugins/facetwp/includes/integrations/wp-rocket/wp-rocket.php +++ /dev/null @@ -1,24 +0,0 @@ -. -*/ - -defined( 'ABSPATH' ) or exit; - -class FacetWP -{ - - private static $instance; - - - function __construct() { - - // php check - if ( version_compare( phpversion(), '7.0', '<' ) ) { - add_action( 'admin_notices', array( $this, 'upgrade_notice' ) ); - return; - } - - // setup variables - define( 'FACETWP_VERSION', '4.1.5' ); - define( 'FACETWP_DIR', dirname( __FILE__ ) ); - define( 'FACETWP_URL', plugins_url( '', __FILE__ ) ); - define( 'FACETWP_BASENAME', plugin_basename( __FILE__ ) ); - - // get the gears turning - include( FACETWP_DIR . '/includes/class-init.php' ); - } - - - /** - * Singleton - */ - public static function instance() { - if ( ! isset( self::$instance ) ) { - self::$instance = new self; - } - return self::$instance; - } - - - /** - * Require PHP 7.0+ - */ - function upgrade_notice() { - $message = __( 'FacetWP requires PHP %s or above. Please contact your host and request a PHP upgrade.', 'fwp' ); - echo '

    ' . sprintf( $message, '7.0' ) . '

    '; - } -} - - -function FWP() { - return FacetWP::instance(); -} - - -FWP(); diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-ca.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-ca.mo deleted file mode 100644 index bc6f1f218547f010c2ceb04aea3d785ace089f19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1837 zcmY+EO>7%Q6vwAfK5C#q5k-|MG(7;0s&#BDsiF-*1m{CRacyF^KyTySXM581j5RZx z)GfJG;sio)=mjK*Kte)lL8#&Y2QKCU5=S^8K5iU(K!P*kKi+K|R^$1-H}m#=%+B+# zCyw4=c%H%UG=3{byvA5^&y+_Y4xrx)8t^`F2RshG0s8&7z(>G$bAAXu2>oWxuRw4A zZO$J-4E75qZ}%JM{r{Qs4v4}2!c+kN1|I|e1@8wRh4BO6N$_FtY0&#Q3;O)#KyMf3 z>&rP`27Mka(7)dSz5i{{`$@rv!0S2R0eyY%gBa{1Og^tqKyUvk_&v_-Ht6m45d0W; z9rXFU4W0yVfPVibcmn(qd>s4^^znbr`3LB~!yWJ`@ED5lb)3QE{S`s)rvf4*I|urF zLeTqN0#AWW(AT#OVlacr*EP!dCg}5g55!;}$ zpPWY!3?e%Y`n;Y5eO{+P@8>kgp5^I~Evpf$B_vEX^F&9&Nv+t5a5R~C@jUI4bu+ov zNa9SB)(I66TU9ZiSg$HahF_-9t~Rm7x>pYzu4}fTc+2VNGOLR#tS%KhuQ9kGnj;WCB%!%!KInI@}*#ThFwsxX0MZFy34MqJ#HzX$WhFi zMsGt3HsatS8H=L}`I?Bxz1rl(uF=ZP6t-xHutDASWE{Md_H5ABAulu=?Vx68a^8VY zCFIp|wH%bILAAmwb78r1wu}dc!4~aE?|f=k4ay5aWu8~6;aqOFDXa_HMkt#Ir%lM~ z!a2S!I~~iP?^BZK7rQ>S-C-%xgBJ>$LiJLdVbCTq2zgC7kqC9L9P&sM>KpadX=RmC zxllt*q!4H{M8=M;xY=PMq*~-rUl@Fhr3>w~U}0+K6Y7!)R#l{99CFAPI?@%INoqtA ztZ6f_Ay>nRYL}{uJQJ6Sil15Hm6^rDYr#4xGFefZI?}xF+|Y)zv;KM|(o(4-ug=2G zZ%)&#mgY<4MZP->=1b?W+td_G7qoP0BC2KChCE9*>xWlTkyzT%30t)tZ44R%E)l|A z6_Fg@<}vXo5k~lK$R=JKj6buu#Su($V5nK^`Mc)`-eNJFL__&{UoxEvd{H};t16d?(oj| zn*kZk8u&1%qeaTn;m#WG_mHJ;E+;yP#NR^}`68u;_<+>NvRp>-heSSUHr6mPDZz(m zUw=?sDj7*u(|9wYlnYKaG7`R6dwk33102lA Aj{pDw diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-ca.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-ca.po deleted file mode 100644 index fc53aafe..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-ca.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Catalan\n" -"Language: ca\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Qualsevol" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Esborrar" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Localització de clara" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Data" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Data (més recent)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Data (més antic)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distància" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Data final" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Introduïu les paraules clau" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Introduïu la ubicació" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Cercar" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "En Stock" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Màx" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "No" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "No hi ha resultats" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "No s'han trobat resultats" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Número" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "de" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Oferta" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Sense Stock" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per pàgina" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Restablir" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Cercar" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Veure menys" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Veure més" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Veure més {num}" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Ordena per" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Data inici" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Comenceu a escriure" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Títol (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Títol (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Desfer" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Sí" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} seleccionats" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.mo deleted file mode 100644 index 7bb5a63d47ae683e54154e58db6a115eb9603e09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1771 zcmZXTPl#JZ9LGmnwZ>|T2fc_)4@#EuvPsyL^{p%2?mxC}x?z*8+Dn<_O_H~n%sgi1 zWgBZz#GVS(ix&lZ(C*2TB6<=eAc%PCQK<+XJa`bqgBS7pd+)g`7+&Txe}41({pL6G zz4!R>_ZWW9;Qtio>ti!FLOO2%fJ&j6G;AlE%+OVkNu9O1pWb@2LA>h1W&>EA@B+CB=|H)e$IlF-yBGG zVKKj4@B&DAv_RV50m=U!NPbfA5%8^ow?I1I`yf7c8x7_45lHq2;CHCmXCT?Vf#4MP zZ4guJCU^>b2c-4eAl2z(kn;Exq&&U`9|pe#>6~{9{sNMpKa2IhK=N}8L1_L&!IL2E zI}JVwo&oW(=L?<#Dc%N1b-Dyn+$$jY>w^?u6&!<<=bIp%^A<>T`T(Rj2O#tl{O0a$h<>Q;fD%l#gQP zh3-nWrX!wNuW2tWAIizTv5~_(4G$e|7`CZ-%bV_yHN;ich&8)t@Np|$s=WJ8m-kGn zBX%(zb);q6*d~-@+o|WKSGZ`xcOv?d?MNp*YvBmp0U)`O&SjmEu`=si)9L6s&xgi( z-kGqL7wBYZ=UqQZV%=x$*el7)%faQDfBTn%>sa6aw3plw24YHqiK6)UrP2b4<4 z>(zQSsMdpejo0SFYVB+lKNto(avYQMBfEM~T?lIPyjBnA3cD@ge9*Q+J0-laA#Vup z`9|F7IR3&wDrL^~D7F2h(lw(OOIt$sQ`9hMOEC&j4IR6|;cUnwab@+TQe(5Rc67E{ zrCM6Ssia1zNrIfcyy|BYC1SnEy8~fy9ZS3I^|k2i_+xoSmfyreY^6o%pp` z*wNxqy7kI@rMk%XlVHB`99Ek~MzIfCCbeC;l4l$8JY6WlBzU%iF&^E{Bw{;h#5+>O z{l3%#+%@jVWDPIt2}B?>O&DID9;hfAF84?j5o;;D)ribDb>wj^+)cmiOX%WoLYZN% zw2kQ<)|}qq3O8XPjiJl6A@^X5$b~-eKJ5P{cn>)Xx+JN% zIFhhZ&c}+ikPC#tN3o6|k*(>0Z9JAF i6saH@9`NanOgA)~-XP)Na=k?@F9;@b>5P%0Xa4|yhOLGG diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.po deleted file mode 100644 index f92fd4ca..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-da_DK.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Danish\n" -"Language: da_DK\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& op" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Enhver" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Ryd" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Rud beliggenhed" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Dato" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Dato (nyeste)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Dato (ældste)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Afstand" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Slut dato" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Indtast søgeord" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Indtast lokation" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Gå" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "På lager" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Maks" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nej" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Ingen resultater" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Ingen resultater fundet" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Nummer" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "af" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Udsalg" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Ikke på lager" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per side" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Nulstil" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Søg" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Se mindre" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Læs mere" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Se {num} mere" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sorter efter" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Start dato" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Begynd at skrive" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titel (A - Å)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titel (Å-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Fortryd" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Ja" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} valgt" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.mo deleted file mode 100644 index 07edce406985cc3d503e5bec30388cab909eb740..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1834 zcmZXUO=u)V6vsa%R|zPKl%SGf>B-EHNaz@GOtK+sCK)obuEvA(bibbIO?TB$ zRh`*ncM-&k3bGdwJgf(UAS`$gJ&7LXD1vzP>*B$Kh~P;N;{VOGJBm$B{a#hSdS6{{ zemHgPZGq=;{7&PydJC_FNN=6;7{mATV2KzTauGa`;JKuop=X;Rt{aWx( zkn3?AMdkWD0CJo&Am{rq7yAjB4@5&9h?SHAGnr+o!@wn4iPgZ-c#^YQG$iZF#cDf^ zCac7{K!qgMR3yjRYs!(4dvq|=CbHP)&ES$~CQ58+3~9*bsk8qQ zWvp`*iLE^Ak`dcD7NjJ$b0>9Nm}tTFAn1|UAxloQkwVx9NTy`%Sje=Yv2a=C*;P4N zYU5=0K(t)|VI1~EbO(b(^+YFeDaqM}w_E;4-t`(~ab87Qyhv8)SX@?DrKOZYN0De5 zeG!tk5qZy(u_&D{&jum63oSVt8?9Wqv_k{9^_sSqMBcM`&w3s0%TjB*+0i98H%Nm-Ey=JS7<`W9^PRKa;#7}Aiph9uD%26m?90V&;!3SF zH$m#1)h4sPRDTbiQ8d2OAWkX9zq`f?I((Ge-G+HP(}pM`r!<&czs z$?->$>F84%_OXMnm1mQg`y)q3(6~YJOwNvuQa9N^3m|Qk<6@ypqVb`29`?J`Gf5mv zLM^BZd+R*Qc0#DRlH0hN0lT%Lk;ifqpU6ym28YCRm`JV}oK}go^uG<+qZlm&(`cd$ z$2T(BU}xIFrrjsA7v!nq!opx6JKGDk_`0;vSPaoaiRCiM;CIwb5VbOATjkk1;L zZntsM6YMCd0&Ym|vq|EO2#s!OnlyTi(rK@;Jnpp}E`4uwq diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.po deleted file mode 100644 index fa29881f..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-de_DE.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: German\n" -"Language: de_DE\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Alle" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Zurücksetzen" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Location löschen" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Datum" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Datum (Neueste)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Datum (älteste)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Entfernung" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Enddatum" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Suchbegriff eingeben" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Geben Sie den Ort an" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Los" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "Auf Lager" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nein" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Keine Ergebnisse" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Keine Ergebnisse gefunden" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Nummer" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "von" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Im Angebot" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Ausverkauft" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Pro Seite" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Zurücksetzen" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Suche" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Weniger sehen" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Mehr anzeigen" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "{num} weitere anzeigen" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sortieren nach" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Startdatum" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Adresse eingeben" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titel (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titel (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Rückgängig" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Ja" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} ausgewählt" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.mo deleted file mode 100644 index 40fd2c9fc7d6917673d8ce22d7f8a8757c89b8cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1866 zcmY+DO>7%Q6vqczz6`W{bD%=Qfhwlj#5M^;8-j414;jTt6gzzM02=SU*wgOLn3>t6 zY3K!xpb8FLiU3uWkdVkJ;!-3eWUf8Kp@M4I6LGR}b=;NCPyns zvh*^~Rc##a?y|NM5Jq9=qT3xv)ngs$65Y*WRWy-SwqEw-mFb4v+D zj$*cM^m#}@GY;M&V^O-0FNuiU+v|K{%V_1wr41V3+Ms27G7ipWJsWg%$V=;MouFZ8 zRPVrt67pK5RtYM#pjPG8>9A5gQ^600!3J$h?|f`m3o5fgb%s}K;dEiQBCHEKMkt#I zr%lLP!a2SyyIsp)>r;~GH@19eJA=tcr>~b*gz9CeVbCFwhP*uxO4>fMH$75LDp9^` z5^}Qd*EdS7W@~YrXmzquY9K{e2c6vk5^!|UO$`zu)f|ud!r^G>G9!{;Nt@J$Tn$F5ov+RDT%4a!{Dpa5EzgzS36@Eb$#Y!Mk>-8p z1~#0U^4*q5OOsuBX$p4!a2#%Ja%QqJ$9D$7%;YOLUDpqoR|B5LH(hCB~9ACE>R zk`FS8CR~x}Kw?bJYGZ`qn_U@+NS@Xr${fupwnRub-}yv3yk^nXkwjsreB`M>VNrBU zQ$9aZu;JCj$yD=rxGyjxJ=ul-& z`%&`K)EB$OaEW;I5N*o|Wrr_;);w}JypfX8tj-g`w-Gmz$xve+)8WKvOx*BV4}F25 zlS)RTdSo_2S!oHmp6|XEBXuGQyCcT>k;(0@2+7 diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.po deleted file mode 100644 index 2c64b557..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-es_AR.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Spanish (Argentina)\n" -"Language: es_AR\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Cualquier" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Limpiar" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Borrar Ubicación" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Fecha" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Fecha (más reciente)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Fecha (más antigua)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distancia" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Último día" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Ingrese palabras claves" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Introducir ubicación" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Ir" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "En Stock" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Minutos" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "No" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "No hay resultados" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "No se encontraron resultados" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Número" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "de" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "A la venta" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Fuera de Stock" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Por página" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Reiniciar" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Buscar" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Ver menos" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Ver más" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Ver {num} más" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Ordenar por" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Fecha de Comienzo" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Comience a escribir" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Título (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Título (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Deshacer" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Sí" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} selecciones" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.mo deleted file mode 100644 index 5efdbcfa831a63b06808a31dabfe230c1d599af8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1851 zcmY+DO=x6A5XW1MU!&`)=z4I`7F1>kZ!$9^5?;(|cJg5~lZ=^JKNduK-m97E-8bE1 zcfZYM*IWca5I-)Wcu>QFuwX8(f_PZLIe5~OcoGG@cu)|%tN(uUvT=u={#A8XS5?>R z`svPzcNl&T;eQnW#cRCASaR(FCm;@>Uk4iSdhiT*8~8Hl_g@DOfp6#h0K5tMCpkX{ zz5V5!-+~zIM@-)CXVClqE$8nb2Ky6J0sI@h9sCEp0Xz)j8^I&st>As2_cICl{H8%~ z7v}2=IiCc59xc$H?||O_DbV{#!CSyra=r=r`@Iihun#f$ye@#={$uca)a(-I?OsE0 z@9z!J`+pC-1N;cYV4q^T8~g&i3;Yhe8T=JI0{#Ks15O}$Z+8^*@oJ#I-wf#E9LrhH z_n!cLoTtG1!52Uue+TsbU(NNmK!3k?^YsfL2HVT^&p;pNGU)5{4e0HE01tz|fd1Zp zf&P2{oAVHY`E&PzCBxfB=K02)(I66TT(I4te2D{!%x%pmNv1)x>v6_T+wV*@s`ukY1R;DSwkwet}(bF znewvjrnySa-dd=EvB*d|$Wtc5E?eSmmE)@H&$8_I<9 zDjn?bv8s*Zoo&`~0z#JdSajP%sd}s}T|&IL5S%RS%O`_{5<8({&7LRAbeEl1JKR!2 zk)xP3jXnh_SdD{c$XJvv9A6rtl$U3V3W>B@BF~77F1?~>I|>e!s*;@O;{JSjZiib zPMeT7gmZjFb~=_n+NUJZk9U1)Tf=gs2geF)LiJMAFldt)guFErO4>dzLXfI-Wjo|# zUtDSx8mo<^gG*M+l|miYBZZjTLnQC$teYApI6KFqzA*SM^C#NN!R&#Z&#g-)SW=OW zQSXq?cBCsblhlYLSk`7>L#~FIYUgWnd@Rlv6@Or!S4(q+=YkbdWXAVf(~;(V=Y}?% zn({9#k(SCGd2R}Je)AyRT6v~ind4i-V5a;CcAJ`F>4KI{O+@u^wjm#n+LMiY(OM(!Vq ziFc(!;^%UYUw`#iK{a0%Q`B&V;<@yt-jxQYagmAg>87oq0hp8yVRlE|Q*R?a`h~6TRPl`&!n3i)8zF TyN0z!dn~4dCXCP(=*#~AwinO9 diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.po deleted file mode 100644 index beaf4419..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-es_ES.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Spanish (Spain)\n" -"Language: es_ES\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Cualquiera" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Limpiar" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Borrar ubicación" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Fecha" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Fecha (más reciente)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Fecha (más antigua)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distancia" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Fecha de finalización" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "¿Qué estás buscando?" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Introducir ubicación" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Ir" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "En Stock" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Máx" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Mín" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "No" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "No hay resultados" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "No se han encontrado resultados" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Número" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "de" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "En oferta" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Agotado" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Por página" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Reiniciar" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Buscar" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Ver menos" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Ver más" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Ver {num} más" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Ordenar por" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Fecha de inicio" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Escribe algo" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Título (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Título (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Deshacer" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Sí" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} selecciones" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.mo deleted file mode 100644 index 55a9072ab325fe895695ba33cc68c0c5d54a3702..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1839 zcmZ9LPiP!f9LJxv{#&)x3K2x*c~G;I+3YTfgh^9e(1+wnjAfNjOcmn(voB%5*0;YHl93|={r%TR) z$FYA3e*#(GZy@Xa zr{ob7%k>_^!ulpa?$cA?jWFEb!92vPqyF1!M7W?cTBwW^FMad1P!!6McE{b-n#G1w>4cRPl z_6}1HbfzM)mZg0%VjYhK35oU0Nj)f2bdY-#Y?A1bB_}peLO29SCS+}Hq}ot!Tvl0n zMHa3$PWE@jh6`ZivJ2Dgj$*Ybda+ALPPV-B)qVTC*Q$!MD$?Q&vO*8UWpzbbN+@&` ziH^}1V0kN%caDrj>wLKsgydf9$jO1x%2g{}8sS*4Z8zh{dnMbnUQhe7(pm3$3x@K3 zdo0D5&3d!$)tg?kAsf?vy>YUR9|FBDZO5GaFs|v#KeW^ydYv-GDvM}c-l{_sQ)w#;+-ZCjNMR}__)N<(D$of-L z{GlbWrCL9}G=(_6d8oEoo2k|34R+{l%i2eOpNdhjwO7t@(r3m}`Q^W6DMkEIqgD!R<V6 yUO#hUL8s^(dMd}CN*9b!4rUG#4rY$+eCAq8WnAuh7K@0Au^aF4++h$DO8FlWc*hI? diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.po deleted file mode 100644 index f76893e9..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-fr_FR.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:42+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: French (France)\n" -"Language: fr_FR\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Tous" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Effacer" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Effacer l’emplacement" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Date" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Date (plus récent)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Date (la plus ancienne)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distance" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Date de fin" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Rechercher par nom" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Entrez la localisation" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Aller" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "En stock" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Non" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Aucun résultat" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Aucun résultat trouvé" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Nombre" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "de" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Promo" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Rupture de stock" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Par page" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Réinitialiser" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Rechercher" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Voir moins" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Voir plus" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Voir {num} plus" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Trier par" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Date de début" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Commencer à taper" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titre (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titre (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Annuler" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Oui" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} sélectionné" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.mo deleted file mode 100644 index b91972a00aac20ceb2ee1b1e24d12ad8982e3daf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1833 zcmZ9LO=x6A5XW10{Te@3BJ3)Pw1RFzc$1kSk?>-~IGco#Br|4aqb`EUI4* zar^^@-&6QMhX0w{NMlUjKIU?cfQ_X|k=e=GP0h{0}RDuI834}yP#cY-Hid>42UybpXFBtO$2#WxF*U0kd$ z6?_q-INBhc?}Ft2JV<^r@Luqpg71Qq--jRu`xq0&^(jd9pMyW3W?zA1_ckuS2fPeY zJnw-M;8l?JzW^TszbyDYNOnJhbnaL16!?3we+)^$H9G}TT#pv|>4MWB#WMp^eQMyt zU>(F@uVJD*6OiuN1u5SE;tKXw!OI}!bEV)_koQcPj1LP>BCf^HFa;KDIbJM zBwIE;o?9=QARXV8`+L^)Jl07)a=2<)!|-;n$u3(L7udQoY{O!3Cw-=azeVJIo0%Tl z$Oc{MSQE#DmaLftZu^Cc7JR2-Te3~*WngWjkn8}GYw3M146Kv6aM5IgOMIkS7kGD{ zwS$0=hdmO*eyYqi>!_e5pInO0P5mpMieH+l`u!kF<0UBMyIsiSYI9|S1ngc zb)+Q??%GcgbdVRqOsa)43q08o4&P((Y-c5!AKOt(ed(fQlh_{W9P|0E3Z<6LoY2vV zbps!Bljf>ltS#`7xHxI}6N|h$wNQE`T9rn+QC@2{v3w_l)WC4z0COdMk%jXhE*(~%-{aEj-R#hMPERPYq7N>$+vLvgcq;?z)aeOj5G ua_Zo~a?7>gi3%tne?S diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.po deleted file mode 100644 index bc9380bc..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-it_IT.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Italian\n" -"Language: it_IT\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Qualsiasi" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Cancella" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Cancella località" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Data" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Data (più recente)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Data (più vecchia)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distanza" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Data Fine" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Inserisci parole chiave" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Inserisci posizione" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Vai" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "Disponibile" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "No" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Nessun risultato" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Nessun risultato trovato" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Numero" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "di" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Offerta" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Esaurito" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per pagina" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Reset" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Cerca" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Vedi di meno" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Vedi di più" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Vedi altri {num}" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Ordina per" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Data Inizio" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Scrivi l'indirizzo o la città qui" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titoli (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titoli (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Annulla" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Sì" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} selezionato" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.mo deleted file mode 100644 index 251944d0d624703484e7e1b89fe8245d941bd62d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1763 zcmZXT!D}Q%6vk^c>N>8j?nMNV@*)$YH<`hOFfl@QO+uDrGVV;&EQ?Yz{btfmb=6Q+ zo$MI*56DqL5mXc*;z0!QvLHwx7cY8Q5Cj!3dJx%@2SFD6UQd|_4n6g&SN-bMd#}F! z`P|go0>3K$kK=#s6k9^Pf7c18F#Q1b-QdUIJ>VzcL*Qp1zyAt+5Il_h4m=I}$H-qn z_P-r@2juh4ASnAygIE&vXkP&DgZ&(cM=VEP2HCF(R=^j)hrw&$yD6W4Qc?cpU@h!-GyA}C8$oqZ(#Z$5viA6IOmozCi8Kt&86*6nY^D0m| z$ZC^z$%pA^ZRm7jWj-j=Be7&sS$Z#-Ku!*6ylY+RvCigkz=^qMZb<87ZXLGcyqD>bh9ZjA&Xs(vdH8@c)_0zAa2Dnnm6vCpNHM zX%ZVnkhUK~wUEh34MDIs?asteu~&T(W4V2}x%>!mdEq!^}vl%*>Zhp3kT`=;=1zDS~yqv6% zA*X_M4Y_7}R&Iwd@{O4pzEYieI^WG+pQ)@VGbqqn1na)q+^DpieGSDXtLaGrICPMq zkY&}Q@KQ@A$FsgG>q?KqBpp(DLpH73r9q~QtX{Ok{OCYWL$G!Mi-n|Q#jE0-#)(XC^H*EI9@iqLSHw ukg=BnA6`nhY{EqvjB&1$d>%K1Bg03ZXu32?QKLPGepv~%Q;NE*Ui<^t4yIKA diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.po deleted file mode 100644 index cd60c4df..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-nb_NO.po +++ /dev/null @@ -1,182 +0,0 @@ -# Translation of Plugin: FacetWP - FacetWP frontend in Norwegian (Bokmål) -# This file is distributed under the same license as the Plugin: FacetWP - FacetWP frontend package. -msgid "" -msgstr "" -"PO-Revision-Date: 2022-08-15 12:42+0000\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: Loco https://localise.biz/\n" -"Language: nb_NO\n" -"Project-Id-Version: Plugin: FacetWP - FacetWP frontend\n" -"Language-Team: Norwegian (Bokmål)" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& opp" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Noen" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Tøm" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Tøm sted" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Dato" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Dato (nyeste)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Dato (eldste)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Avstand" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Sluttdato" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Skriv inn søkeord" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Angi plassering" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "Skriv inn {n} eller flere tegn" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "Utvalgte" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Gå" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "På lager" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "Laster" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Maks" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nei" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Ingen resultater" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Ingen resultater funnet" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Nummer" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "av" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "På salg" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Ikke på lager" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per side" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Tilbakestill" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Søk" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Se mindre" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Se mer" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Se {num} mer" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sorter etter" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Startdato" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Begynner å skrive" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Tittel (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Tittel (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Angre" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Ja" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} valgt" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-nl_NL.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-nl_NL.mo deleted file mode 100644 index 9645f817838764103cdbfcb9a35b99620a23040e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1796 zcmY+DO^72!6vu0I{fe&ZDvE+gc~B-Sok_xs3_XsR`DE6~BuuiqIv1&Qzhru*yQ=A~ zPByONK`)A+UiRWa5m7H51Q7(mn+Sr4N5PM)hZTjrFaBS5J6S`ee(zPkdhbU^PC5{zXg!v+;Y8D z@&d?x^g!M}06G65$aymGUhwsj?|^*1_dyKtAtvtYW02!N1%JRh`x4~1*HE1K2FUf_ z1kZu*f*9f>Oni>dKIoNeE^ zL`jNQ=gLjxk-glNbHl`FTdnL-jIvHU9R&?1T zZ#vC}Y%I9-#`!va2z2&n9B}ekT+^v9IgLfxXu1o{B5p^e*6Alor=hYYab;UsE4PBd zAeGM^P#Bu$huqpEu6ZVUuCk-_D8oB+`lKRPu4mReI9YV14qx8gskFD-8?&P|YW2z* z4n-Q3rZHN!bj8lcp$hb}^bS;lud#Bmzv(Q^;<%$BCC-NSjE}eM%B4YIE8Q?lROoD) zBuY^&&fRpSxhxBFWlqZ{S7f8QTzS#iB27tgsvYAQd0=gvy7TjVzrrA;+8}sk9&!9| z)^4-5SgS9~N$f1vp25?uAwRHA&t!>5Yel!NEZQvv5#pv@4$_pgzz3ZKhyKYe&IOT0 zEQBnQb2^}Gl3L1@!3!qybGJ2QY4~Cz(7w;H;*voUo6vA#pbgRzmmi(t(-X`wo}%2A z5}jC%5s@h6&qP8bwg`I)o#37z^#8sb(b#C@WywU4OiSrOfTQ9@?*;_f+>)1-(^aED zt5Q4rhK{hcZ;X}^TE_lWItmVtWJIv@^-@CY_i&d%SB*b\n" -"Language-Team: Dutch\n" -"Language: nl_NL\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Alle" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Wissen" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Verwijder locatie" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Datum" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Datum (nieuwste)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Datum (oudste)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Afstand" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Einddatum" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Voer trefwoorden in" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Locatie invoeren" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Ga" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "Op voorraad" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nee" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Geen resultaten" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Geen resultaten gevonden" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Nummer" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "van" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Aanbieding" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Niet op voorraad" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per Pagina" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Reset" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Zoeken" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Toon minder" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Bekijk meer" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Toon {num} meer" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sorteer op" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Startdatum" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Klantnaam" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titel (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titel (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Ongedaan maken" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Ja" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} geselecteerd" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-pl_PL.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-pl_PL.mo deleted file mode 100644 index f8eff2a9f66937f8ab98a553758dd00206a9a769..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1914 zcmY+DO^6&t6vsegkd%+a>=5@v^_MRKS10!{8n85cnjV9|DhnkAW|OHqLR-<~I*o zKex0mmwX+xd9*-#z609$1JK4vz(>K$B|iXdeV>4M+2>enUSELL|4VQRhHId`?;Bih z2fIopY&TY`v@fY|Mcn7p`4&$)ZUjUy4=RkXI4YcRp0c~Ca#8vFwl1a%7 zwEe#X5_knfXm%B}@xKD?y*EHx?~kC(^Jfq*`yGq*`vbK7`4@Z!JOn3O$8(^~?`X+a zK%386$#bBM!$F&0AGDuRSnf-Z9it>-%Q9mtq2Td&rBHd?1WK~g+=ybK=}nOeZDvYs zEA+=&pbeLvV5`!n!h2O35z|m)sfv9KyH)Q6JgeB6q?S?MkZte_Y$K3tQ{kmp=p;1y zfJj}HNS|#cqmGE#7LM^yu&u<9>Xspzh#m2sVB10q!&)f8>jQ#9p>-jQR4fYNqD)4Y zXsoK(P$y$8!yy!Dk42M3f$Xt%U_wFD%g*l1U3u48o?+*tuh?5cGu34m){a;4z|q+j=K~vj;#YU7C!N{}s@2{3(r=w>EUU$~u?51U+=xf{$EksxZ*~dsdgC@a^V$Wn*n) zby8bxwpv+1RYKybEJDskTrhJ{$OE}RUZ2PKI~wQOXPlE0Kbull#LlYpl#e#Mbg~ne zN;6Di9y(`KJkl=7s8Ds|r3KtSC=< zdwYewx>TE=!I2t{)MpkdZ#rj%6!Ewp>&jEqHzv~V+?@R~QLvcp1o<5N?B=A-`s|6> z>H?*ab7J;o>^7C~1LL$*5_@80T&7FoIx$K*xb-nRtx^?Ypms7Z&-OpP_5MV{91L+= z&b@(k7VN zl7>^tX&5G6u2OMe=YRLE!I$mOi1&D&$v{j75%Q^+4=IItc=KAyHUmMq#MtHd>J;r? z=f2Fm{sD(%gxTC79mTou`Tq5+jBp_QCMRt$11Px|(`3L}c{1b!wyQea%V~rp?kOpH z=uOn|)ZR6=FhR+H(q7R#id7ydFUJA&VHcrffXyh-S<2D(O`fOdWiiI3T#WIG>cWw= Q`H\n" -"Language-Team: Polish\n" -"Language: pl_PL\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 " -"|| n%100>14) ? 1 : 2);\n" -"X-Generator: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& się" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Dowolny" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Wyczyść" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Wyczyść lokalizację" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Data" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Daty (Najnowsze)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Daty (Najstarsze)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Odległość" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Data zakończenia" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Wprowadź słowa kluczowe" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Wprowadź lokalizację" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Idź" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "W magazynie" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nie" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Brak wyników" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Nie znaleziono żadnych wyników" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Numer" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "z" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "W sprzedaży" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Brak w magazynie" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Na stronę" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Resetuj" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Szukaj" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Zobacz mniej" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Zobacz więcej" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Zobacz {num} więcej" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sortuj wg" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Data rozpoczęcia" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Zacznij wpisywać" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Nazwy (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Nazwy (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Cofnij" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Tak" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "wybrano {n}" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.mo deleted file mode 100644 index d09d10b81de392cf1351c31a28df619766117dae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1841 zcmYk5J!~9B6vu}Uz79yDfFdCROaros*1kJzWUX<81h6zKDt0KHvU z?ax+x4fJ_*K>vOZ^!_(M?dXqA?WM73gTg(V)1!h2fh85;LqsUw_wo+1owID zfj<7n;FI8Ipg+F}J^|hakApvgKK}0&?|>(u{|owl9)S}d?JY%zJhs`Ab!6Y)SEs)6phtiA$^{6p&3RIJ%sWSQ=>%jycZlu+a-W^JQ4 zAO%ZtaGs1s>q5RDB64rE`AFYrZdNXJ?cw-{0H%`^@gJG~nThco}uxkeOsh}~*8_jT{S=ucN>w>Nk$|k~T6Y`dD zjxWky&+=E+DM|FJeV^KPHWumhbZuFvL5>~2ewsH%r)zHpi=@buB`)ho^L6Jk8;+0r z%a%w>V?DV$4m*E%kZp5pa;!ehx3ge!>}8y`HO0~e9i5wq=E`J4US?ZP$LqOBF6Ov` z%QDR{BPEJEoyc7={Azez`>_zk!begeEv|Efeo!$lqS_P6$$`KYhGzJ=ie&Z1f>a{G z?m*%`;yx#0%Lp5wb6c3cYP+b4Eg3eSa*UovMyxfwR*jHPp+jjkMIzQ1BvR}7Jv*Gx zYUKg&x)v@mIhRYMZKXdz9F?DCj U_Qfvx-;pVc>0t8UN%?C22VxP&@Bjb+ diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.po deleted file mode 100644 index e95a5a20..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-pt_BR.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:42+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Portuguese (Brazil)\n" -"Language: pt_BR\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Qualquer" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Limpar" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Limpar localização" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Data" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Data (mais recente)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Data (mais antiga)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distância" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Data Final" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Digitar palavras-chave" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Digitar local" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Ir" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "Em estoque" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Máx" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Não" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Sem resultados" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Nenhum resultado encontrado" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Número" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "de" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "À venda" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Fora de Estoque" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Por página" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Redefinir" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Pesquisar" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Ver menos" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Veja mais" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Ver {num} mais" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Ordenar por" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Data de Início" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Comece a digitar" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Título (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Título (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Desfazer" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Sim" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} seleccionado" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.mo deleted file mode 100644 index ed81d582781780bcbcfb9e53a4a625086897bedb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1921 zcmYk6U1%Le6vwApzpmd}>x;+{Y)CAd+5GU62^b%I^r@oalMg-!^;!I%-L=UwcYf#0oIP{S**W*u z$M(N3@EpSLDf~|CV@-(Uj$Q7Dm_ol3bl_d!D) z`26p|$H5;!-oIJvzk>&${{!;*_rds4@BsJ(I0QZi9s^+_1|a8`f;dX7*4zL&o;N|R z&s*R@@I4Sie1VDcxeju?-`4t%Ap89p#1JgZ?>`GZ366v8 zw_Ecph#?dvjwb~<&J5&pJ#P+Ck%>vOE~XMCT{Tl;Bk8p@;)L|7oM?DXt*P9P)Y^O! zSDMbfG?5b1CZ^JQ+IZ#Yf?8j*F3z#e>TQRote7#hLn8Hi==6Gg+5!MTzD<#WO0h&XLxE6%E1*uJ=Au28NL6?qkl z1!vDg3TEQqjB+_j7t%=?DgW964fmZjex$LeG8`Lp^MQ_oSBgO%EZdM83-imtlv8EB z0}dsmcC+0Kn(d(7qSleH**e_B1H)iZt!j3@Yu65%M}yWlwc6p4c4ap!a~~`_Y4SvR z>q6>E@9C88^>RA4qLReE+~?5NveC$<#~ZWK3<}gRSXMF(Y0;+AXlZV*hve)Vi}Q`{ zOm})WyVhv4F@?O8!C~teqW0>dAIlP{%>+d&(&2-2PA{Jfj_%rVP<`csX%pEPg%0Ux zPy5C~QaG6eC#_5KkW5ypdFS~Fs>IH)>2zB35;Y0iolcW3U#4O64AzE*$Q)`lo5%Oa z$2zSSM_}E8b$eu@@p^Dd8Re>C%-YD(iuYL_j*aoPOmwbBdwOFGcD%WpVtaIav^ha* zSuj5O0(KXyinR}xY~dm`Rb?1bm15OL^G>4`mT=>7C3ik3xpPgI*B_MJJk>?+A?vRqnK(Tc)i*<3r diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.po deleted file mode 100644 index 120e929d..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-ro_RO.po +++ /dev/null @@ -1,186 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:42+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Romanian\n" -"Language: ro_RO\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n==0 || (n!=1 && n%100>=1 && " -"n%100<=19) ? 1 : 2);\n" -"X-Generator: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& up" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Orice" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Sterge" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Ștergeți locația" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Data" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Data (cele mai noi)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Data (cea mai veche)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Distanță" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Data de sfârșit" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Introdu cuvinte cheie" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Vă rugăm să introduceți ID-ul Locatiei" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Mergi" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "În stoc" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nu" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Nici un rezultat" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Niciun rezultat găsit" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Număr" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "din" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "La reducere" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Stoc epuizat" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per pagină" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Reset" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Caută" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Vedea mai puțin" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Vezi mai mult" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Vezi {num} mai multe" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sortare după" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Data de început" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Începeți să tastați" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titlu (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titlu (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Anulare" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Da" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} selectat" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-ru_RU.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-ru_RU.mo deleted file mode 100644 index e36bae2bb387015064551307c320e4233d270c3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2236 zcmaKsU1%It6vwYxKUk~PVnwmat71fkp7HEGjs-vl3oJ5RodLZ1YE5c(z}{?E)bDJ_`H% zF=U%kZU&!){Q^kwT_EM*fTTYOJ_VitY5%X%^_7%AfRt|pJ`LUgDer$k%4-`orMO;@ z@^}l}0J!Nym_yj zl!3~o)}T{PEIUw^Tav8DE%VsB$5qnj2j$eH=a&P_lesF`=dpg5k0`HnkPTRe*?{e` zy&fL!%OG@AaNCfNd7)cod&5dm`fLzkmLu65`Q8DHM1NVlCj9`dGkLF7lIry#-aO`euF7VHWfj|sfneM& zi&w(&K#Y1O&kPNYif&)V{T7sp$@95NdG z`$l`kjx|5ZX-xW}$1Qnf^x5P)inhuOIiYVkqSx~)fyv!!YzBoFJ9siIG`m}kT%lm_ zrY26q+?Il2@Rxax!yR^KA%AOWXQ7RTaYSyXk>}IXNl2&BmPLqxkbJfy^M>e?uJn@z z?eR(;pHQkAn60gJRUJE!Ek*mCR`}84THX1U_Lf`+pR9`ZmY1+PKDYS9cCaQOn9O*V*5-XY5& zbp`J=Bw3@i=p@r0Q62gc<*Vx)>nqVb*6YcpkdJe`NJ-t{`oEPdQgfhknOcERj{Rzo zTBZik%;zw#M6)zl*4LOmgMhgdJPuuojv<*7)DXPr0##SncTJNtGAI4ZD1@5XAfZOw z>zTAC`Z`1#Sg)bsC??(y$9Pv_XLK!YD%_JMy&oN8`mDY{@s#i)WN^m%3eCos03AJ+ z9QQfBM2V2W<2ykGd`L%&D8yXFcMd|R6&}eiS1fpm)DeMF$onk(W~g=XG`gQC;>xVu zf_Ni3$(5v@8gA4wHcL*D=}+`k+z(u#Q$nA|)mXL93w;Xq0`zf)kV)?\n" -"Language-Team: Russian\n" -"Language: ru_RU\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" -"X-Generator: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "и вверх" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Любой" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Очистить" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Очистить местоположение" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Дата" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Дата (новые)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Дата (самая старая)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Расстояние" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Дата окончания" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Введите ключевые слова" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Введите местоположение" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Перейти" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "В наличии" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Макс" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Мин" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Нет" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Нет результатов" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Результатов не найдено" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Номер" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "из" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Распродажа" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Нет в наличии" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "На страницу" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Сброс" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Поиск" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Свернуть" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Узнать больше" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Посмотреть {num} Подробнее" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Сортировать по" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Дата начала" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Напишите " - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Имя (А-Я)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Имя (Я-А)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Отменить" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Да" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} выбрано" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.mo b/wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.mo deleted file mode 100644 index 021b23e0f05062700889348cbd143c8c7f928ba2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1752 zcmY+DO>7%Q6vqczD7Ziohe}8Y4F`~|Y8~53AleXwn(rD=6;in%DkQ`K4)j3N6DK};?8P7Ut-Ut8Ff?t9Z zf2-ha5RLr+LvcTWl>e84zk+D&H<%Lm2lz1f7kDpt0>Q_?li&m3;~?cZ1yX&BAjSE` zc(dSHkm~4ww7v&Y{(X@0q~LMzt%6rUI^Rbi8oLHVb$tR-{0;Cs+}Y9 z|6Lf$_kQ7D18M(5@C5h;NOgY&-Vfd`=D!E2uAf0P_B#yK`zMI4*xv<@U^DWMfpq`J z!IR*lAR4Q|(EKwX)w=@HelLJj*NY&X?=_J2?}2D6hM{;1Qr^oT)pNBN{}810Hwu0R zqOn^rbU$Ag{05{v-_qn$JRP&9nzFT63X@wN>p-|jD|SXWnHgT*kq6ScO5yFsVeUoN z2^C1Tu0ozguPY}FAIa%~Hlf8hxpxw7YPO|#$LV0iTH*q0MT+fcG;X9#V`u-<<$ay1 zknN;NPa3w1Wg?brH+5Y1ixh3-9*cowd(ukBIygcw1SF58wOJ?8MrNIhDorl&+||bM z-jsEmKqo6Z@4D$YQUlhFTr7FH>7B3q+duC$E9{&KHG5TBru*!oy2P!FW#DAU+D7lA z=WT`FOVU_eozFK!Al=JtUhW&MT&1)p$Jo|u*+CR~r_+J;y4vTZ_HNf(Gcvnxk4o`* zqt>W-wT9QI^ZKG+tDmajhd^&nP9jP^k860fWv{-(>kWUgh}#y{d0iuvjfK<3=PltJ z-;8=a%by*}IM&biskDP}HPFd(rEQ@GDelngN|E@yb0EXW4(|;6+)iHate09_t@Zig z>eX6l4abrSdrikE+Q|!UVH}G{t?*zd48F(ex$cIyJddNA`qFsoD$pVB+2_l>$d%f0 zYDDa9Xp>l)tuqTxjxkWhw z4;0@hO>)c2YKq&InJUtRmuJ`G5Q3<%=ES<$Azp7MPF`RYnJ_r5#Xunsa_~%X$6WS-TqF4jPS0+deZlR>L=)15jOQAmex{Mx6*Vw| RofS+>GLa<0jOdfGe*idursn_v diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.po b/wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.po deleted file mode 100644 index 65cf3903..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front-sv_SE.po +++ /dev/null @@ -1,185 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-21 14:01+0000\n" -"PO-Revision-Date: 2022-08-15 12:41+0000\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: Swedish\n" -"Language: sv_SE\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: Loco https://localise.biz/\n" -"X-Loco-Version: 2.5.0; wp-5.6\n" -"X-Poedit-SourceCharset: UTF-8\n" - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "& upp" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "Någon" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "Rensa" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "Rensa plats" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "Datum" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "Datum (nyaste)" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "Datum (äldsta)" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "Avstånd" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "Slutdatum" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "Ange nyckelord" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "Ange plats" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "Start" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "I lager" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "Max" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "Min" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "Nej" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "Inga resultat" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "Inga resultat hittades" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "Nummer" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "av" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "Rea" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "Slut i lager" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "Per sida" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "Återställ" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "Sök" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "Se mindre" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "Se mer" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "Se {num} mer" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "Sortera efter" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "Startdatum" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "Börja skriv" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "Titel (A-Z)" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "Titel (Z-A)" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "Ångra" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "Ja" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "{n} markerat" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp-front.pot b/wp/wp-content/plugins/facetwp/languages/fwp-front.pot deleted file mode 100644 index 41b36f05..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp-front.pot +++ /dev/null @@ -1,185 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: FacetWP (front)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-15 12:40+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Language-Team: Matt Gibbs \n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\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/\n" -"X-Loco-Version: 2.5.2; wp-5.7.2\n" -"X-Poedit-SourceCharset: UTF-8\n" -"Language: " - -#: includes/facets/rating.php:111 -msgid "& up" -msgstr "" - -#: includes/facets/fselect.php:37 includes/facets/fselect.php:80 -#: includes/facets/dropdown.php:35 includes/facets/hierarchy.php:26 -msgid "Any" -msgstr "" - -#: includes/facets/date_range.php:282 -msgid "Clear" -msgstr "" - -#: includes/facets/proximity.php:180 -msgid "Clear location" -msgstr "" - -#: includes/facets/date_range.php:23 -msgid "Date" -msgstr "" - -#: includes/facets/sort.php:154 -msgid "Date (Newest)" -msgstr "" - -#: includes/facets/sort.php:161 -msgid "Date (Oldest)" -msgstr "" - -#: includes/facets/proximity.php:285 -msgid "Distance" -msgstr "" - -#: includes/facets/date_range.php:29 -msgid "End Date" -msgstr "" - -#: includes/facets/search.php:20 -msgid "Enter keywords" -msgstr "" - -#: includes/facets/proximity.php:64 -msgid "Enter location" -msgstr "" - -#: includes/facets/autocomplete.php:157 -msgid "Enter {n} or more characters" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:502 -msgid "Featured" -msgstr "" - -#: includes/facets/number_range.php:32 includes/facets/autocomplete.php:64 -msgid "Go" -msgstr "" - -#: includes/class-display.php:175 -msgid "Go to next page" -msgstr "" - -#: includes/class-display.php:174 -msgid "Go to page" -msgstr "" - -#: includes/class-display.php:176 -msgid "Go to previous page" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "In Stock" -msgstr "" - -#: includes/facets/autocomplete.php:156 -msgid "Loading" -msgstr "" - -#: includes/facets/number_range.php:29 -msgid "Max" -msgstr "" - -#: includes/facets/number_range.php:26 -msgid "Min" -msgstr "" - -#: includes/integrations/acf/acf.php:293 -msgid "No" -msgstr "" - -#: includes/facets/autocomplete.php:97 includes/facets/autocomplete.php:158 -msgid "No results" -msgstr "" - -#: includes/class-display.php:194 includes/facets/fselect.php:87 -msgid "No results found" -msgstr "" - -#: includes/facets/number_range.php:23 -msgid "Number" -msgstr "" - -#: includes/class-renderer.php:512 -msgid "of" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:499 -msgid "On Sale" -msgstr "" - -#: includes/integrations/woocommerce/woocommerce.php:496 -msgid "Out of Stock" -msgstr "" - -#: includes/class-renderer.php:569 -msgid "Per page" -msgstr "" - -#: includes/facets/slider.php:20 includes/facets/reset.php:15 -msgid "Reset" -msgstr "" - -#: includes/facets/fselect.php:86 -msgid "Search" -msgstr "" - -#: includes/facets/checkboxes.php:131 includes/facets/hierarchy.php:161 -msgid "See less" -msgstr "" - -#: includes/facets/hierarchy.php:160 -msgid "See more" -msgstr "" - -#: includes/facets/checkboxes.php:130 -msgid "See {num} more" -msgstr "" - -#: includes/facets/sort.php:136 -msgid "Sort by" -msgstr "" - -#: includes/facets/date_range.php:26 -msgid "Start Date" -msgstr "" - -#: includes/facets/autocomplete.php:61 -msgid "Start typing" -msgstr "" - -#: includes/facets/sort.php:140 -msgid "Title (A-Z)" -msgstr "" - -#: includes/facets/sort.php:147 -msgid "Title (Z-A)" -msgstr "" - -#: includes/facets/rating.php:112 -msgid "Undo" -msgstr "" - -#: includes/integrations/acf/acf.php:293 -msgid "Yes" -msgstr "" - -#: includes/facets/fselect.php:85 -msgid "{n} selected" -msgstr "" diff --git a/wp/wp-content/plugins/facetwp/languages/fwp.pot b/wp/wp-content/plugins/facetwp/languages/fwp.pot deleted file mode 100644 index 3ae8afdb..00000000 --- a/wp/wp-content/plugins/facetwp/languages/fwp.pot +++ /dev/null @@ -1,1032 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: FacetWP\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-30 17:19+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Matt Gibbs \n" -"Language-Team: \n" -"Language: \n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\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/\n" -"X-Loco-Version: 2.4.1; wp-5.4.2" - -#: includes/class-settings.php:345 -msgid "Activate" -msgstr "" - -#: includes/class-settings.php:554 -msgid "Activating" -msgstr "" - -#: templates/page-settings.php:153 templates/page-settings.php:181 -msgid "Add new" -msgstr "" - -#: includes/class-settings.php:524 -msgid "Add query filter" -msgstr "" - -#: includes/class-settings.php:523 -msgid "Add query sort" -msgstr "" - -#. Description of the plugin -msgid "Advanced Filtering for WordPress" -msgstr "" - -#: includes/class-settings.php:508 -msgid "All post types" -msgstr "" - -#: includes/class-settings.php:188 -msgid "AND (match all)" -msgstr "" - -#: includes/class-settings.php:509 -msgid "and show" -msgstr "" - -#: includes/class-settings.php:119 -msgid "Any" -msgstr "" - -#: includes/class-settings.php:484 -msgid "Author field" -msgstr "" - -#: includes/facets/search.php:74 -msgid "Auto refresh" -msgstr "" - -#: includes/facets/reset.php:80 -msgid "Auto-hide" -msgstr "" - -#: includes/facets/autocomplete.php:10 -msgid "Autocomplete" -msgstr "" - -#: includes/class-settings.php:466 -msgid "Background color" -msgstr "" - -#: includes/class-settings.php:223 -msgid "Basic" -msgstr "" - -#: includes/class-settings.php:467 -msgid "Border" -msgstr "" - -#: includes/class-settings.php:474 -msgid "Border color" -msgstr "" - -#: includes/class-settings.php:468 -msgid "Border style" -msgstr "" - -#: includes/class-settings.php:475 -msgid "Border width" -msgstr "" - -#: includes/facets/reset.php:59 -msgid "Button" -msgstr "" - -#: includes/class-settings.php:505 -msgid "Button border" -msgstr "" - -#: includes/class-settings.php:478 -msgid "Button padding" -msgstr "" - -#: includes/class-settings.php:476 -msgid "Button text" -msgstr "" - -#: includes/class-settings.php:477 -msgid "Button text color" -msgstr "" - -#: includes/facets/checkboxes.php:7 -msgid "Checkboxes" -msgstr "" - -#: includes/class-settings.php:525 -msgid "Clear" -msgstr "" - -#: includes/class-settings.php:532 -msgid "Column" -msgstr "" - -#: includes/class-settings.php:481 -msgid "Column widths" -msgstr "" - -#: includes/class-settings.php:518 -msgid "Comment Count" -msgstr "" - -#: includes/class-settings.php:220 -msgid "Compare type" -msgstr "" - -#: includes/class-settings.php:482 includes/class-settings.php:529 -msgid "Content" -msgstr "" - -#: includes/class-settings.php:559 -msgid "Convert to query args" -msgstr "" - -#: includes/class-settings.php:552 -msgid "Copied!" -msgstr "" - -#: includes/class-settings.php:537 -msgid "Copy shortcode" -msgstr "" - -#: includes/class-settings.php:203 -msgid "Count" -msgstr "" - -#: includes/facets/pager.php:250 -msgid "Count text (no results)" -msgstr "" - -#: includes/facets/pager.php:239 -msgid "Count text (plural)" -msgstr "" - -#: includes/facets/pager.php:245 -msgid "Count text (singular)" -msgstr "" - -#: includes/class-settings.php:504 -msgid "CSS class" -msgstr "" - -#: includes/class-settings.php:480 -msgid "Custom CSS" -msgstr "" - -#: includes/class-helper.php:495 includes/class-settings.php:520 -msgid "Custom Fields" -msgstr "" - -#: includes/class-settings.php:498 -msgid "Custom URL" -msgstr "" - -#: includes/class-settings.php:471 -msgid "Dashed" -msgstr "" - -#: includes/class-settings.php:538 -msgid "Data source" -msgstr "" - -#: includes/class-settings.php:490 -msgid "Date" -msgstr "" - -#: includes/class-settings.php:492 -msgid "Date format" -msgstr "" - -#: includes/facets/date_range.php:7 -msgid "Date Range" -msgstr "" - -#: includes/class-settings.php:59 -msgid "Debug mode" -msgstr "" - -#: includes/integrations/searchwp/searchwp.php:203 -msgid "Default" -msgstr "" - -#: includes/class-settings.php:117 includes/facets/sort.php:55 -#: includes/facets/pager.php:265 -msgid "Default label" -msgstr "" - -#: includes/facets/proximity.php:236 -msgid "Default radius" -msgstr "" - -#: includes/class-settings.php:541 -msgid "Display" -msgstr "" - -#: includes/class-settings.php:544 -msgid "Display Code" -msgstr "" - -#: includes/facets/date_range.php:137 -msgid "Display format" -msgstr "" - -#: templates/page-settings.php:189 -msgid "Display mode" -msgstr "" - -#: includes/class-settings.php:485 -msgid "Display name" -msgstr "" - -#: includes/class-settings.php:197 -msgid "Display value" -msgstr "" - -#: includes/class-ajax.php:138 -msgid "Done, please re-index" -msgstr "" - -#: includes/facets/pager.php:221 -msgid "Dots label" -msgstr "" - -#: includes/class-settings.php:472 -msgid "Dotted" -msgstr "" - -#: includes/class-settings.php:473 -msgid "Double" -msgstr "" - -#: includes/facets/proximity.php:214 includes/facets/dropdown.php:7 -msgid "Dropdown" -msgstr "" - -#: includes/class-settings.php:73 -msgid "Enable if your store uses variable products." -msgstr "" - -#: includes/class-settings.php:224 -msgid "Enclose" -msgstr "" - -#: includes/facets/date_range.php:128 -msgid "End Date" -msgstr "" - -#: includes/class-settings.php:526 -msgid "Enter term slugs" -msgstr "" - -#: includes/class-settings.php:527 -msgid "Enter values" -msgstr "" - -#: includes/class-ajax.php:200 -msgid "Error" -msgstr "" - -#: includes/class-ajax.php:80 -msgid "Error: invalid JSON" -msgstr "" - -#: includes/facets/number_range.php:115 -msgid "Exact" -msgstr "" - -#: includes/facets/date_range.php:126 -msgid "Exact Date" -msgstr "" - -#: includes/class-settings.php:171 -msgid "Exclude these values" -msgstr "" - -#: includes/class-settings.php:87 includes/class-settings.php:368 -msgid "Export" -msgstr "" - -#: includes/class-settings.php:185 -msgid "Facet logic" -msgstr "" - -#: includes/class-settings.php:536 -msgid "Facet type" -msgstr "" - -#: templates/page-settings.php:108 templates/page-settings.php:148 -#: templates/page-settings.php:152 -msgid "Facets" -msgstr "" - -#. Name of the plugin -msgid "FacetWP" -msgstr "" - -#: index.php:67 -#, php-format -msgid "" -"FacetWP requires PHP %s or above. Please contact your host and request a PHP " -"upgrade." -msgstr "" - -#: includes/class-request.php:364 -msgid "FacetWP was unable to auto-detect the post listing" -msgstr "" - -#. Author of the plugin -msgid "FacetWP, LLC" -msgstr "" - -#: includes/class-settings.php:507 -msgid "Fetch" -msgstr "" - -#: includes/class-settings.php:488 -msgid "Field type" -msgstr "" - -#: includes/facets/number_range.php:112 includes/facets/date_range.php:123 -msgid "Fields to show" -msgstr "" - -#: includes/class-settings.php:465 -msgid "Font size" -msgstr "" - -#: includes/facets/slider.php:147 -msgid "Format" -msgstr "" - -#: includes/facets/fselect.php:7 -msgid "fSelect" -msgstr "" - -#: includes/class-settings.php:603 -msgid "full" -msgstr "" - -#: includes/class-settings.php:13 -msgid "General" -msgstr "" - -#: includes/class-settings.php:351 -msgid "Get an API key" -msgstr "" - -#: includes/class-settings.php:20 -msgid "Google Maps API key" -msgstr "" - -#: includes/class-settings.php:543 -msgid "Help" -msgstr "" - -#: includes/class-settings.php:502 -msgid "Hide item?" -msgstr "" - -#: includes/class-settings.php:131 -msgid "Hierarchical" -msgstr "" - -#: includes/facets/hierarchy.php:7 -msgid "Hierarchy" -msgstr "" - -#: includes/class-settings.php:196 -msgid "Highest count" -msgstr "" - -#: includes/class-settings.php:522 -msgid "Hit Enter" -msgstr "" - -#. Author URI of the plugin -msgid "https://facetwp.com/" -msgstr "" - -#: includes/class-settings.php:483 -msgid "Image size" -msgstr "" - -#: includes/class-settings.php:91 includes/class-settings.php:376 -msgid "Import" -msgstr "" - -#: includes/class-settings.php:84 -msgid "Import / Export" -msgstr "" - -#: includes/class-ajax.php:274 -msgid "Imported" -msgstr "" - -#: includes/class-settings.php:558 -msgid "Importing" -msgstr "" - -#: includes/class-builder.php:241 -msgid "In Stock" -msgstr "" - -#: includes/facets/reset.php:65 -msgid "Include / exclude" -msgstr "" - -#: includes/class-settings.php:77 -msgid "Index out-of-stock products?" -msgstr "" - -#: includes/class-settings.php:547 -msgid "Indexing" -msgstr "" - -#: includes/class-settings.php:549 -msgid "Indexing complete" -msgstr "" - -#: includes/facets/pager.php:215 -msgid "Inner size" -msgstr "" - -#: includes/class-settings.php:493 -msgid "Input format" -msgstr "" - -#: includes/class-settings.php:225 -msgid "Intersect" -msgstr "" - -#: includes/facets/proximity.php:207 -msgid "Kilometers" -msgstr "" - -#: includes/class-settings.php:534 templates/page-settings.php:159 -#: templates/page-settings.php:187 -msgid "Label" -msgstr "" - -#: includes/class-settings.php:528 -msgid "Layout" -msgstr "" - -#: includes/class-settings.php:16 -msgid "License key" -msgstr "" - -#: includes/class-settings.php:495 includes/facets/reset.php:60 -msgid "Link" -msgstr "" - -#: includes/class-settings.php:496 -msgid "Link type" -msgstr "" - -#: templates/page-settings.php:109 templates/page-settings.php:176 -#: templates/page-settings.php:180 -msgid "Listings" -msgstr "" - -#: includes/class-settings.php:43 -msgid "Load a11y support" -msgstr "" - -#: includes/class-settings.php:35 -msgid "Load jQuery" -msgstr "" - -#: includes/facets/pager.php:210 -msgid "Load more" -msgstr "" - -#: includes/facets/pager.php:255 -msgid "Load more text" -msgstr "" - -#: includes/class-settings.php:557 -msgid "Loading" -msgstr "" - -#: includes/facets/pager.php:260 -msgid "Loading text" -msgstr "" - -#: includes/facets/proximity.php:196 -msgid "Longitude" -msgstr "" - -#: includes/class-settings.php:550 -msgid "Looking" -msgstr "" - -#: includes/facets/number_range.php:117 -msgid "Max" -msgstr "" - -#: includes/class-settings.php:519 -msgid "Menu Order" -msgstr "" - -#: includes/facets/proximity.php:206 -msgid "Miles" -msgstr "" - -#: includes/facets/number_range.php:116 -msgid "Min" -msgstr "" - -#: includes/facets/number_range.php:114 -msgid "Min + Max" -msgstr "" - -#: includes/class-settings.php:143 -msgid "Multi-select" -msgstr "" - -#: templates/page-settings.php:160 templates/page-settings.php:188 -msgid "Name" -msgstr "" - -#: includes/class-settings.php:521 -msgid "Narrow results by" -msgstr "" - -#: includes/facets/pager.php:233 -msgid "Next button label" -msgstr "" - -#: includes/class-settings.php:462 -msgid "No results text" -msgstr "" - -#: includes/class-settings.php:469 includes/facets/proximity.php:216 -msgid "None" -msgstr "" - -#: includes/class-settings.php:436 -msgid "Not yet activated" -msgstr "" - -#: includes/class-ajax.php:238 -msgid "Nothing to import" -msgstr "" - -#: includes/class-settings.php:491 -msgid "Number" -msgstr "" - -#: includes/class-settings.php:494 -msgid "Number format" -msgstr "" - -#: includes/class-settings.php:460 -msgid "Number of grid columns" -msgstr "" - -#: includes/facets/number_range.php:7 -msgid "Number Range" -msgstr "" - -#: includes/class-settings.php:170 -msgid "Off" -msgstr "" - -#: includes/class-builder.php:246 -msgid "On Sale" -msgstr "" - -#: includes/class-settings.php:499 -msgid "Open in new tab?" -msgstr "" - -#: includes/class-settings.php:189 -msgid "OR (match any)" -msgstr "" - -#: includes/class-settings.php:214 -msgid "Other data source" -msgstr "" - -#: includes/class-builder.php:241 -msgid "Out of Stock" -msgstr "" - -#: includes/class-settings.php:374 -msgid "Overwrite existing items?" -msgstr "" - -#: includes/class-settings.php:503 -msgid "Padding" -msgstr "" - -#: includes/facets/pager.php:208 -msgid "Page numbers" -msgstr "" - -#: includes/facets/pager.php:10 -msgid "Pager" -msgstr "" - -#: includes/facets/pager.php:206 -msgid "Pager type" -msgstr "" - -#: includes/class-settings.php:125 -msgid "Parent term" -msgstr "" - -#: includes/class-settings.php:373 -msgid "Paste the import code here" -msgstr "" - -#: includes/facets/pager.php:211 -msgid "Per page" -msgstr "" - -#: includes/class-settings.php:510 -msgid "per page" -msgstr "" - -#: includes/facets/pager.php:270 -msgid "Per page options" -msgstr "" - -#: includes/class-settings.php:122 -msgid "Placeholder text" -msgstr "" - -#: includes/class-updater.php:172 -#, php-format -msgid "" -"Please renew your license for automatic " -"updates." -msgstr "" - -#: includes/class-updater.php:177 -msgid "Please activate your FacetWP license for automatic updates." -msgstr "" - -#: includes/class-helper.php:485 -msgid "Post Author" -msgstr "" - -#: includes/class-helper.php:482 includes/class-settings.php:516 -msgid "Post Date" -msgstr "" - -#: includes/class-helper.php:483 includes/class-settings.php:517 -msgid "Post Modified" -msgstr "" - -#: includes/class-settings.php:514 -msgid "Post Name" -msgstr "" - -#: includes/class-helper.php:484 includes/class-settings.php:513 -msgid "Post Title" -msgstr "" - -#: includes/class-helper.php:481 includes/class-settings.php:515 -msgid "Post Type" -msgstr "" - -#: templates/page-settings.php:190 -msgid "Post types" -msgstr "" - -#: includes/class-settings.php:497 -msgid "Post URL" -msgstr "" - -#: includes/class-helper.php:479 includes/class-settings.php:512 -msgid "Posts" -msgstr "" - -#: includes/class-settings.php:500 includes/facets/slider.php:135 -msgid "Prefix" -msgstr "" - -#: includes/class-settings.php:156 -msgid "Preserve ghost order" -msgstr "" - -#: includes/class-settings.php:553 -msgid "Press CTRL+C to copy" -msgstr "" - -#: includes/facets/pager.php:227 -msgid "Prev button label" -msgstr "" - -#: includes/facets/proximity.php:11 -msgid "Proximity" -msgstr "" - -#: templates/page-settings.php:122 -msgid "Purge the index table" -msgstr "" - -#: includes/class-settings.php:551 -msgid "Purging" -msgstr "" - -#: includes/class-settings.php:542 -msgid "Query" -msgstr "" - -#: includes/class-settings.php:545 -msgid "Query Arguments" -msgstr "" - -#: includes/facets/radio.php:7 -msgid "Radio" -msgstr "" - -#: includes/facets/proximity.php:220 -msgid "Radius options" -msgstr "" - -#: includes/facets/proximity.php:212 -msgid "Radius UI" -msgstr "" - -#: includes/facets/proximity.php:231 -msgid "Range (max)" -msgstr "" - -#: includes/facets/proximity.php:226 -msgid "Range (min)" -msgstr "" - -#: includes/class-settings.php:198 -msgid "Raw value" -msgstr "" - -#: includes/class-settings.php:555 templates/page-settings.php:116 -msgid "Re-index" -msgstr "" - -#: includes/facets/reset.php:7 -msgid "Reset" -msgstr "" - -#: includes/facets/reset.php:70 -msgid "Reset all except these facets" -msgstr "" - -#: includes/facets/reset.php:68 -msgid "Reset everything" -msgstr "" - -#: includes/facets/reset.php:69 -msgid "Reset only these facets" -msgstr "" - -#: includes/class-settings.php:233 -msgid "Reset text" -msgstr "" - -#: includes/facets/reset.php:57 -msgid "Reset UI" -msgstr "" - -#: includes/facets/pager.php:209 -msgid "Result counts" -msgstr "" - -#: includes/class-settings.php:531 -msgid "Row" -msgstr "" - -#: templates/page-settings.php:163 -msgid "Rows" -msgstr "" - -#: templates/page-settings.php:127 -msgid "Save changes" -msgstr "" - -#: includes/class-settings.php:546 -msgid "Saving" -msgstr "" - -#: includes/facets/search.php:7 -msgid "Search" -msgstr "" - -#: includes/facets/search.php:69 -msgid "Search engine" -msgstr "" - -#: includes/class-settings.php:479 -msgid "Separator" -msgstr "" - -#: includes/class-settings.php:24 -msgid "Separators" -msgstr "" - -#: includes/class-init.php:134 templates/page-settings.php:110 -msgid "Settings" -msgstr "" - -#: includes/class-ajax.php:73 -msgid "Settings saved" -msgstr "" - -#: includes/class-ajax.php:67 -msgid "Settings saved, please re-index" -msgstr "" - -#: includes/class-settings.php:137 -msgid "Show expanded" -msgstr "" - -#: includes/class-settings.php:78 -msgid "Show facet choices for out-of-stock products?" -msgstr "" - -#: includes/class-settings.php:151 -msgid "Show ghosts" -msgstr "" - -#: templates/page-settings.php:121 -msgid "Show indexable post types" -msgstr "" - -#: templates/page-settings.php:120 -msgid "Show indexer stats" -msgstr "" - -#: includes/class-settings.php:172 -msgid "Show only these values" -msgstr "" - -#: includes/class-ajax.php:277 -msgid "Skipped" -msgstr "" - -#: includes/facets/slider.php:7 includes/facets/proximity.php:215 -msgid "Slider" -msgstr "" - -#: includes/class-settings.php:208 -msgid "Soft limit" -msgstr "" - -#: includes/class-settings.php:470 -msgid "Solid" -msgstr "" - -#: includes/facets/sort.php:10 -msgid "Sort" -msgstr "" - -#: includes/class-settings.php:194 includes/class-settings.php:511 -#: includes/facets/sort.php:57 -msgid "Sort by" -msgstr "" - -#: includes/facets/sort.php:62 -msgid "Sort options" -msgstr "" - -#: templates/page-settings.php:162 -msgid "Source" -msgstr "" - -#: includes/class-settings.php:461 -msgid "Spacing between results" -msgstr "" - -#: includes/facets/rating.php:7 -msgid "Star Rating" -msgstr "" - -#: includes/facets/date_range.php:125 -msgid "Start + End Dates" -msgstr "" - -#: includes/facets/date_range.php:127 -msgid "Start Date" -msgstr "" - -#: includes/class-settings.php:533 -msgid "Start typing" -msgstr "" - -#: includes/facets/slider.php:154 -msgid "Step" -msgstr "" - -#: includes/class-settings.php:556 -msgid "Stop indexer" -msgstr "" - -#: includes/class-settings.php:51 -msgid "Strict query detection" -msgstr "" - -#: includes/class-settings.php:530 -msgid "Style" -msgstr "" - -#: includes/class-settings.php:501 includes/facets/slider.php:139 -msgid "Suffix" -msgstr "" - -#: templates/page-settings.php:111 -msgid "Support" -msgstr "" - -#: includes/class-settings.php:72 -msgid "Support product variations?" -msgstr "" - -#: includes/class-settings.php:539 -msgid "Switch to advanced mode" -msgstr "" - -#: includes/class-settings.php:540 -msgid "Switch to visual mode" -msgstr "" - -#: includes/class-helper.php:490 -msgid "Taxonomies" -msgstr "" - -#: includes/class-settings.php:199 -msgid "Term order" -msgstr "" - -#: includes/class-settings.php:506 -msgid "Term URL" -msgstr "" - -#: includes/class-settings.php:489 -msgid "Text" -msgstr "" - -#: includes/class-settings.php:464 -msgid "Text color" -msgstr "" - -#: includes/class-settings.php:463 -msgid "Text style" -msgstr "" - -#: includes/class-settings.php:548 -msgid "The index table is empty" -msgstr "" - -#: templates/page-settings.php:161 -msgid "Type" -msgstr "" - -#: includes/class-settings.php:229 -msgid "UI type" -msgstr "" - -#: includes/class-settings.php:535 -msgid "Unique name" -msgstr "" - -#: includes/facets/proximity.php:204 -msgid "Unit of measurement" -msgstr "" - -#: includes/class-settings.php:29 -msgid "URL prefix" -msgstr "" - -#: includes/class-settings.php:487 -msgid "User ID" -msgstr "" - -#: includes/class-settings.php:486 -msgid "User login" -msgstr "" - -#: includes/class-settings.php:443 -msgid "Valid until" -msgstr "" - -#: includes/class-settings.php:167 -msgid "Value modifiers" -msgstr "" - -#: includes/class-settings.php:69 -#: includes/integrations/woocommerce/woocommerce.php:64 -msgid "WooCommerce" -msgstr "" - -#: includes/facets/search.php:60 -msgid "WP Default" -msgstr "" diff --git a/wp/wp-content/plugins/facetwp/package.json b/wp/wp-content/plugins/facetwp/package.json deleted file mode 100644 index e209367b..00000000 --- a/wp/wp-content/plugins/facetwp/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "facetwp", - "type": "module", - "devDependencies": { - "@rollup/plugin-buble": "^1.0.2", - "@rollup/plugin-multi-entry": "^6.0.0", - "@rollup/plugin-terser": "^0.4.0", - "rollup": "^3.14.0" - }, - "scripts": { - "build": "rollup -c", - "watch": "rollup -c -w" - } -} diff --git a/wp/wp-content/plugins/facetwp/rollup.config.js b/wp/wp-content/plugins/facetwp/rollup.config.js deleted file mode 100644 index 0c657774..00000000 --- a/wp/wp-content/plugins/facetwp/rollup.config.js +++ /dev/null @@ -1,52 +0,0 @@ -import terser from '@rollup/plugin-terser'; -import multiEntry from '@rollup/plugin-multi-entry'; -import buble from '@rollup/plugin-buble'; - -export default [{ - input: [ - 'assets/vendor/fUtil/fUtil.js', - 'assets/js/src/event-manager.js', - 'assets/js/src/front.js', - 'assets/js/src/front-facets.js' - ], - output: { - file: 'assets/js/dist/front.min.js', - format: 'iife' - }, - plugins: [ - multiEntry(), - terser() - ] -}, -{ - input: 'assets/js/src/admin.js', - output: { - file: 'assets/js/dist/admin.min.js', - format: 'iife' - }, - plugins: [ - buble() - ] -}, -{ - input: 'assets/vendor/fDate/fDate.js', - output: { - file: 'assets/vendor/fDate/fDate.min.js', - format: 'iife' - }, - plugins: [ - buble(), - terser() - ] -}, -{ - input: 'assets/vendor/nummy/nummy.js', - output: { - file: 'assets/vendor/nummy/nummy.min.js', - format: 'iife' - }, - plugins: [ - buble(), - terser() - ] -}] diff --git a/wp/wp-content/plugins/facetwp/templates/page-settings.php b/wp/wp-content/plugins/facetwp/templates/page-settings.php deleted file mode 100644 index f8ba4fee..00000000 --- a/wp/wp-content/plugins/facetwp/templates/page-settings.php +++ /dev/null @@ -1,240 +0,0 @@ -get_html(); - -// Settings -$settings = FWP()->settings->get_registered_settings(); -$i18n = FWP()->settings->get_i18n_strings(); -$image_sizes = FWP()->settings->get_image_size_labels(); - -// Useful data -$data = FWP()->helper->settings; -$facet_types = FWP()->helper->facet_types; -$data_sources = FWP()->helper->get_data_sources(); -$layout_data = FWP()->builder->get_layout_data(); -$query_data = FWP()->builder->get_query_data(); - -// Generate fields and handle aliases -$facet_fields = []; -$fields = FWP()->settings->get_registered_facet_fields(); - -foreach ( $fields as $name => $field ) { - $output = FWP()->settings->get_facet_field_html( $name ); - $output = preg_replace( '/[ ]+/s', ' ', $output ); - $facet_fields[ $name ] = [ - 'names' => isset( $field['items'] ) ? array_keys( $field['items'] ) : [ $name ], - 'html' => trim( $output ) - ]; -} - -// Get SVG icons -$svg_icons = FWP()->settings->get_svg(); - -// Clone facet settings HTML -$facet_clone = []; -$admin_scripts = ''; - -foreach ( $facet_types as $name => $class ) { - if (method_exists( $class, 'admin_scripts' ) ) { - ob_start(); - $class->admin_scripts(); - $admin_scripts .= ob_get_clean(); - } - - if ( method_exists( $class, 'settings_html' ) ) { - ob_start(); - $class->settings_html(); - $facet_clone[ $name ] = trim( ob_get_clean() ); - } -} - -?> - - - - - - - - - - - - - - - - - - -
    -
    - - v - - - - - - -
    -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    - Check your browser console if this text doesn't disappear -
    - - - -
    -

    -  »  - {{ getItemLabel() }} -

    -

    - - -

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    - - -
    - - - -
    -

    -  »  - {{ getItemLabel() }} -

    -

    - - -

    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    - - -
    - - - -
    -
    - $tab ) : ?> - - -
    - - $tab ) : ?> -
    - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    - -
    - -
    - - - -
    -
    -
    - - - - - -
    -
    diff --git a/wp/wp-content/plugins/facetwp/templates/page-support.php b/wp/wp-content/plugins/facetwp/templates/page-support.php deleted file mode 100644 index 0e5d7647..00000000 --- a/wp/wp-content/plugins/facetwp/templates/page-support.php +++ /dev/null @@ -1,67 +0,0 @@ -payment_id = (int) FWP()->helper->get_license_meta( 'payment_id' ); - } - - - function get_html() { - if ( 0 < $this->payment_id ) { - $output = ''; - } - else { - $output = '

    Active License Required

    '; - $output .= '

    Please activate or renew your license to access support.

    '; - } - - return $output; - } - - - function get_sysinfo() { - $plugins = get_plugins(); - $active_plugins = get_option( 'active_plugins', [] ); - $theme = wp_get_theme(); - $parent = $theme->parent(); - - ob_start(); - -?> -Home URL: - -Payment ID: payment_id; ?> - -WordPress Version: - -Theme: get( 'Name' ) . ' ' . $theme->get( 'Version' ); ?> - -Parent Theme: get( 'Name' ) . ' ' . $parent->get( 'Version' ); ?> - - -PHP Version: - -MySQL Version: db_version() ); ?> - -Web Server Info: - - - $plugin ) { - if ( in_array( $plugin_path, $active_plugins ) ) { - echo $plugin['Name'] . ' ' . $plugin['Version'] . "\n"; - } - } - - $output = ob_get_clean(); - $output = preg_replace( "/[ ]{2,}/", ' ', trim( $output ) ); - $output = str_replace( "\n", '{n}', $output ); - $output = urlencode( $output ); - return $output; - } -} diff --git a/wp/wp-content/plugins/iper-medical/admin-cron.php b/wp/wp-content/plugins/iper-medical/admin-cron.php index dfd18e8b..c50a16a1 100644 --- a/wp/wp-content/plugins/iper-medical/admin-cron.php +++ b/wp/wp-content/plugins/iper-medical/admin-cron.php @@ -39,7 +39,7 @@ jQuery("#cronMSGC").html("Waiting, sync in progress..."); jQuery("#btSendCronC").attr("disabled","disabled"); e.preventDefault(); - jQuery.get("/iper_cron?t=c",{},function(data){ + jQuery.get("/iper_cron?t=c.",{},function(data){ jQuery("#iper_print_debug_cronC").val(data).html(data); jQuery("#btSendCronC").removeAttr("disabled"); jQuery("#cronMSGC").html(""); diff --git a/wp/wp-content/plugins/relevanssi-premium/build/index.asset.php b/wp/wp-content/plugins/relevanssi-premium/build/index.asset.php deleted file mode 100644 index 88eeb121..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '3cf891ee5aaa21141e30e23ad95d485e'); \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/build/index.js b/wp/wp-content/plugins/relevanssi-premium/build/index.js deleted file mode 100644 index 0933fb81..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/build/index.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var r=n(18),o=n(19),l=n(20),c=n(22);e.exports=function(e,t){return r(e)||o(e,t)||l(e,t)||c()}},function(e,t){e.exports=window.wp.data},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=window.wp.editPost},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","import {\n\tPanel,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n\tTextareaControl,\n\tCheckboxControl,\n\tButton,\n\twithFocusOutside,\n} from \"@wordpress/components\"\nimport { registerPlugin } from \"@wordpress/plugins\"\nimport { PluginSidebar, PluginSidebarMoreMenuItem } from \"@wordpress/edit-post\"\nimport { __ } from \"@wordpress/i18n\"\nimport { select, withSelect, withDispatch } from \"@wordpress/data\"\nimport { compose } from \"@wordpress/compose\"\nimport { useState, useEffect } from \"@wordpress/element\"\n\nconst relevanssiIcon = wp.element.createElement(\n\t\"svg\",\n\t{\n\t\twidth: 20,\n\t\theight: 20,\n\t},\n\twp.element.createElement(\"path\", {\n\t\td:\n\t\t\t\"M5.644 20.665 C6.207 20.545 6.612 20.029 6.574 19.438 6.469 17.784 6.492 16.554 6.617 15.602 L7.388 19.228 C7.454 19.538 7.576 19.815 7.737 20.058 7.742 20.12 7.749 20.181 7.763 20.243 L8.444 23.384 C10.112 23.233 11.311 22.775 11.214 23.077 L10.82 21.227 C10.875 21.218 10.929 21.211 10.984 21.199 10.995 21.197 11.004 21.193 11.015 21.191 L11.35 22.766 C11.571 22.305 13.613 22.092 14.187 21.891 L13.42 19.11 C13.529 18.742 13.553 18.346 13.466 17.936 L12.445 13.134 C12.535 13.088 12.62 13.03 12.698 12.959 12.737 12.929 12.786 12.899 12.84 12.864 13.25 12.596 14.097 12.042 14.433 10.839 L20.429 12.98 C20.642 13.056 20.862 13.067 21.069 13.023 21.456 12.941 21.792 12.667 21.934 12.267 22.154 11.655 21.835 10.981 21.222 10.763 L14.393 8.324 C14.385 8.291 14.379 8.26 14.37 8.226 14.212 7.595 13.573 7.212 12.94 7.372 12.887 7.385 12.838 7.402 12.789 7.422 12.873 6.845 12.859 6.245 12.731 5.643 12.145 2.884 9.422 1.118 6.661 1.705 3.901 2.292 2.132 5.012 2.718 7.771 3.304 10.529 6.027 12.295 8.788 11.708 10.041 11.442 11.088 10.735 11.805 9.786 11.917 9.894 12.05 9.981 12.203 10.04 12.148 10.37 11.997 10.56 11.811 10.71 10.72 11.467 10.238 11.826 9.318 12.07 L8.678 12.167 C7.581 12.344 6.407 12.307 5.457 11.871 4.141 13.689 3.972 15.683 4.221 19.589 4.263 20.238 4.823 20.73 5.473 20.688 5.531 20.685 5.589 20.677 5.644 20.665 Z M8.568 10.67 C6.38 11.135 4.222 9.735 3.758 7.55 3.293 5.364 4.695 3.208 6.883 2.743 9.07 2.278 11.229 3.677 11.693 5.863 12.158 8.049 10.755 10.205 8.568 10.67 Z\",\n\t}),\n\twp.element.createElement(\"path\", {\n\t\td:\n\t\t\t\"M8.009 5.745 C7.25 5.906 6.576 5.754 6.502 5.406 6.496 5.377 6.496 5.348 6.498 5.318 6.012 5.752 5.765 6.429 5.911 7.115 6.127 8.132 7.122 8.783 8.132 8.568 9.142 8.353 9.786 7.354 9.57 6.338 9.483 5.928 9.269 5.58 8.98 5.323 8.755 5.503 8.411 5.66 8.009 5.745 Z\",\n\t})\n)\n\nconst { Fragment } = wp.element\n\nregisterPlugin(\"relevanssi-premium\", {\n\trender: function () {\n\t\tconst [relevanssiSees, setRelevanssiSees] = useState([])\n\t\tconst [relevanssiRelated, setRelevanssiRelated] = useState([])\n\t\tconst [relevanssiExcluded, setRelevanssiExcluded] = useState([])\n\t\tconst [relevanssiExcludedIds, setRelevanssiExcludedIds] = useState([])\n\n\t\tconst regenerateRelatedPosts = (postId, metaKey, metaValue) => {\n\t\t\tif (!metaValue) metaValue = \"0\"\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/regeneraterelatedposts/${postId}/${metaKey}/${metaValue}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiRelated(createRelatedList(data))\n\t\t\t})\n\t\t}\n\n\t\tconst RelatedPostControl = withFocusOutside(\n\t\t\tclass extends React.Component {\n\t\t\t\thandleFocusOutside() {\n\t\t\t\t\tregenerateRelatedPosts(\n\t\t\t\t\t\twp.data.select(\"core/editor\").getCurrentPostId(),\n\t\t\t\t\t\tthis.props.metaKey,\n\t\t\t\t\t\twp.data.select(\"core/editor\").getEditedPostAttribute(\"meta\")[\n\t\t\t\t\t\t\tthis.props.metaKey\n\t\t\t\t\t\t]\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\n\t\tconst MetaControl = compose(\n\t\t\twithDispatch((dispatch, props) => {\n\t\t\t\treturn {\n\t\t\t\t\tsetMetaValue: function (metaValue) {\n\t\t\t\t\t\tdispatch(\"core/editor\").editPost({\n\t\t\t\t\t\t\tmeta: { [props.metaKey]: metaValue },\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}),\n\t\t\twithSelect((select, props) => {\n\t\t\t\tlet metaValue = select(\"core/editor\").getEditedPostAttribute(\"meta\")[\n\t\t\t\t\tprops.metaKey\n\t\t\t\t]\n\t\t\t\tif (metaValue === \"0\") metaValue = \"\"\n\t\t\t\treturn {\n\t\t\t\t\tmetaValue,\n\t\t\t\t}\n\t\t\t})\n\t\t)((props) => {\n\t\t\tlet args = {\n\t\t\t\tlabel: props.title,\n\t\t\t\tvalue: props.metaValue,\n\t\t\t\tonChange: function (content) {\n\t\t\t\t\tprops.setMetaValue(content)\n\t\t\t\t},\n\t\t\t}\n\t\t\tif (props.control == CheckboxControl) {\n\t\t\t\tconst checked = props.metaValue == \"on\" ? true : false\n\t\t\t\targs.value = \"\"\n\t\t\t\targs.checked = checked\n\t\t\t\targs.onChange = function (content) {\n\t\t\t\t\tcontent = content ? \"on\" : \"off\"\n\t\t\t\t\tprops.setMetaValue(content)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wp.element.createElement(props.control, args)\n\t\t})\n\n\t\tconst excludeRelatedPost = (excludedPostId, postId) => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/excluderelatedpost/${excludedPostId}/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiExcludedIds(data)\n\t\t\t})\n\t\t}\n\n\t\tconst unExcludeRelatedPost = (excludedPostId, postId) => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/unexcluderelatedpost/${excludedPostId}/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiExcludedIds(data)\n\t\t\t})\n\t\t}\n\n\t\tconst postId = select(\"core/editor\").getCurrentPostId()\n\t\tuseEffect(() => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/sees/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiSees(data)\n\t\t\t})\n\t\t}, [postId])\n\n\t\t/*\n\n\n\t\t\t\t\t\t\t*/\n\n\t\tconst createRelatedList = (data) => {\n\t\t\treturn data.map((row) => {\n\t\t\t\treturn (\n\t\t\t\t\t
  • \n\t\t\t\t\t\t{row.title}{\" \"}\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t)\n\t\t\t})\n\t\t}\n\t\tuseEffect(() => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/listrelated/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiRelated(createRelatedList(data))\n\t\t\t})\n\t\t}, [postId, relevanssiExcludedIds])\n\n\t\tuseEffect(() => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/listexcluded/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tconst list = data.map((row) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t{row.title}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\tsetRelevanssiExcluded(list)\n\t\t\t})\n\t\t}, [postId, relevanssiExcludedIds])\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tRelevanssi Premium\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{relevanssiSees.title && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Title:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.title}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.content && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Content:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.content}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.author && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Author:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.author}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.category && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Categories:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.category}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.tag && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Tags:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.tag}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.taxonomy && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Other taxonomies:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.taxonomy}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.comment && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Comments:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.comment}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.customfield && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Custom fields:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.customfield}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.excerpt && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Excerpt:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.excerpt}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.link && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Links to this post:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.link}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.mysql && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"MySQL columns:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.mysql}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.reason && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{__(\"Reason this post is not indexed:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.reason}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    {__(\"Related posts for this post:\", \"relevanssi\")}

    \n\t\t\t\t\t\t\t
      {relevanssiRelated}
    \n\n\t\t\t\t\t\t\t

    {__(\"Excluded posts for this post:\", \"relevanssi\")}

    \n\t\t\t\t\t\t\t
      {relevanssiExcluded}
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t)\n\t},\n})\n","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"compose\"]; }());","(function() { module.exports = window[\"wp\"][\"data\"]; }());","(function() { module.exports = window[\"wp\"][\"editPost\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"plugins\"]; }());"],"sourceRoot":""} \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/changelog.txt b/wp/wp-content/plugins/relevanssi-premium/changelog.txt deleted file mode 100644 index 5c368182..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/changelog.txt +++ /dev/null @@ -1,1564 +0,0 @@ -= 2.17.2 = -* New feature: If you have a valid license, you can now leave support requests from within the Relevanssi settings pages. -* New feature: New filter hook `relevanssi_didyoumean_token` lets you filter Did you mean words before correction. You can use this filter hook to exclude words from being corrected. -* Minor fix: Relevanssi now adds spaces after table cell tags to avoid table cell content sticking together in excerpts. -* Minor fix: Phrase search couldn't find phrases that include an ampersand if they matched the post title. This works now. -* Minor fix: The 'Allowable tags in excerpts' function now automatically corrects the entered value to match what Relevanssi expects the value to be. -* Minor fix: In some cases Relevanssi goofed excerpts for user profiles when custom field content was used for excerpts. This is now corrected and the user custom field excerpts work better now. -* Minor fix: Relevanssi blocked non-post items from the results when used with Relevanssi Live Ajax Search. That is now fixed. -* Minor fix: Phrase searching did not work in multisite searches. This is now fixed. - -= 2.17.1 = -* New feature: New filter hook `relevanssi_update_translations` lets you disable the translation updates from TranslationsPress. If you only use WordPress in English, you can disable the translation updates with `add_filter( 'relevanssi_update_translations', '__return_false' );`. -* Changed behaviour: Relevanssi now ignores WordPress metadata custom fields that aren't interesting for Relevanssi indexing. -* Changed behaviour: Both `relevanssi_get_permalink()` and `relevanssi_the_permalink()` now can take post ID or a post object as a parameter and can thus be used outside the Loop. -* Changed behaviour: The `relevanssi_hits_filter` hook now gets the WP_Query object as the second parameter. -* Minor fix: The "Disable outside connections" option did not apply to the TranslationsPress translation updates. Now it does: those are also disabled when this option is enabled. -* Minor fix: The `mysqlcolumn_detail` feature was completely missing. Nobody has ever asked about it, which suggests nobody actually uses it, but now it works. -* Minor fix: The 'Ignore post content' checkbox did not show up correctly. Now it works. - -= 2.17.0 = -* New feature: 'Ignore post content' checkbox in the Relevanssi post edit sidebar makes Relevanssi ignore post content for that post when indexing. -* New feature: The action hook `relevanssi_init` runs at the end of the `relevanssi_init()` function. -* New feature: The $post->relevanssi_hits data now includes more information about custom field, taxonomy and MySQL column matches. -* New feature: New filter hook `relevanssi_author_query_filter` filters the post author MySQL query. -* New feature: New filter hook `relevanssi_by_date_query_filter` filters the by_date MySQL query. -* New feature: New filter hook `relevanssi_date_query_filter` filters the date query MySQL query. -* New feature: New filter hook `relevanssi_parent_query_filter` filters the post parent MySQL query. -* New feature: New filter hook `relevanssi_post_query_filter` filters the post__in and post__not_in MySQL query. -* New feature: New filter hook `relevanssi_post_status_query_filter` filters the post_status MySQL query. -* New feature: New filter hook `relevanssi_post_type_query_filter` filters the post_type MySQL query. -* New feature: Relevanssi will now show available Premium updates even when the license is not valid or API key is missing. The updates cannot be installed without a valid API key, but they will be visible. -* Major fix: The click tracking log table trimming wasn't implemented before. Now it's up and running. -* Minor fix: The Bricks compatibility was improved, Relevanssi now notices changes to Bricks posts more often. Relevanssi also only reads the text from the `_bricks_page_content_2` custom field. - -= 2.16.8 = -* One trailing comma caused Relevanssi to not work with PHP 7.2 or earlier. That is fixed, and Relevanssi is now again compatible with PHP 7. - -= 2.16.7 = -* Minor fix: The `relevanssi_index_taxonomies_args` filter hook should've been removed from use long time ago, but it was still in use in some cases, and thus `relevanssi_hide_empty_terms` didn't always work, depending on how the terms were indexed. Now the filter use is consistent and `relevanssi_hide_empty_terms` is always used. -* User interface: The synonym settings page now alerts if the synonyms aren't active because of the AND search. - -= 2.16.6 = -* Minor fix: The translations would show up as requiring update, even after the update. This is now fixed. -* Minor fix: Pinning didn't work with numeric keywords. - -= 2.16.5 = -* Security fix: Extra hardening for AJAX requests. Some AJAX actions in Relevanssi could leak information to site subscribers who knew what to look for. - -= 2.16.4 = -* Security fix: Any registered user could empty the Relevanssi index by triggering the index truncate AJAX action. That is no longer possible. -* New feature: The [searchform] shortcode has a new parameter, 'checklist', which you can use to create taxonomy checklists. -* New feature: New filter hook `relevanssi_post_type_archive_ok` allows controlling whether individual post type archives are indexed or not. -* New feature: You can now set the API key with the constant RELEVANSSI_API_KEY. If the constant is set, the API key settings disappear on the Relevanssi settings page. -* Changed behaviour: The `relevanssi_related_output_objects` filter hook has been removed. It was unnecessary: it simply isn't useful to filter a function return value, because you can modify it without a filter hook. -* Changed behaviour: The `relevanssi_search_form` filter hook has an additional parameter which has the shortcode attributes. -* Changed behaviour: The `relevanssi_search_again` parameter array has more parameters the filter can modify. -* Changed behaviour: The `relevanssi_show_matches` filter hook gets the post object as the second parameter. -* Changed behaviour: The `relevanssi_term_add_data` filter hook now runs also when individual terms are modified. Previously it only run when all terms were indexed. -* Translations: Relevanssi Premium is now professionally translated to German and Spanish. - -= 2.16.3 = -* Security fix: User searches page had a XSS vulnerability. -* Changed behaviour: Click tracking is no longer added to links if the user is on the logging block list or a bot. -* Minor fix: `relevanssi_orderby` did not always accept an array-format orderby parameter. -* Minor fix: Removes a highlighting problem stemming from uppercase search terms. -* Minor fix: When image attachment indexing was disabled, saving image attachments would still index the images. Image attachment blocking is now a `relevanssi_indexing_restriction` filter function, which means it's always active. -* Minor fix: Enabling click tracking doesn't break anchor links anymore. -* Minor fix: Relevanssi removes highlights better from inside multiline HTML tags. - -= 2.16.2 = -* Minor fix: Remove unnecessary database calls from admin pages. -* Minor fix: Improved Oxygen compatibility. - -= 2.16.1 = -* Fixes an error on the post query insights screen. - -= 2.16.0 = -* New feature: Click tracking lets you track the way the users click different posts from the search results pages. Enable the click tracking from the Logging settings to see it in effect. -* New feature: Proximity sorting lets you sort posts by geographical distance. See the knowledge base for details on how this works. -* New feature: New filter hook `relevanssi_render_blocks` controls whether Relevanssi renders blocks in a post or not. If you are having problems updating long posts with lots of blocks, having this filter hook return `false` for the post in question will likely help, as rendering the blocks in a long post can take huge amounts of memory. -* New feature: The [searchform] shortcode has a new parameter, 'post_type_boxes', which creates a checkbox for each post type you list in the value. For example [searchform post_type_boxes='*post,page'] would create a search with a checkbox for 'post' and 'page' post types, with 'post' pre-checked. -* New feature: You can now have multiple dropdowns in one [searchform] shortcode. Anything that begins with 'dropdown' is considered a dropdown parameter, so you can do [searchform dropdown_1='category' dropdown_2='post_tag'] for example. -* New feature: New filter hook `relevanssi_search_params` lets you filter search parameters after they've been collected from the WP_Query. -* New feature: New filter hook `relevanssi_excerpt_post` lets you make Relevanssi skip creating excerpts for specific posts. -* Changed behaviour: Redirect queries now support regular expressions. -* Changed behaviour: Filter hooks `relevanssi_1day`, `relevanssi_7days` and `relevanssi_30days` are removed, as the user searches page is now different. The default value for `relevanssi_user_searches_limit` is now 100 instead of 20. -* Minor fix: Stopwords weren't included in the exported options; they are now. -* Minor fix: Relevanssi won't let you adjust synonyms and stopwords anymore if you use Polylang and are in 'Show all languages' mode. -* Minor fix: New parameter for `relevanssi_tokenize()` introduces the context (indexing or search query). The `relevanssi_extract_phrases()` is only used on search queries. -* Minor fix: When you deactivate the Related posts feature from the settings, the Related post caches for posts are flushed. -* Minor fix: In some languages, iOS uses „“ for quotes. Relevanssi now understands those for the phrase operator. -* Minor fix: You can now choose 'user' post type in the admin search post type dropdown. -* Minor fix: The debugging page now lets you debug user profiles and taxonomy terms. -* Minor fix: Highlighting is improved by a more precise HTML entity filter, thanks to Jacob Bearce. -* Minor fix: Fixes problems with the WP-Members compatibility. -* Minor fix: The `relevanssi_premium_tokenizer` filter hook now gets the context (indexing or searching) as a parameter. -* Minor fix: Stops Relevanssi from blocking the admin search for WooCommerce coupons and other WooCommerce custom post types. -* Minor fix: Searching for a stemmed word with the AND search didn't find correct results. - -= 2.15.3.1 = -* Minor fix: The Bricks compatibility was broken, this version fixes it. - -= 2.15.3 = -* New feature: You can add a post type dropdown to [searchform] forms with `dropdown='post_type'`. -* New feature: New filter hook `relevanssi_sku_boost` controls the WooCommerce `_sku` field weight boost. -* New feature: New filter hook `relevanssi_related_posts_cache_id` lets you change the Related posts transient cache ID so allow multiple cached related posts per post. -* New feature: New filter hook `relevanssi_post_to_excerpt` lets you filter the post object before an excerpt is created from it. -* New feature: New filter hook `relevanssi_custom_fields_before_repeaters` filters the list of custom fields before repeater fields are processed, so you can add fields from code using the field_%_subfield notation. -* New feature: Relevanssi is now compatible with the Bricks page builder theme (requires Bricks 1.3.2). -* Changed behaviour: The spam block now returns a 410 Gone status code for blocked pages. -* Changed behaviour: The minimum capability for seeing the Gutenberg sidebar or the Relevanssi meta box is changed from 'manage_options' to 'edit_others_posts' in order to allow editors see the sidebar and the meta box. If you prefer the original way, use the `relevanssi_sidebar_capability` filter hook to adjust. -* Minor fix: Relevanssi removes HTML comments better from the post content. -* Minor fix: Sometimes the Did you mean would return really weird long suggestions from the search logs. That won't happen anymore. -* Minor fix: Oxygen compatibility has been improved. Rich text fields and updating posts when they are saved in Oxygen now work better, and revisions are no longer indexed. -* Minor fix: Improves tax_query handling in fringe cases with multiple AND clauses joined together with OR. -* Minor fix: It's now possible to override global multisite search settings from the `searchblogs` query variable. -* Minor fix: Searching without a search term works much better now, you get more posts in the results (default value is up to 500). - -= 2.15.2 = -* New feature: Adds support for Avada Live Search. -* New feature: Adds support for Fibo Search. -* New feature: Spam blocking can be used to block bots from accessing your search results pages. -* Changed behaviour: The filter hook `relevanssi_indexing_terms` that appeared in post type archive indexing is renamed to `relevanssi_indexing_tokens` what it should've been to begin with. -* Minor fix: Elementor library searches are not broken anymore when Relevanssi is enabled in admin. -* Minor fix: Relevanssi now understands array-style post_type[] parameters. -* Minor fix: The MySQL column detail information has been missing from the index. -* Minor fix: Spam blocking now works with pretty search page URLs and not just with ?s= URLs. You can use the new filter hook `relevanssi_search_url_prefix` to adjust the prefix in case it's not `/search/`. Spam blocking is also extended to page views with spam content in the `highlight` parameter. -* Minor fix: Relevanssi now automatically considers the Turkish 'ı' the same as 'i'. - -= 2.15.1 = -* New feature: New action hooks `relevanssi_disable_stemmer` and `relevanssi_enable_stemmer`. Relevanssi-compatible stemmers should implement these action hooks: the first should disable the stemmer and the second should enable it. -* New feature: Adds compatibility for WP-Members plugin, preventing blocked posts from showing up in the search results. -* New feature: New function `relevanssi_get_attachment_suffix()` can be used to return the attachment file suffix based on a post object or a post ID. -* Major fix: Fixes the broken Relevanssi controls on block editor post edit pages. -* Minor fix: Improved the Missing terms feature when used with stemming. This fix requires updating Snowball Stemmer to version 1.3. -* Minor fix: Improves the Oxygen compatibility. Now also the [oxygen] shortcode tags are removed. - -= 2.15.0 = -* New feature: Relevanssi can now add Google-style missing term lists to the search results. You can either use the `%missing%` tag in the search results breakdown settings, or you can create your own code: the missing terms are also in `$post->missing_terms`. Relevanssi Premium will also add "Must have" links when there's just one missing term. -* New feature: New filter hook `relevanssi_missing_terms_tag` controls which tag is used to wrap the missing terms. -* New feature: New filter hook `relevanssi_missing_terms_template` can be used to filter the template used to display the missing terms. -* New feature: New filter hook `relevanssi_missing_terms_must_have` filters the 'Must have' part of the missing terms element. -* New feature: New filter hook `relevanssi_phrase` filters each phrase before it's used in the MySQL query. -* New feature: New filter hook `relevanssi_multi_results`, which is the same as `relevanssi_results`, but is applied to multisite results, so instead of a post ID, it has 'blog ID|post ID' in the keys and as usual the post weight in the value. -* New feature: New filter hook `relevanssi_site_results`, which is the same as `relevanssi_results`, but only applied in single site results in multisite searching (ie. the filter is applied once for each subsite included in the results). -* New feature: New filter hook `relevanssi_post_author` lets you filter the post author display_name before it is indexed. -* New feature: New function `relevanssi_get_post_meta_for_all_posts()` can be used to fetch particular meta field for a number of posts with just one query. -* New feature: Relevanssi now has a keyword-based spam blocking feature to stop spam searches as soon as possible. -* New feature: The `fields` parameter can be set to `id=>type`, which returns post ID and the post type (post, user, taxonomy term), providing support for non-post results. This only works when using `relevanssi_do_query()` to run the query. -* Changed behaviour: `relevanssi_strip_tags()` used to add spaces between HTML tags before stripping them. It no longer does that, but instead adds a space after specific list of tags (p, br, h1-h6, div, blockquote, hr, li, img) to avoid words being stuck to each other in excerpts. -* Changed behaviour: Relevanssi now indexes the contents of Oxygen Builder PHP & HTML code blocks. -* Changed behaviour: Relevanssi now handles synonyms inside phrases differently. If the new filter hook `relevanssi_phrase_synonyms` returns `true` (default value), synonyms create a new phrase (with synonym 'dog=hound', phrase `"dog biscuits"` becomes `"dog biscuits" "hound biscuits"`). If the value is `false`, synonyms inside phrases are ignored. -* Changed behaviour: Multisite searching code has been refactored, and at the same time new features have been added. It is now possible to use date parameters and synonyms in multisite searching. -* Minor fix: Attachments that cause the reading server run out of memory are now labeled with the "File size too large error". -* Minor fix: Multisite searches were not logged. Now they are. -* Minor fix: Warnings when creating excerpts with search terms that contain a slash were removed. -* Minor fix: Better Ninja Tables compatibility to avoid problems with lightbox images. -* Minor fix: Trying to open the Relevanssi sidebar in Gutenberg when a post type did not support custom fields caused a crash. Now the sidebar is simply disabled if the post type does not support custom fields. -* Minor fix: Relevanssi did not work well in the Media Library grid view. Relevanssi is now blocked there. If you need Relevanssi in Media Library searches, use the list view. -* Minor fix: Relevanssi excerpt creation didn't work correctly when numerical search terms were used. - -= 2.14.5 = -* New feature: New WP CLI command `wp relevanssi remove_attachment_errors` clears out all attachment reading errors. -* Changed behaviour: `relevanssi_excerpt_custom_field_content` now gets the post ID and list of custom field names as a parameter. -* Changed behaviour: Attachments tab will now prevent reading the attachments if the options have been changed and aren't saved. -* Changed behaviour: Instead of setting the attachment reading server to 'us', Relevanssi install process will now guess whether 'eu' would be a better option based on the site locale. -* Minor fix: Avoids admin ajax request flooding when removing lots of posts at once. -* Minor fix: Adds trailing slash to the blog URL in Did you mean links. -* Minor fix: When the contents for an attached attachment are read, Relevanssi will now automatically index the parent post if the setting is enabled. - -= 2.14.4 = -* New feature: New action hooks `relevanssi_pre_the_content` and `relevanssi_post_the_content` fire before and after Relevanssi applies `the_content` filter to the post excerpts. Some Relevanssi default behaviour has been moved to these hooks so it can be modified. -* Changed behaviour: The `relevanssi_do_not_index` gets the post object as a third parameter. -* Minor fix: Remove errors from `relevanssi_strip_all_tags()` getting a `null` parameter. -* Minor fix: Updating posts still used `relevanssi_update_doc_count()`, which can sometimes be really slow. -* Minor fix: Corrected misleading instructions about indexing AND synonyms. - -= 2.14.3 = -* Major fix: Post type weights did not work; improving the caching had broken them. -* Minor fix: 'Read all unread attachments' did not include 'key is not valid' errors. Now it rereads those attachments. -* Minor fix: Stops indexing error messages in WPML. -* Minor fix: Synonyms are now used for highlighting titles in AND searches if 'Index synonyms for AND searches' is enabled. -* Minor fix: Relevanssi works better with soft hyphens now, removing them in indexing and excerpt-building. - -= 2.14.2 = -* Major fix: Stops more problems with ACF custom field indexing. -* Major fix: Fixes a bug in search result caching that caused Relevanssi to make lots of unnecessary database queries. -* Minor fix: Pinning didn't work correctly when the post content indexing was disabled. Now the pinned words are included in the post title, if the post content is not available. - -= 2.14.1 = -* Major fix: Stops TypeError crashes from null custom field indexing. - -= 2.14.0 = -* New feature: New filter hook `relevanssi_excerpt_gap` lets you adjust the first line of excerpt optimization. -* New feature: Phrase matching now works also for taxonomy terms and user profiles. -* New feature: New filter hook `relevanssi_phrase_queries` can be used to add phrase matching queries to support more content types. -* New feature: New WP CLI command `wp relevanssi refresh` reindexes all posts (and only posts) without truncating the index first. This is very useful for regular reindexing of production sites, as the search won't stop working during the reindexing. -* New feature: New function `relevanssi_update_words_option()` can be used to update the `relevanssi_words` option directly, in case the AJAX update action fails for some reason. -* New feature: You can now reset the `relevanssi_words` cache option from the Relevanssi debugging settings tab. -* Changed behaviour: The `relevanssi_tag_before_tokenize` filter hook parameters were changed in order to be actually useful and to match what the filter hook is supposed to do. -* Changed behaviour: Relevanssi now automatically optimizes excerpt creation in long posts. You can still use `relevanssi_optimize_excerpts` for further optimization, but it's probably not necessary. -* Changed behaviour: The `relevanssi_admin_search_element` filter hook now gets the post object as the second parameter, rendering the filter hook more useful. -* Minor fix: WPML couldn't digest post type archives in the search results. Relevanssi now handles that and also takes errors from WPML more gracefully. -* Minor fix: Taxonomy terms in WPML were not indexed correctly. Instead of the post language, the current language was used, so if your admin dashboard is in English, German posts would get English translations of the terms, not German. This is now fixed. -* Minor fix: Excerpt creation is now faster when multiple excerpts are not used. -* Minor fix: The SEO plugin noindex setting did not actually work. That has been fixed now. -* Minor fix: Multisite searching didn't work correctly in HyperDB environments. -* Minor fix: Improved fringe cases in nested taxonomy queries. -* Minor fix: Indexing would remove content where less than or greater than symbols were interpreted as HTML tags. -* Minor fix: In some cases Relevanssi wouldn't highlight the last word of the title. This is more reliable now. -* Minor fix: Relevanssi will now add the `highlight` parameter only to search results, and not to other links on the search results page. -* Minor fix: Disables stemming for words that are inside phrases to make post part targeted searches more precise. - -= 2.13.1 = -* Major fix: User and taxonomy term search did not work correctly, thanks to a complicated mix of small issues that didn't show up in the automated testing. The problem was caused be `relevanssi_premium_get_post()` returning WP_Post objects for these non-posts, so the function is now returning stdClass objects again. -* Major fix: The type hinting introduced for some functions turned out to be too strict, causing fatal errors. The type hinting has been relaxed (using nullable types would help, but that's a PHP 7.4 feature, and we don't want that). - -= 2.13.0 = -* New feature: New filter hook `relevanssi_rendered_block` filters Gutenberg block content after the block has been rendered with `render_block()`. -* New feature: New filter hook `relevanssi_log_query` can be used to filter the search query before it's logged. This can be used to log instead the query that includes synonyms (available as a parameter to the filter hook). -* New feature: New filter hook `relevanssi_add_all_results` can be used to make Relevanssi add a list of all result IDs found to `$query->relevanssi_all_results`. Just make this hook return `true`. -* New feature: New filter hook `relevanssi_acceptable_hooks` can be used to adjust where in WP admin the Relevanssi admin javascripts are enqueued. -* New feature: Support for All-in-One SEO. Posts marked as 'Robots No Index' are not indexed by Relevanssi. -* New feature: New setting in advanced indexing settings to control whether Relevanssi respects the SEO plugin 'noindex' setting or not. -* Changed behaviour: Type hinting has been added to Relevanssi functions, which may cause errors if the filter functions are sloppy with data types. -* Changed behaviour: Relevanssi no longer logs queries with the added synonyms. You can use the `relevanssi_log_query` filter hook to return to the previous behaviour of logging the synonyms too. Thanks to Jan Willem Oostendorp. -* Changed behaviour: `relevanssi_the_title()` now supports the same parameters as `the_title()`, so you can just replace `the_title()` with it and keep everything else the same. The old behaviour is still supported. -* Changed behaviour: When using ACF and custom fields indexing set to 'all', Relevanssi will no longer index the meta fields (where the content begins with `field_`). -* Minor fix: In some cases, having less than or greater than symbols in PDF content would block that PDF content from being indexed. -* Minor fix: PDF content wasn't being indexed in some cases where custom field indexing was otherwise disabled. -* Minor fix: The Oxygen compatibility made it impossible to index other custom fields than the Oxygen `ct_builder_shortcodes`. This has been improved now. -* Minor fix: In Related posts, random posts from the same category could include duplicates of posts in the related posts. -* Minor fix: Old legacy scripts that caused Javascript warnings on admin pages have been removed. -* Minor fix: relevanssi_premium_get_post() always returns WP_Post objects now, never stdClass objects. -* Minor fix: The search results log export did not do anything useful when no data was found. Now the export provides a message "No search keywords logged". Thanks to Jan Willem Oostendorp. - -= 2.12.2 = -* New feature: You can force Relevanssi to be active by setting the query variable `relevanssi` to `true`. Thanks to Jan Willem Oostendorp. -* Changed behaviour: Relevanssi has been moved from `the_posts` filter to `posts_pre_query`. This change doesn't do much, but increases performance slightly as WordPress needs to do less useless work, as now the default query is no longer run. Thanks to Jan Willem Oostendorp. -* Minor fix: Highlighting didn't work properly when highlighting something immediately following a HTML tag. -* Minor fix: WPML search results that included non-post results caused fatal errors and crashes. This fixes the crashing and makes non-post results work better in both WPML and Polylang. -* Minor fix: Pinning could cause warnings when using `fields` and non-post results. -* Minor fix: Importing options broke synonym and stopword settings. -* Minor fix: Improves the Rank Math SEO compatibility to avoid errors in plugin activation. -* Minor fix: You can no longer set the value of minimum word length to less than 1 or higher than 9 from the settings page. - -= 2.12.1 = -* Major fix: The multilingual stopwords and synonyms were used based on the global language. Now when indexing posts, the post language is used instead of the global language. -* Minor fix: Fixes the broken AND indexing for synonyms. - -= 2.12.0 = -* New feature: Relevanssi now supports multilingual synonyms and stopwords. Relevanssi now has a different set of synonyms and stopwords for each language. This feature is compatible with WPML and Polylang. -* New feature: SEO by Rank Math compatibility is added: posts marked as 'noindex' with Rank Math are not indexed by Relevanssi. -* New feature: New filter hook `relevanssi_sidebar_capability` adjusts the minimum capability required for seeing the Gutenberg sidebar and the Classic editor metabox. Default value is `manage_options`, ie. Editor. -* Minor fix: Attachment weren't affected by `relevanssi_indexing_restriction` filters when a new attachment was added. Now the filters apply as they should. -* Minor fix: With keyword matching set to 'whole words' and the 'expand highlights' disabled, words that ended with an 's' weren't highlighted correctly. -* Minor fix: The 'Post exclusion' setting didn't work correctly. It has been fixed. -* Minor fix: It's now impossible to set negative weights in searching settings. They did not work as expected anyway. -* Minor fix: Contributors could see the Relevanssi Gutenberg sidebar, but it didn't work. Now the sidebar is only shown by default to Editors and above. -* Minor fix: Relevanssi had an unnecessary index on the `doc` column in the `wp_relevanssi` database table. It is now removed to save space. Thanks to Matthew Wang. -* Minor fix: Improved Oxygen Builder support makes sure `ct_builder_shortcodes` custom field is always indexed. - -= 2.11.1 = -* Changed behaviour: The `relevanssi_excerpt_part` filter hook now gets the post ID as a second parameter. The documentation for the filter has been fixed to match actual use: this filter is applied to the excerpt part after the highlighting and the ellipsis have been added. -* Changed behaviour: The `relevanssi_index_custom_fields` filter hook is no longer used when determining which custom fields are used for phrase searching. If you have a use case where this change matters, please contact us. -* Minor fix: The `relevanssi_excerpt` filter hook was removed in 2.11.0. It is now restored and behaves the way it did before, except that when doing multi-part excerpts, this filter is applied separately for each excerpt part. -* Minor fix: The debugging tab no longer shows the 'Buy Premium' note to Premium users. -* Minor fix: Avoids undefined variable warnings from the Pretty Links compatibility code. -* Minor fix: In Premium, phrase matching in custom fields didn't work correctly when the custom field indexing setting was 'all' or 'visible'. -* Minor fix: The Oxygen Builder compatibility has been improved. Now shortcodes in Oxygen Builder content are expanded, if that setting is enabled in Relevanssi settings. -* Minor fix: Adding new redirects when there were none was impossible. This is now fixed, and in a more future-proof way. -* Minor fix: The default value for the number of excerpts was 3. It's now 1. - -= 2.11.0 = -* New feature: There's now a "Debugging" tab in the Relevanssi settings, letting you see how the Relevanssi index sees posts. This is familiar to Premium users, but is now available in the free version as well. -* New feature: The SEO Framework plugin is now supported and posts set excluded from the search in SEO Framework settings will be excluded from the index. -* New feature: There's a new option, "Expand highlights". Enabling it makes Relevanssi expand partial-word highlights to cover the full word. This is useful when doing partial matching and when using a stemmer. -* New feature: Relevanssi can now generate excerpts that show multiple snippets from the post. You can adjust the number of excerpts displayed from the excerpt settings. Individual excerpt parts are wrapped in `span` tags with the class `excerpt_part` for styling. -* New feature: New filter hook `relevanssi_excerpt_part` allows you to modify the excerpt parts before they are combined together. -* New feature: New filter hook `relevanssi_excerpts` lets you filter the array of excerpts before the highlights are added. -* New feature: Relevanssi now supports an arbitrary number of levels in the `field_%_subfield_%_subfield` notation for flexible ACF fields. -* New feature: Improved compatibility with Oxygen Builder. Relevanssi automatically indexes the Oxygen Builder content and cleans it up. New filter hooks `relevanssi_oxygen_section_filters` and `relevanssi_oxygen_section_content` allow easier filtering of Oxygen content to eg. remove unwanted sections. -* Changed behaviour: The "Uncheck this for non-ASCII highlights" option has been removed. Highlights are now done in a slightly different way that should work in all cases, including for example Cyrillic text, thus this option is no longer necessary. -* Changed behaviour: The `index_pdfs` WP CLI command has been retired. It has been replaced with two separate commands: `remove_attachment_contents` removes all read attachment contents from the database and `read_attachments` reads all attachment content from files that haven't been read yet. -* Changed behaviour: Relevanssi excerpts are now wrapped in `span` tags. -* Minor fix: Removes the warning about non-numeric values when using a redirect for the first time. -* Minor fix: Fixes phrase searching using non-US alphabet. -* Minor fix: Sometimes the `relevanssi_user_index_ok` filter would get a user ID and not the object. This is now fixed: it's always an object. -* Minor fix: Excluding posts from the block editor didn't work properly: the post would be marked excluded, but would not actually be removed from the index until the next reindexing of the whole database. This works now as expected. -* Minor fix: Relevanssi would break admin searching for hierarchical post types. This is now fixed, Relevanssi won't do that anymore. -* Minor fix: Relevanssi indexing now survives better shortcodes that change the global `$post`. -* Minor fix: Warnings about missing `relevanssi_update_counts` function are now removed. -* Minor fix: Paid Membership Pro support now takes notice of the "filter queries" setting. -* Minor fix: OR logic didn't work correctly when two phrases both had the same word (for example "freedom of speech" and "free speech"). The search would always be an AND search in those cases. That has been fixed. -* Minor fix: Relevanssi no longer blocks the Pretty Links admin page search. -* Minor fix: The "Respect 'exclude_from_search'" setting did not work if no post type parameter was included in the search parameters. -* Minor fix: The category inclusion and exclusion setting checkboxes on the Searching tab didn't work. The setting was saved, but the checkboxes wouldn't appear. - -= 2.10.3 = -* New feature: Multisite searching now supports date parameters. -* New feature: Both `relevanssi_fuzzy_query` and `relevanssi_term_where` now get the current search term as a parameter. -* New feature: New filter hook `relevanssi_tabs` can be used to adjust the tabs in Relevanssi settings page to add, modify or delete the tabs. -* Major fix: The `post_relevanssi_related` action hook did not fire at all, causing possible problems if `pre_relevanssi_related` set something that `post_relevanssi_related` was supposed clear out. The default behaviour isn't a problem, but some custom solutions may be. -* Minor fix: Relevanssi database tables don't have PRIMARY keys, only UNIQUE keys. In case this is a problem (for example on Digital Ocean servers), deactivate and activate Relevanssi to fix the problem. -* Minor fix: When `posts_per_page` was set to -1, the `max_num_pages` was incorrectly set to the number of posts found. It should, of course, be 1. -* Minor fix: Excluding from logs didn't work if user IDs had spaces between them ('user_a, user_b'). This is now fixed for good, the earlier fix didn't work. -* Minor fix: When indexing, users are now counted in a different way, so that the `relevanssi_user_indexing_args` filter hook is applied and the count reflects the actual number of users indexed. - -= 2.10.2 = -* New feature: Wildcard operators ? (any one letter) and * (zero or more letters) can be used inside words, if enabled by setting the `relevanssi_wildcard_search` filter to `true`. -* New feature: New filter hook `relevanssi_term_where` lets you filter the term WHERE conditional for the search query. -* Minor fix: Doing the document count updates asynchronously caused problems in some cases (eg. importing posts). Now the document count is only updated after a full indexing and once per week. -* Minor fix: Phrase matching has been improved to make it possible to search for phrases that include characters like the ampersand. - -= 2.10.1 = -* New feature: New filter hook `relevanssi_didyoumean_alphabet` to replace the default Latin alphabet with something more suited to your site. -* Major fix: Changes in WooCommerce 4.4.0 broke the Relevanssi searches. This makes the WooCommerce search work again. -* Minor fix: Excluding from logs didn't work if user IDs had spaces between them ('user_a, user_b'). Now the extra spaces don't matter. -* Minor fix: The asynchronous doc count action in the previous version could cause an infinite loop with the Snitch logger plugin. This is prevented now: the async action doesn't run after indexing unless a post is actually indexed. -* Minor fix: Relevanssi indexing procedure was triggered for autosaved drafts, causing possible problems with the asynchronous doc count action. -* Minor fix: The `relevanssi_index_custom_fields` filter hook was not applied when doing phrase matching, thus phrases could not be found when they were in custom fields added with the filter. -* Minor fix: Apostrophes in redirect queries didn't work. That is now fixed and saving a query with an apostrophe works and will redirect. - -= 2.10.0 = -* Changed behaviour: Relevanssi now requires PHP 7. -* Changed behaviour: Relevanssi now sorts strings with strnatcasecmp() instead of strcasecmp(), leading to a more natural results with strings that include numbers. -* Changed behaviour: Relevanssi init is now moved from priority 10 to priority 1 on the `init` hook to avoid problems with missing TablePress compatibility. -* New feature: Content wrapped in the `noindex` tags is no longer used for excerpts. -* New feature: The `[et_pb_fullwidth_code]` shortcode is now removed completely, including the contents, when Relevanssi is indexing and building excerpts. -* New feature: Relevanssi now shows a warning when a multisite site is not public, as that will lead to no search results because Relevanssi doesn't search non-public sites. -* New feature: The redirects tab now shows the number of times each redirect has been used. -* Major fix: Relevanssi didn't index new comments when they were added; when a post was indexed or the whole index rebuilt, comment content was included. We don't know how long this bug has existed, but it is now fixed. Rebuild the index to get all comment content included in the index. -* Minor fix: Phrase matching did not work correctly in visible custom fields. -* Minor fix: TablePress support could cause halting errors if posts were inserted before Relevanssi has loaded itself (on `init` priority 10). These errors will no longer happen. -* Minor fix: Relevanssi only updates doc count on `relevanssi_insert_edit()` when the post is indexed. -* Minor fix: Counting document count is a slow process that has slowed down opening the indexing tab. It's now done asynchronously. Thanks to Mike Garrett. - -= 2.9.0 = -* New feature: New function `relevanssi_get_related_post_ids()` returns an array of related post IDs for a post. -* New feature: New function `relevanssi_get_related_post_objects()` returns an array of related post objects for a post. -* New feature: New filter hook `relevanssi_related_output_objects` is the same as `relevanssi_related_output` but for `relevanssi_get_related_post_objects()`. -* New feature: New filter hook `relevanssi_get_approved_comments_args` filters the arguments to `get_approved_comments` in comment indexing. This can be used to index custom comment types, for example. -* Changed behaviour: Relevanssi related posts code has been split into separate functions. The `relevanssi_related_posts()` functions like before, but if you don't want the HTML code, check the new functions. -* Deprecated: Using relevanssi_related_posts() with `$just_objects` or `$no_template` set to `true` is deprecated. Use `relevanssi_get_related_post_objects()` and `relevanssi_get_related_post_ids()` instead. -* Minor fix: The related posts transient field uses a different name for storing objects or HTML, to avoid problems in case both styles are used at the same time. -* Minor fix: Indexing subscriber profiles from the admin interface has stopped working at some point, likely due to some changes in WordPress. It is now noticed and fixed. -* Minor fix: If running in multisite environment, `relevanssi_get_post_status()` includes the blog ID in the cache key in addition to post ID to avoid clashes where same post ID in different blogs have different statuses. -* Minor fix: General improvements to the post caching in multisite environments. -* Minor fix: Options that are used in admin backend only are no longer autoloaded on every page load. - -= 2.8.2 = -* Minor fix: Using phrases in the post part targeting didn't work. It works much better now, but may still have some oddities in some cases. -* Minor fix: Media Library searches failed if Relevanssi was enabled in the WP admin, but the `attachment` post type wasn't indexed. Relevanssi will no longer block the default Media Library search in these cases. -* Minor fix: Adds more backwards compatibility for the `relevanssi_indexing_restriction` change, there's now an alert on indexing tab if there's a problem. - -= 2.8.1 = -* New feature: New filter hook `relevanssi_post_content_after_shortcodes` filters the post content after shortcodes have been processed but before the HTML tags are stripped. -* Minor fix: Adds more backwards compatibility for the `relevanssi_indexing_restriction` change. - -= 2.8.0 = -* New feature: New filter hook `relevanssi_block_to_render` makes it possible to filter Gutenberg blocks before they are rendered to HTML. -* New feature: New filter hook `relevanssi_admin_search_blocked_post_types` makes it easy to block Relevanssi from searching a specific post type in the admin dashboard. There's built-in support for Reusable Content Blocks `rc_blocks` post type, for example. -* New feature: Relevanssi metabox and the Gutenberg sidebar now show the reason why a post is not indexed. You can find the reason at the "How Relevanssi sees this post" feature. -* New feature: When creating excerpts Relevanssi tries to remove the disabled shortcodes. -* Changed behaviour: Relevanssi has been blocked in the admin Media Library searches since 2012. There seems to be no reason not to use Relevanssi there, so Relevanssi is now used for admin Media Library searches, if admin searching is enabled in the first place. -* Changed behaviour: Relevanssi now applies minimum word length when tokenizing search query terms. -* Changed behaviour: Content stopwords are removed from the search queries when doing excerpts and highlights. When Relevanssi uses the untokenized search terms for excerpt-building, stopwords are removed from those words. This should lead to better excerpts. -* Changed behaviour: The `relevanssi_indexing_restriction` filter hook has a changed format. Instead of a string value, the filter now expects an array with the MySQL query in the index 'mysql' and a reason in string format in 'reason'. There's some temporary backwards compatibility for this. -* Minor fix: Synonym indexing for AND searches didn't work for taxonomy terms. -* Minor fix: Post part targeting didn't work well with partial matching or numeric search terms. -* Minor fix: Using `post_parent` from the URL parameters didn't work. -* Minor fix: Improves handling of content stopwords in partial matched searches. -* Minor fix: Polylang filtered out users and taxonomy terms from the results in some cases. That's still implemented in a fairly hackish way, but it's been made more robust now. -* Minor fix: Improves handling of emoji in indexing. If the database supports emoji, they are allowed, otherwise they are encoded. -* Minor fix: The `relevanssi_words` option no longer autoloads (it's a big one). - -= 2.7.0 = -* Changed behaviour: Content stopwords are now applied to the attachment content. -* Changed behaviour: Phrases in OR search are now less restrictive. A search for 'foo "bar baz"' used to only return posts with the "bar baz" phrase, but now also posts with just the word 'foo' will be returned. -* Major fix: Fixes an error message in WP 4.9. -* Minor fix: Relevanssi included results from archived blogs in the multisite search results. -* Minor fix: User Access Manager showed drafts in search results for all users. This is now fixed. - -= 2.6.1 = -* Minor fix: When using Gutenberg, pinning interface only worked for posts. Now it works for all indexed post types. - -= 2.6.0 = -* New feature: New filter hook `relevanssi_disable_stopwords` can be used to disable stopwords completely. Just add a filter function that returns `true`. -* New feature: New filter hook `relevanssi_date_query_non_posts` can be used to allow users and taxonomy terms in searches with a date query. -* Changed behaviour: The `relevanssi_related_words` filter hook didn't get the post ID as parameter, which severely constricts its usability. That's now fixed: the filter gets the post ID as the second parameter. -* Changed behaviour: Stopwords are no longer automatically restored if emptied. It's now possible to empty the stopword list. If you want to restore the stopwords from the file (or from the database, if you're upgrading from an earlier version of Premium and find your stopwords missing), just click the button on the stopwords settings page that restores the stopwords. -* Changed behaviour: Changes to post weights in the `relevanssi_results` hook did not affect the relevance scores shown in excerpts. That's changed now, and the displayed scores are now taken from the `$doc_weight` array, which is returned in the return value array from `relevanssi_search()`. -* Changed behaviour: Excerpt length and type are now checked outside the loop that goes through the posts. This reduces the number of database calls, but the most important effect is that now multisite searches will always create the excerpts with the settings of the subsite where the search is made and not with the settings of the subsite of each post. -* Minor fix: Searching for regex special characters (for example parentheses, brackets) caused problems in excerpts. -* Minor fix: Phrase matching wasn't applied to PDF content if the "Custom fields to index" setting was set to "some". -* Minor fix: Indexing taxonomies from the WP CLI could leave old taxonomy terms in the index. This is now prevented. -* Minor fix: Improvements in handling highlighting for words with apostrophes. -* Minor fix: Disregard hanging commas at the end of post exclusion settings. -* Minor fix: Relevanssi was blocking post queries in WP CLI. That's now fixed. -* Minor fix: Sometimes excerpts wouldn't have an ellipsis in the beginning even though they should. -* Minor fix: The 'Add a redirect' button did not work if there were no redirects. - -= 2.5.2 = -* Major fix: Makes Relevanssi Premium compatible with WP 4.9. - -= 2.5.1 = -* Major fix: Returns the missing stopwords. - -= 2.5.0 = -* New feature: You can now edit the read attachment content on the attachment edit pages. -* New feature: It's now possible to exclude image attachments from the index with a simple setting on the indexing settings page. -* New feature: You can now redirect empty searches to a specific page instead of the search results template. You can choose the URL from the Redirect settings page. -* New feature: Relevanssi now has a shiny new Gutenberg sidebar that replaces the old Relevanssi Post Controls metabox when using the block editor. -* New feature: When new attachments are uploaded and Relevanssi is set to automatically read new attachments, that reading is now done as an asynchronous background process, so it won't slow down the media upload. -* New feature: Page builder short codes are now removed in Relevanssi indexing. This should reduce the amount of garbage data indexed for posts in Divi, Avada and other page builder themes. -* Changed behaviour: The `relevanssi_page_builder_shortcodes` filter hook is now applied both in indexing and excerpts, and has a second parameter that will inform you of the current context. -* Minor fix: Post type archive indexing doesn't stop the WP CLI indexing if there are no post type archives to index. -* Minor fix: Did you mean could occasionally cause long delays in searches. This was especially problematic in some object cache situations, when the transient didn't last as long as it should've been. Updating the Did you mean word list, which is a slow process, now happens asynchronously. -* Minor fix: Stopwords weren't case insensitive like they should. They are now. Also, stopwords are no longer stored in the `wp_relevanssi_stopwords` database table, but are now stored in the `relevanssi_stopwords` option. -* Minor fix: A comma at the end of the custom field indexing setting made Relevanssi index all custom fields. This doesn't happen anymore and trailing commas are automatically removed, too. -* Minor fix: Post type archive indexing could ran into problems when post types are added or removed. This should fix some of those problems. -* Minor fix: Accessibility improvements all around the admin interface. Screen reader support should be better, feel free to report any further ways to make this better. -* Minor fix: Doing searches without search terms and with the throttle disabled could cause problems. Relevanssi now makes sure throttle is always on when doing termless searches. -* Minor fix: Untokenized search terms are used for building excerpts, which makes highlighting in excerpts work better. - -= 2.4.4 = -* New feature: You can now give Gutenberg blocks a CSS class `relevanssi_noindex` to exclude them from being indexed. Relevanssi will not index Gutenberg blocks that have the class. -* New feature: You can now target specific parts of the post with search terms like `{post_tag:cat}`, `{title:word}`, `{author:mikko}`, `{customfield_name:value}` and so on. See [this Knowledge Base entry for more information](https://www.relevanssi.com/knowledge-base/search-targets/). -* New feature: Relevanssi automatically skips some custom fields from common plugins that only contain unnecessary metadata. -* New feature: Related posts keywords can now be restricted by taxonomy, so tags will only match to tags and not other parts of the post. This may lead to increased precision. -* New feature: The search results breakdown is added to the post objects and can be found in $post->relevanssi_hits. The data also includes new fields and the breakdown from the excerpt settings page can now show author, excerpt, custom field and MySQL column hits. -* New feature: Relevanssi can now index Ninja Tables table content. This is something of an experimental feature right now, feedback is welcome. -* New feature: New filter hook `relevanssi_indexing_query` filters the indexing query and is mostly interesting for debugging reasons. -* Minor fix: Deleted and trashed comment contents were not deindexed when the comment was removed. That has been corrected now. -* Minor fix: Phrase matching is now applied to attachments as well, including the attachments indexed for parent post. -* Minor fix: Phrase matching only looks at custom fields that are indexed by Relevanssi. -* Minor fix: Exact match bonus now uses the original query without synonyms added for the exact match check. -* Minor fix: Paid Membership Pro filtering is only applied to published posts to prevent drafts from showing up in the search results. -* Minor fix: Indexing internal links for target documents could cause documents to go unindexed. This has now been fixed. If you use internal link indexing, rebuild the index after you update. -* Minor fix: Relevanssi could stop plugin information retrieval for other plugins fail. This has been fixed. - -= 2.4.3 = -* Major fix: Disabling `update_post_metadata_cache` seemed like a good optimization move for related posts, but it turns out it disables related posts thumbnails. We'll take weaker performance with working images. -* Major fix: Importing options caused WordPress to crash, because related posts and redirect settings were handled incorrectly in the import. -* Minor fix: The Polylang compatibility filter didn't return correct post objects if fields was set to `ids` or `id=>parent`. Now the filter function returns correct type of result. -* Minor fix: Enabling the related posts checkbox did not activate the number of months setting. - -= 2.4.2 = -* New feature: New filter hook `relevanssi_indexing_adjust` can be used to stop Relevanssi from adjusting the number of posts indexed at once during the indexing. -* New feature: New filter hook `relevanssi_acf_field_value` filters ACF field values before they are indexed. -* New feature: New filter hook `relevanssi_disabled_shortcodes` filters the array containing shortcodes that are disabled when indexing. -* Removed feature: The `relevanssi_indexing_limit` option wasn't really used anymore, so it has been removed. -* Changed behaviour: Indexing exclusions from Relevanssi settings, Yoast SEO and SEOPress are applied in a different way in the indexing, making for a smoother indexing process. -* Changed behaviour: WP Table Reloaded support has been removed; you really shouldn't be using WP Table Reloaded anymore. -* Changed behaviour: Related posts doesn't even try doing an AND search anymore, as most of the time it was a waste of time. If you need that, using the `relevanssi_related_args` filter hook to swap the operator is still possible. -* Major fix: Related posts generation performance has been improved. -* Major fix: Related posts didn't work if multisite searching was enabled. That error has been eliminated. The related posts will come from the same subsite as the original post. -* Minor fix: Relevanssi won't choke on ACF fields with array or object values anymore. -* Minor fix: While you could set the Related posts to show random posts from the same category, the setting wouldn't appear correctly on the settings page. That has been fixed. -* Minor fix: The settings export now includes couple of missing parts, like the related posts settings. -* Minor fix: Relevanssi uninstall process left couple of Relevanssi options in the database. -* Minor fix: WPML language filter didn't work when `fields` was set to `ids` or `id=>parent`. - -= 2.4.1 = -* New feature: SEOPress support, posts marked "noindex" in SEOPress are no longer indexed by Relevanssi by default. -* Removed feature: Multi-taxonomy restrictions with `&taxonomy=post_tag|category&term=tag_term|cat_term` format has stopped working, apparently long time ago. Looks like nobody missed it. -* Changed behaviour: Membership plugin compatibility is removed from `relevanssi_default_post_ok` function and has been moved to individual compatibility functions for each supported membership plugin. This makes it much easier to for example disable the membership plugin features if required. -* Minor fix: The `searchform` shortcode now works better with different kinds of search forms. -* Minor fix: Yoast SEO compatibility won't block indexing of posts with explicitly allowed indexing. -* Minor fix: The `relevanssi_the_tags()` function printed out plain text, not HTML code like it should. The function now also accepts the post ID as a parameter. -* Minor fix: Excerpt creation and highlighting have been improved a little. - -= 2.4.0 = -* New feature: Multi-phrase searches now respect AND and OR operators. If multiple phrases are included in an OR search, any posts with at least one phrase will be included. In AND search, all phrases must be included. -* New feature: Admin search has been improved: there's a post type dropdown and the search is triggered when you press enter. The debug information has a `div` tag around it with the id `debugging`, so you can hide them with CSS if you want to. The numbering of results also makes more sense. -* New feature: The date parameters (`year`, `monthnum`, `w`, `day`, `hour`, `minute`, `second`, `m`) are now supported. -* New feature: New filter hook `relevanssi_file_content` filters the file content before it's saved in the `_relevanssi_pdf_content` custom field. -* New feature: New filter hook `relevanssi_related_args` filters the related posts search arguments. -* New feature: You can now set a month restriction to show only recent posts in the related posts. For more fine-grained date control, use the `relevanssi_related_args` filter hook. -* New feature: Instead of fully random posts, you can choose to get random posts from the same category if no proper matches are found for related posts. -* New feature: New filter hook `relevanssi_indexing_limit` filters the default number of posts to index (10). If you have issues with indexing timing out, you can try adjusting this to a smaller number like 5 or 1. -* New feature: Support for Paid Membership Pro added. -* New feature: WordPress SEO support, posts marked "noindex" in WordPress SEO are no longer indexed by Relevanssi by default. -* Removed feature: qTranslate is no longer supported. -* Major fix: Updates work when API key is in single site settings in a multisite environment. In 2.3.0, it is required that the key is in the multisite settings, otherwise updates won't work in multisite. -* Major fix: Tax query searching had some bugs in it, manifesting especially into Polylang not limiting the languages correctly. Some problems with the test suites were found and fixed, and similar problems won't happen again. -* Minor fix: Admin search only shows pinning and editing options to users with enough capabilities to use them. -* Minor fix: Phrase searching now uses filterable post statuses instead of a hard-coded set of post statuses. -* Minor fix: When saving an API key on a single site in multisite environment, the key appears to be saved. (In 2.3.0 it was saved, but it didn't look like it.) -* Minor fix: The plugin action links were missing on the Plugins page list, they're back now. -* Minor fix: Synonym indexing has been fixed, it could prevent saving of posts when synonym list was empty. -* Minor fix: Setting the `post_type` parameter to `post_type` to get post type archive pages now works. -* Minor fix: In some cases, Relevanssi might complain when uploading files. -* Minor fix: Missing action links were returned to the plugins list. -* Minor fix: Wrinkles in the upgrade process from free to Premium were ironed out. -* Minor fix: Search terms with slashes won't cause errors anymore. -* Minor fix: Relevanssi admin pages have been examined for accessibility and form labels have been improved in many places. -* Deprecated: `relevanssi_get_term_taxonomy()` function is deprecated and will be removed at some point in the future. - -= 2.3.0 = -* New feature: Content stopwords are just like regular stopwords, but they are only applied to post content. They are not applied to titles, custom fields or other places. -* New feature: The search form shortcode has a new parameter `dropdown` which can be used to add a category dropdown, like this: `[searchform dropdown="category"]`. -* New feature: Relevanssi can now use the contents of the PDF files indexed with WP File Download. -* New feature: Related posts can now be used in a different way. Instead of storing rendered HTML in the transients, Relevanssi can now store just the post objects for the related posts. -* New feature: Related posts WP CLI command has new parameters: just_objects activates the post object transients, post_type only generates the related posts for a particular post type. -* New feature: You can now pin and unpin posts from the Admin search. Just do a search and you can then easily pin posts for that search term. -* New feature: Relevanssi now supports User Access Manager permission controls. -* New filter: `relevanssi_indexing_tokens` can be used to filter the tokens (individual words) before they are indexed. -* Removed filter: `relevanssi_default_meta_query_relation` did not have any effect anymore. -* Changed behaviour: The default taxonomy relation was set to AND in 2.2.5, but wasn't properly applied before. Now it is really switched. -* Changed behaviour: Relevanssi now uses the `relevanssi_indexing_tokens` filter hook to add synonyms, which means adding lots of synonyms is much faster than before, and synonyms are now applied to all indexed content. -* Changed behaviour: New post types have been added to list of forbidden post types Relevanssi won't show as indexing options (ACF, TablePress and WooCommerce). -* Changed behaviour: Related posts templates are no longer generated when posts are saved. There are cases where generating the templates in admin context cause problems. The templates will be generated the first time the post is opened. -* Major fix: Tax query processing has been completely refactored, eliminating all sorts of bugs, especially with various edge cases. -* Major fix: Gutenberg block indexing only worked with the Gutenberg plugin enabled. It now works with WP 5.0 built-in Gutenberg as well. If you use Gutenberg blocks, reindex to get all the block content in the index. -* Major fix: Excerpt-building and highlighting did not respect the "Keyword matching" setting. They do now, and the excerpts should be better now. -* Major fix: AND searches needed queries that could get too long for the database to handle. This has been fixed and optimized. -* Major fix: Post exclusion (negative pinning) didn't work properly in multisite context. -* Major fix: Taxonomy term subquery relations didn't work; now they are applied. -* Major fix: Saving related posts exclusion settings wasn't possible. -* Minor fix: Authors can search for their own private posts. -* Minor fix: API key setting field behaviour has been improved. -* Minor fix: iOS uses curly quotes by default, and that didn't work as a phrase operator. Now phrase operator works with curly quotes and straight quotes. -* Minor fix: The free version Did you mean broke with search terms longer than 255 characters. -* Minor fix: Relevanssi won't create empty pinning meta fields anymore. -* Minor fix: Phrases with numbers and one word like "team 17" didn't work, because numbers weren't counted as words. -* Minor fix: $post->relevanssi_pinned wasn't set correctly for pinned posts. -* Minor fix: Relevanssi handles errors better in multisite searching when you search for a taxonomy that doesn't exist on the current site. - -= 2.2.5 = -* EXISTS and NOT EXISTS didn't work for taxonomy terms in searches. -* WPML post type handling has been improved. If post type allows fallback for default language, Relevanssi will support that. -* Relevanssi now reminds you to set up automatic trimming for the logs. It's a really good idea, otherwise the logs will become bloated, which will hurt search performance. -* New filter: `relevanssi_user_indexing_args` lets you adjust the arguments for the user indexing query, making easy for example to adjust which user roles are indexed. -* API keys are handled better in single installations on multisites. -* The pinning query is significantly faster. -* In some cases, the related posts feature could show wrong number of posts. That's now fixed. -* The Groups posts filter is only applied to public posts to avoid drafts being shown to people who shouldn't see them. -* The `posts_per_page` query variable didn't work; it's now added to the introduced query variables so that it works. -* Relevanssi won't log empty queries anymore. -* WP CLI searches were disabled when Relevanssi is active; it should work now. -* New filter: `relevanssi_pdf_for_parent_query` lets you adjust the MySQL query for fetching PDFs to index with the parent post. -* New filter: `relevanssi_pdf_for_parent_insert_data` lets you manipulate the INSERT data for PDFs indexed with the parent post. -* The default tax query relation was switched from OR to AND to match the WP_Query default behaviour. -* Gutenberg can cause duplicated postmeta fields for pinning and unpinning. Relevanssi will now remove the duplicate post meta when the post is saved. -* When used with WP 5.1, Relevanssi will now use `wp_insert_site` instead of the now-deprecated `wpmu_new_blog`. -* Multisite blog creation is handled better in WP 5.1+. -* Relevanssi now supports Restrict Content Pro permissions. -* The Relevanssi metabox is now only shown for indexed post types. - -= 2.2.4.2 = -* Fixes couple of JS issues with the metabox scripts. -* Improves meta key sorting. -* New actions: `pre_relevanssi_related` is triggered before related posts searches and `post_relevanssi_related` after the searches. - -= 2.2.4.1 = -* It's now possible to disable thumbnails and titles for related posts. -* The related posts custom template is looked for in the right place. -* Metabox buttons work without Gutenberg. -* Drafts shouldn't appear in the related posts anymore. -* Choosing the default thumbnail for related posts is more pleasant now. -* You can now disable auto-appended related posts for a post. -* You can disable a post so that it won't appear as a related post. - -= 2.2.4 = -* New Related posts feature can be used to display related posts for your content. -* Relevanssi metabox on post edit pages is now in the sidebar by default. It doesn't move automatically on older installations, but you can drag it there. It's recommended, as from now on the look will be designed for sidebar use. -* Search performance has been improved. -* Redirects have been improved a bit. -* Multisite searching was broken when sorting posts. -* Using period as a thousands separator could cause weird results. -* Members plugin compatibility has been improved: it's only used if the 'content permissions' feature has been enabled. -* New JetPack taxonomies and post types have been added to the block list so they won't appear in Relevanssi settings. -* Attachment indexing will bypass zip files. -* New filter: `relevanssi_accept_mime_type` lets you filter attachment reading by MIME type. -* New filter: `relevanssi_do_not_read` lets you filter attachment reading by post ID. -* API key field was not shown if Relevanssi was installed on a single site in a multisite network. Now it's shown correctly. -* New filter: `relevanssi_search_form` works exactly like `get_search_form`, but only applies to the Relevanssi shortcode search forms. -* Relevanssi settings page won't let you exclude categories you have restricted the search to. - -= 2.2.3.1 = -* The new Redirects feature caused unforeseen consequences. This version should fix them. - -= 2.2.3 = -* New Redirects feature lets you redirect keywords directly to specific result pages. -* Choosing "CSS Style" for highlighting was not possible. That is now fixed. -* Gutenberg reusable block indexing was fatally broken with the latest Gutenberg version. That has been updated. -* Relevanssi now by default respects the WooCommerce "exclude from search" setting. -* `post__not_in` still didn't work properly, it does now. -* New filter: `relevanssi_comparison_order` can be used to define the sorting order when sorting the results by post type. -* English stemmer has been improved a bit. -* "Did you mean" process included a very slow query. It is now cached, leading in some cases to massive performance improvements (we're talking about several seconds here). -* Highlights inside `code` and similar blocks are handled better now. - -= 2.2.2.1 = -* Fixed broken "User searches" page. -* "How Relevanssi sees this post" is hidden by default. - -= 2.2.2 = -* Relevanssi can now index Gutenberg reusable blocks. (This functionality broke once already before release, so that can happen, since Gutenberg is still in very active development.) -* The `post__in` and `post__not_in` parameters didn't work, and are now fixed. `post_parent__in` and `post_parent__not_in` are also improved. -* You can use named meta queries for sorting posts. Meta query sorting is improved in other ways as well. -* Log export didn't work properly. -* The `relevanssi_premium_get_post()` now has a default value (-1) for the blog ID. -* Adding stopwords from the common word list has been fixed. -* The `relevanssi_get_words_having` filter hook is now also applied to the free version Did you mean queries. -* New filters: `relevanssi_1day` and `relevanssi_7days` can be used to adjust the number of days for log displays, so instead of 1, 7 and 30 days you can have anything you want. - -= 2.2.1 = -* The admin search has been moved to a separate page and made visible to editors, authors and contributors. -* New filter: `relevanssi_admin_search_capability` can be used to adjust who sees the admin search page. -* "How Relevanssi sees the post" feature on post edit screens actually works now. -* Numeric meta values (`meta_value_num`) are now sorted as numbers and not strings. - -= 2.2.0.1 = -* 2.2 claimed to be version 2.1.7. - -= 2.2 = -* New feature: Search tab on Relevanssi settings page allows you to perform searches in WP admin using Relevanssi. -* New feature: Post type archives can now be indexed. This will index the label and the description of the post type. -* New feature: Relevanssi now has a privacy mode that blocks outside connections: at the moment that means update checks and indexing attachments with Relevanssi indexing services. This helps keep your site private and can in some configurations speed up plugin page loads a lot. -* New feature: On post edit screens, you can now see how Relevanssi sees the post. This should help debugging indexing issues. -* New feature: You can now export the search log as a CSV file. -* New filter: `relevanssi_entities_inside_pre` and `relevanssi_entities_inside_code` adjust how HTML entities are handled inside `pre` and `code` tags. -* New filter: `relevanssi_attachment_server_url` allows the use of custom attachment reading server. -* User meta fields are indexed as custom fields, not as post content, and the `customfield_detail` column is also filled. -* Pinned posts have `$post->relevanssi_pinned` set to 1 for debugging purposes, but you can also use this for styling the posts in the search results templates. -* Multisite searching updates: exact match bonus and the recency bonus did not work in multisite searches. Now they work. -* Multisite search also had quite a few bugs squashed. -* The basic Did you mean feature has been toned down a bit, to make the suggestions slightly less weird in some cases. -* Post parent parameters now accept 0 as a value, making it easier to search for children of any post or posts without a parent. -* Pinning caused an error message when `fields` was set to `ids`. Now the behaviour is correct, and the pinning code also won't run, unless something is pinned. -* Taxonomy terms and users are handled better in multi-word AND searches. - -= 2.1.7 = -* The API key option in the network options wasn't very intuitive. It's better now. -* Direct attachment links in search results work better now, especially in cases where the site has moved. -* Improved handling of certain edge cases in taxonomy search. -* Home page links were getting the highlight parameter even though they shouldn't. This has been fixed. -* The Import / Export options tab was missing (very few people complained, so perhaps that feature is not very important...). -* The status of the 'Index PDF contents for parent post' option didn't show up correctly on the settings page. -* Added support for WP JV Post Reading Groups. -* Improved handling of HTML entities. -* Events Made Easy Calendar shortcodes are now removed when building excerpts. -* `set_time_limit()` was removed from the indexing; it's no longer necessary, and it can break the indexing on sites that don't allow the use of the function. -* `relevanssi_post_title_before_tokenize` filter was moved a bit so that it's the last thing that runs before tokenizing. -* When indexing custom MySQL column data, stopwords and minimum word length weren't applied properly. -* Disabled shortcodes are handled better in the indexing: the shortcode names won't be indexed anymore like they were before. -* Fix for pinning in multisite context. -* Made sure there won't be a warning for non-numeric values when searching. -* Removed unnecessary post types from the weight setting list. -* New filter: `relevanssi_clean_excerpt` lets you remove unwanted highlights from excerpts. -* Highlighting works better with `pre` and `code` tags. -* New filter: `relevanssi_comment_author_to_index` lets you filter comment author names before indexing. -* `relevanssi_comment_content_to_index` doesn't include the comment author name anymore. - -= 2.1.6.1 = -* The privacy features caused an error notice with certain Relevanssi configurations, and the plugin required WP 4.9.6. - -= 2.1.6 = -* Privacy: If you log search queries, Relevanssi will suggest some additional content to your privacy policy page. -* Privacy: Relevanssi now supports the new Privacy Policy and Personal Data tools in WordPress 4.9.6. -* Improved Polylang support. Now taxonomy terms can be language filtered as well. -* Saving synonyms with quotes worked, but the synonyms showed up wrong. -* Taxonomy term indexing had a bug where the `type` column for taxonomy terms would be set to 0. -* The `relevanssi_user_index_ok` filter is now applied when users are updated. -* Relevanssi could in some situations override navigation menu links with links to the user profiles or taxonomy terms found in the search. This update fixes that behaviour. -* Random order works again; using orderby `rand` didn't work properly. The `rand(seed)` format is also supported now. -* Fixed quotes and apostrophes in Did you mean suggestions. - -= 2.1.5 = -* New feature: WooCommerce product visibility can now be considered better in the indexing. See the filter hook 'relevanssi_woocommerce_indexing' for more details. -* Phrases were not highlighted correctly on documents. This is now fixed. -* Shortcode fix: 'wp_show_posts' shouldn't cause problems anymore. -* Fix for post tag indexing issues. -* MemberPress post controls were loose and showed drafts to searchers. That is now fixed. -* Highlighting was too loose, even if matching was set to whole words. -* Highlighting now works better in cases where there's a hyphen or an apostrophe inside a word. - -= 2.1.4 = -* Fixed cases where Relevanssi added an ellipsis even if the excerpt was from the start of the post. -* Highlighting now works with numeric search strings. -* Improved highlighting for accented words. Thanks to Paul Ryan. -* A surplus comma at the end of post exclusion setting won't break the search anymore. -* Fixed instructions for adjusting the throttle limit. -* New "Pin this post for all keywords" feature. - -= 2.1.3 = -* Recent post bonus is now applied to searches. -* Exact term setting can now be disabled. -* Users of Members plugin would have drafts appear in search results. This is now fixed. -* Pinned keywords would appear in the list of exlusion keywords, and you couldn't set exclusion keywords. That is now corrected. -* "Index unindexed posts" works better. -* Removing quotes and apostrophes in indexing didn't work properly. -* Attachment indexing progress meter fixed. -* The "Highlight from external searches" option was removed. It's not supported by Google or Bing anymore, so there's little point in keeping it. - -= 2.1.2 = -* MemberPress post control was backwards. -* Fusion Builder shortcodes are automatically removed from excerpts. -* Indexing failed, when a same word appeared in two different taxonomies. -* Internal link management had a bit of a bug in the indexing. -* User searches page reset buttons fixed. - -= 2.1.1.1 = -* Fixes an issue where you can't save taxonomy indexing settings. - -= 2.1.1 = -* Automated testing can't catch everything... There was some overzealous security in place, breaking Network options. That is now fixed. -* Attachment file name is not prepended to the excerpts automatically. - -= 2.1 = -* Relevanssi code has been reviewed and modified to follow WordPress coding standards. As a result, there have been minor improvements all around the code to make things more robust and secure. -* Attachment indexing has been extended to many more document types: now it should be able to handle most document types, including Office and OpenDocument formats. It's also slightly faster. -* There's now an option to do attachment reading in an EU-based server. -* Custom field detail is no longer serialized. It's now JSON. If you use custom field detail, rebuild the index and change your code to use json_decode() instead of unserialize(). -* `relevanssi_the_tags()` and `relevanssi_get_the_tags()` now have different set of parameters, more in line with `the_tags()` and `get_the_tags()`. -* Taxonomy indexing settings were emptied out if you saved another options tab. That is now fixed. -* Improvements to WPML support; WPML is now less likely to be confused in multisite searches. -* Updated filter: `relevanssi_search_ok` now gets the WP_Query object as a parameter, which is helpful if you're not using the global $wp_query. -* ACF Flexible Content field indexing didn't work properly, possibly due to a change in ACF. That should now work better. - -= 2.0.5 = -* Fixed a bug in "Did you mean" suggestions. -* Paid Member Subscription shortcode compatibility. -* Indexing works better when there are plenty of excluded posts. -* Ampersand handling works better in titles. -* Relevanssi won't add the `highlight` parameter to links pointing to the front page anymore (because that makes those links point to the blog page). -* There's less need for `relevanssi_get_permalink()` now, as Relevanssi can adjust the links printed out with `get_permalink()`. -* The [searchform] shortcode can now take parameters, for example: `[searchform post_types="page"]` will print out a search form that only searches pages. -* Small improvement for excerpt-building, thanks to ___ _______. - -= 2.0.4 = -* Fixed filter: `relevanssi_custom_field_value` didn't get the post ID correctly. -* Relevanssi used `sanitize_hex_color`, which isn't actually reliably available. -* Multisite searches didn't support `orderby` and `order` parameters. -* Did you mean suggestions have been improved. -* New filter: `relevanssi_do_not_index_term` lets you control whether or not taxonomy terms are indexed. -* Single-word phrases are not allowed anymore, as they do no good. They are silently converted to non-phrases now. -* `relevanssi_get_permalink` doesn't add the `highlight` parameter to URLs outside search results pages anymore. -* Setting post type or post content weight to 0 didn't work. -* Search form shortcode echoed out the search form, instead of returning it as it should. -* Gravity Forms shortcode is now disabled in Relevanssi indexing. -* ACF repeater field indexing doesn't break if you try to index multilevel repeaters (that still won't work, but it won't break everything either). -* HTML tags are stripped from post excerpts when using the excerpt to build Relevanssi excerpts. -* User indexing is now done in steps, after it turned out to be impossible to index 16,000 users at once. -* New filter: `relevanssi_excerpt_query` filters the search query before building excerpts. -* New option: if you choose to hide Relevanssi from post edit pages, you can allow admins to see the Relevanssi post controls. - -= 2.0.3.1 = -* There was a small error in the multisite installation procedure, now fixed. - -= 2.0.3 = -* Uninstalling Relevanssi was broken. That is now fixed. -* In some cases excerpt-building could take ages because of autoembed link discovery. Relevanssi now blocks the autoembed procedure in link-building. -* © and ® symbols caused problems in indexing; they are now included in the default punctuation removal. -* Fixed filter: `relevanssi_pdf_read_timeout` wasn't applied to all cases of timeouts. -* Updated filter: `relevanssi_index_custom_fields` now gets a second parameter that contains the post ID. -* New filter: `relevanssi_custom_field_value` is used to filter custom field values both before indexing and before excerpt-building. Parameters include the field name and the post ID. -* Indexing PDF content didn't work properly if Relevanssi was set to index visible custom fields. -* There was a bug in importing the options. -* New setting can be enabled to read in the contents of new PDF files as they are uploaded on the site. This is disabled by default. - -= 2.0.2 = -* New filter: `relevanssi_multisite_public_status` lets you make non-public multisite subsites available in the search. -* New filter: `relevanssi_pdf_read_timeout` lets you increase the PDF reading timeout from the default value of 45 seconds. -* Deprecated filter: `relevanssi_index_taxonomies_args` is no longer used, because Relevanssi doesn't use `get_terms()` anymore in taxonomy term indexing. -* New filter: `relevanssi_hide_empty_terms` can be used instead of `relevanssi_index_taxonomies_args` to include empty taxonomy terms in indexing. Defaults to `true`, set to `false` to include taxonomy terms that are not attached to any posts. -* Taxonomy term indexing is now done in small steps to prevent timeout issues when indexing large numbers of taxonomy terms. -* Improvements to the Polylang setting. -* PDFs were always indexed for the parent post, never mind the value of the option. - -= 2.0.1 = -* Fixes a fatal error that happened with older PHP versions. - -= 2.0 = -* Legacy code has been removed. If you have a version older than 1.16, update first to 1.16.x to guarantee smooth upgrade process. -* This version includes a small database change, so if you're updating from a previous version, after the update deactivate the plugin and then reactivate. -* Improved indexing: no more clicking "Continue indexing" again and again! -* Settings pages have been completely rewritten. -* There's documentation in the WordPress contextual help: just click Help on the top right corner. -* Better Polylang support. A new option to remove the Polylang language filter. -* Logs can be automatically trimmed. Old log entries are removed to save space. -* Finally a setting to adjust content weight! -* Excerpts can use the custom field content. -* Highlighting in documents is changed: it now requires a `highlight` query parameter. This helps getting pass caching and makes the highlighting more reliable. To get the query parameter active, use `relevanssi_get_permalink()` to print out the permalinks on the search results templates. -* Relevanssi added synonyms to highlighting even if synonyms were not used for searching. In some cases, synonyms were added twice. -* The User Searches page got a makeover, too. -* Relevanssi is automatically disabled in REST API searches. -* Groups and Simple Membership support has been improved. -* Sorting search results is now up to 300 times faster than before. -* Lots of improvements all over the place. -* New filter: `relevanssi_excerpt_custom_field_content` lets you modify custom field content that is used for excerpts. -* New filter: `relevanssi_punctuation_filter` allows for easy modification of punctuation handling. -* New filter: `relevanssi_default_punctuation_replacement` changes the default way to handle the rest of the punctuation. -* New filter: `relevanssi_search_again` lets you run the search again if no results are found and to modify the parameters between search runs. -* New filter: `relevanssi_fallback` allows you to do fallback searches. -* New filter: `relevanssi_page_builder_shortcodes` lets you control which page builder shortcodes Relevanssi removes before building the excerpts. -* New filter: `relevanssi_optimize_excerpts` makes excerpt-building faster, if you make the filter return `true`. -* New query variable: set `include_attachments` to `0`, `off` or `false` to exclude attachments from the search. - -= 1.16.2.1 = -* Fixing a bug in the sorting algorithm. - -= 1.16.2 = -* ACF repeater fields with dashes didn't work; that is now fixed. -* Simple Membership plugin is now supported automatically to restrict access to posts. -* Relevanssi can now handle orderby parameter in array format. -* Relevanssi now blocks Easy Digital Downloads shortcodes when indexing to improve compatibility with EDD. -* When using `fields` to only fetch post IDs, Relevanssi doesn't try to highlight post titles. -* New action: `relevanssi_update_options` lets you adjust Relevanssi options immediately after the defaults are set. -* Remove notices about duplicated database columns when installing the plugin. - -= 1.16.1 = -* SECURITY: This version fixes a SQL injection vulnerability, where a site admin could theoretically inject SQL code into Relevanssi search queries. Doing this required access to Relevanssi settings page and in my tests, I couldn't do any damage, just break the Relevanssi search, but in any case, this vulnerability is now fixed. -* Multisite meta queries didn't work properly. -* Search and Filter shortcode is added to the blacklist. -* Groups plugin is now supported automatically to restrict access to posts. -* The filter `relevanssi_index_custom_fields` now works even if the custom field setting is empty. -* The filter `relevanssi_tax_term_additional_content` now works even when the taxonomy description is empty. -* Relevanssi taxonomy term indexing is moved to a later priority (from 10 to 9999) to make sure all term data is available for indexing. -* The filter `relevanssi_post_to_index` now has a second parameter. For posts, it simply repeats the post object, but for taxonomy terms, it has the term object. - -= 1.16.0.1 = -* Fixes "unknown column" issues in multisite searches. -* Removes errors when trying to search a multisite subsite that doesn't have Relevanssi. -* Small fix to make automatic updates work better in a multisite environment. - -= 1.16.0 = -* Changed a bit how Relevanssi attaches itself to queries. Instead of the global $wp_query, Relevanssi now uses the query passed as the parameter to `the_posts` filter hook. This should improve compatibility in some cases, but may cause problems in some fringe cases. If you're doing something unusual with Relevanssi, try this out before deploying to public use. -* Internal link processing had some minor issues, which are now straightened out. -* Some meta queries caused major problems with the Relevanssi weighting algorithm. This has now been fixed. -* Error notices caused by trying to use a non-existing taxonomy term have been removed. - -= 1.15.4 = -* Improved performance of multisite queries. -* Copying settings between multisite sites didn't work in networks of over 100 sites. Now the limit is 2000. -* Post type exclusion didn't work as expected. -* Relevanssi couldn't handle nested tax queries (such as those generated by WooCommerce product visibility filtering) properly. -* Fake posts created for taxonomy terms now include the parent in $post->post_parent. -* Doing a quick edit cleaned out the Relevanssi post controls settings. - -= 1.15.3.1 = -* New filter: `relevanssi_allow_one_letter_highlights` lets you allow one-letter highlights. Just make the filter function return `true`. -* New filter: `relevanssi_block_one_letter_searches` by default blocks one-letter searches. If you want to enable them, add a filter function that always returns `false`. -* Fixed an undefined variable notice. - -= 1.15.3 = -* Multisite search won't attempt to search in blogs that don't exist or are deleted or marked spam. -* Synonym indexing failed if synonyms contained a forward slash. -* Highlighting HTML tags has been improved further. -* New filter: `relevanssi_tag_before_tokenize` allows you to access tag content before indexing. -* Improvements to taxonomy terms and post type parameters. Now if you set a post type parameter, taxonomy terms or user profiles are not included in the search. In order to see taxonomy terms in the search results when using `post_types` parameter, add the taxonomy name (or `user`) to the `post_types` parameter. This does not work with the default `post_type` parameter. -* Relevanssi now actively blocks one-letter search terms, as they are generally pointless and can cause "out of memory" issues. One-letter search terms are no longer highlighted, either. These are usually caused by cases like "word's" being interpreted as "word s". -* New filter: `relevanssi_disable_shortcodes_excerpt` lets you add more shortcodes to be disabled before excerpts are built. -* Relevanssi now indexes taxonomy terms whenever they are created. -* Relevanssi now supports `fieldname_%_subfieldname` notation for ACF repeater fields in "Custom fields to index" settings. - -= 1.15.2.1 = -* An extra parentheses killed the WP CLI indexing. - -= 1.15.2 = -* When a taxonomy term was saved, Relevanssi didn't record the changes correctly. -* New WP CLI commands to index only users or taxonomies. -* Improved the way highlighting handles HTML tags, especially when highlighting on post pages. -* Relevanssi didn't remove taxonomy term data from the index properly. I recommend rebuilding the taxonomy terms (which you can do easily with the new WP CLI command `wp relevanssi index --target=taxonomies`). -* The throttle limit setting was removed from the settings page for causing trouble. If you need to change it, update `relevanssi_throttle_limit` option directly. -* The "Did you mean" function should return slightly more relevant results. -* The `relevanssi_get_words_query` filter hook has been retired and replaced with new `relevanssi_get_words_having` filter hook, used to adjust the value. The default value is 1, and there's usually no reason to adjust that. -* FacetWP users ran into trouble, as `relevanssi_do_query()` started to explicitly expect a WP_Query object in version 1.15.0. That expectation is removed; it's still highly recommended for future compatibility that you use WP_Query objects. -* Small bug fix: `get_current_screen()` is now only used when it's available to avoid occasional fatal errors. -* Error messages from `DOING_AJAX` being undefined should be removed. - -= 1.15.1 = -* Enabling "Index synonyms" setting with an empty synonym list caused post content and title indexing to fail. -* Wrong pages creeping into navigation menus from multisite searches should be history now. -* Relevanssi Premium now offers WP CLI support. See `wp help relevanssi` for instructions. -* Relevanssi didn't support tax_queries with `field` set to `name`. That works now. -* Much faster way of showing the 25 most common words in the index. If you've disabled this feature because it was so slow, try enabling it - you might be surprised! - -= 1.15.0.1 = -* The network settings page was missing. - -= 1.15.0 = -* Improved ACF compatibility. -* Relevanssi was a bit too eager to index taxonomy terms it shouldn't. That is now fixed. I suggest you rebuild the index, if you haven't done that recently. -* Synonym indexing was searching and replacing too much. If you're using synonym indexing, please rebuild the index. -* It is now possible to copy Relevanssi settings from one blog in the multisite network to all other blogs. -* On multisite installations, the API key is now a network option. The network admin needs to set the value from the network admin dashboard. -* Relevanssi post controls didn't work on attachments: you couldn't save the values. That is now possible. -* Pinning didn't work on multisite searches. It does now. -* Relevanssi now stores the operator used in $wp_query->query_vars['operator'] so that it can be accessed outside Relevanssi. - -= 1.14.9 = -* Did you mean function had a XSS vulnerability, which is now removed. -* Minimum word length wasn't applied to titles in indexing. It is now fixed. If you think this is a problem, rebuild the index. -* TablePress compatibility has been improved. -* Meta query handling has been improved, thanks to Maxime Culea. -* Improved WP_Query parameter support: setting query variable `sentence` to 1 forces phrase search. - -= 1.14.8 = -* An improved version of the sorting function will not throw notices when Intuitive Custom Post Order plugin is used. -* New filter: `relevanssi_missing_sort_key` can be used to adjust the result sorting when using keys that are not present in all posts (eg. menu_order). -* Importing options now works, it was broken in 1.14.6. -* New feature: keyword-based exclusion is the opposite of the pinning feature. You can now list keywords on post edit screen, and if the search query matches those keywords, the post will not appear in results. -* Czech translation and stopwords, thanks to Michael Kucera. - -= 1.14.7.1 = -* Relevanssi threw a fatal error with PHP 7.1 thanks to a wrong variable declaration. -* The accidental PHP 5.4+ requirement has been removed. - -= 1.14.7 = -* Relevanssi broke the WP admin menu search when admin searches were enabled. -* Pinning now supports multi-word search terms. -* Relevanssi broke the admin page search under WP 4.7. Relevanssi is now disabled in admin page searches. -* The way accented characters are handled in highlighting is improved. A new filter, `relevanssi_accents_replacement_arrays`, can be used to adjust the accent replacement. - -= 1.14.6.1 = -* Fix for a fatal bug in 1.14.6. - -= 1.14.6 = -* Relevanssi option import had a arbitrary code execution vulnerability that is now blocked. -* Relevanssi admin page had a vulnerability that allowed SQL injection attacks. That is now fixed. -* Relevanssi didn't like to highlight search terms that are followed by a ?, an ! or an apostrophe. -* New filter: `relevanssi_ok_to_log` lets you control whether search queries are logged or not. - -= 1.14.5 = -* Relevanssi had problems with plus signs in search queries. -* 500 errors caused by arrays in custom fields should be gone now. -* Post type filters in multisite searching work better now, and meta_query support is now added. (Thanks to Maxime Culea.) -* Improvements to the ACF "select" field support. -* Relevanssi will not break when frontend plugins insert posts. -* Polylang support has been improved. -* WPML and Polylang filters work when "fields" is set to "ids". -* `relevanssi_match` filter has a new parameter, which contains the search term. -* `relevanssi_post_ok` filter was missing from the multisite search. - -= 1.14.4 = -* Fixed a small glitch that could happen if a highlighted term is next to a starting square bracket. -* Bug fixes in the multisite searching: post type weights work now, and relevancy scores are properly noted. -* Ensured PHP7 and WP 4.6 compatibility. -* New filter: `relevanssi_30days` can be used to adjust the 30 day logs to a different number of days. - -= 1.14.3 = -* Fix for a small bug that caused inflated relevancy values. -* `relevanssi_didyoumean_url` has two more parameters (uncorrected query and the suggestion). -* The Did you mean function didn't work properly if the search term wasn't in lowercase. -* Adding stopwords that contain apostrophes didn't work. -* Relevanssi can now index the human-readable labels of ACF "select" fields. (Thanks to Raphaël Droz.) - -= 1.14.2 = -* Fixed a fatal error when searching includes private posts. - -= 1.14.1 = -* Multisite searches had some compatibility issues with other plugins and navigation menus; those have now been fixed. -* Multisite search (which has limitations) doesn't trigger if the search only targets the current site. -* Multisite search can now return taxonomy terms. -* "Did you mean" corrections in search queries with many words work better now. -* Fixed an error if the search term was not found in content. -* Fixed an error when building excerpts from posts shorter than the excerpt length. -* Blocked the `[starpro]`, CFDB and WooCommerce shortcodes that are causing problems with Relevanssi. -* Added support for `term_tax_id` in the `fields` parameter in tax_queries. -* Excerpt-building failed if multibyte string operations were missing. It should work now. -* New filter: `relevanssi_remove_stopwords_in_titles` allows you to include stopwords in titles. -* New filter: `relevanssi_remote_addr` can be used to modify the IP address logged to Relevanssi logs. -* New filter: `relevanssi_user_searches_limit` to adjust the number of user searches shown in the logs. -* Old data check is only done on Relevanssi settings page, not on all admin pages. That should improve admin performance. - -= 1.14 = -* Tokenizer was using `strlen()` and not `mb_strlen()`, so word lengths were not calculated properly. If your site uses non-ASCII alphabet, rebuilding the index is a good idea. -* Printing out titles for taxonomy terms didn't work properly. `relevanssi_the_title()` works for that and if you don't want to echo the title, you can use it like `relevanssi_the_title(false)` to make it return the title. -* Small improvement to WPML multilanguage filtering. -* `relevanssi_user_add_data` only worked when indexing all users. -* "Undefined index" errors in multisite search were eliminated. -* The `[noindex]` shortcode now supports shortcodes inside it. -* When posts transitioned from "future" to "published" there were some issues with disappearing Relevanssi settings. That's fixed now. -* The `[watupro]` shortcode didn't work with Relevanssi, so Relevanssi will now bypass it. -* Relevanssi had `the_title` filter hook calls that were missing the second parameter; that's now fixed. -* The excerpt-building algorithm is completely rewritten based on work by Ben Boyter (http://www.boyter.org/). -* The plugin i18n features have been improved slightly. -* New filter: `relevanssi_didyoumean_suggestion` lets you modify the Did you mean? suggestion before it's displayed. -* `relevanssi_didyoumean()` has a new parameter: you can now choose whether the result is echoed out (the default value) or just returned. -* Multisite search had some problems with some Relevanssi variables not changing when the blog was switched. This is now improved, thanks to Teemu Muikku. -* In the search results breakdown, you can now use %categories% and %taxonomies% to show the number of matches in categories and taxonomies other than tags and cats, respectively. -* Search results breakdowns now work for taxonomy terms and user profiles. -* Relevanssi supports `fields` parameter (both `ids` and `id=>parent`) to return only post IDs or post IDs and post parents. - -= 1.13.5 = -* Previous version broke the multisite search. That is now fixed. -* Empty lines on synonym settings caused problems. Fixed that. -* Relevanssi didn't clean up properly on uninstall, leaving _relevanssi_pin postmeta fields. - -= 1.13.4 = -* New filter: `relevanssi_valid_admin_status` can be used to adjust post statuses that Relevanssi will handle. -* Meta query support should now be perfect; there were some limitations with complicated meta queries before. - -= 1.13.3 = -* Removes one "Undefined variable" error. -* New filter: `relevanssi_display_common_words` can be used to disable the "25 most common words" listing on the settings page, if it's too heavy to load. -* Eliminated problems where using the `relevanssi_do_not_index` filter caused error messages. -* Relevanssi was sanitizing taxonomy titles too aggressively. That is now toned down a bit. -* If Relevanssi creates an empty excerpt for a post and there's a user-set excerpt for the post, that excerpt is used. -* The `relevanssi_post_title_before_tokenize` filter now has a second parameter that contains the post object. -* No ellipsis is added to the post excerpt, if the post excerpt shows the whole post. -* Relevanssi now supports `post_parent`, `post_parent__in` and `post_parent__not_in`, though you have to set them in `relevanssi_modify_wp_query` filter for them to work. - -= 1.13.2 = -* Fixed a bug that caused the results to change depending of the order of words in a multi-word search query. -* Added `product_categories` and `recent_products` from WooCommerce to the list of blocked shortcodes. -* There are improvements in excerpt-building and highlighting, especially when fuzzy search is enabled. -* Fixed a possible (if quite unlikely) XSS vulnerability. -* Improved search performance (thanks to MikeNGarrett). -* Sometimes highlights in documents make the document content disappear. I don't know why, but I've added a fix that should make the content visible (without the highlights) if a problem appears. - -= 1.13.1 = -* Fixed a bug with numeric taxonomy terms. -* Fixed a bug in user search. -* API keys are now completely hidden on the Relevanssi settings page. -* `relevanssi_do_not_index` hook is moved a bit, so that when updating posts, posts that are not indexed because of the hook are now removed from the index. -* Pinning didn't work if the post wasn't otherwise found with the pinning term. Now pinning terms are also indexed to ensure that the posts can be found with them. - -= 1.13 = -* New feature: You can now pin posts on particular search terms. -* New feature: Synonyms can now be defined in indexing, allowing them to be used with AND searches. (Thanks to Christoph Daum.) -* Relevanssi handles taxonomy terms in search better. The change requires a reindexing. -* Fix in indexing: Relevanssi will now bypass the global $post when indexing. This should help with problems with the Cookie Law Info plugin, for example. -* Tax query relation setting didn't work properly. It is now fixed. -* Word-based excerpt building sometimes created too short excerpts. That is now fixed. -* Synonyms are now highlighted. -* Phrase matching had issues where searching for a too common phrase crashed the search. That has been fixed. -* LIKE operator didn't work properly in meta_queries. -* API key field in settings is now a password field so clients and users can't see the API key. -* Relevanssi created lots of unnecessary post_meta rows and didn't clean up properly afterwards. Now unnecessary rows are not created, and everything is cleaned up properly. -* Problems with Avatar Upload plugin are fixed. -* Offset errors with mb_stripos() shouldn't happen anymore. -* Relevanssi tables are now added to `wpmu_drop_tables` to ensure neat cleanup with WPMU. -* A small problem in taxonomy search MySQL fixed, also a small problem with AND operator in tax_queries. -* Did you mean function now handles umlauted alphabet (ä, ö, ü and å). -* Fixed a bug with WP_Date_Queries. Thanks to Charles St-Pierre. -* New filter: `relevanssi_post_to_index` lets you access the post object before the post is indexed. -* New filter: `relevanssi_orderby` lets you modify the $orderby value before Relevanssi sorts posts. -* New filter: `relevanssi_order` lets you modify the $order value before Relevanssi sorts posts. -* New filter: `relevanssi_post_title_before_tokenize` lets you modify post titles before indexing. -* New filter: `relevanssi_private_cap` lets you adjust the capability setting for private posts in custom post types. - -= 1.12.1 = -* Fixed a bug where excluding posts would cause the search to fail. -* WPML searches showed each result twice. That's fixed. -* Increased plugin safety against hackers. -* There was a bug in `relevanssi_comment_content_to_index` filter. -* Some people had problems with the log entry timestamps. Fixed that. -* New filter: `relevanssi_prevent_default_request` gives you more control over where Relevanssi prevents the default query from running. -* New filter: `relevanssi_private_cap` lets you set the correct capability for finding private posts in custom post types. -* The option to exclude categories and tags from search only worked for categories, not tags. Tags have been separated to a different option. - -= 1.12 = -* Relevanssi now automatically treats 'ß' as 'ss'. If your site has 'ß' in text, reindexing the database is a good idea. -* Query variable `post_status` is now supported. -* Improvements to excerpts: excerpts with phrases work much better now, and the excerpt creation logic has been improved: the excerpts are now better. The process takes a bit more time, though. -* Allowing HTML tags in excerpts could lead to those tags being left open. Relevanssi will now try to close open HTML tags in excerpts. -* Allowed tags were not controlled in comments. They are now. -* Highlighting in documents didn't always work; it should be more reliable now. -* Non-integer values are removed from `post__in` and `post__not_in` before processing them. -* Query variables `p` and `page_id` are now supported. -* Relevanssi now understands `date_query` variables as well. -* The original post excerpt is stored in $post->original_excerpt. -* Taxonomy search works better with term id parameters (for example from `wp_category_dropdown`). -* Errors about $wpdb->prepare() missing an argument removed. -* New functions: `relevanssi_the_title()` and `relevanssi_get_the_title()` can be used to display highlighted titles in search results. -* The old title highlighting method has been disabled, because it caused highlights in wrong places. Now the highlighted title is stored in $post->highlighted_post_title, take it from there or use the Relevanssi title functions to display it. -* Polylang and WPML support was adjusted to perform better in edge cases. -* Indexing is faster, thanks to some improved code from Tom Novelli. -* MySQL injection attack vulnerability removed. -* The cache feature is now removed. Relevanssi should automatically drop the cache tables. -* New filter: `relevanssi_indexing_data` lets you modify the data before it's indexed. -* Fix for a bug that sometimes caused multisite hits to come from the wrong site. - -= 1.11 = -* Fixed a bug in the TablePress support. -* Titles are put through the_title filter before indexing. -* relevanssi_related() function had a bug. -* New filter: `relevanssi_join` can be used to join tables in the Relevanssi search MySQL queries. Thanks to Ninos Ego. -* New filter: `relevanssi_tax_term_additional_content` can be used to add any content to taxonomy terms before indexing. -* New filter: `relevanssi_post_content` can be used to modify post content before any Relevanssi processing. -* New filter: `relevanssi_post_content_before_tokenize` can be used to modify post content just before it's tokenized. -* New filter: `relevanssi_indexing_values` can be used to modify what Relevanssi stores in the index. -* New filter: `relevanssi_default_meta_query_relation` can be used to change the default meta query relation (default value is "AND"). -* When using a meta_query, `relation` can be set to OR now. -* Phrases are now matched to excerpts. -* Number of queries Relevanssi generates is much, much lower. -* New filter: `relevanssi_didyoumean_url` lets you modify the URL generated by the did you mean feature. -* Better set of Russian stopwords. -* Relevanssi now highlights search query synonyms as well in documents. - -= 1.10.14 = -* Fix to make Relevanssi compatible with WordPress 3.7. -* Fixed a mistyped database table name. -* Relevanssi disables responsive-flipbook shortcode in indexing; it was causing problems. -* Fixed a problem with an author dropdown with no author selected. - -= 1.10.13 = -* New filter: `relevanssi_comment_content_to_index` lets you modify comment content before it's indexed by Relevanssi (to index comment meta, for example). -* Facetious support: if post_type is set to -1, Relevanssi will not hang up on it. -* Numerical search terms work better now. -* Relevanssi now handles WordPress-created tax_queries better. -* Support for Polylang broke the support for WPML. That is now fixed. -* Two deprecated $wpdb->escape() were still left; they're gone now. -* Shortcode `layerslider` was causing problems with Relevanssi; Relevanssi now disables it before building excerpts. -* Relevanssi won't break BBPress search anymore. -* Multisite searches had some issues. - -= 1.10.12 = -* Excerpt-building had issues, which are now fixed. -* Punctuation removal now replaces   with a space. -* "starrater" short code from GD Star Rating is now disabled in indexing. -* Punctuation removal now replaces invisible spaces with a normal space. -* Division by zero error caused by 0 in posts_per_page is now prevented, and -1 value for posts_per_page handled better. -* Relevanssi doesn't apply `get_the_excerpt` filters to excerpts it builds any more. -* New filter: `relevanssi_excerpt` lets you modify the excerpts Relevanssi creates. -* Relevanssi now suspends WP post cache while indexing, making indexing a lot more efficient. Thanks to Julien Mession for this one. -* Deprecated function errors in 3.6 removed. -* When search included user profiles or taxonomy terms, Relevanssi would generate lots of MySQL errors. Not anymore. -* New filter: `relevanssi_valid_status` lets you modify the post statuses Relevanssi indexes. -* New filter: `relevanssi_index_taxonomies_args` lets you modify the arguments passed to get_terms() when indexing taxonomies (for example to set 'hide_empty' to false). -* Searching by taxonomy ID could confuse two taxonomies with the same term_id. The search is now checking the taxonomy as well to see it's correct. -* Basic support for Polylang plugin. -* Russian and Italian stopwords are now included, thanks to Flector and Valerio Vendrame. -* Small fix in the way user meta fields are handled. - -= 1.10.11 = -* Previous upgrade broke AND operator in searches. Fixed that. - -= 1.10.10 = -* REBUILD THE INDEX AFTER THIS UPDATE. -* Prevented error messages relating to creation of post objects from users and taxonomies. -* Fixed MySQL errors from empty meta queries. -* Removed WP complaint about badly formed $wpdb->prepare() statement. -* Sort order (orderby and order variables) are now read from query variables instead of global variables. -* Relevanssi will not choke on bad values of orderby anymore. -* Limit searches is improved: when using AND search it is less likely to miss results. -* Phrase recognition read the whole post content (which it didn't need) from database, causing memory issues in some cases. Fixed that. -* Fuzzy searches are now a lot more efficient; they were a huge resource hog before. -* Fixed a possible MySQL injection attack. - -= 1.10.9.1 = -* OR fallback didn't actually fall back to OR, but instead got stuck in an endless loop of AND searches. -* Relevanssi was being called twice when a post was saved, on `save_post` and `wp_insert_post`. I removed the hook on `save_post`. - -= 1.10.9 = -* Fixed the auto-update problem in 1.10.8 asking to update after update was done. -* Meta queries didn't work without a key; now they work with just meta_value or meta_value_num. -* Modified the way the highlights work; now highlighting words with apostrophes should produce more meaningful results. - -= 1.10.8 = -* Major indexing problems caused by shortcodes changing the post ID during the indexing of posts are now fixed. -* Meta queries had problems with meta_value being set to null. -* Relevanssi now supports category__and. By default this sets include_children to false. -* When querying by slug, the term taxonomy is also taken into consideration, fixing problems when same slug appears in different taxonomies. -* Author search didn't work. -* Fixed an error message caused by all-number synonyms starting with zero, like 02. -* New action hook: `relevanssi_pre_indexing_query` can be used to "SET OPTION SQL_BIG_SELECTS=1" if needed. -* Synonyms are now case-insensitive. -* Highlighting should not highlight anything between & and ; or in @siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@]*?.*?@siu', - '@@siu', - ), - ' ', - $text - ); - return $text; -} - -/** - * Strips tags from contents, keeping the allowed tags. - * - * The allowable tags are read from the relevanssi_excerpt_allowable_tags - * option. Relevanssi also adds extra spaces after some tags to make sure words - * are not stuck together after the tags are removed. The function also removes - * invisible content. - * - * @uses relevanssi_strip_invisibles() Used to remove scripts and other tags. - * @see strip_tags() Used to remove tags. - * - * @param string|null $content The content. - * - * @return string The content without tags. - */ -function relevanssi_strip_tags( $content ) { - if ( ! is_string( $content ) ) { - $content = strval( $content ); - } - $content = relevanssi_strip_invisibles( $content ); - - $space_tags = array( - '/(<\/?p.*?>)/', - '/(<\/?br.*?>)/', - '/(<\/?h[1-6].*?>)/', - '/(<\/?div.*?>)/', - '/(<\/?blockquote.*?>)/', - '/(<\/?hr.*?>)/', - '/(<\/?li.*?>)/', - '/()/', - '/(<\/td>)/', - ); - - $content = preg_replace( $space_tags, '$1 ', $content ); - return strip_tags( - $content, - get_option( 'relevanssi_excerpt_allowable_tags', '' ) - ); -} - -/** - * Returns the position of substring in the string. - * - * Uses mb_stripos() if possible, falls back to mb_strpos() and mb_strtoupper() - * if that cannot be found, and falls back to just strpos() if even that is not - * possible. - * - * @param string $haystack String where to look. - * @param string $needle The string to look for. - * @param int $offset Where to start, default 0. - * - * @return mixed False, if no result or $offset outside the length of $haystack, - * otherwise the position (which can be non-false 0!). - */ -function relevanssi_stripos( $haystack, $needle, int $offset = 0 ) { - if ( ! is_string( $haystack ) ) { - $haystack = strval( $haystack ); - } - if ( ! is_string( $needle ) ) { - $needle = strval( $needle ); - } - if ( $offset > relevanssi_strlen( $haystack ) ) { - return false; - } - - if ( preg_match( '/[\?\*]/', $needle ) ) { - // There's a ? or an * in the string, which means it's a wildcard search - // query (a Premium feature) and requires some extra steps. - $needle_regex = str_replace( - array( '?', '*' ), - array( '.', '.*' ), - preg_quote( $needle, '/' ) - ); - $pos_found = false; - while ( ! $pos_found ) { - preg_match( - "/$needle_regex/i", - $haystack, - $matches, - PREG_OFFSET_CAPTURE, - $offset - ); - /** - * This trickery is necessary, because PREG_OFFSET_CAPTURE gives - * wrong offsets for multibyte strings. The mb_strlen() gives the - * correct offset, the rest of this is because the $offset received - * as a parameter can be before the first $position, leading to an - * infinite loop. - */ - $pos = isset( $matches[0][1] ) - ? mb_strlen( substr( $haystack, 0, $matches[0][1] ) ) - : false; - if ( $pos && $pos > $offset ) { - $pos_found = true; - } elseif ( $pos ) { - $offset++; - } else { - $pos_found = true; - } - } - } elseif ( function_exists( 'mb_stripos' ) ) { - if ( '' === $haystack ) { - $pos = false; - } else { - $pos = mb_stripos( $haystack, $needle, $offset ); - } - } elseif ( function_exists( 'mb_strpos' ) && function_exists( 'mb_strtoupper' ) && function_exists( 'mb_substr' ) ) { - $pos = mb_strpos( - mb_strtoupper( $haystack ), - mb_strtoupper( $needle ), - $offset - ); - } else { - $pos = strpos( strtoupper( $haystack ), strtoupper( $needle ), $offset ); - } - return $pos; -} - -/** - * Returns the length of the string. - * - * Uses mb_strlen() if available, otherwise falls back to strlen(). - * - * @param string $s The string to measure. - * - * @return int The length of the string. - */ -function relevanssi_strlen( $s ) { - if ( ! is_string( $s ) ) { - $s = strval( $s ); - } - if ( function_exists( 'mb_strlen' ) ) { - return mb_strlen( $s ); - } - return strlen( $s ); -} - -/** - * Multibyte friendly strtolower. - * - * If multibyte string functions are available, returns mb_strtolower() and - * falls back to strtolower() if multibyte functions are not available. - * - * @param string $string The string to lowercase. - * - * @return string $string The string in lowercase. - */ -function relevanssi_strtolower( $string ) { - if ( ! is_string( $string ) ) { - $string = strval( $string ); - } - if ( ! function_exists( 'mb_strtolower' ) ) { - return strtolower( $string ); - } else { - return mb_strtolower( $string ); - } -} - -/** - * Multibyte friendly substr. - * - * If multibyte string functions are available, returns mb_substr() and falls - * back to substr() if multibyte functions are not available. - * - * @param string $string The source string. - * @param int $start If start is non-negative, the returned string will - * start at the start'th position in str, counting from zero. If start is - * negative, the returned string will start at the start'th character from the - * end of string. - * @param int|null $length Maximum number of characters to use from string. If - * omitted or null is passed, extract all characters to the end of the string. - * - * @return string $string The string in lowercase. - */ -function relevanssi_substr( $string, int $start, $length = null ) { - if ( ! is_string( $string ) ) { - $string = strval( $string ); - } - if ( ! function_exists( 'mb_substr' ) ) { - return substr( $string, $start, $length ); - } else { - return mb_substr( $string, $start, $length ); - } -} - -/** - * Prints out the post excerpt. - * - * Prints out the post excerpt from $post->post_excerpt, unless the post is - * protected. Only works in the Loop. - * - * @see post_password_required() Used to check for password requirements. - * - * @global $post The global post object. - */ -function relevanssi_the_excerpt() { - global $post; - if ( ! post_password_required( $post ) ) { - echo '

    ' . $post->post_excerpt . '

    '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } else { - esc_html_e( 'There is no excerpt because this is a protected post.', 'relevanssi' ); - } -} - -/** - * Echoes out the permalink to the current post within Loop. - * - * Uses get_permalink() to get the permalink, then adds the 'highlight' - * parameter if necessary using relevanssi_add_highlight(), then echoes it out. - * - * @param int|WP_Post $post Post ID or post object. Default is the global $post. - * - * @uses relevanssi_get_permalink() Fetches the current post permalink. - */ -function relevanssi_the_permalink( $post = 0 ) { - echo esc_url( relevanssi_get_permalink( $post ) ); -} - -/** - * Prints out a list of tags for post. - * - * Replacement for the_tags() that does the same, but applies Relevanssi search term - * highlighting on the results. - * - * @param string $before What is printed before the tags, default ''. - * @param string $separator The separator between items, default ', '. - * @param string $after What is printed after the tags, default ''. - * @param boolean $echo If true, echo, otherwise return the result. Default true. - * @param int $post_id The post ID. Default current post ID (in the Loop). - */ -function relevanssi_the_tags( string $before = '', string $separator = ', ', string $after = '', bool $echo = true, int $post_id = 0 ) { - $tag_list = get_the_tag_list( $before, $separator, $after, $post_id ); - $found = preg_match_all( '~~', $tag_list, $matches ); - if ( $found ) { - $originals = $matches[0]; - $tag_names = $matches[1]; - $highlighted = array(); - - $count = count( $matches[0] ); - for ( $i = 0; $i < $count; $i++ ) { - $highlighted_tag_name = relevanssi_highlight_terms( $tag_names[ $i ], get_search_query(), true ); - $highlighted[ $i ] = str_replace( '>' . $tag_names[ $i ] . '<', '>' . $highlighted_tag_name . '<', $originals[ $i ] ); - } - - $tag_list = str_replace( $originals, $highlighted, $tag_list ); - } - - if ( $echo ) { - echo $tag_list; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } else { - return $tag_list; - } -} - -/** - * Prints out post title with highlighting. - * - * Uses the global $post object. Reads the highlighted title from - * $post->post_highlighted_title. This used to accept one parameter, the - * `$echo` boolean, but in 2.12.3 / 4.10.3 the function signature was matched - * to copy `the_title()` function in WordPress core. The original behaviour is - * still supported: `relevanssi_the_title()` without arguments works exactly as - * before and `relevanssi_the_title( false )` returns the title. - * - * @global object $post The global post object. - * - * @param boolean|string $before Markup to prepend to the title. Can also be a - * boolean for whether to echo or return the title. - * @param string $after Markup to append to the title. - * @param boolean $echo Whether to echo or return the title. Default - * true for echo. - * - * @return void|string Void if $echo argument is true, current post title with - * highlights if $echo is false. - */ -function relevanssi_the_title( $before = true, string $after = '', bool $echo = true ) { - if ( true === $before ) { - $before = ''; - $echo = true; - } elseif ( false === $before ) { - $before = ''; - $echo = false; - } - global $post; - if ( empty( $post->post_highlighted_title ) ) { - $post->post_highlighted_title = $post->post_title; - } - if ( relevanssi_strlen( $post->post_highlighted_title ) === 0 ) { - return; - } - $title = $before . $post->post_highlighted_title . $after; - if ( $echo ) { - echo $title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } else { - return $title; - } -} - -/** - * Turns off options, ie. sets them to "off". - * - * If the specified options don't exist in the request array, they are set to - * "off". - * - * @param array $request The _REQUEST array, passed as reference. - * @param array $options An array of option names. - */ -function relevanssi_turn_off_options( array &$request, array $options ) { - array_walk( - $options, - function( $option ) use ( &$request ) { - if ( ! isset( $request[ $option ] ) ) { - $request[ $option ] = 'off'; - } - } - ); -} - -/** - * Sets an option after doing floatval. - * - * @param array $request An array of option values. - * @param string $option The key to check. - * @param boolean $autoload Should the option autoload, default true. - * @param float $default The default value if floatval() fails, default 0. - * @param boolean $positive If true, replace negative values and zeroes with - * $default. - */ -function relevanssi_update_floatval( array $request, string $option, bool $autoload = true, float $default = 0, bool $positive = false ) { - if ( isset( $request[ $option ] ) ) { - $value = floatval( $request[ $option ] ); - if ( ! $value ) { - $value = $default; - } - if ( $positive && $value <= 0 ) { - $value = $default; - } - update_option( $option, $value, $autoload ); - } -} - -/** - * Sets an option after doing intval. - * - * @param array $request An array of option values. - * @param string $option The key to check. - * @param boolean $autoload Should the option autoload, default true. - * @param int $default The default value if intval() fails, default 0. - */ -function relevanssi_update_intval( array $request, string $option, bool $autoload = true, int $default = 0 ) { - if ( isset( $request[ $option ] ) ) { - $value = intval( $request[ $option ] ); - if ( ! $value ) { - $value = $default; - } - update_option( $option, $value, $autoload ); - } -} - -/** - * Sets an option with one of the listed legal values. - * - * @param array $request An array of option values. - * @param string $option The key to check. - * @param array $values The legal values. - * @param string $default The default value. - * @param boolean $autoload Should the option autoload, default true. - */ -function relevanssi_update_legal_value( array $request, string $option, array $values, string $default, bool $autoload = true ) { - if ( isset( $request[ $option ] ) ) { - $value = $default; - if ( in_array( $request[ $option ], $values, true ) ) { - $value = $request[ $option ]; - } - update_option( $option, $value, $autoload ); - } -} - -/** - * Sets an on/off option according to the request value. - * - * @param array $request An array of option values. - * @param string $option The key to check. - * @param boolean $autoload Should the option autoload, default true. - */ -function relevanssi_update_off_or_on( array $request, string $option, bool $autoload = true ) { - relevanssi_update_legal_value( - $request, - $option, - array( 'off', 'on' ), - 'off', - $autoload - ); -} - -/** - * Sets an option after sanitizing and unslashing the value. - * - * @param array $request An array of option values. - * @param string $option The key to check. - * @param boolean $autoload Should the option autoload, default true. - */ -function relevanssi_update_sanitized( array $request, string $option, bool $autoload = true ) { - if ( isset( $request[ $option ] ) ) { - $value = sanitize_text_field( wp_unslash( $request[ $option ] ) ); - update_option( $option, $value, $autoload ); - } -} - -/** - * Returns true if $_SERVER['HTTP_USER_AGENT'] is on the bot block list. - * - * Looks for bot user agents in the $_SERVER['HTTP_USER_AGENT'] and returns true - * if a match is found. - * - * @return bool True if $_SERVER['HTTP_USER_AGENT'] is a bot. - */ -function relevanssi_user_agent_is_bot() : bool { - if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) { - /** - * Filters the bots Relevanssi should block from search queries. - * - * Lets you filter the bots that are blocked from Relevanssi search - * queries. - * - * @param array $bots An array of bot user agents. - */ - $bots = apply_filters( 'relevanssi_bots_to_block', relevanssi_bot_block_list() ); - foreach ( array_values( $bots ) as $lookfor ) { - if ( false !== stristr( $_SERVER['HTTP_USER_AGENT'], $lookfor ) ) { - return true; - } - } - } - return false; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/admin-ajax.php b/wp/wp-content/plugins/relevanssi-premium/premium/admin-ajax.php deleted file mode 100644 index f9bc6565..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/admin-ajax.php +++ /dev/null @@ -1,742 +0,0 @@ -prepare( - "SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = %s - AND post_id NOT IN ( - SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %s - )", - $meta_key, - $exclusion_key, - $value - ); - - $meta_ids = $wpdb->get_col( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - if ( ! count( $meta_ids ) ) { - return false; - } - - $query = "DELETE FROM $wpdb->postmeta WHERE meta_id IN ( " . implode( ',', $meta_ids ) . ' )'; - - $count = $wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared - - if ( ! $count ) { - return false; - } - - return true; -} - -/** - * Performs the "index PDFs" AJAX action. - * - * Reads in the PDF content for PDF files fetched using the relevanssi_get_posts_with_attachments() function. - * - * @since 2.0.0 - */ -function relevanssi_index_pdfs_action() { - check_ajax_referer( 'relevanssi-index-pdfs', 'security' ); - relevanssi_current_user_can_access_options(); - - $pdfs = relevanssi_get_posts_with_attachments( 3 ); - - if ( ! isset( $_POST['completed'] ) || ! isset( $_POST['total'] ) ) { // WPCS: input var ok. - wp_die(); - } - - $post_data = $_POST; // WPCS: input var ok. - - $completed = absint( $post_data['completed'] ); - $total = absint( $post_data['total'] ); - - $response = array(); - $response['feedback'] = ''; - - if ( empty( $pdfs ) ) { - $response['feedback'] = __( 'Indexing complete!', 'relevanssi' ); - $response['completed'] = 'done'; - $response['percentage'] = 100; - } else { - foreach ( $pdfs as $post_id ) { - $echo_and_die = false; - $send_files = get_option( 'relevanssi_send_pdf_files' ); - if ( 'off' === $send_files ) { - $send_files = false; - } - - $index_response = relevanssi_index_pdf( $post_id, $echo_and_die, $send_files ); - $completed++; - - if ( $index_response['success'] ) { - // translators: placeholder is the post ID. - $response['feedback'] .= sprintf( esc_html__( 'Successfully indexed attachment id %d.', 'relevanssi' ), esc_html( $post_id ) ) . "\n"; - } else { - // translators: the numeric placeholder is the post ID, the string is the error message. - $response['feedback'] .= sprintf( esc_html__( 'Failed to index attachment id %1$d: %2$s', 'relevanssi' ), esc_html( $post_id ), esc_html( $index_response['error'] ) ) . "\n"; - } - } - $response['completed'] = $completed; - if ( $total > 0 ) { - $response['percentage'] = round( $completed / $total * 100, 0 ); - } else { - $response['percentage'] = 0; - } - } - - echo wp_json_encode( $response ); - - wp_die(); -} - -/** - * Performs the "send PDF" AJAX action. - * - * Reads in the PDF content for one PDF file, based on the 'post_id' parameter, sending the PDF over. - * - * @since 2.0.0 - */ -function relevanssi_send_pdf() { - check_ajax_referer( 'relevanssi_send_pdf', 'security' ); - if ( ! current_user_can( 'upload_files' ) ) { - wp_die(); - } - - if ( ! isset( $_REQUEST['post_id'] ) ) { // WPCS: input var ok. - wp_die(); - } - $post_id = intval( wp_unslash( $_REQUEST['post_id'] ) ); // WPCS: input var ok. - $echo_and_die = true; - $send_file = true; - relevanssi_index_pdf( $post_id, $echo_and_die, $send_file ); - - // Just for sure; relevanssi_index_pdf() should echo necessary responses and die, so don't expect this to ever happen. - wp_die(); -} - -/** - * Performs the "send URL" AJAX action. - * - * Reads in the PDF content for one PDF file, based on the 'post_id' parameter, using the PDF URL. - * - * @since 2.0.0 - */ -function relevanssi_send_url() { - check_ajax_referer( 'relevanssi_send_pdf', 'security' ); - if ( ! current_user_can( 'upload_files' ) ) { - wp_die(); - } - - if ( ! isset( $_REQUEST['post_id'] ) ) { // WPCS: input var ok. - wp_die(); - } - $post_id = intval( wp_unslash( $_REQUEST['post_id'] ) ); // WPCS: input var ok. - $echo_and_die = true; - $send_file = false; - relevanssi_index_pdf( $post_id, $echo_and_die, $send_file ); - - // Just for sure; relevanssi_index_pdf() should echo necessary responses and die, so don't expect this to ever happen. - wp_die(); -} - -/** - * Reads all PDF errors. - * - * Gets a list of all PDF errors in the database and prints out a list of them. - * - * @global $wpdb The WordPress database interface, used to fetch the meta fields. - * - * @since 2.0.0 - */ -function relevanssi_get_pdf_errors_action() { - if ( ! current_user_can( 'upload_files' ) ) { - wp_die(); - } - - global $wpdb; - - $errors = $wpdb->get_results( "SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pdf_error'" ); - $error_message = array(); - foreach ( $errors as $error ) { - $row = __( 'Attachment ID', 'relevanssi' ) . ' ' . $error->post_id . ': ' . $error->meta_value; - $row = str_replace( 'PDF Processor error: ', '', $row ); - $error_message[] = $row; - } - - echo wp_json_encode( implode( "\n", $error_message ) ); - wp_die(); -} - -/** - * Reads a list of taxonomies. - * - * Gets a list of taxonomies selected for indexing from the relevanssi_list_taxonomies() function. - * - * @since 2.0.0 - */ -function relevanssi_list_taxonomies_wrapper() { - relevanssi_current_user_can_access_options(); - - $taxonomies = array(); - if ( function_exists( 'relevanssi_list_taxonomies' ) ) { - $taxonomies = relevanssi_list_taxonomies(); - } - echo wp_json_encode( $taxonomies ); - wp_die(); -} - -/** - * Indexes taxonomy terms for AJAX indexing. - * - * Reads in the parameters, indexes taxonomy terms and reports the results. - * - * @since 2.0.0 - */ -function relevanssi_index_taxonomies_ajax_wrapper() { - check_ajax_referer( 'relevanssi_taxonomy_indexing_nonce', 'security' ); - relevanssi_current_user_can_access_options(); - - if ( ! isset( $_POST['completed'] ) || ! isset( $_POST['total'] ) || ! isset( $_POST['taxonomy'] ) || ! isset( $_POST['offset'] ) || ! isset( $_POST['limit'] ) ) { // WPCS: input var ok. - wp_die(); - } - - $post_data = $_POST; // WPCS: input var ok. - - $completed = absint( $post_data['completed'] ); - $total = absint( $post_data['total'] ); - $taxonomy = $post_data['taxonomy']; - $offset = $post_data['offset']; - $limit = $post_data['limit']; - - $response = array(); - - $indexing_response = relevanssi_index_taxonomies_ajax( $taxonomy, $limit, $offset ); - - $completed += $indexing_response['indexed']; - if ( $completed === $total ) { - $response['completed'] = 'done'; - $response['total_posts'] = $completed; - $response['percentage'] = 100; - // translators: number of terms indexed on this go, total indexed terms, total number of terms. - $response['feedback'] = sprintf( _n( '%1$d taxonomy term, total %2$d / %3$d.', '%1$d taxonomy terms, total %2$d / %3$d.', $indexing_response['indexed'], 'relevanssi' ), $indexing_response['indexed'], $completed, $total ) . "\n"; - } else { - $response['completed'] = $completed; - // translators: number of terms indexed on this go, total indexed terms, total number of terms. - $response['feedback'] = sprintf( _n( '%1$d taxonomy term, total %2$d / %3$d.', '%1$d taxonomy terms, total %2$d / %3$d.', $indexing_response['indexed'], 'relevanssi' ), $indexing_response['indexed'], $completed, $total ) . "\n"; - - if ( $total > 0 ) { - $response['percentage'] = $completed / $total * 100; - } else { - $response['percentage'] = 0; - } - - $response['new_taxonomy'] = false; - if ( 'done' === $indexing_response['taxonomy_completed'] ) { - $response['new_taxonomy'] = true; - } - } - $response['offset'] = $offset + $limit; - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Indexes post type archives for AJAX indexing. - * - * Indexes post type archives and reports the results. The post type archives are - * always indexed all at one go; I don't think there's often a case where there are - * too many. - * - * @since 2.2.0 - */ -function relevanssi_index_post_type_archives_ajax_wrapper() { - check_ajax_referer( 'relevanssi_post_type_archive_indexing_nonce', 'security' ); - relevanssi_current_user_can_access_options(); - - $response = array(); - - if ( 'on' !== get_option( 'relevanssi_index_post_type_archives' ) ) { - $response['feedback'] = __( 'disabled.', 'relevanssi' ) . "\n"; - } else { - $indexing_response = relevanssi_index_post_type_archives_ajax(); - - $response['completed'] = 'done'; - $response['total_posts'] = $indexing_response['indexed']; - $response['percentage'] = 100; - // translators: number of terms indexed on this go, total indexed terms, total number of terms. - $response['feedback'] = sprintf( _n( '%1$d post type archive indexed.', '%1$d post type archives indexed.', $indexing_response['indexed'], 'relevanssi' ), $indexing_response['indexed'] ) . "\n"; - } - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Indexes users for AJAX indexing. - * - * Reads in the parameters, indexes users and reports the results. - * - * @since 2.0.0 - */ -function relevanssi_index_users_ajax_wrapper() { - check_ajax_referer( 'relevanssi_user_indexing_nonce', 'security' ); - relevanssi_current_user_can_access_options(); - - if ( ! isset( $_POST['completed'] ) || ! isset( $_POST['total'] ) || ! isset( $_POST['limit'] ) ) { // WPCS: input var ok. - wp_die(); - } - - $post_data = $_POST; // WPCS: input var ok. - - $completed = absint( $post_data['completed'] ); - $total = absint( $post_data['total'] ); - $limit = $post_data['limit']; - if ( isset( $post_data['offset'] ) ) { - $offset = $post_data['offset']; - } else { - $offset = 0; - } - - $response = array(); - - $indexing_response = relevanssi_index_users_ajax( $limit, $offset ); - - $completed += $indexing_response['indexed']; - $processed = $offset; - - if ( $completed === $total || $processed > $total ) { - $response['completed'] = 'done'; - $response['total_posts'] = $completed; - $response['percentage'] = 100; - $processed = $total; - } else { - $response['completed'] = $completed; - $offset = $offset + $limit; - - if ( $total > 0 ) { - $response['percentage'] = $completed / $total * 100; - } else { - $response['percentage'] = 0; - } - } - - // translators: number of users indexed on this go, total indexed users, total processed users, total number of users. - $response['feedback'] = sprintf( _n( 'Indexed %1$d user (total %2$d), processed %3$d / %4$d.', 'Indexed %1$d users (total %2$d), processed %3$d / %4$d.', $indexing_response['indexed'], 'relevanssi' ), $indexing_response['indexed'], $completed, $processed, $total ) . "\n"; - $response['offset'] = $offset; - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Counts the users. - * - * Counts the users for indexing purposes using the relevanssi_count_users() function. - * - * @since 2.0.0 - */ -function relevanssi_count_users_ajax_wrapper() { - relevanssi_current_user_can_access_options(); - - $count = -1; - if ( function_exists( 'relevanssi_count_users' ) ) { - $count = relevanssi_count_users(); - } - echo wp_json_encode( $count ); - wp_die(); -} - -/** - * Counts the taxonomy terms. - * - * Counts the taxonomy terms for indexing purposes using the relevanssi_count_taxonomy_terms() function. - * - * @since 2.0.0 - */ -function relevanssi_count_taxonomies_ajax_wrapper() { - relevanssi_current_user_can_access_options(); - - $count = -1; - if ( function_exists( 'relevanssi_count_taxonomy_terms' ) ) { - $count = relevanssi_count_taxonomy_terms(); - } - echo wp_json_encode( $count ); - wp_die(); -} - -/** - * Creates a list of related posts. - * - * @since 2.2.4 - */ -function relevanssi_get_related_posts() { - check_ajax_referer( 'relevanssi_metabox_nonce', 'security' ); - if ( ! current_user_can( 'edit_posts' ) ) { - wp_die(); - } - - $post_id = (int) $_POST['post_id']; // WPCS: input var ok. - - if ( 0 === $post_id ) { - wp_die(); - } - - if ( isset( $_POST['keywords'] ) ) { - $keywords = sanitize_text_field( $_POST['keywords'] ); // WPCS: input var ok. - - delete_post_meta( $post_id, '_relevanssi_related_keywords' ); - add_post_meta( $post_id, '_relevanssi_related_keywords', $keywords ); - - // Keywords have changed, flush the cache. - delete_post_meta( $post_id, '_relevanssi_related_posts' ); - } - - if ( isset( $_POST['ids'] ) ) { - $include_ids_array = explode( ',', $_POST['ids'] ); - $valid_ids = array(); - foreach ( $include_ids_array as $id ) { - if ( get_post( $id ) ) { - $valid_ids[] = $id; - } - } - if ( ! empty( $valid_ids ) ) { - $id_string = implode( ',', $valid_ids ); - delete_post_meta( $post_id, '_relevanssi_related_include_ids' ); - add_post_meta( $post_id, '_relevanssi_related_include_ids', $id_string ); - } else { - delete_post_meta( $post_id, '_relevanssi_related_include_ids' ); - } - - // Included IDs have changed, flush the cache. - delete_post_meta( $post_id, '_relevanssi_related_posts' ); - } - - $list = relevanssi_generate_related_list( $post_id ); - - $response = array( - 'list' => $list, - ); - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Adds a post ID to the excluded ID list. - * - * @since 2.2.4 - */ -function relevanssi_add_to_exclude_list() { - check_ajax_referer( 'relevanssi_metabox_nonce', 'security' ); - if ( ! current_user_can( 'edit_posts' ) ) { - wp_die(); - } - - $post_id = (int) $_POST['post_id']; // WPCS: input var ok. - - if ( 0 === $post_id ) { - wp_die(); - } - - if ( isset( $_POST['remove_id'] ) ) { - relevanssi_exclude_a_related_post( $post_id, $_POST['remove_id'] ); - } - - $related = relevanssi_generate_related_list( $post_id ); - $excluded = relevanssi_generate_excluded_list( $post_id ); - - $response = array( - 'related' => $related, - 'excluded' => $excluded, - ); - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Adds a post ID to the list of excluded post IDs of a post. - * - * @param int $post_id Add to this post IDs exclude list. - * @param int $excluded_post Add this post ID to the exclude list. - */ -function relevanssi_exclude_a_related_post( $post_id, $excluded_post ) { - $remove_id = (int) $excluded_post; - $excluded_ids = trim( get_post_meta( $post_id, '_relevanssi_related_exclude_ids', true ) ); - if ( $excluded_ids ) { - $excluded_ids = explode( ',', $excluded_ids ); - } else { - $excluded_ids = array(); - } - $excluded_ids[] = $remove_id; - $excluded_ids = array_keys( array_flip( $excluded_ids ) ); - $excluded_ids = implode( ',', $excluded_ids ); - update_post_meta( $post_id, '_relevanssi_related_exclude_ids', $excluded_ids ); - - // Excluded IDs have changed, flush the cache. - delete_post_meta( $post_id, '_relevanssi_related_posts' ); -} - -/** - * Removes a post ID from the excluded ID list and regenerates the lists. - * - * @since 2.2.4 - */ -function relevanssi_remove_from_exclude_list() { - check_ajax_referer( 'relevanssi_metabox_nonce', 'security' ); - if ( ! current_user_can( 'edit_posts' ) ) { - wp_die(); - } - - $post_id = (int) $_POST['post_id']; // WPCS: input var ok. - - if ( 0 === $post_id ) { - wp_die(); - } - - if ( isset( $_POST['return_id'] ) ) { - relevanssi_unexclude_a_related_post( $post_id, $_POST['return_id'] ); - } - - $related = relevanssi_generate_related_list( $post_id ); - $excluded = relevanssi_generate_excluded_list( $post_id ); - - $response = array( - 'related' => $related, - 'excluded' => $excluded, - ); - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Removes a post ID from the related posts exclude list. - * - * @param int $post_id The post ID that owns the related posts exclude list. - * @param int $unexcluded_post The post ID which is removed from the exclude list. - */ -function relevanssi_unexclude_a_related_post( $post_id, $unexcluded_post ) { - $return_id = (int) $unexcluded_post; - $excluded_ids = trim( get_post_meta( $post_id, '_relevanssi_related_exclude_ids', true ) ); - $excluded_ids = array_flip( explode( ',', $excluded_ids ) ); - unset( $excluded_ids[ $return_id ] ); - $excluded_ids = array_keys( $excluded_ids ); - $excluded_ids = implode( ',', $excluded_ids ); - update_post_meta( $post_id, '_relevanssi_related_exclude_ids', $excluded_ids ); - - // Excluded IDs have changed, flush the cache. - delete_post_meta( $post_id, '_relevanssi_related_posts' ); -} - -/** - * Adds a keyword to the pinned keywords list for a post. - * - * @since 2.2.6 - */ -function relevanssi_pin_post() { - check_ajax_referer( 'relevanssi_admin_search_nonce', 'security' ); - if ( ! current_user_can( 'edit_posts' ) ) { - wp_die(); - } - - $post_id = (int) $_POST['post_id']; // WPCS: input var ok. - $keyword = $_POST['keyword']; // WPCS: input var ok. - - if ( 0 === $post_id || empty( $keyword ) ) { - wp_die(); - } - - $result = false; - $already_pinned = false; - $pins = get_post_meta( $post_id, '_relevanssi_pin' ); - foreach ( $pins as $pin ) { - if ( $pin === $keyword ) { - $already_pinned = true; - break; - } - } - if ( ! $already_pinned ) { - $result = add_post_meta( $post_id, '_relevanssi_pin', $keyword ); - } - - $response = array( - 'success' => $result, - ); - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Removes a keyword from the pinned keywords list for a post. - * - * @since 2.2.6 - */ -function relevanssi_unpin_post() { - check_ajax_referer( 'relevanssi_admin_search_nonce', 'security' ); - if ( ! current_user_can( 'edit_posts' ) ) { - wp_die(); - } - - $post_id = (int) $_POST['post_id']; // WPCS: input var ok. - $keyword = $_POST['keyword']; // WPCS: input var ok. - - if ( 0 === $post_id || empty( $keyword ) ) { - wp_die(); - } - - $result = delete_post_meta( $post_id, '_relevanssi_pin', $keyword ); - - $response = array( - 'success' => $result, - ); - - echo wp_json_encode( $response ); - wp_die(); -} - -/** - * Fetches database words to the relevanssi_words option. - * - * An AJAX wrapper for relevanssi_update_words_option(). - * - * @see relevanssi_update_words_option() - * - * @since 2.5.0 - */ -function relevanssi_ajax_get_words() { - if ( ! wp_verify_nonce( $_REQUEST['_nonce'], 'relevanssi_get_words' ) ) { - wp_die(); - } - - relevanssi_update_words_option(); - - wp_die(); -} - -/** - * Launches the attachment content indexing. - * - * Sets the _relevanssi_pdf_error for the post to show RELEVANSSI_ERROR_05 - * (ie. "work in progress"), then launches the indexing and dies off. - * - * @since 2.5.0 - */ -function relevanssi_ajax_index_pdf() { - if ( ! wp_verify_nonce( $_REQUEST['_nonce'], 'relevanssi_index_pdf' ) ) { - wp_die(); - } - - if ( ! current_user_can( 'upload_files' ) ) { - wp_die(); - } - - update_post_meta( $_REQUEST['post_id'], '_relevanssi_pdf_error', RELEVANSSI_ERROR_05 ); - - relevanssi_index_pdf( $_REQUEST['post_id'] ); - - wp_die(); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/admin_metabox_scripts.js b/wp/wp-content/plugins/relevanssi-premium/premium/admin_metabox_scripts.js deleted file mode 100644 index a4c66e7c..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/admin_metabox_scripts.js +++ /dev/null @@ -1,71 +0,0 @@ -jQuery(document).ready(function ($) { - $("#relevanssi_related_keywords").change(function (e) { - var post_id = $("#this_post_id").val() - var keywords = $("#relevanssi_related_keywords").val() - var data = { - action: "relevanssi_related_posts", - security: relevanssi_metabox_data.metabox_nonce, - post_id: post_id, - keywords: keywords, - } - jQuery.post(ajaxurl, data, function (response) { - response = JSON.parse(response) - $("#related_posts_list").html(response.list) - }) - }) - - $("#relevanssi_related_include_ids").change(function (e) { - var post_id = $("#this_post_id").val() - var ids = $("#relevanssi_related_include_ids").val() - var data = { - action: "relevanssi_related_posts", - security: relevanssi_metabox_data.metabox_nonce, - post_id: post_id, - ids: ids, - } - jQuery.post(ajaxurl, data, function (response) { - response = JSON.parse(response) - $("#related_posts_list").html(response.list) - }) - }) - - $("#relevanssi_hidebox").on("click", "button.removepost", function (e) { - var remove_id = $(this).data("removepost") - if (remove_id) { - var post_id = $("#this_post_id").val() - var data = { - action: "relevanssi_related_remove", - security: relevanssi_metabox_data.metabox_nonce, - post_id: post_id, - remove_id: remove_id, - } - jQuery.post(ajaxurl, data, function (response) { - response = JSON.parse(response) - - $("#related_posts_list").html(response.related) - $("#excluded_posts_list").html(response.excluded) - }) - } - }) - - $("#relevanssi_hidebox").on("click", "button.returnpost", function (e) { - var return_id = $(this).data("returnpost") - console.log(return_id) - if (return_id) { - var post_id = $("#this_post_id").val() - var data = { - action: "relevanssi_related_return", - security: relevanssi_metabox_data.metabox_nonce, - post_id: post_id, - return_id: return_id, - } - jQuery.post(ajaxurl, data, function (response) { - response = JSON.parse(response) - console.log(response) - - $("#related_posts_list").html(response.related) - $("#excluded_posts_list").html(response.excluded) - }) - } - }) -}) diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/admin_pdf_scripts.js b/wp/wp-content/plugins/relevanssi-premium/premium/admin_pdf_scripts.js deleted file mode 100644 index 97f95490..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/admin_pdf_scripts.js +++ /dev/null @@ -1,49 +0,0 @@ -jQuery(document).ready(function () { - jQuery("#sendUrl").click(function (e) { - e.preventDefault() - var postID = jQuery("#sendUrl").data("post_id") - console.log(postID) - jQuery.ajax({ - url: ajaxurl, - type: "POST", - data: { - action: "relevanssi_send_url", - post_id: postID, - security: admin_pdf_data.send_pdf_nonce, - }, - dataType: "json", - complete: function (data) { - console.log(data) - location.reload() - }, - }) - }) - - jQuery("#sendPdf").click(function (e) { - e.preventDefault() - var postID = jQuery("#sendPdf").data("post_id") - console.log(postID) - jQuery.ajax({ - url: ajaxurl, - type: "POST", - data: { - action: "relevanssi_send_pdf", - post_id: postID, - security: admin_pdf_data.send_pdf_nonce, - }, - dataType: "json", - complete: function (data) { - console.log(data) - location.reload() - }, - }) - }) - - jQuery("textarea#relevanssi_pdf_content").focus(function () { - jQuery(this).animate({ rows: 40, cols: 120 }, 500) - }) - - jQuery("textarea#relevanssi_pdf_content").focusout(function () { - jQuery(this).animate({ rows: 4, cols: 80 }, 500) - }) -}) diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/admin_scripts_premium.js b/wp/wp-content/plugins/relevanssi-premium/premium/admin_scripts_premium.js deleted file mode 100644 index db4148e8..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/admin_scripts_premium.js +++ /dev/null @@ -1,540 +0,0 @@ -jQuery(document).ready(function ($) { - // Show and hide the "Show Relevanssi for admins" setting on the Overview tab depending - // on whether the "Hide Relevanssi" setting is enabled. - var show_post_controls = $("#show_post_controls") - $("#relevanssi_hide_post_controls").change(function () { - show_post_controls.toggleClass("screen-reader-text") - }) - - // Find out the latest row ID in the redirect table. - var last_row_id = $(".redirect_table_row:last").attr("id") - var redirect_row_index = 0 - if (last_row_id) { - // There's a last row, we're on the Redirects tab. - last_row_id = last_row_id.split("_") - if (last_row_id.length > 1) { - redirect_row_index = last_row_id[1] - } - } - - // Adds a new row to the redirect table on the Redirects tab. - $("#add_redirect").click(function (e) { - redirect_row_index++ - $(".redirect_table_row:last") - .clone(true) - .attr("id", "row_" + redirect_row_index) - .insertAfter(".redirect_table_row:last") - - var query = $("#row_" + redirect_row_index + " input:first") - query.val("") - query.attr("name", "query_" + redirect_row_index) - query.attr("id", "query_" + redirect_row_index) - - var partial = $("#row_" + redirect_row_index + " input:checkbox") - partial.prop("checked", false) - partial.attr("name", "partial_" + redirect_row_index) - partial.attr("id", "partial_" + redirect_row_index) - - var url = $("#row_" + redirect_row_index + " input:eq(2)") - url.val("") - url.attr("id", "url_" + redirect_row_index) - url.attr("name", "url_" + redirect_row_index) - - var hits = $("#row_" + redirect_row_index + " input:last") - hits.val("") - hits.attr("name", "hits_" + redirect_row_index) - hits.attr("id", "hits_" + redirect_row_index) - - var hitsNumber = $("#row_" + redirect_row_index + " span:last") - hitsNumber.html("0") - }) - - // Related posts tab: if "Matching post types" is checked, disable and uncheck other options. - $("input.matching").click(function (e) { - if ($(this).is(":checked")) { - $("input.nonmatching").prop("checked", false) - $("input.nonmatching").attr("disabled", true) - } else { - $("input.nonmatching").attr("disabled", false) - } - }) - - // Related posts tab: Display default thumbnail option. - $("#relevanssi_related_thumbnails").click(function (e) { - $("#defaultthumbnail").toggleClass("screen-reader-text", !this.checked) - }) - - // Redirects tab redirect table row removal. - $(".remove").click(function (e) { - e.preventDefault() - if ($("#redirect_table >tbody >tr").length > 1) { - // If there is more than one row in the table, remove the last row. - $(this).closest("tr").remove() - } else { - // Only one row left, don't remove it (because adding rows is based on cloning). - // Instead empty out the values. - $(".redirect_table_row:last input:text").val("") - $(".redirect_table_row:last input:checkbox").prop("checked", false) - } - }) - - // Related posts tab: Toggle settings for main switch. - $("#relevanssi_related_enabled").click(function () { - $("#tr_relevanssi_related_append input").attr("disabled", !this.checked) - $("#tr_relevanssi_related_keyword input").attr("disabled", !this.checked) - $("#relevanssi_related_number").attr("disabled", !this.checked) - $("#relevanssi_related_months").attr("disabled", !this.checked) - $("#tr_relevanssi_related_post_types input").attr("disabled", !this.checked) - $("#relevanssi_related_nothing").attr("disabled", !this.checked) - $("#relevanssi_related_notenough").attr("disabled", !this.checked) - $("#relevanssi_related_titles").attr("disabled", !this.checked) - $("#relevanssi_related_thumbnails").attr("disabled", !this.checked) - $("#relevanssi_related_excerpts").attr("disabled", !this.checked) - $("#relevanssi_related_cache_for_admins").attr("disabled", !this.checked) - $("#relevanssi_flush_related_cache").attr("disabled", !this.checked) - }) - - // Redirects tab redirect table row cloning. - $("a.copy").click(function (e) { - e.preventDefault() - redirect_row_index++ - $(this) - .closest("tr") - .clone(true) - .attr("id", "row_" + redirect_row_index) - .insertAfter(".redirect_table_row:last") - - var query = $("#row_" + redirect_row_index + " input:first") - query.attr("name", "query_" + redirect_row_index) - query.attr("id", "query_" + redirect_row_index) - - var partial = $("#row_" + redirect_row_index + " input:checkbox") - partial.attr("name", "partial_" + redirect_row_index) - partial.attr("id", "partial_" + redirect_row_index) - - var url = $("#row_" + redirect_row_index + " input:eq(2)") - url.attr("name", "url_" + redirect_row_index) - url.attr("name", "url_" + redirect_row_index) - - var hits = $("#row_" + redirect_row_index + " input:last") - hits.val("") - hits.attr("name", "hits_" + redirect_row_index) - hits.attr("id", "hits_" + redirect_row_index) - - var hitsNumber = $("#row_" + redirect_row_index + " span:last") - hitsNumber.html("0") - }) - - $("#attachments_tab :input").change(function (e) { - $("#index").attr("disabled", "disabled") - var relevanssi_note = $("#relevanssi-note") - relevanssi_note.show() - relevanssi_note.html( - '

    ' + relevanssi.options_changed + "

    " - ) - }) - - $("#build_index").click(function () { - $("#relevanssi-progress").show() - $("#results").show() - $("#relevanssi-timer").show() - $("#relevanssi-indexing-instructions").show() - $("#stateoftheindex").html(relevanssi.reload_state) - $("#indexing_button_instructions").hide() - var results = document.getElementById("results") - results.value = "" - - var data = { - action: "relevanssi_truncate_index", - security: nonce.indexing_nonce, - } - - intervalID = window.setInterval(relevanssiUpdateClock, 1000) - - console.log("Truncating index.") - results.value += relevanssi.truncating_index + " " - jQuery.post(ajaxurl, data, function (response) { - truncate_response = JSON.parse(response) - console.log("Truncate index: " + truncate_response) - if (truncate_response == true) { - results.value += relevanssi.done + "\n" - } - var data = { - action: "relevanssi_index_post_type_archives", - security: nonce.post_type_archive_indexing_nonce, - } - console.log("Indexing post type archives.") - results.value += "Indexing post type archives... " - jQuery.post(ajaxurl, data, function (response) { - console.log("Done") - response = JSON.parse(response) - results.value += response.feedback - var data = { - action: "relevanssi_count_users", - } - console.log("Counting users.") - results.value += relevanssi.counting_users + " " - jQuery.post(ajaxurl, data, function (response) { - count_response = JSON.parse(response) - console.log("Counted " + count_response + " users.") - if (count_response < 0) { - results.value += relevanssi.user_disabled + "\n" - } else { - results.value += - count_response + " " + relevanssi.users_found + "\n" - } - - var user_total = count_response - - var data = { - action: "relevanssi_count_taxonomies", - } - console.log("Counting taxonomies.") - results.value += relevanssi.counting_terms + " " - jQuery.post(ajaxurl, data, function (response) { - count_response = JSON.parse(response) - console.log("Counted " + count_response + " taxonomy terms.") - if (count_response < 0) { - results.value += relevanssi.taxonomy_disabled + "\n" - } else { - results.value += - count_response + " " + relevanssi.terms_found + "\n" - } - - var taxonomy_total = count_response - - var data = { - action: "relevanssi_count_posts", - } - console.log("Counting posts.") - results.value += relevanssi.counting_posts + " " - jQuery.post(ajaxurl, data, function (response) { - count_response = JSON.parse(response) - console.log("Counted " + count_response + " posts.") - var post_total = parseInt(count_response) - results.value += - count_response + " " + relevanssi.posts_found + "\n" - - var data = { - action: "relevanssi_list_taxonomies", - } - console.log("Listing taxonomies.") - jQuery.post(ajaxurl, data, function (response) { - taxonomies_response = JSON.parse(response) - console.log("Listing taxonomies: " + taxonomies_response) - console.log("Starting indexing.") - console.log("User total " + user_total) - if (user_total > 0) { - console.log("Indexing users.") - var args = { - total: user_total, - completed: 0, - total_seconds: 0, - post_total: post_total, - limit: 10, - taxonomies: taxonomies_response, - taxonomies_total: taxonomy_total, - } - process_user_step(args) - } else if (taxonomy_total > 0) { - console.log("Indexing taxonomies.") - results.value += relevanssi.indexing_taxonomies + " " - results.value += taxonomies_response + "\n" - var args = { - taxonomies: taxonomies_response, - completed: 0, - total: taxonomy_total, - total_seconds: 0, - post_total: post_total, - current_taxonomy: "", - offset: 0, - limit: 20, - } - process_taxonomy_step(args) - } else { - console.log("Just indexing.") - var args = { - completed: 0, - total: post_total, - offset: 0, - total_seconds: 0, - limit: relevanssi_params.indexing_limit, - adjust: relevanssi_params.indexing_adjust, - extend: false, - security: nonce.indexing_nonce, - } - process_indexing_step(args) - } - }) - }) - }) - }) - }) - }) - }) -}) - -function process_user_step(args) { - var completed = args.completed - var total = args.total - var total_seconds = args.total_seconds - - console.log(completed + " / " + total) - var t0 = performance.now() - - jQuery.ajax({ - type: "POST", - url: ajaxurl, - data: { - action: "relevanssi_index_users", - limit: args.limit, - offset: args.offset, - completed: completed, - total: total, - security: nonce.user_indexing_nonce, - }, - dataType: "json", - success: function (response) { - console.log(response) - if (response.completed == "done") { - var t1 = performance.now() - var time_seconds = (t1 - t0) / 1000 - time_seconds = Math.round(time_seconds * 100) / 100 - total_seconds += time_seconds - - var results_textarea = document.getElementById("results") - results_textarea.value += response.feedback - results_textarea.scrollTop = results_textarea.scrollHeight - var percentage_rounded = Math.round(response.percentage) - - jQuery(".rpi-progress div").animate( - { - width: percentage_rounded + "%", - }, - 50, - function () { - // Animation complete. - } - ) - - console.log("Done indexing users.") - - if (args.taxonomies_total > 0) { - var new_args = { - completed: 0, - total: args.taxonomies_total, - taxonomies: args.taxonomies, - current_taxonomy: "", - post_total: args.post_total, - offset: 0, - total_seconds: total_seconds, - limit: 20, - extend: false, - } - process_taxonomy_step(new_args) - } else { - var new_args = { - security: nonce.indexing_nonce, - completed: 0, - total: args.post_total, - offset: 0, - total_seconds: 0, - limit: relevanssi_params.indexing_limit, - adjust: relevanssi_params.indexing_adjust, - extend: false, - } - process_indexing_step(new_args) - } - } else { - var t1 = performance.now() - var time_seconds = (t1 - t0) / 1000 - time_seconds = Math.round(time_seconds * 100) / 100 - total_seconds += time_seconds - - var estimated_time = rlv_format_approximate_time( - Math.round( - (total_seconds / response.percentage) * 100 - total_seconds - ) - ) - - document.getElementById("relevanssi_estimated").innerHTML = - estimated_time - - if (time_seconds < 2) { - args.limit = args.limit * 2 - // current limit can be indexed in less than two seconds; double the limit - } else if (time_seconds < 5) { - args.limit += 5 - // current limit can be indexed in less than five seconds; up the limit - } else if (time_seconds > 20) { - args.limit = Math.round(args.limit / 2) - if (args.limit < 1) args.limit = 1 - // current limit takes more than twenty seconds; halve the limit - } else if (time_seconds > 10) { - args.limit -= 5 - if (args.limit < 1) args.limit = 1 - // current limit takes more than ten seconds; reduce the limit - } - - var results_textarea = document.getElementById("results") - results_textarea.value += response.feedback - results_textarea.scrollTop = results_textarea.scrollHeight - var percentage_rounded = Math.round(response.percentage) - - jQuery(".rpi-progress div").animate( - { - width: percentage_rounded + "%", - }, - 50, - function () { - // Animation complete. - } - ) - console.log("Next step.") - var new_args = { - completed: parseInt(response.completed), - total: args.total, - total_seconds: total_seconds, - offset: response.offset, - limit: args.limit, - post_total: args.post_total, - taxonomies: args.taxonomies, - taxonomies_total: args.taxonomies_total, - } - process_user_step(new_args) - } - }, - }) -} - -function process_taxonomy_step(args) { - var completed = args.completed - var total = args.total - var total_seconds = args.total_seconds - - console.log(completed + " / " + total) - var t0 = performance.now() - - if (args.current_taxonomy == "") { - taxonomy = args.taxonomies.shift() - args.offset = 0 - args.limit = 20 - } else { - taxonomy = args.current_taxonomy - } - - if (taxonomy != undefined) { - var results_textarea = document.getElementById("results") - results_textarea.value += "Indexing " + "'" + taxonomy + "': " - jQuery.ajax({ - type: "POST", - url: ajaxurl, - data: { - action: "relevanssi_index_taxonomies", - completed: completed, - total: total, - taxonomy: taxonomy, - offset: args.offset, - limit: args.limit, - security: nonce.taxonomy_indexing_nonce, - }, - dataType: "json", - success: function (response) { - console.log(response) - if (response.completed == "done") { - var t1 = performance.now() - var time_seconds = (t1 - t0) / 1000 - time_seconds = Math.round(time_seconds * 100) / 100 - total_seconds += time_seconds - - var results_textarea = document.getElementById("results") - results_textarea.value += response.feedback - - console.log("Done indexing taxonomies.") - - var new_args = { - completed: 0, - total: args.post_total, - offset: 0, - total_seconds: 0, - limit: relevanssi_params.indexing_limit, - adjust: relevanssi_params.indexing_adjust, - extend: false, - security: nonce.indexing_nonce, - } - process_indexing_step(new_args) - } else { - var t1 = performance.now() - var time_seconds = (t1 - t0) / 1000 - time_seconds = Math.round(time_seconds * 100) / 100 - total_seconds += time_seconds - - var estimated_time = rlv_format_approximate_time( - Math.round( - (total_seconds / response.percentage) * 100 - total_seconds - ) - ) - - document.getElementById("relevanssi_estimated").innerHTML = - estimated_time - - if (time_seconds < 2) { - args.limit = args.limit * 2 - // current limit can be indexed in less than two seconds; double the limit - } else if (time_seconds < 5) { - args.limit += 5 - // current limit can be indexed in less than five seconds; up the limit - } else if (time_seconds > 20) { - args.limit = Math.round(args.limit / 2) - if (args.limit < 1) args.limit = 1 - // current limit takes more than twenty seconds; halve the limit - } else if (time_seconds > 10) { - args.limit -= 5 - if (args.limit < 1) args.limit = 1 - // current limit takes more than ten seconds; reduce the limit - } - - var results_textarea = document.getElementById("results") - results_textarea.value += response.feedback - results_textarea.scrollTop = results_textarea.scrollHeight - var percentage_rounded = Math.round(response.percentage) - - jQuery(".rpi-progress div").animate( - { - width: percentage_rounded + "%", - }, - 50, - function () { - // Animation complete. - } - ) - console.log("Next step.") - if (response.new_taxonomy) taxonomy = "" - var new_args = { - taxonomies: args.taxonomies, - completed: parseInt(response.completed), - total: args.total, - total_seconds: total_seconds, - post_total: args.post_total, - current_taxonomy: taxonomy, - offset: response.offset, - limit: args.limit, - } - process_taxonomy_step(new_args) - } - }, - }) - } else { - var new_args = { - completed: 0, - total: args.post_total, - offset: 0, - total_seconds: 0, - limit: relevanssi_params.indexing_limit, - adjust: relevanssi_params.indexing_adjust, - extend: false, - security: nonce.indexing_nonce, - } - process_indexing_step(new_args) - } -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/body-stopwords.php b/wp/wp-content/plugins/relevanssi-premium/premium/body-stopwords.php deleted file mode 100644 index bd67b113..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/body-stopwords.php +++ /dev/null @@ -1,388 +0,0 @@ - 1 ) { - foreach ( $terms as $term ) { - $n++; - $term = trim( $term ); - $success = relevanssi_add_single_body_stopword( $term ); - if ( $success ) { - $s++; - } - } - if ( $verbose ) { - // translators: %1$d is the successful entries, %2$d is the total entries. - printf( "

    %s

    ", sprintf( esc_html__( 'Successfully added %1$d/%2$d terms to content stopwords!', 'relevanssi' ), intval( $s ), intval( $n ) ) ); - } - } else { - // Add to stopwords. - $success = relevanssi_add_single_body_stopword( $term ); - - $term = stripslashes( $term ); - $term = esc_html( $term ); - if ( $verbose ) { - if ( $success ) { - // Translators: %s is the stopword. - printf( "

    %s

    ", sprintf( esc_html__( "Term '%s' added to content stopwords!", 'relevanssi' ), esc_html( stripslashes( $term ) ) ) ); - } else { - // Translators: %s is the stopword. - printf( "

    %s

    ", sprintf( esc_html__( "Couldn't add term '%s' to content stopwords!", 'relevanssi' ), esc_html( stripslashes( $term ) ) ) ); - } - } - } - - return $success; -} - -/** - * Adds a single stopword to the stopword table. - * - * @global object $wpdb The WP database interface. - * @global array $relevanssi_variables The global Relevanssi variables. - * - * @param string $term The term to add. - * - * @return boolean True if success, false if not. - */ -function relevanssi_add_single_body_stopword( $term ) { - if ( empty( $term ) ) { - return false; - } - - $term = stripslashes( relevanssi_strtolower( $term ) ); - $stopwords = relevanssi_fetch_body_stopwords(); - - if ( in_array( $term, $stopwords, true ) ) { - return false; - } - - $stopwords[] = $term; - - $success = relevanssi_update_body_stopwords( $stopwords ); - - if ( ! $success ) { - return false; - } - - global $wpdb, $relevanssi_variables; - - relevanssi_delete_term_from_all_post_content( $term ); - - // Remove all lines with all zeros, ie. no matches. - $wpdb->query( - 'DELETE FROM ' - . $relevanssi_variables['relevanssi_table'] // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - . ' WHERE content + title + comment + tag + link + author + category + excerpt + taxonomy + customfield + mysqlcolumn = 0' - ); - - return true; -} - -/** - * Deletes a term from all posts in the database, language considered. - * - * If Polylang or WPML are used, deletes the term only from the posts matching - * the current language. - * - * @param string $term The term to delete. - */ -function relevanssi_delete_term_from_all_post_content( $term ) { - global $wpdb, $relevanssi_variables; - - if ( function_exists( 'pll_languages_list' ) ) { - $term_id = relevanssi_get_language_term_taxonomy_id( - relevanssi_get_current_language() - ); - - $wpdb->query( - $wpdb->prepare( - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "UPDATE {$relevanssi_variables['relevanssi_table']} - SET content = 0 - WHERE term=%s - AND doc IN ( - SELECT object_id - FROM $wpdb->term_relationships - WHERE term_taxonomy_id = %d - )", - $term, - $term_id - ) - ); - - return; - } - - if ( function_exists( 'icl_object_id' ) && ! function_exists( 'pll_is_translated_post_type' ) ) { - $language = relevanssi_get_current_language( false ); - $wpdb->query( - $wpdb->prepare( - // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "UPDATE {$relevanssi_variables['relevanssi_table']} - SET content = 0 - WHERE term=%s - AND doc IN ( - SELECT DISTINCT(element_id) - FROM {$wpdb->prefix}icl_translations - WHERE language_code = %s - )", - $term, - $language - ) - ); - - return; - } - - // No language defined, just remove from the index. - $wpdb->query( - $wpdb->prepare( - 'UPDATE ' . $relevanssi_variables['relevanssi_table'] . ' SET content = 0 WHERE term=%s', // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $term - ) - ); -} - -/** - * Removes all content stopwords in specific language. - * - * Empties the relevanssi_body_stopwords option for particular language. - * - * @param string $language The language code of stopwords. If empty, removes - * the stopwords for the current language. - */ -function relevanssi_remove_all_body_stopwords( $language = null ) { - if ( ! $language ) { - $language = relevanssi_get_current_language(); - } - - $stopwords = get_option( 'relevanssi_body_stopwords', array() ); - unset( $stopwords[ $language ] ); - $success = update_option( 'relevanssi_body_stopwords', $stopwords ); - - if ( $success ) { - printf( - "

    %s

    ", - esc_html__( 'All content stopwords removed! Remember to re-index.', 'relevanssi' ) - ); - } else { - printf( - "

    %s

    ", - esc_html__( "There was a problem, and content stopwords couldn't be removed.", 'relevanssi' ) - ); - } -} - -/** - * Updates the current language content stopwords in the stopwords option. - * - * Fetches the stopwords option, replaces the current language stopwords with - * the parameter array and updates the option. - * - * @param array $stopwords An array of stopwords. - * - * @return boolean The return value from update_option(). - */ -function relevanssi_update_body_stopwords( $stopwords ) { - $current_language = relevanssi_get_current_language(); - $stopwords_option = get_option( 'relevanssi_body_stopwords', array() ); - - $stopwords_option[ $current_language ] = implode( ',', array_filter( $stopwords ) ); - return update_option( - 'relevanssi_body_stopwords', - $stopwords_option - ); -} - -/** - * Removes a single content stopword. - * - * @param string $term The stopword to remove. - * @param boolean $verbose If true, print out a notice. Default true. - * - * @return boolean True if success, false if not. - */ -function relevanssi_remove_body_stopword( $term, $verbose = true ) { - $stopwords = relevanssi_fetch_body_stopwords(); - $term = stripslashes( $term ); - $stopwords = array_filter( - $stopwords, - function( $stopword ) use ( $term ) { - return $stopword !== $term; - } - ); - - $success = relevanssi_update_body_stopwords( $stopwords ); - - if ( $success ) { - if ( $verbose ) { - printf( - "

    %s

    ", - sprintf( - // Translators: %s is the stopword. - esc_html__( - "Term '%s' removed from content stopwords! Re-index to get it back to index.", - 'relevanssi' - ), - esc_html( stripslashes( $term ) ) - ) - ); - } - return true; - } else { - if ( $verbose ) { - printf( - "

    %s

    ", - sprintf( - // Translators: %s is the stopword. - esc_html__( - "Couldn't remove term '%s' from content stopwords!", - 'relevanssi' - ), - esc_html( stripslashes( $term ) ) - ) - ); - } - return false; - } -} - -/** - * Fetches the list of content stopwords. - * - * Gets the list of content stopwords from the options. - * - * @return array An array of stopwords. - */ -function relevanssi_fetch_body_stopwords() { - $current_language = relevanssi_get_current_language(); - $stopwords_array = get_option( 'relevanssi_body_stopwords', array() ); - $stopwords = isset( $stopwords_array[ $current_language ] ) ? $stopwords_array[ $current_language ] : ''; - $stopword_list = $stopwords ? explode( ',', $stopwords ) : array(); - - return $stopword_list; -} - -/** - * Displays a list of body stopwords. - * - * Displays the list of body stopwords and gives the controls for adding new stopwords. - */ -function relevanssi_show_body_stopwords() { - printf( - '

    %s

    ', - esc_html__( 'Post content stopwords are like stopwords, but they are only applied to the post content. These words can be used for searching and will be found in post titles, custom fields and other indexed content – just not in the post body content. Sometimes a word can be very common, but also have a more specific meaning and use on your site, and making it a content stopword will make it easier to find the specific use cases.', 'relevanssi' ) - ); - ?> - - - - - -
    - - -

    -
    -

    - - - - - - - - - - -
    - - -
      - ', esc_attr( $term ) ); - } - ); - - ?> -
    -

    -
    - - - - -

    -
    - - content - + $match->title - + $match->comment - + $match->link - + $match->author - + $match->excerpt - + $match->customfield - + $match->mysqlcolumn - + $match->tag - + $match->taxonomy - + $match->category; - if ( (int) $match->content === (int) $sum ) { - $match->weight = 0; - } - } - return $match; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-language-packs.php b/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-language-packs.php deleted file mode 100644 index 49a5499d..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-language-packs.php +++ /dev/null @@ -1,190 +0,0 @@ -type = $type; - $this->slug = $slug; - $this->api_url = $api_url; - } - - /** - * Adds a new project to load translations for. - * - * @since 1.0.0 - */ - public function add_project() { - if ( ! has_action( 'init', array( $this, 'register_clean_translations_cache' ) ) ) { - add_action( 'init', array( $this, 'register_clean_translations_cache' ), 9999 ); - } - - /** - * Short-circuits translations API requests for private projects. - */ - add_filter( - 'translations_api', - function ( $result, $requested_type, $args ) { - if ( $this->type . 's' === $requested_type && $this->slug === $args['slug'] ) { - return $this->get_translations( $this->type, $args['slug'], $this->api_url ); - } - - return $result; - }, - 10, - 3 - ); - - /** - * Filters the translations transients to include the private plugin or theme. - * - * @see wp_get_translation_updates() - */ - add_filter( - 'site_transient_update_' . $this->type . 's', - function ( $value ) { - if ( ! $value ) { - $value = new \stdClass(); - } - - if ( ! isset( $value->translations ) ) { - $value->translations = array(); - } - - $translations = $this->get_translations( $this->type, $this->slug, $this->api_url ); - - if ( ! isset( $translations['translations'] ) ) { - return $value; - } - - $installed_translations = wp_get_installed_translations( $this->type . 's' ); - - foreach ( (array) $translations['translations'] as $translation ) { - if ( in_array( $translation['language'], 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'] = $this->type; - $translation['slug'] = $this->slug; - - $value->translations[] = $translation; - } - } - - return $value; - } - ); - } - - /** - * Registers actions for clearing translation caches. - * - * @since 1.1.0 - */ - public function register_clean_translations_cache() { - $clear_plugin_translations = function() { - $this->clean_translations_cache( 'plugin' ); - }; - $clear_theme_translations = function() { - $this->clean_translations_cache( 'theme' ); - }; - - add_action( 'set_site_transient_update_plugins', $clear_plugin_translations ); - add_action( 'delete_site_transient_update_plugins', $clear_plugin_translations ); - - add_action( 'set_site_transient_update_themes', $clear_theme_translations ); - add_action( 'delete_site_transient_update_themes', $clear_theme_translations ); - } - - /** - * Clears existing translation cache for a given type. - * - * @since 1.1.0 - * - * @param string $type Project type. Either plugin or theme. - */ - public function clean_translations_cache( $type ) { - $transient_key = 't15s-registry-' . $this->slug . '-' . $type; - $translations = get_site_transient( $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( $transient_key ); - } - - /** - * Gets the translations for a given project. - * - * @since 1.0.0 - * - * @param string $type Project type. Either plugin or theme. - * @param string $slug Project directory slug. - * @param string $url Full GlotPress API URL for the project. - * - * @return array Translation data. - */ - public function get_translations( $type, $slug, $url ) { - $transient_key = 't15s-registry-' . $slug . '-' . $type; - $translations = get_site_transient( $transient_key ); - - 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' => 2 ) ) - ), - true - ); - if ( is_array( $result ) ) { - $translations->{$slug} = $result; - $translations->_last_checked = time(); - - set_site_transient( $transient_key, $translations ); - return $result; - } - - // Nothing found. - return array(); - } -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-spellcorrector.php b/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-spellcorrector.php deleted file mode 100644 index 8b2dd227..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-spellcorrector.php +++ /dev/null @@ -1,221 +0,0 @@ - with modifications by Mikko Saari - * @see https://www.relevanssi.com/ - */ - -/* -*************************************************************************** -* Copyright (C) 2008 by Felipe Ribeiro * -* felipernb@gmail.com * -* http://www.feliperibeiro.com * -* * -* 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 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. * -*************************************************************************** -*/ - -/** - * Spell correcting feature. - * - * This class implements the Spell correcting feature, useful for the - * "Did you mean" functionality on the search engine. Using a dictionary of - * words extracted from the product catalog. - * - * Based on the concepts of Peter Norvig: http://norvig.com/spell-correct.html - * - * @author Felipe Ribeiro - * @date September 18th, 2008 - */ -class Relevanssi_SpellCorrector { - /** - * Dictionary of words. - * - * @var array $dictionary Array of words, containing the dictionary. - */ - private static $dictionary; - - /** - * Reads a text and extracts the list of words. - * - * @param string $text Source text for the words. - * @return array The list of words - */ - private static function words( $text ) { - $matches = array(); - $text = relevanssi_strtolower( $text ); - preg_match_all( '/[a-z]+/', $text, $matches ); - return $matches[0]; - } - - /** - * Generates a list of possible "disturbances" on the passed string. - * - * @param string $word Word to disturb. - * - * @return array A list of variations. - */ - private static function edits1( $word ) { - /** - * Filters the alphabet used for Did you mean suggestions. - * - * In order to use the Did you mean suggestions with non-Latin alphabets - * (or even European languages with a wider range of characters than - * English), Relevanssi needs to be provided with the alphabet used. - * - * @param string A string containing the alphabet as a string of - * characters without spaces. - */ - $alphabet = apply_filters( - 'relevanssi_didyoumean_alphabet', - 'abcdefghijklmnopqrstuvwxyzäöåü' - ); - $alphabet = preg_split( '/(? $max ) { - $max = $value; - $word = $c; - } - } - return $word; - } -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-auto-update.php b/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-auto-update.php deleted file mode 100644 index 45a54cce..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-auto-update.php +++ /dev/null @@ -1,243 +0,0 @@ -current_version = $current_version; - $this->update_path = $update_path; - $this->plugin_slug = $plugin_slug; - list ($t1, $t2) = explode( '/', $plugin_slug ); - $this->slug = str_replace( '.php', '', $t2 ); - - if ( 'on' !== get_option( 'relevanssi_do_not_call_home' ) ) { - // define the alternative API for updating checking. - add_filter( 'pre_set_site_transient_update_plugins', array( &$this, 'check_update' ) ); - - // Define the alternative response for information checking. - add_filter( 'plugins_api', array( &$this, 'check_info' ), 10, 3 ); - } - } - - /** - * Adds our self-hosted autoupdate plugin to the filter transient. - * - * @param object $transient The filtered transient. - * - * @return object $transient - */ - public function check_update( $transient ) { - // Get the remote version. - $info = $this->get_remote_information(); - $remote_version = 0; - if ( isset( $info->new_version ) ) { - $remote_version = $info->new_version; - } - - // If a newer version is available, add the update. - if ( version_compare( $this->current_version, $remote_version, '<' ) ) { - $obj = new stdClass(); - $obj->slug = $this->slug; - $obj->new_version = $remote_version; - $obj->url = $info->package; - $obj->package = $info->package; - $obj->icons = $info->icons; - $obj->banners = $info->banners; - - $transient->response[ $this->plugin_slug ] = $obj; - } else { - global $relevanssi_variables; - // No update is available. - $item = (object) array( - 'id' => 'relevanssi-premium/relevanssi.php', - 'slug' => 'relevanssi-premium', - 'plugin' => 'relevanssi-premium/relevanssi.php', - 'new_version' => $relevanssi_variables['plugin_version'], - 'url' => '', - 'package' => '', - 'icons' => array(), - 'banners' => array(), - 'banners_rtl' => array(), - 'tested' => '', - 'requires_php' => '', - 'compatibility' => new stdClass(), - ); - $transient->no_update['relevanssi-premium/relevanssi.php'] = $item; - } - - return $transient; - } - - /** - * Adds our self-hosted description to the filter. - * - * @param object $api Result object or array, should return false. - * @param array $action Type of information request. - * @param object $args Plugin API arguments. - * - * @return object $api New stdClass with plugin information on success, default response on failure. - */ - public function check_info( $api, $action, $args ) { - $plugin = ( 'plugin_information' === $action ) && isset( $args->slug ) && ( $this->slug === $args->slug ); - - if ( $plugin ) { - if ( $args->slug === $this->slug ) { - $information = $this->get_remote_information(); - return $information; - } - } - return $api; - } - - /** - * Returns the remote version. - * - * @return string $remote_version Version number at the remote end. - */ - public function get_remote_version() { - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - $request = wp_remote_post( - $this->update_path, - array( - 'body' => array( - 'api_key' => $api_key, - 'action' => 'version', - ), - ) - ); - if ( ! is_wp_error( $request ) || 200 === wp_remote_retrieve_response_code( $request ) ) { - return $request['body']; - } - return false; - } - - /** - * Get information about the remote version. - * - * @return bool|object - */ - public function get_remote_information() { - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - $request = wp_remote_post( - $this->update_path, - array( - 'body' => array( - 'api_key' => $api_key, - 'action' => 'info', - ), - ) - ); - if ( ! is_wp_error( $request ) || 200 === wp_remote_retrieve_response_code( $request ) ) { - if ( is_serialized( $request['body'] ) ) { - return unserialize( $request['body'] ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions - } - } - return false; - } - - /** - * Returns the status of the plugin licensing. - * - * @return boolean $remote_license - */ - public function get_remote_license() { - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - $request = wp_remote_post( - $this->update_path, - array( - 'body' => array( - 'api_key' => $api_key, - 'action' => 'license', - ), - ) - ); - if ( ! is_wp_error( $request ) || 200 === wp_remote_retrieve_response_code( $request ) ) { - if ( 'false' === $request['body'] ) { - return false; - } - return $request['body']; - } - return false; - } -} - -/** - * Activates the auto update mechanism. - * - * @global array $relevanssi_variables Relevanssi global variables, used for plugin file name and version number. - * - * Hooks into 'init' filter hook to activate the auto update mechanism. - */ -function relevanssi_activate_auto_update() { - global $relevanssi_variables; - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - if ( 'su9qtC30xCLLA' === crypt( $api_key, 'suolaa' ) ) { - $relevanssi_plugin_remote_path = 'https://www.relevanssi.com/update/update-development-2022.php'; - } else { - $relevanssi_plugin_remote_path = 'https://www.relevanssi.com/update/update-2022.php'; - } - $relevanssi_variables['autoupdate'] = new Relevanssi_WP_Auto_Update( - $relevanssi_variables['plugin_version'], - $relevanssi_plugin_remote_path, - $relevanssi_variables['plugin_basename'] - ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-cli-command.php b/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-cli-command.php deleted file mode 100644 index 822e83fc..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/class-relevanssi-wp-cli-command.php +++ /dev/null @@ -1,732 +0,0 @@ -] - * : What to index. No value means everything. Valid values are - * "taxonomies" and "users" to index taxonomy terms and user profiles - * respectively. - * --- - * options: - * - post_types - * - taxonomies - * - users - * --- - * - * [--post=] - * : Post ID, if you only want to reindex one post. - * - * [--limit=] - * : Number of posts you want to index at one go. - * - * [--extend=] - * : If true, do not truncate the index or index users and taxonomies. - * If false, first truncate the index, then index user profiles and - * taxonomy terms. - * --- - * default: false - * options: - * - true - * - false - * --- - * - * [--index_debug=] - * : If true, display debugging information when indexing a single post. - * --- - * default: false - * options: - * - true - * - false - * --- - * - * ## EXAMPLES - * - * wp relevanssi index - * wp relevanssi index --post=1 - * wp relevanssi index --target=taxonomies - * wp relevanssi index --target=users - * wp relevanssi index --post=1 --index_debug=true - * wp relevanssi index --limit=100 - * wp relevanssi index --extend=true --limit=100 - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function index( $args, $assoc_args ) { - remove_filter( 'relevanssi_search_ok', '__return_true' ); - - $post_id = null; - if ( isset( $assoc_args['post'] ) ) { - $post_id = $assoc_args['post']; - } - - $limit = null; - if ( isset( $assoc_args['limit'] ) ) { - $limit = $assoc_args['limit']; - } - - $extend = false; - if ( isset( $assoc_args['extend'] ) ) { - $extend = $assoc_args['extend']; - } - - $debug = false; - if ( isset( $assoc_args['index_debug'] ) ) { - $debug = $assoc_args['index_debug']; - } - - $target = null; - if ( isset( $assoc_args['target'] ) ) { - $target = $assoc_args['target']; - } - - if ( 'taxonomies' === $target ) { - relevanssi_index_taxonomies(); - WP_CLI::success( 'Done!' ); - } elseif ( 'users' === $target ) { - relevanssi_index_users(); - WP_CLI::success( 'Done!' ); - } elseif ( 'post_types' === $target ) { - relevanssi_index_post_type_archives(); - WP_CLI::success( 'Done!' ); - } else { - if ( isset( $post_id ) ) { - $n = relevanssi_index_doc( $post_id, true, relevanssi_get_custom_fields(), true, $debug ); - switch ( $n ) { - case -1: - WP_CLI::error( "No such post: $post_id!" ); - break; - case 'hide': - WP_CLI::error( "Post $post_id is excluded from indexing." ); - break; - case 'donotindex': - WP_CLI::error( "Post $post_id is excluded from indexing by the relevanssi_do_not_index filter." ); - break; - default: - WP_CLI::success( "Reindexed post $post_id!" ); - } - } else { - $verbose = false; - list( $complete, $n ) = relevanssi_build_index( $extend, $verbose, $limit ); - - $completion = 'Index is not complete yet.'; - if ( $complete ) { - $completion = 'Index is complete.'; - } - - WP_CLI::success( "$n posts indexed. $completion" ); - } - } - } - - /** - * Refreshes the Relevanssi index. - * - * ## EXAMPLES - * - * wp relevanssi refresh - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function refresh( $args, $assoc_args ) { - $index_post_types = get_option( 'relevanssi_index_post_types', '' ); - $index_statuses = apply_filters( - 'relevanssi_valid_status', - array( 'publish', 'private', 'draft', 'pending', 'future' ) - ); - $all_indexed_posts = get_posts( - array( - 'post_type' => $index_post_types, - 'fields' => 'ids', - 'numberposts' => -1, - 'post_status' => $index_statuses, - ) - ); - - $found_posts = count( $all_indexed_posts ); - $progress = relevanssi_generate_progress_bar( 'Indexing posts', $found_posts ); - - WP_CLI::log( 'Found ' . $found_posts . ' posts to refresh.' ); - foreach ( $all_indexed_posts as $post_id ) { - relevanssi_index_doc( $post_id, true, relevanssi_get_custom_fields(), true, false ); - $progress->tick(); - } - $progress->finish(); - - WP_CLI::success( 'Index refresh done!' ); - } - - /** - * Empties the Relevanssi index. - * - * ## EXAMPLES - * - * wp relevanssi truncate_index - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function truncate_index( $args, $assoc_args ) { - $result = relevanssi_truncate_index(); - switch ( $result ) { - case false: - WP_CLI::error( "Couldn't truncate the Relevanssi database!" ); - break; - default: - WP_CLI::success( 'Relevanssi database truncated.' ); - } - } - - /** - * Adds a stopword to the list of stopwords and removes it from the index. - * - * ## OPTIONS - * - * ... - * : Stopwords to add. - * - * ## EXAMPLES - * - * wp relevanssi add_stopword stop halt seis - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function add_stopword( $args, $assoc_args ) { - if ( is_array( $args ) ) { - foreach ( $args as $stopword ) { - if ( relevanssi_add_single_stopword( $stopword ) ) { - WP_CLI::success( "Stopword added: $stopword" ); - } else { - WP_CLI::error( "Couldn't add stopword: $stopword!" ); - } - } - } else { - WP_CLI::error( 'No stopwords listed.' ); - } - } - - /** - * Removes a stopword from the list of stopwords. Reindex to get it back to the index. - * - * ## OPTIONS - * - * ... - * : Stopwords to remove. - * - * ## EXAMPLES - * - * wp relevanssi remove_stopword stop halt seis - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function remove_stopword( $args, $assoc_args ) { - $verbose = false; - if ( is_array( $args ) ) { - foreach ( $args as $stopword ) { - if ( relevanssi_remove_stopword( $stopword, $verbose ) ) { - WP_CLI::success( "Stopword removed: $stopword" ); - } else { - WP_CLI::error( "Couldn't remove stopword: $stopword!" ); - } - } - } else { - WP_CLI::error( 'No stopwords listed.' ); - } - } - - /** - * Empties the Relevanssi logs. - * - * ## EXAMPLES - * - * wp relevanssi reset_log - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function reset_log( $args, $assoc_args ) { - $verbose = false; - $result = relevanssi_truncate_logs( $verbose ); - switch ( $result ) { - case false: - WP_CLI::error( "Couldn't reset the logs!" ); - break; - default: - WP_CLI::success( 'Relevanssi log truncated.' ); - } - } - - /** - * Shows common words in the index. - * - * ## OPTIONS - * - * [--limit=] - * : How many words to show. Defaults to 25. - * - * ## EXAMPLES - * - * wp relevanssi common - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function common( $args, $assoc_args ) { - $wp_cli = true; - $limit = 25; - if ( isset( $assoc_args['limit'] ) && is_numeric( $assoc_args['limit'] ) ) { - $limit = $assoc_args['limit']; - } - - $words = relevanssi_common_words( $limit, $wp_cli ); - if ( is_array( $words ) ) { - foreach ( $words as $word ) { - WP_CLI::log( sprintf( '%s (%d)', $word->term, $word->cnt ) ); - } - } else { - WP_CLI::error( 'No words returned.' ); - } - } - - /** - * Reads the attachment content for all attachments that haven't been read - * yet. - * - * ## EXAMPLES - * - * wp relevanssi read_attachments - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function read_attachments( $args, $assoc_args ) { - $attachment_posts = relevanssi_get_posts_with_attachments( 0 ); - WP_CLI::log( 'Found ' . count( $attachment_posts ) . ' attachments to read.' ); - foreach ( $attachment_posts as $post_id ) { - $exit_and_die = false; - WP_CLI::log( 'Reading attachment ' . $post_id . '...' ); - $response = relevanssi_index_pdf( $post_id, $exit_and_die ); - if ( $response['success'] ) { - WP_CLI::log( "Successfully read the content for post $post_id." ); - } else { - WP_CLI::log( "Couldn't read the post $post_id: " . $response['error'] ); - } - } - } - - /** - * Removes all attachment content for all posts. Use with care! Does not - * reindex the posts or remove them from the index. - * - * ## EXAMPLES - * - * wp relevanssi remove_attachment_content - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array (not - * used). - */ - public function remove_attachment_content( $args, $assoc_args ) { - delete_post_meta_by_key( '_relevanssi_pdf_content' ); - delete_post_meta_by_key( '_relevanssi_pdf_error' ); - - WP_CLI::log( 'Removed all attachment content.' ); - } - - /** - * Removes all attachment errors for all posts. - * - * ## EXAMPLES - * - * wp relevanssi remove_attachment_errors - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array (not - * used). - */ - public function remove_attachment_errors( $args, $assoc_args ) { - delete_post_meta_by_key( '_relevanssi_pdf_error' ); - - WP_CLI::log( 'Removed all attachment errors.' ); - } - - /** - * Regenerates the related posts for all posts. - * - * ## OPTIONS - * - * [--post_type=] - * : A comma-separated list of post types to cover. If empty, generate the post - * types chosen in the Related posts options, or if that's empty, all public post - * types. - * - * [--post_objects=] - * : If true, doesn't generate the related posts HTML code and instead stores the - * post objects of the related posts in the transient. If false, the transient - * will contain the generated related posts HTML code. Default false. - * --- - * default: false - * options: - * - true - * - false - * --- - * - * ## EXAMPLES - * - * wp relevanssi regenerate_related - * wp relevanssi regenerate_related --post_type=post,page - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function regenerate_related( $args, $assoc_args ) { - relevanssi_flush_related_cache(); - - $settings = get_option( 'relevanssi_related_settings', relevanssi_related_default_settings() ); - - if ( isset( $settings['enabled'] ) && 'off' === $settings['enabled'] ) { - WP_CLI::error( 'Related posts feature is disabled.' ); - } - - $post_types = array(); - if ( isset( $settings['append'] ) && ! empty( $settings['append'] ) ) { - // Related posts are automatically appended to certain post types, so - // regenerate the related posts for those post types. - $post_types = explode( ',', $settings['append'] ); - } else { - // Nothing set, so regenerate for all public post types. - $pt_args = array( - 'public' => true, - ); - $post_types = get_post_types( $pt_args, 'names' ); - } - - if ( isset( $assoc_args['post_type'] ) ) { - $post_types = explode( ',', $assoc_args['post_type'] ); - } - - $post_objects = false; - if ( isset( $assoc_args['post_objects'] ) ) { - if ( filter_var( $assoc_args['post_objects'], FILTER_VALIDATE_BOOLEAN ) ) { - $post_objects = true; - } - } - - $post_args = array( - 'post_type' => $post_types, - 'fields' => 'ids', - 'posts_per_page' => -1, - ); - $posts = get_posts( $post_args ); // Get all posts for the wanted post types. - $count = count( $posts ); - WP_CLI::log( 'Regenerating related posts for post types ' . implode( ', ', $post_types ) . ", total $count posts." ); - - $progress = relevanssi_generate_progress_bar( 'Regenerating', $count ); - - foreach ( $posts as $post_id ) { - relevanssi_related_posts( $post_id, $post_objects ); - $progress->tick(); - } - - $progress->finish(); - WP_CLI::success( 'Done!' ); - } - - /** - * Lists pinned posts. - * - * ## OPTIONS - * - * [--format=] - * : Format of the results. Possible values are "table", "json", "csv", - * "yaml" and "count". Default: "table". - * - * [--type=] - * : Type of the results. Possible values are "pinned", "unpinned", and - * "both". Default: "both". - * - * ## EXAMPLES - * - * wp relevanssi list_pinned_posts - * wp relevanssi list_pinned_posts --format=csv --type=pinned - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function list_pinned_posts( $args, $assoc_args ) { - global $wpdb; - - $posts = $wpdb->get_results( - "SELECT p.ID, p.post_title, pm.meta_key, pm.meta_value FROM $wpdb->posts AS p, $wpdb->postmeta AS pm - WHERE p.ID = pm.post_id - AND ( - pm.meta_key = '_relevanssi_pin' - OR pm.meta_key = '_relevanssi_unpin' - OR ( - pm.meta_key = '_relevanssi_pin_for_all' AND pm.meta_value = 'on' - ) - ) - ORDER BY p.ID ASC" - ); - - $pinned = array(); - $unpinned = array(); - - $format = $assoc_args['format'] ?? 'table'; - if ( 'ids' === $format ) { - $format = 'table'; - } - - $include_pinned = true; - $include_unpinned = true; - if ( isset( $assoc_args['type'] ) ) { - if ( 'pinned' === $assoc_args['type'] ) { - $include_unpinned = false; - } elseif ( 'unpinned' === $assoc_args['type'] ) { - $include_pinned = false; - } - } - - foreach ( $posts as $post ) { - if ( $include_pinned && '_relevanssi_pin_for_all' === $post->meta_key ) { - $pinned[] = array( - 'ID' => $post->ID, - 'Title' => $post->post_title, - 'Pinned keywords' => __( 'all keywords' ), - ); - } elseif ( $include_pinned && '_relevanssi_pin' === $post->meta_key ) { - $pinned[] = array( - 'ID' => $post->ID, - 'Title' => $post->post_title, - 'Pinned keywords' => $post->meta_value, - ); - } elseif ( $include_unpinned && '_relevanssi_unpin' === $post->meta_key ) { - $unpinned[] = array( - 'ID' => $post->ID, - 'Title' => $post->post_title, - 'Unpinned keywords' => $post->meta_value, - ); - } - } - - if ( $pinned ) { - if ( 'table' === $format || 'count' === $format ) { - $header = "\n" . __( 'Pinned posts' ) . ':'; - WP_CLI::log( $header ); - WP_CLI::log( str_pad( '', strlen( $header ), '=' ) ); - } - WP_CLI\Utils\format_items( $format, $pinned, array( 'ID', 'Title', 'Pinned keywords' ) ); - } - - if ( $unpinned ) { - if ( 'table' === $format || 'count' === $format ) { - $header = "\n" . __( 'Unpinned posts' ) . ':'; - WP_CLI::log( $header ); - WP_CLI::log( str_pad( '', strlen( $header ), '=' ) ); - } - WP_CLI\Utils\format_items( $format, $unpinned, array( 'ID', 'Title', 'Unpinned keywords' ) ); - } - - if ( ! $pinned && ! $unpinned ) { - WP_CLI::log( __( 'No pinned posts found.' ) ); - } - } - - /** - * Lists posts in or not in the index. - * - * ## OPTIONS - * - * [--format=] - * : Format of the results. Possible values are "table", "json", "csv", - * "yaml", and "count". Default: "table". - * - * [--post_type=] - * : Post type. Default: none, show all post types. - * - * [--type=] - * : Type of the results. Possible values are "post", "term", and "user". - * Default: "post". - * - * [--status=] - * : Status of the results. Possible values are "indexed" and "unindexed". - * Default: "indexed". - * - * ## EXAMPLES - * - * wp relevanssi list - * - * @param array $args Command arguments (not used). - * @param array $assoc_args Command arguments as associative array. - */ - public function list( $args, $assoc_args ) { - global $wpdb, $relevanssi_variables; - - $status = $assoc_args['status'] ?? 'indexed'; - $post_type = $assoc_args['post_type'] ?? ''; - $type = $assoc_args['type'] ?? 'post'; - - if ( 'indexed' === $status ) { - if ( 'post' === $type ) { - if ( $post_type ) { - $post_type = "AND post_type = '" . esc_sql( $post_type ) . "'"; - } - $posts = $wpdb->get_results( - "SELECT DISTINCT(p.ID), p.post_title AS Title, p.post_type AS 'Type' FROM $wpdb->posts AS p, " . - "{$relevanssi_variables['relevanssi_table']} AS r WHERE p.ID = r.doc $post_type " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'ORDER BY p.ID ASC' - ); - } elseif ( 'term' === $type ) { - $posts = $wpdb->get_results( - "SELECT DISTINCT(t.term_id) AS ID, t.name AS 'Name', tt.taxonomy AS 'Taxonomy', tt.count AS 'Count' FROM $wpdb->terms AS t, $wpdb->term_taxonomy AS tt, " . - "{$relevanssi_variables['relevanssi_table']} AS r " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'WHERE tt.term_id = t.term_id AND t.term_id = r.item AND tt.taxonomy = r.type - ORDER BY t.term_id ASC' - ); - } elseif ( 'user' === $type ) { - $users_in_index = $wpdb->get_col( - "SELECT DISTINCT(r.item) FROM {$relevanssi_variables['relevanssi_table']} AS r " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "WHERE r.type = 'user'" - ); - $users = relevanssi_get_users( - array( - 'number' => -1, - 'orderby' => 'ID', - 'order' => 'ASC', - 'include' => array_map( 'intval', $users_in_index ), - ) - ); - foreach ( $users as $user ) { - $posts[] = array( - 'ID' => $user->ID, - 'Name' => $user->display_name, - 'Login' => $user->user_login, - 'Roles' => implode( ', ', $user->roles ), - ); - } - } - } elseif ( 'unindexed' === $status ) { - if ( 'post' === $type ) { - $indexed_post_types = str_replace( 'post.', 'p.', relevanssi_post_type_restriction() ); - if ( $post_type ) { - $post_type = "AND post_type = '" . esc_sql( $post_type ) . "'"; - $indexed_post_types = ''; - } - - $posts = $wpdb->get_results( - "SELECT DISTINCT(p.ID), p.post_title AS Title, p.post_type AS 'Type' FROM $wpdb->posts AS p " . - "LEFT JOIN {$relevanssi_variables['relevanssi_table']} AS r ON p.ID = r.doc " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'WHERE r.doc IS NULL ' . - "$indexed_post_types $post_type " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'ORDER BY p.ID ASC' - ); - } elseif ( 'term' === $type ) { - $taxonomies = get_option( 'relevanssi_index_terms' ); - if ( ! is_array( $taxonomies ) ) { - $taxonomies = array(); - } - $taxonomies = "'" . implode( "', '", $taxonomies ) . "'"; - - $posts = $wpdb->get_results( - "SELECT DISTINCT(t.term_id) AS ID, t.name AS 'Name', tt.taxonomy AS 'Taxonomy', tt.count AS 'Count' " . - "FROM $wpdb->term_taxonomy AS tt, $wpdb->terms AS t " . - "LEFT JOIN {$relevanssi_variables['relevanssi_table']} AS r " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'ON t.term_id = r.item - WHERE r.item IS NULL AND tt.term_id = t.term_id AND tt.taxonomy IN (' . $taxonomies . ') ' . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'ORDER BY t.term_id ASC' - ); - } elseif ( 'user' === $type ) { - $users_in_index = $wpdb->get_col( - "SELECT DISTINCT(r.item) FROM {$relevanssi_variables['relevanssi_table']} AS r " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "WHERE r.type = 'user'" - ); - $users = relevanssi_get_users( - array( - 'number' => -1, - 'orderby' => 'ID', - 'order' => 'ASC', - 'exclude' => $users_in_index, - ) - ); - foreach ( $users as $user ) { - $posts[] = array( - 'ID' => $user->ID, - 'Name' => $user->display_name, - 'Login' => $user->user_login, - 'Roles' => implode( ', ', $user->roles ), - ); - } - } - } - - $format = $assoc_args['format'] ?? 'table'; - if ( 'ids' === $format ) { - $format = 'table'; - } - - if ( 'post' === $type ) { - WP_CLI\Utils\format_items( $format, $posts, array( 'ID', 'Title', 'Type' ) ); - } elseif ( 'term' === $type ) { - WP_CLI\Utils\format_items( $format, $posts, array( 'ID', 'Name', 'Taxonomy', 'Count' ) ); - } elseif ( 'user' === $type ) { - WP_CLI\Utils\format_items( $format, $posts, array( 'ID', 'Name', 'Login', 'Roles' ) ); - } elseif ( 'post_type' === $type ) { - WP_CLI\Utils\format_items( $format, $posts, array( 'Title', 'Type' ) ); - } - } -} - -WP_CLI::add_command( 'relevanssi', 'Relevanssi_WP_Cli_Command' ); - -/** - * Generates a WP CLI progress bar. - * - * If WP CLI is enabled, creates a progress bar using WP_CLI\Utils\make_progress_bar(). - * - * @param string $title Title of the progress bar. - * @param int $count Total count for the bar. - */ -function relevanssi_generate_progress_bar( $title, $count ) { - $progress = null; - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress = WP_CLI\Utils\make_progress_bar( $title, $count ); - } - return $progress; -} - -add_filter( 'relevanssi_search_ok', 'relevanssi_cli_query_ok', 10, 2 ); -/** - * Sets the relevanssi_search_ok true for searches. - * - * @param boolean $ok Whether it's ok to do a Relevanssi search or not. - * @param WP_Query $query The query object. - * - * @return boolean Whether it's ok to do a Relevanssi search or not. - */ -function relevanssi_cli_query_ok( $ok, $query ) { - if ( $query->is_search() ) { - return true; - } - return $ok; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/click-tracking.php b/wp/wp-content/plugins/relevanssi-premium/premium/click-tracking.php deleted file mode 100644 index 9a7018bb..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/click-tracking.php +++ /dev/null @@ -1,1006 +0,0 @@ -ID - ); - - if ( ! isset( $_REQUEST['_rt'] ) ) { - return; - } - $rt = relevanssi_extract_rt( relevanssi_base64url_decode( $_REQUEST['_rt'] ) ); - if ( is_wp_error( $rt ) ) { - return; - } - - $wpdb->query( - $wpdb->prepare( - "INSERT IGNORE INTO {$relevanssi_variables['tracking_table']} " . // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - '(`post_id`, `query`, `rank`, `page`, `timestamp`) VALUES (%d, %s, %d, %d, %s)', - $post->ID, - $rt['query'], - $rt['rank'], - $rt['page'], - gmdate( 'c', $rt['time'] ) - ) - ); -} - -/** - * Extracts the values from the _rt URL parameter. - * - * @param string $rt The URL parameter. - * - * @return array|WP_Error An array of values: 'rank', 'page', 'query', and - * 'time'. Returns a WP_Error if the value doesn't explode into right number of - * parts. - */ -function relevanssi_extract_rt( string $rt ) { - $rt_values = explode( '|', $rt ); - if ( count( $rt_values ) != 4 ) { - return new WP_Error( 'invalid-rt', __( 'Invalid click tracking value format.', 'relevanssi' ) ); - } - $rank = intval( $rt_values[0] ); - $page = intval( $rt_values[1] ); - $time = intval( $rt_values[3] ); - if ( $rank === 0 || $page === 0 || $time === 0 ) { - return new WP_Error( 'invalid-rt', __( 'Invalid click tracking value format.', 'relevanssi' ) ); - } - return array( - 'rank' => $rank, - 'page' => $page, - 'query' => $rt_values[2], - 'time' => $time, - ); -} - -/** - * Adds tracking information to a permalink. - * - * Called from the `relevanssi_permalink` filter function to add the tracking - * data to the link. - * - * @param string $permalink The permalink to modify. - * @param object $link_post A post object, default null in which case the global - * $post is used. - * - * @global $relevanssi_tracking_positions An array of post ID => rank pairs used - * to get the post rankings. If a post does not appear in this array, the - * tracking data is not added to the permalink. - * @global $relevanssi_tracking_permalink A cache of permalinks to avoid doing - * work that is already done. - * - * @return string The modified permalink. - */ -function relevanssi_add_tracking( string $permalink, $link_post = null ) : string { - if ( 'on' !== get_option( 'relevanssi_click_tracking', 'off' ) ) { - return $permalink; - } - if ( empty( get_search_query() ) ) { - return $permalink; - } - if ( ! relevanssi_is_ok_to_log() ) { - return $permalink; - } - if ( ! $link_post ) { - global $post; - $link_post = $post; - } - if ( ! relevanssi_is_front_page_id( isset( $link_post->ID ) ?? null ) ) { - global $relevanssi_tracking_positions, $relevanssi_tracking_permalink; - $position = $relevanssi_tracking_positions[ $link_post->ID ] ?? null; - - if ( ! $position ) { - return $permalink; - } - - if ( isset( $relevanssi_tracking_permalink[ $link_post->ID ] ) ) { - return $relevanssi_tracking_permalink[ $link_post->ID ]; - } - - $page = get_query_var( 'paged' ) > 0 ? get_query_var( 'paged' ) : 1; - $nonce = wp_create_nonce( 'relevanssi_click_tracking_' . $link_post->ID ); - $query = relevanssi_strtolower( str_replace( '|', ' ', get_search_query() ) ); - $time = time(); - $value = "$position|$page|$query|$time"; - - $permalink = esc_attr( - add_query_arg( - array( - '_rt' => relevanssi_base64url_encode( $value ), - '_rt_nonce' => $nonce, - ), - $permalink - ) - ); - - $relevanssi_tracking_permalink[ $link_post->ID ] = $permalink; - } - - return $permalink; -} - -/** - * URL-friendly base64 encode. - * - * @param string $data String to encode. - * @return string Encoded string. - */ -function relevanssi_base64url_encode( string $data ) : string { - return rtrim( - strtr( - base64_encode( $data ), // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions - '+/', - '-_' - ), - '=' - ); -} - -/** - * URL-friendly base64 decode. - * - * @param string $data String to decode. - * @return string Decoded string. - */ -function relevanssi_base64url_decode( string $data ) : string { - return base64_decode( // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions - strtr( $data, '-_', '+/' ) - ); -} - -/** - * Records the ranking positions for the posts found. - * - * Runs as the last thing (at PHP_INT_MAX) on the `relevanssi_hits_filter` hook - * to record the ranking positions of each post. - * - * @global array $relevanssi_tracking_positions An array of post ID => rank - * pairs. - * - * @param array $hits The hits found. - * - * @return array The hits found, unmodified. - */ -function relevanssi_record_positions( array $hits ) : array { - global $relevanssi_tracking_positions; - - $position = 0; - foreach ( $hits[0] as $hit ) { - $position++; - $hit = relevanssi_get_an_object( $hit )['object']; - if ( ! $hit ) { - continue; - } - if ( $hit->ID > 0 ) { - $relevanssi_tracking_positions[ $hit->ID ] = $position; - } elseif ( isset( $hit->term_id ) ) { - $relevanssi_tracking_positions[ $hit->post_type . '_' . $hit->term_id ] = $position; - } elseif ( isset( $hit->user_id ) ) { - $relevanssi_tracking_positions[ 'user_' . $hit->user_id ] = $position; - } - } - - return $hits; -} - -/** - * Removes the undisplayed posts from the $relevanssi_tracking_positions array. - * - * Goes through the $relevanssi_tracking_positions array and only keeps the - * posts that appear on the current page of results. - * - * @global array $relevanssi_tracking_positions An array of post ID => rank - * pairs. - * - * @param array $hits The hits displayed. - * - * @return array The hits displayed, unmodified. - */ -function relevanssi_current_page_hits( array $hits ) : array { - global $relevanssi_tracking_positions; - - $all_positions = $relevanssi_tracking_positions; - $relevanssi_tracking_positions = array(); - - foreach ( $hits as $hit ) { - $hit = relevanssi_get_an_object( $hit )['object']; - - if ( $hit->ID > 0 ) { - $relevanssi_tracking_positions[ $hit->ID ] = $all_positions[ $hit->ID ]; - } elseif ( isset( $hit->term_id ) ) { - $id = $hit->post_type . '_' . $hit->term_id; - - $relevanssi_tracking_positions[ $id ] = $all_positions[ $id ]; - } elseif ( isset( $hit->user_id ) ) { - $id = 'user_' . $hit->user_id; - - $relevanssi_tracking_positions[ $id ] = $all_positions[ $id ]; - } - } - - return $hits; -} - -/** - * Creates the tracking table. - * - * @param string $charset_collate Character set collation. - * - * @return void - */ -function relevanssi_create_tracking_table( string $charset_collate ) { - global $relevanssi_variables; - - $sql = 'CREATE TABLE ' . $relevanssi_variables['tracking_table'] . ' ' . - "(`id` int(11) NOT NULL AUTO_INCREMENT, - `post_id` int(11) NOT NULL DEFAULT '0', - `query` varchar(200) NOT NULL, - `rank` int(11) NOT NULL DEFAULT '0', - `page` int(11) NOT NULL DEFAULT '0', - `timestamp` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY id (id), - UNIQUE INDEX post_id_timestamp (post_id, timestamp)) $charset_collate"; - - dbDelta( $sql ); -} - -/** - * Generates an array with date indices and 0 values for each date. - * - * Uses the `relevanssi_trim_click_logs` option to determine the length of the - * date range. - * - * @param string $type The type of date count: 'clicks', 'log' or 'both'. - * - * @return array An array of 'Y-m-d' date indices. - */ -function relevanssi_default_date_count( string $type ) : array { - global $wpdb, $relevanssi_variables; - - if ( 'clicks' === $type ) { - $amount_of_days = get_option( 'relevanssi_trim_click_logs', 90 ); - } - if ( 'log' === $type ) { - $amount_of_days = get_option( 'relevanssi_trim_logs', 30 ); - if ( 0 === $amount_of_days ) { - $amount_of_days = abs( $wpdb->get_var( "SELECT TIMESTAMPDIFF(DAY, NOW(), time) FROM {$relevanssi_variables['log_table']} ORDER BY time ASC LIMIT 1" ) ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared. - } - } - if ( 'both' === $type ) { - $click_days = get_option( 'relevanssi_trim_click_logs', 90 ); - $log_days = get_option( 'relevanssi_trim_logs', 30 ); - - if ( '0' === $log_days ) { - $log_days = abs( $wpdb->get_var( "SELECT TIMESTAMPDIFF(DAY, NOW(), time) FROM {$relevanssi_variables['log_table']} ORDER BY time ASC LIMIT 1" ) ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared. - } - $amount_of_days = max( $click_days, $log_days ); - } - $date_counts = array(); - $start_date = gmdate( 'Y-m-d', strtotime( intval( $amount_of_days ) . ' days ago' ) ); - $end_date = gmdate( 'Y-m-d' ); - - while ( strtotime( $start_date ) <= strtotime( $end_date ) ) { - $date_counts[ $start_date ] = 0; - - $start_date = gmdate( - 'Y-m-d', - strtotime( '+1 days', strtotime( $start_date ) ) - ); - } - - return $date_counts; -} - -/** - * Determines what happens when a request for a post insights screen is made. - * - * @param array $request The $_REQUEST array to dig for parameters. - * - * @return bool True, if a screen was displayed and false if not. - */ -function relevanssi_handle_insights_screens( array $request ) : bool { - if ( isset( $request['insights'] ) ) { - if ( isset( $request['action'] ) && isset( $request['query'] ) && 'delete_query' === $request['action'] ) { - check_admin_referer( 'relevanssi_delete_query' ); - relevanssi_delete_query( $request['query'] ); - } - if ( isset( $request['action'] ) && isset( $request['query'] ) && 'delete_query_from_log' === $request['action'] ) { - check_admin_referer( 'relevanssi_delete_query' ); - relevanssi_delete_query_from_log( $request['query'] ); - } - relevanssi_show_insights( stripslashes( $request['insights'] ) ); - return true; - } - - if ( isset( $request['post_insights'] ) ) { - relevanssi_show_post_insights( $request['post_insights'] ); - return true; - } - - return false; -} - -/** - * Deletes a query from the click tracking database. - * - * @param string $query The query to delete. - */ -function relevanssi_delete_query( string $query ) { - global $wpdb, $relevanssi_variables; - - $deleted = $wpdb->query( - $wpdb->prepare( - "DELETE FROM {$relevanssi_variables['tracking_table']} WHERE query = %s", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - stripslashes( $query ) - ) - ); - - if ( $deleted ) { - printf( - "

    %s

    ", - sprintf( - // Translators: %s is the stopword. - esc_html__( - "The query '%s' deleted from the click tracking log.", - 'relevanssi' - ), - esc_html( stripslashes( $query ) ) - ) - ); - } else { - printf( - "

    %s

    ", - sprintf( - // Translators: %s is the stopword. - esc_html__( - "Couldn't remove the query '%s' from the click tracking log.", - 'relevanssi' - ), - esc_html( stripslashes( $query ) ) - ) - ); - - } -} - -/** - * Displays the search query insights screen. - * - * Prints out the display for a single search query insights screen. - * - * @param string $query The search query. - */ -function relevanssi_show_insights( string $query ) { - global $wpdb, $relevanssi_variables; - - ?> - - ' . - // Translators: %s is the search query string. - esc_html__( 'Search insights for %s', 'relevanssi' ) . - '', - esc_html( '"' . $query . '"' ) - ); - - $results = $wpdb->get_results( - $wpdb->prepare( - 'SELECT * FROM ' . $relevanssi_variables['tracking_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE query = %s', - $query - ) - ); - - $posts = array(); - $post_average_rank = array(); - $post_average_page = array(); - $date_counts = relevanssi_default_date_count( 'both' ); - $oldest_date = array_keys( $date_counts )[0]; - foreach ( $results as $row ) { - if ( $row->timestamp < $oldest_date ) { - continue; - } - relevanssi_increase_value( $posts[ $row->post_id ] ); - relevanssi_increase_value( $post_average_rank[ $row->post_id ], $row->rank ); - relevanssi_increase_value( $post_average_page[ $row->post_id ], $row->page ); - relevanssi_increase_value( $date_counts[ gmdate( 'Y-m-d', strtotime( $row->timestamp ) ) ] ); - } - - relevanssi_average_array( $post_average_rank, $posts ); - relevanssi_average_array( $post_average_page, $posts ); - - $results = $wpdb->get_results( - $wpdb->prepare( - 'SELECT * FROM ' . $relevanssi_variables['log_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE query = %s', - $query - ) - ); - - $date_numbers = relevanssi_default_date_count( 'both' ); - - foreach ( $results as $row ) { - relevanssi_increase_value( $date_numbers[ gmdate( 'Y-m-d', strtotime( $row->time ) ) ] ); - } - ksort( $date_numbers ); - arsort( $posts ); - - $dates_array = $date_counts + $date_numbers; - ksort( $dates_array ); - $dates = array_map( - function( $v ) { - return gmdate( 'M j', strtotime( $v ) ); - }, - array_keys( $dates_array ) - ); - - relevanssi_create_line_chart( - $dates, - array( - __( '# of Searches', 'relevanssi' ) => array_values( $date_numbers ), - __( '# of Clicks', 'relevanssi' ) => array_values( $date_counts ), - ) - ); - if ( count( $posts ) > 0 ) { - ?> - -

    - - - - - - - - - - - - $count ) { - $insights_url = relevanssi_get_insights_url( intval( $post_id ) ); - $insights = sprintf( "%s", esc_url( $insights_url ), get_the_title( $post_id ) ); - - $link = get_permalink( $post_id ); - $edit = get_edit_post_link( $post_id ); - ?> - - - - - - - - -
    - ( - | )
    - -
    -

    - -
    - - - - -
    -
    - -
    -

    - -
    - - - - -
    -
    - - - ' . - // Translators: %s is the search query string. - esc_html__( 'Search insights for %s', 'relevanssi' ) . - '', - esc_html( '"' . $title . '"' ) - ); - - $link = get_permalink( $post_id ); - $edit = get_edit_post_link( $post_id ); - ?> -

    - | -

    - get_results( - $wpdb->prepare( - 'SELECT * FROM ' . $relevanssi_variables['tracking_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE post_id = %d', - $post_id - ) - ); - - $queries = array(); - $query_average_rank = array(); - $query_average_page = array(); - $date_counts = relevanssi_default_date_count( 'clicks' ); - - foreach ( $results as $row ) { - relevanssi_increase_value( $queries[ $row->query ] ); - relevanssi_increase_value( $query_average_rank[ $row->query ], $row->rank ); - relevanssi_increase_value( $query_average_page[ $row->query ], $row->page ); - relevanssi_increase_value( $date_counts[ gmdate( 'Y-m-d', strtotime( $row->timestamp ) ) ] ); - } - - relevanssi_average_array( $query_average_rank, $queries ); - relevanssi_average_array( $query_average_page, $queries ); - - arsort( $queries ); - - $dates = array_map( - function( $v ) { - return gmdate( 'M j', strtotime( $v ) ); - }, - array_keys( $date_counts ) - ); - - relevanssi_create_line_chart( - $dates, - array( - __( '# of Clicks', 'relevanssi' ) => array_values( $date_counts ), - ) - ); - - ?> - -

    - - - - - - - - - - - - $count ) { - $insights_url = relevanssi_get_insights_url( $query ); - $insights = sprintf( "%s", esc_url( $insights_url ), $query ); - ?> - - - - - - - - -
    - get_results( - 'SELECT LOWER(query) AS query, COUNT(*) AS count ' - . "FROM {$relevanssi_variables['tracking_table']} " // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . 'GROUP BY query' - ); - - $relevanssi_variables['query_clicks'] = array_combine( - wp_list_pluck( $data, 'query' ), - wp_list_pluck( $data, 'count' ) - ); - - return $relevanssi_variables['query_clicks'][ $query ] ?? 0; -} - -/** - * Prints out the user interface for setting the click tracking options. - */ -function relevanssi_click_tracking_interface() { - $click_tracking = relevanssi_check( get_option( 'relevanssi_click_tracking' ) ); - $trim_click_logs = get_option( 'relevanssi_trim_click_logs' ); - - ?> -

    - -

    - -

    - - - - - - - - - - - - - - - - - - - get_var( - $wpdb->prepare( - 'SELECT COUNT(*) FROM ' . $click_table . ' ' . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'WHERE timestamp >= %s AND timestamp <= %s', - $from . ' 00:00:00', - $to . ' 23:59:59' - ) - ); - - $click_ratio = 0; - if ( $total > 0 ) { - $click_ratio = round( 100 * $total_clicks / $total, 1 ); - } - ?> -
    -
    -
    - -
    -
    - - () -
    -
    -
    - -

    - get_results( - $wpdb->prepare( - "SELECT post_id, COUNT(*) AS hits, AVG(`rank`) AS average - FROM $click_table " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'WHERE timestamp >= %s AND timestamp <= %s - GROUP BY post_id ORDER BY hits DESC', - $from . ' 00:00:00', - $to . ' 23:59:59' - ) - ); - - $top_ten = array_slice( $results, 0, 10 ); - - $list = array(); - foreach ( $top_ten as $result ) { - $title = get_the_title( $result->post_id ); - $insights_url = relevanssi_get_insights_url( intval( $result->post_id ) ); - - $list[] = '
  • ' - . wp_kses_post( $title ) . ' (' . intval( $result->hits ) - . ')
  • '; - } - - if ( count( $list ) > 0 ) { - ?> -
    -

    -
      - ' . implode( "\n", $list ) . '
    '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - $something_printed = true; - ?> -
    - average - $a->average; - } - ); - - $top_ten = array_slice( $results, 0, 10 ); - - $list = array(); - foreach ( $top_ten as $result ) { - $title = get_the_title( $result->post_id ); - $insights_url = relevanssi_get_insights_url( intval( $result->post_id ) ); - - $list[] = '
  • ' . wp_kses_post( $title ) . ' (' - . round( $result->average, 0 ) . ')
  • '; - } - if ( count( $list ) > 0 ) { - ?> -
    -

    -
      - ' . implode( "\n", $list ) . '
    '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - $something_printed = true; - ?> -
    - get_results( - $wpdb->prepare( - "SELECT query, COUNT(DISTINCT(post_id)) AS posts - FROM $click_table " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'WHERE timestamp >= %s AND timestamp <= %s - GROUP BY query ORDER BY posts DESC LIMIT 10', - $from . ' 00:00:00', - $to . ' 23:59:59' - ) - ); - - $list = array(); - foreach ( $results as $result ) { - if ( $result->posts < 3 ) { - continue; - } - $insights_url = relevanssi_get_insights_url( $result->query ); - - $list[] = '
  • ' - . esc_html( $result->query ) . ' (' - // Translators: %1$s is the number of posts. - . sprintf( __( '%1$s posts', 'relevanssi' ), intval( $result->posts ) ) - . ')
  • '; - } - if ( count( $list ) > 0 ) { - ?> -

    - ' . implode( "\n", $list ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - $something_printed = true; - } - - if ( ! $something_printed ) { - ?> -

    - - - query. - * - * @return string The HTML link tag to link to the insights page. - */ -function relevanssi_insights_link( $query ) : string { - global $relevanssi_variables; - $insights_url = admin_url( 'admin.php?page=' . rawurlencode( $relevanssi_variables['plugin_basename'] ) ) - . '&insights=' . rawurlencode( $query->query ); - $insights = sprintf( "%s", esc_url( $insights_url ), esc_html( relevanssi_hyphenate( $query->query ) ) ); - return $insights; -} - -/** - * Trims Relevanssi click tracking table. - * - * Trims Relevanssi click tracking table, using the day interval setting from - * 'relevanssi_trim_click_logs'. - * - * @global object $wpdb The WordPress database interface. - * @global array $relevanssi_variables The global Relevanssi variables, used - * for database table names. - * - * @return int|bool Number of rows deleted, or false on error. - */ -function relevanssi_trim_click_logs() { - global $wpdb, $relevanssi_variables; - $interval = intval( get_option( 'relevanssi_trim_click_logs' ) ); - return $wpdb->query( - $wpdb->prepare( - 'DELETE FROM ' . $relevanssi_variables['tracking_table'] . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - ' WHERE timestamp < TIMESTAMP(DATE_SUB(NOW(), INTERVAL %d DAY))', - $interval - ) - ); -} - -/** - * Sets up the Relevanssi click tracking log trimming action. - */ -function relevanssi_schedule_click_tracking_trim() { - if ( get_option( 'relevanssi_trim_click_logs' ) > 0 ) { - if ( ! wp_next_scheduled( 'relevanssi_trim_click_logs' ) ) { - wp_schedule_event( time(), 'daily', 'relevanssi_trim_click_logs' ); - } - } else { - if ( wp_next_scheduled( 'relevanssi_trim_click_logs' ) ) { - wp_clear_scheduled_hook( 'relevanssi_trim_click_logs' ); - } - } -} - -/** - * Prints out the Relevanssi click tracking log as a CSV file. - * - * Exports the whole Relevanssi click tracking log as a CSV file. - * - * @uses relevanssi_output_exported_log - */ -function relevanssi_export_click_log() { - global $wpdb, $relevanssi_variables; - - $data = $wpdb->get_results( 'SELECT * FROM ' . $relevanssi_variables['tracking_table'], ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - relevanssi_output_exported_log( - 'relevanssi_click_log.csv', - $data, - __( 'No search clicks logged.', 'relevanssi' ) - ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/common.php b/wp/wp-content/plugins/relevanssi-premium/premium/common.php deleted file mode 100644 index 57b3a1e2..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/common.php +++ /dev/null @@ -1,1230 +0,0 @@ -Related Searches:
    • ', '
    • ', '
    ' ); - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param string $query The search query (get_search_query() is a good way to get the current query). - * @param string $pre What is printed before the results, default '
    • '. - * @param string $sep The separator between individual results, default '
    • '. - * @param string $post What is printed after the results, default '
    '. - * @param int $number Number of related searches to show, default 5. - * - * @author John Blackbourn - */ -function relevanssi_related( $query, $pre = '
    • ', $sep = '
    • ', $post = '
    ', $number = 5 ) { - global $wpdb, $relevanssi_variables; - - $output = array(); - $related = array(); - $tokens = relevanssi_tokenize( $query, true, -1, 'search_query' ); - if ( empty( $tokens ) ) { - return; - } - - $query_slug = sanitize_title( $query ); - $related = get_transient( 'related-' . $query_slug ); - if ( ! $related ) { - /** - * Loop over each token in the query and return logged queries which: - * - * - Contain a matching token - * - Don't match the query or the token exactly - * - Have at least 2 hits - * - Have been queried at least twice - * - * then order by most queried with a max of $number results. - */ - foreach ( $tokens as $token => $count ) { - $escaped_token = '%' . $wpdb->esc_like( "$token" ) . '%'; - $log_table = $relevanssi_variables['log_table']; - $results = $wpdb->get_results( - $wpdb->prepare( - 'SELECT query ' . - "FROM $log_table " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - 'WHERE query LIKE %s - AND query NOT IN (%s, %s) - AND hits > 1 - GROUP BY query - HAVING count(query) > 1 - ORDER BY count(query) DESC - LIMIT %d', - $escaped_token, - $token, - $query, - $number - ) - ); - foreach ( $results as $result ) { - $related[] = $result->query; - } - } - if ( empty( $related ) ) { - return; - } else { - set_transient( 'related-' . $query_slug, $related, 60 * 60 * 24 * 7 ); - } - } - - // Order results by most matching tokens then slice to a maximum of $number results. - $related = array_keys( array_count_values( $related ) ); - $related = array_slice( $related, 0, $number ); - foreach ( $related as $rel ) { - $url = add_query_arg( - array( - 's' => rawurlencode( $rel ), - ), - home_url() - ); - $rel = esc_attr( $rel ); - $output[] = "$rel"; - } - - echo $pre . implode( $sep, $output ) . $post; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -} - -/** - * Replaces get_posts() in a way that handles users and taxonomy terms. - * - * Custom-made get_posts() replacement that creates post objects for users and - * taxonomy terms. For regular posts, the function uses get_posts() and a - * caching mechanism. - * - * @global array $relevanssi_post_array The global Relevanssi post array used as - * a cache. - * - * @param int|string $id The post ID to fetch. If the ID is a string and - * begins with 'u_', it's considered a user ID and if it begins with '**', it's - * considered a taxonomy term. - * @param int $blog_id The blog ID, used to make caching work in - * multisite environment. Defaults to -1, which means the blog id is not used. - * - * @return object $post The post object for the post ID. - */ -function relevanssi_premium_get_post( $id, int $blog_id = -1 ) { - global $relevanssi_post_array; - $type = substr( $id, 0, 2 ); - switch ( $type ) { - case 'u_': - list( , $id ) = explode( '_', $id ); - - $user = get_userdata( $id ); - $post = new stdClass(); - $post->post_title = $user->display_name; - $post->post_content = $user->description; - $post->post_type = 'user'; - $post->ID = $id; - $post->relevanssi_link = get_author_posts_url( $id ); - $post->post_status = 'publish'; - $post->post_date = gmdate( 'Y-m-d H:i:s' ); - $post->post_author = 0; - $post->post_name = ''; - $post->post_excerpt = ''; - $post->comment_status = ''; - $post->ping_status = ''; - $post->user_id = $id; - - /** - * Filters the user profile post object. - * - * After a post object is created from the user profile, it is - * passed through this filter so it can be modified. - * - * @param object $post The post object. - */ - $post = apply_filters( 'relevanssi_user_profile_to_post', $post ); - break; - case 'p_': - list( , $id ) = explode( '_', $id ); - - $post_type_name = relevanssi_get_post_type_by_id( $id ); - $post_type = get_post_type_object( $post_type_name ); - $post = new stdClass(); - $post->post_title = $post_type->label; - $post->post_content = $post_type->description; - $post->post_type = 'post_type'; - $post->ID = $id; - $post->relevanssi_link = get_post_type_archive_link( $post_type_name ); - $post->post_status = 'publish'; - $post->post_date = gmdate( 'Y-m-d H:i:s' ); - $post->post_author = 0; - $post->post_name = ''; - $post->post_excerpt = ''; - $post->comment_status = ''; - $post->ping_status = ''; - $post->post_type_id = $post_type_name; - - /** - * Filters the post type post object. - * - * After a post object is created from a post type, it is passed - * through this filter so it can be modified. - * - * @param stdClass $post The post object. - */ - $post = apply_filters( 'relevanssi_post_type_to_post', $post ); - break; - case '**': - list( , $taxonomy, $id ) = explode( '**', $id ); - - $term = get_term( $id, $taxonomy ); - if ( is_wp_error( $term ) ) { - return new WP_Error( 'term_not_found', "Taxonomy term wasn't found." ); - } - $post = new stdClass(); - $post->post_title = $term->name; - $post->post_content = $term->description; - $post->post_type = $taxonomy; - $post->ID = -1; - $post->post_status = 'publish'; - $post->post_date = gmdate( 'Y-m-d H:i:s' ); - $post->relevanssi_link = get_term_link( $term, $taxonomy ); - $post->post_author = 0; - $post->post_name = ''; - $post->post_excerpt = ''; - $post->comment_status = ''; - $post->ping_status = ''; - $post->term_id = $id; - $post->post_parent = $term->parent; - - /** - * Filters the taxonomy term post object. - * - * After a post object is created from the taxonomy term, it is - * passed through this filter so it can be modified. - * - * @param Object $post The post object. - */ - $post = apply_filters( 'relevanssi_taxonomy_term_to_post', $post ); - break; - default: - $cache_id = $id; - if ( -1 !== $blog_id ) { - $cache_id = $blog_id . '|' . $id; - } - if ( isset( $relevanssi_post_array[ $cache_id ] ) ) { - // Post exists in the cache. - $post = $relevanssi_post_array[ $cache_id ]; - } else { - $post = get_post( $id ); - - $relevanssi_post_array[ $cache_id ] = $post; - } - if ( - 'on' === get_option( 'relevanssi_link_pdf_files' ) - && ! empty( $post->post_mime_type ) - ) { - /** - * Filters the URL to the attachment file. - * - * If you set the attachment indexing to index attachments that - * are stored outside the WP attachment system, use this filter - * to provide a link to the attachment. - * - * @param string The URL to the attachment file. - * @param int The attachment post ID number. - */ - $post->relevanssi_link = apply_filters( - 'relevanssi_get_attachment_url', - wp_get_attachment_url( $post->ID ), - $post->ID - ); - } - } - return $post; -} - -/** - * Returns a list of indexed taxonomies. - * - * This will also include "user", if user profiles are indexed, and "post_type", if - * post type archives are indexed. - * - * @return array $non_post_post_types_array An array of taxonomies Relevanssi is set - * to index (and "user" or "post_type"). - */ -function relevanssi_get_non_post_post_types() { - // These post types are not posts, ie. they are taxonomy terms and user profiles. - $non_post_post_types_array = array(); - if ( get_option( 'relevanssi_index_taxonomies' ) ) { - $taxonomies = get_option( 'relevanssi_index_terms' ); - if ( is_array( $taxonomies ) ) { - $non_post_post_types_array = $taxonomies; - } - } - if ( get_option( 'relevanssi_index_users' ) ) { - $non_post_post_types_array[] = 'user'; - } - if ( get_option( 'relevanssi_index_post_type_archives' ) ) { - $non_post_post_types_array[] = 'post_type'; - } - return $non_post_post_types_array; -} - -/** - * Gets the PDF content for the child posts of the post. - * - * @global $wpdb The WordPress database interface. - * - * @param int $post_id The post ID of the parent post. - * - * @return string $pdf_content The PDF content of the child posts. - */ -function relevanssi_get_child_pdf_content( $post_id ) { - global $wpdb; - - $post_id = intval( $post_id ); - $pdf_content = ''; - - if ( $post_id > 0 ) { - $pdf_content = $wpdb->get_col( "SELECT meta_value FROM $wpdb->postmeta AS pm, $wpdb->posts AS p WHERE pm.post_id = p.ID AND p.post_parent = $post_id AND meta_key = '_relevanssi_pdf_content'" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - // Only user-provided variable is $post_id, and that's from Relevanssi and sanitized as an int. - return implode( ' ', $pdf_content ); - } - - return ''; -} - -/** - * Provides the Premium version "Did you mean" recommendations. - * - * Provides a better version of "Did you mean" recommendations, using the - * spelling corrector class to generate a correct spelling. - * - * @global WP_Query $wp_query The query object, used to check the number of - * posts found. - * - * @param string $query The search query to correct. - * @param string $pre Text printed out before the suggestion. - * @param string $post Text printed out after the suggestion. - * @param int $n Maximum number of hits before the suggestions are shown, - * default 5. - */ -function relevanssi_premium_didyoumean( $query, $pre, $post, $n = 5 ) { - global $wp_query; - - $total_results = $wp_query->found_posts; - $result = ''; - - if ( $total_results > $n ) { - return $result; - } - - $suggestion = relevanssi_premium_generate_suggestion( $query ); - if ( empty( $suggestion ) ) { - $suggestion = relevanssi_simple_generate_suggestion( $query ); - } - - $result = null; - if ( $suggestion ) { - $url = trailingslashit( get_bloginfo( 'url' ) ); - $url = esc_attr( - add_query_arg( - array( - 's' => rawurlencode( $suggestion ), - ), - $url - ) - ); - /** This filter is documented in lib/didyoumean.php */ - $url = apply_filters( 'relevanssi_didyoumean_url', $url, $query, $suggestion ); - - // Escape the suggestion to avoid XSS attacks. - $suggestion = htmlspecialchars( $suggestion ); - - /** This filter is documented in lib/didyoumean.php */ - $result = apply_filters( 'relevanssi_didyoumean_suggestion', "$pre$suggestion$post" ); - } - return $result; -} - -/** - * Generates the "Did you mean" suggestion. - * - * Generates "Did you mean" suggestions given a query to correct, using the - * spelling corrector method. - * - * @param string $query The search query to correct. - * - * @return string $query Corrected query, empty if there are no corrections - * available. - */ -function relevanssi_premium_generate_suggestion( $query ) { - $corrected_query = ''; - - if ( class_exists( 'Relevanssi_SpellCorrector' ) ) { - $query = htmlspecialchars_decode( $query, ENT_QUOTES ); - $tokens = relevanssi_tokenize( $query, true, -1, 'search_query' ); - - $sc = new Relevanssi_SpellCorrector(); - - $correct = array(); - $exact_matches = 0; - foreach ( array_keys( $tokens ) as $token ) { - /** - * Filters the tokens for Did you mean suggestions. - * - * You can use this filter hook to modify the tokens before Relevanssi - * tries to come up with Did you mean suggestions for them. If you - * return an empty string, the token will be skipped and no suggestion - * will be made for the token. - * - * @param string $token An individual word from the search query. - * - * @return string The token. - */ - $token = apply_filters( 'relevanssi_didyoumean_token', trim( $token ) ); - if ( ! $token ) { - continue; - } - $c = $sc->correct( $token ); - if ( ! empty( $c ) && strval( $token ) !== $c ) { - array_push( $correct, $c ); - $query = str_ireplace( $token, $c, $query ); // Replace misspelled word in query with suggestion. - } elseif ( null !== $c ) { - $exact_matches++; - } - } - if ( count( $tokens ) === $exact_matches ) { - // All tokens are correct. - return ''; - } - if ( count( $correct ) > 0 ) { - // Strip quotes, because they are likely incorrect. - $query = str_replace( '"', '', $query ); - $corrected_query = $query; - } - } - - return $corrected_query; -} - -/** - * Multisite-friendly get_post(). - * - * Gets a post using relevanssi_get_post() from the specified subsite. - * - * @param int $blogid The blog ID. - * @param int $id The post ID. - * - * @return object|WP_Error $post The post object or a WP_Error if the post - * cannot be found. - */ -function relevanssi_get_multisite_post( $blogid, $id ) { - switch_to_blog( $blogid ); - if ( ! is_numeric( mb_substr( $id, 0, 1 ) ) ) { - // The post ID does not start with a number; this is a user or a - // taxonomy term, so suspend cache addition to avoid getting garbage in - // the cache. - wp_suspend_cache_addition( true ); - } - $post = relevanssi_get_post( $id, $blogid ); - restore_current_blog(); - return $post; -} - -/** - * Initializes things for Relevanssi Premium. - * - * Adds metaboxes, depending on settings; adds synonym indexing filter if - * necessary and removes an unnecessary action. - */ -function relevanssi_premium_init() { - $show_post_controls = true; - if ( 'on' === get_option( 'relevanssi_hide_post_controls' ) ) { - $show_post_controls = false; - /** - * Adjusts the capability required to show the Relevanssi post controls - * for admins. - * - * @param string $capability The minimum capability required, default - * 'manage_options'. - */ - if ( - 'on' === get_option( 'relevanssi_show_post_controls' ) && - current_user_can( apply_filters( 'relevanssi_options_capability', 'manage_options' ) ) - ) { - $show_post_controls = true; - } - } - if ( $show_post_controls ) { - add_action( 'add_meta_boxes', 'relevanssi_add_metaboxes' ); - } - - if ( 'on' === get_option( 'relevanssi_index_synonyms' ) ) { - add_filter( 'relevanssi_indexing_tokens', 'relevanssi_add_indexing_synonyms', 10 ); - } - - // If the relevanssi_save_postdata is not disabled, scheduled publication - // will swipe out the Relevanssi post controls settings. - add_action( - 'future_to_publish', - function( $post ) { - remove_action( 'save_post', 'relevanssi_save_postdata' ); - } - ); - - if ( function_exists( 'do_blocks' ) ) { - add_action( 'init', 'relevanssi_register_gutenberg_actions', 11 ); - } - - global $pagenow, $relevanssi_variables; - $on_relevanssi_page = false; - if ( isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification - $page = sanitize_file_name( wp_unslash( $_GET['page'] ) ); // phpcs:ignore WordPress.Security.NonceVerification - $base = sanitize_file_name( wp_unslash( plugin_basename( $relevanssi_variables['file'] ) ) ); - if ( $base === $page ) { - $on_relevanssi_page = true; - } - } - - if ( function_exists( 'is_multisite' ) && is_multisite() && function_exists( 'get_blog_status' ) ) { - $public = (bool) get_blog_status( get_current_blog_id(), 'public' ); - if ( ! $public && 'options-general.php' === $pagenow && $on_relevanssi_page ) { - add_action( - 'admin_notices', - function() { - printf( - "

    %s

    ", - esc_html__( 'Your site is not public. By default, Relevanssi does not search private sites. If you want to be able to search on this site, either make it public or add a filter function that returns true on \'relevanssi_multisite_public_status\' filter hook.', 'relevanssi' ) - ); - } - ); - } - } - - add_filter( 'relevanssi_remove_punctuation', 'relevanssi_wildcards_pre', 8 ); - add_filter( 'relevanssi_remove_punctuation', 'relevanssi_wildcards_post', 12 ); - add_filter( 'relevanssi_term_where', 'relevanssi_query_wildcards' ); - - add_filter( 'relevanssi_indexing_restriction', 'relevanssi_hide_post_restriction' ); - - if ( defined( 'RELEVANSSI_API_KEY' ) ) { - add_filter( - 'pre_option_relevanssi_api_key', - function() { - return RELEVANSSI_API_KEY; - } - ); - add_filter( - 'pre_site_option_relevanssi_api_key', - function() { - return RELEVANSSI_API_KEY; - } - ); - } - - $update_translations = false; - if ( 'on' === get_option( 'relevanssi_update_translations' ) ) { - $update_translations = true; - } - if ( 'on' === get_option( 'relevanssi_do_not_call_home' ) ) { - $update_translations = false; - } - /** - * Filters whether to update the Relevanssi translations. - * - * @param boolean $update_translations If false, don't update translations. - */ - $update_translations = apply_filters( 'relevanssi_update_translations', $update_translations ); - - if ( $update_translations ) { - $t15s_updater = new Relevanssi_Language_Packs( - 'plugin', - 'relevanssi', - 'https://packages.translationspress.com/relevanssi/relevanssi/packages.json' - ); - $t15s_updater->add_project(); - } - - add_action( - 'in_plugin_update_message-' . $relevanssi_variables['plugin_basename'], - 'relevanssi_premium_modify_plugin_update_message' - ); - - // Add the related posts filters if necessary. - relevanssi_related_init(); -} - -/** - * Adds the Relevanssi Premium hide post filter to the indexing restrictions. - * - * @global object $wpdb The WP database interface. - * - * @param array $restrictions The current set of restrictions. - * - * @return array The updated restrictions. - */ -function relevanssi_hide_post_restriction( $restrictions ) { - global $wpdb; - - $restrictions['mysql'] .= " AND post.ID NOT IN (SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_hide_post' AND meta_value = 'on')"; - $restrictions['reason'] .= ' ' . __( 'Relevanssi index exclude', 'relevanssi' ); - - return $restrictions; -} - -/** - * Replaces the standard permalink with $post->relevanssi_link if it exists. - * - * Relevanssi adds a link to the user profile or taxonomy term page to $post->relevanssi_link. This function replaces permalink with that link, if it exists. - * - * @param string $permalink The permalink to filter. - * @param int $post_id The post ID. - * - * @return string $permalink Modified permalink. - */ -function relevanssi_post_link_replace( $permalink, $post_id ) { - $post = relevanssi_get_post( $post_id ); - if ( property_exists( $post, 'relevanssi_link' ) ) { - $permalink = $post->relevanssi_link; - } - return $permalink; -} - -/** - * Fetches a list of words from the Relevanssi database for spelling corrector. - * - * A helper function for the spelling corrector. Gets the word list from the - * 'relevanssi_words' option. If the data is expired (more than a month old), - * this function triggers an asynchronous refresh action that fetches new words - * from the Relevanssi database to use as a source material for spelling - * suggestions. - * - * @return array $words An array of words, with the word as the key and number - * of occurrances as the value. - */ -function relevanssi_get_words() { - $data = get_option( - 'relevanssi_words', - array( - 'expire' => 0, - 'words' => array(), - ) - ); - - if ( time() > $data['expire'] ) { - relevanssi_launch_ajax_action( 'relevanssi_get_words' ); - } - - return $data['words']; -} - -/** - * Adds the Premium options. - * - * @global array $relevanssi_variables The global Relevanssi variables, used to set the link boost default. - */ -function relevanssi_premium_install() { - global $relevanssi_variables; - - add_option( 'relevanssi_api_key', '' ); - add_option( 'relevanssi_click_tracking', 'on' ); - add_option( 'relevanssi_disable_shortcodes', '' ); - add_option( 'relevanssi_do_not_call_home', 'off' ); - add_option( 'relevanssi_hide_post_controls', 'off' ); - add_option( 'relevanssi_index_pdf_parent', 'off' ); - add_option( 'relevanssi_index_post_type_archives', 'off' ); - add_option( 'relevanssi_index_subscribers', 'off' ); - add_option( 'relevanssi_index_synonyms', 'off' ); - add_option( 'relevanssi_index_taxonomies', 'off' ); - add_option( 'relevanssi_index_terms', array() ); - add_option( 'relevanssi_index_users', 'off' ); - add_option( 'relevanssi_internal_links', 'noindex' ); - add_option( 'relevanssi_link_boost', $relevanssi_variables['link_boost_default'] ); - add_option( 'relevanssi_link_pdf_files', 'off' ); - add_option( 'relevanssi_max_excerpts', 1 ); - add_option( 'relevanssi_mysql_columns', '' ); - add_option( 'relevanssi_post_type_weights', '' ); - add_option( 'relevanssi_read_new_files', 'off' ); - add_option( 'relevanssi_redirects', array() ); - add_option( 'relevanssi_related_settings', relevanssi_related_default_settings() ); - add_option( 'relevanssi_related_style', relevanssi_related_default_styles() ); - add_option( 'relevanssi_send_pdf_files', 'off' ); - add_option( 'relevanssi_server_location', relevanssi_default_server_location() ); - add_option( 'relevanssi_show_post_controls', 'off' ); - add_option( 'relevanssi_spamblock', array() ); - add_option( 'relevanssi_thousand_separator', '' ); - add_option( 'relevanssi_trim_click_logs', '180' ); - add_option( 'relevanssi_update_translations', 'off' ); - add_option( - 'relevanssi_recency_bonus', - array( - 'bonus' => '', - 'days' => '', - ) - ); -} - -/** - * Makes an educated guess whether the default attachment server location should - * be US or EU, based on the site locale setting. - * - * @uses get_locale() - * - * @return string 'eu' or 'us', depending on the locale. - */ -function relevanssi_default_server_location() : string { - $server = 'us'; - $locale = get_locale(); - - if ( strpos( $locale, '_' ) === false ) { - $language = $locale; - } else { - list( $language, $country ) = explode( '_', $locale ); - } - - $eu_languages = array( 'ast', 'bel', 'ca', 'cy', 'el', 'et', 'eu', 'fi', 'fur', 'gd', 'hr', 'hsb', 'lv', 'oci', 'roh', 'sq', 'uk' ); - $eu_countries = array( 'AL', 'AT', 'BA', 'BE', 'BG', 'CH', 'CY', 'DE', 'EE', 'ES', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IL', 'IS', 'IT', 'LI', 'LT', 'LU', 'LV', 'MC', 'MD', 'ME', 'MT', 'NL', 'NO', 'PL', 'PT', 'RO', 'RS', 'SE', 'SI', 'SK', 'UA' ); - - if ( in_array( strtolower( $language ), $eu_languages, true ) || - in_array( strtoupper( $country ), $eu_countries, true ) ) { - $server = 'eu'; - } - - return $server; -} - -/** - * Returns the attachment reading server URL. - * - * Checks the correct server from 'relevanssi_server_location' option and returns the - * correct URL from the constants. - * - * @return string The attachment reading server URL. - */ -function relevanssi_get_server_url() { - $server = RELEVANSSI_US_SERVICES_URL; - if ( 'eu' === get_option( 'relevanssi_server_location' ) ) { - $server = RELEVANSSI_EU_SERVICES_URL; - } - /** - * Allows changing the attachment reading server URL. - * - * @param string The server URL. - */ - return apply_filters( 'relevanssi_attachment_server_url', $server ); -} - -/** - * Extracts taxonomy specifiers from the search query. - * - * Finds all {taxonomy:search term} specifiers from the query. If any are - * found, they are stored in $relevanssi_variables global variable and the - * filtering function is activated. - * - * @global array $relevanssi_variables Used to store the target data. - * - * @param string $query The query. - * - * @return string The query with the specifier tags removed. - */ -function relevanssi_extract_specifier( $query ) { - global $relevanssi_variables; - - $targets = array(); - - if ( preg_match_all( '/{(.*?):(.*?)}/', $query, $matches, PREG_SET_ORDER ) ) { - foreach ( $matches as $match ) { - list( $whole, $target, $keyword ) = $match; - - $phrases = relevanssi_extract_phrases( $keyword ); - if ( ! empty( $phrases ) ) { - foreach ( $phrases as $phrase ) { - $relevanssi_variables['phrase_targets'][ $phrase ] = $target; - } - } else { - if ( is_numeric( $keyword ) ) { - $keyword = ' ' . $keyword; - } - $targets[ $keyword ][] = $target; - } - - $query = str_replace( $whole, $keyword, $query ); - } - } - - if ( ! empty( $targets ) ) { - $relevanssi_variables['targets'] = $targets; - add_filter( 'relevanssi_match', 'relevanssi_target_matches' ); - } - - return $query; -} - -/** - * Filters posts by taxonomy specifiers. - * - * If taxonomy specifiers are found in the query, this filtering function is - * activated and will set the post weight to 0 in the cases where the post - * matches the search term, but not the specifiers. - * - * @global array $relevanssi_variables Used to store the target data. - * - * @param object $match The Relevanssi match object. - * - * @return object The match object, with the weight modified if necessary. - */ -function relevanssi_target_matches( $match ) { - global $relevanssi_variables; - - if ( is_numeric( $match->term ) ) { - $match->term = ' ' . $match->term; - } - - $fuzzy = get_option( 'relevanssi_fuzzy' ); - if ( 'always' === $fuzzy || 'sometimes' === $fuzzy ) { - foreach ( $relevanssi_variables['targets'] as $term => $target ) { - if ( - substr( $match->term, 0, strlen( $term ) ) === $term || - substr( strrev( $match->term ), 0, strlen( $term ) ) === strrev( $term ) - ) { - $relevanssi_variables['targets'][ $match->term ] = - $relevanssi_variables['targets'][ $term ]; - } - } - } - - $no_matches = false; - if ( isset( $relevanssi_variables['targets'][ $match->term ] ) ) { - $no_matches = true; - foreach ( $relevanssi_variables['targets'][ $match->term ] as $target ) { - if ( isset( $match->$target ) && '0' !== $match->$target ) { - $no_matches = false; - break; - } - if ( ! is_object( $match->customfield_detail ) ) { - $match->customfield_detail = json_decode( $match->customfield_detail ); - } - if ( - ! empty( $match->customfield_detail ) && - isset( $match->customfield_detail->$target ) && - '0' !== $match->customfield_detail->$target - ) { - $no_matches = false; - break; - } - if ( ! is_object( $match->taxonomy_detail ) ) { - $match->taxonomy_detail = json_decode( $match->taxonomy_detail ); - } - if ( - ! empty( $match->taxonomy_detail ) && - isset( $match->taxonomy_detail->$target ) && - '0' !== $match->taxonomy_detail->$target - ) { - $no_matches = false; - break; - } - if ( ! is_object( $match->mysqlcolumn_detail ) ) { - $match->mysqlcolumn_detail = json_decode( $match->mysqlcolumn_detail ); - } - if ( - ! empty( $match->mysqlcolumn_detail ) && - isset( $match->mysqlcolumn_detail->$target ) && - '0' !== $match->mysqlcolumn_detail->$target - ) { - $no_matches = false; - break; - } - } - } - if ( $no_matches ) { - $match->weight = 0; - } - - return $match; -} - -/** - * Generates queries for targeted phrases. - * - * Goes through the targeted phrases from the Relevanssi global variable - * $relevanssi_variables['phrase_targets'] and generates the queries for the - * phrases taking note of the target restrictions. Some of this is slightly - * hacky, as some default inclusions generated by the - * relevanssi_generate_phrase_queries() are simply removed. - * - * @see relevanssi_generate_phrase_queries() - * - * @global array $relevanssi_variables The global Relevanssi variables. - * - * @param string $phrase The source phrase for the queries. - * - * @return array An array of queries per phrase. - */ -function relevanssi_targeted_phrases( $phrase ) { - global $relevanssi_variables; - - $target = $relevanssi_variables['phrase_targets'][ $phrase ]; - - $taxonomies = array(); - $excerpt = 'off'; - $fields = array(); - - if ( 'excerpt' === $target ) { - $excerpt = 'on'; - } - if ( 'tag' === $target ) { - $target = 'post_tag'; - } - if ( taxonomy_exists( $target ) ) { - $taxonomies = array( $target ); - } else { - $fields = array( $target ); - } - - $queries = relevanssi_generate_phrase_queries( - array( $phrase ), - $taxonomies, - $fields, - $excerpt - ); - - if ( 'excerpt' === $target ) { - $find = array( - "post_content LIKE '%$phrase%' OR ", - "post_title LIKE '%$phrase%' OR ", - ); - $queries[ $phrase ][0] = str_replace( $find, '', $queries[ $phrase ][0] ); - } elseif ( 'title' === $target ) { - $find = array( - "post_content LIKE '%$phrase%' OR ", - ); - $queries[ $phrase ][0] = str_replace( $find, '', $queries[ $phrase ][0] ); - } else { - unset( $queries[ $phrase ][0] ); // Remove the generic post content or title query. - } - if ( $fields ) { - // Custom field targeting, remove PDF content custom frield from the list. - $queries[ $phrase ][1] = str_replace( - ",'_relevanssi_pdf_content'", - '', - $queries[ $phrase ][1] - ); - } - - return $queries; -} - -/** - * Adds the Relevanssi Premium phrase filters for PDF content, terms and users. - * - * Hooks on to `relevanssi_phrase_queries` to include the phrase queries for - * Relevanssi Premium features: looking for phrases in PDF content, taxonomy - * term names and user fields. - * - * @param array $queries The array of queries where the new queries are added. - * @param string $phrase The current phrase, already MySQL escaped. - * @param string $status MySQL escaped post status value to use in queries. - * - * @return array The queries, with new queries added. - */ -function relevanssi_premium_phrase_queries( $queries, $phrase, $status ) { - global $wpdb; - - $index_post_types = get_option( 'relevanssi_index_post_types', array() ); - if ( in_array( 'attachment', $index_post_types, true ) ) { - $query = "(SELECT ID - FROM $wpdb->posts AS p, $wpdb->postmeta AS m - WHERE p.ID = m.post_id - AND m.meta_key = '_relevanssi_pdf_content' - AND m.meta_value LIKE '%$phrase%' - AND p.post_status IN ($status))"; - - $queries[] = array( - 'query' => $query, - 'target' => 'doc', - ); - } - - if ( 'on' === get_option( 'relevanssi_index_pdf_parent' ) ) { - $query = "(SELECT parent.ID - FROM $wpdb->posts AS p, $wpdb->postmeta AS m, $wpdb->posts AS parent - WHERE p.ID = m.post_id - AND p.post_parent = parent.ID - AND m.meta_key = '_relevanssi_pdf_content' - AND m.meta_value LIKE '%$phrase%' - AND p.post_status = 'inherit')"; - - $queries[] = array( - 'query' => $query, - 'target' => 'doc', - ); - } - - $index_taxonomies = get_option( 'relevanssi_index_terms', array() ); - if ( ! empty( $index_taxonomies ) ) { - $taxonomies_escaped = implode( "','", array_map( 'esc_sql', $index_taxonomies ) ); - $taxonomies_sql = "AND tt.taxonomy IN ('$taxonomies_escaped')"; - - $query = "(SELECT t.term_id - FROM $wpdb->terms AS t, $wpdb->term_taxonomy AS tt - WHERE t.term_id = tt.term_id - AND t.name LIKE '%$phrase%' - $taxonomies_sql)"; - - $queries[] = array( - 'query' => $query, - 'target' => 'item', - ); - } - - $index_users = get_option( 'relevanssi_index_users', 'off' ); - if ( 'on' === $index_users ) { - $extra_fields = get_option( 'relevanssi_index_user_fields' ); - $meta_keys = array( 'description', 'first_name', 'last_name' ); - if ( $extra_fields ) { - $meta_keys = array_merge( $meta_keys, explode( ',', $extra_fields ) ); - } - $meta_keys_escaped = implode( "','", array_map( 'esc_sql', $meta_keys ) ); - $meta_keys_sql = "um.meta_key IN ('$meta_keys_escaped')"; - - $query = "(SELECT DISTINCT(u.ID) - FROM $wpdb->users AS u LEFT JOIN $wpdb->usermeta AS um - ON u.ID = um.user_id - WHERE ($meta_keys_sql AND meta_value LIKE '%$phrase%') - OR u.display_name LIKE '%$phrase%')"; - - $queries[] = array( - 'query' => $query, - 'target' => 'item', - ); - } - - return $queries; -} - -/** - * Fetches database words to the relevanssi_words option. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the - * database table names. - */ -function relevanssi_update_words_option() { - global $wpdb, $relevanssi_variables; - - /** - * The minimum limit of occurrances to include a word. - * - * To save resources, only words with more than this many occurrances are - * fed to the spelling corrector. If there are problems with the spelling - * corrector, increasing this value may fix those problems. - * - * @param int $number The number of occurrances must be more than this - * value, default 2. - */ - $count = apply_filters( 'relevanssi_get_words_having', 2 ); - if ( ! is_numeric( $count ) ) { - $count = 2; - } - $q = 'SELECT term, - SUM(title + content + comment + tag + link + author + category + excerpt + taxonomy + customfield) - AS c FROM ' . $relevanssi_variables['relevanssi_table'] . - " GROUP BY term HAVING c > $count"; // Safe: $count is numeric. - - $results = $wpdb->get_results( $q ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - $words = array(); - foreach ( $results as $result ) { - $words[ $result->term ] = $result->c; - } - - $expire = time() + MONTH_IN_SECONDS; - $data = array( - 'expire' => $expire, - 'words' => $words, - ); - - update_option( 'relevanssi_words', $data, false ); -} - -/** - * Adds the "Must have" part for the missing terms list. - * - * Assumes there's just one missing term (this is checked outside this - * function). - * - * @param WP_Post $post The post object. - * - * @return string A string containing the "Must have" link. - */ -function relevanssi_add_must_have( $post ) { - $query_string = $GLOBALS['wp']->query_string ?? ''; - $request = $GLOBALS['request'] ?? '/'; - $search_term = implode( '', $post->relevanssi_hits['missing_terms'] ); - $search_page_url = add_query_arg( $query_string, '', home_url( $request ) ); - $search_page_url = str_replace( rawurlencode( $search_term ), '%2B' . $search_term, $search_page_url ); - - return apply_filters( - 'relevanssi_missing_terms_must_have', - ' | ' . __( 'Must have', 'relevanssi' ) . ': ' . $search_term . '' - ); -} - -/** - * Updates the $term_hits array used for showing how many hits were found for - * each term. - * - * @param array $term_hits The term hits array (passed as reference). - * @param array $match_arrays The matches array (passed as reference). - * @param stdClass $match The match object. - * @param string $term The search term. - */ -function relevanssi_premium_update_term_hits( &$term_hits, &$match_arrays, $match, $term ) { - relevanssi_increase_value( $match_arrays['mysqlcolumn'][ $match->doc ], $match->mysqlcolumn ); - - $match_arrays['customfield_detail'][ $match->doc ] = array(); - $match_arrays['taxonomy_detail'][ $match->doc ] = array(); - $match_arrays['mysqlcolumn_detail'][ $match->doc ] = array(); - - if ( ! empty( $match->customfield_detail ) ) { - $match_arrays['customfield_detail'][ $match->doc ][ $term ] = $match->customfield_detail; - } - if ( ! empty( $match->taxonomy_detail ) ) { - $match_arrays['taxonomy_detail'][ $match->doc ][ $term ] = $match->taxonomy_detail; - } - if ( ! empty( $match->mysqlcolumn_detail ) ) { - $match_arrays['mysqlcolumn_detail'][ $match->doc ][ $term ] = $match->mysqlcolumn_detail; - } -} - -/** - * Adds Premium features to the $return array from $match_arrays. - * - * @param array $return The search return value array, passed as a - * reference. - * @param array $match_arrays The match array for source data. - */ -function relevanssi_premium_update_return_array( &$return, $match_arrays ) { - $match_arrays['mysqlcolumn_matches'] = $match_arrays['mysqlcolumn_matches'] ?? ''; - $match_arrays['customfield_detail'] = $match_arrays['customfield_detail'] ?? ''; - $match_arrays['taxonomy_detail'] = $match_arrays['taxonomy_detail'] ?? ''; - $match_arrays['mysqlcolumn_detail'] = $match_arrays['mysqlcolumn_detail'] ?? ''; - - $additions = array( - 'mysqlcolumn' => $match_arrays['mysqlcolumn_matches'], - 'customfield_detail' => $match_arrays['customfield_detail'], - 'taxonomy_detail' => $match_arrays['taxonomy_detail'], - 'mysqlcolumn_detail' => $match_arrays['mysqlcolumn_detail'], - ); - - $return = array_merge( $return, $additions ); -} - -/** - * Adds Premium features to the $post->relevanssi_hits source array. - * - * @param array $hits The search hits array. - * @param array $data The source data. - * @param int $post_id The post ID. - */ -function relevanssi_premium_add_matches( &$hits, $data, $post_id ) { - $hits['mysqlcolumn'] = $data['mysqlcolumn_matches'][ $post_id ] ?? 0; - $hits['customfield_detail'] = $data['customfield_detail'][ $post_id ] ?? array(); - $hits['taxonomy_detail'] = $data['taxonomy_detail'][ $post_id ] ?? array(); - $hits['mysqlcolumn_detail'] = $data['mysqlcolumn_detail'][ $post_id ] ?? array(); - - $hits['customfield_detail'] = array_map( - function( $value ) { - return (array) json_decode( $value ); - }, - $hits['customfield_detail'] - ); -} - -/** - * Returns a string of custom field content for the user. - * - * Fetches the user custom field content based on the field indexing settings - * and concatenates it as a single space-separated string. - * - * @uses relevanssi_get_user_field_content - * - * @param string $user_id The ID of the user. - * - * @return string The custom field content. - */ -function relevanssi_get_user_custom_field_content( $user_id ) : string { - $custom_field_content = ''; - - $fields = relevanssi_get_user_field_content( $user_id ); - if ( ! empty( $fields ) ) { - $custom_field_content = implode( ' ', array_values( $fields ) ); - } - - return $custom_field_content; -} - -/** - * Returns an array of user custom field names. - * - * Gets the indexed user field names from relevanssi_index_user_fields and - * relevanssi_index_user_meta options and returns an array of field names. - * - * @return array Array of user custom field names. - */ -function relevanssi_generate_list_of_user_fields() : array { - $user_fields = array(); - - $user_fields_option = get_option( 'relevanssi_index_user_fields' ); - if ( $user_fields_option ) { - $user_fields = explode( ',', $user_fields_option ); - } - - $user_meta = get_option( 'relevanssi_index_user_meta' ); - if ( $user_meta ) { - $user_fields = array_merge( $user_fields, explode( ',', $user_meta ) ); - } - - $user_fields = array_map( 'trim', $user_fields ); - - return $user_fields; -} - -/** - * Returns an array of user custom field content. - * - * Gets the indexed user field content from the fields specified in the user - * field indexing options. - * - * @uses relevanssi_generate_list_of_user_fields - * - * @param string $user_id The ID of the user. - * - * @return array An array of (field, value) pairs. - */ -function relevanssi_get_user_field_content( $user_id ) : array { - $fields = relevanssi_generate_list_of_user_fields(); - $user = get_user_by( 'id', $user_id ); - $user_vars = get_object_vars( $user ); - $values = array(); - foreach ( $fields as $field ) { - $field_value = ''; - if ( isset( $user_vars[ $field ] ) ) { - $field_value = $user_vars[ $field ]; - } - if ( empty( $field_value ) && isset( $user_vars['data']->$field ) ) { - $field_value = $user_vars['data']->$field; - } - if ( empty( $field_value ) ) { - $field_value = get_user_meta( $user_id, $field, true ); - } - $values[ $field ] = $field_value; - } - return $values; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/contextual-help.php b/wp/wp-content/plugins/relevanssi-premium/premium/contextual-help.php deleted file mode 100644 index 1e47e9ad..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/contextual-help.php +++ /dev/null @@ -1,103 +0,0 @@ -add_help_tab( - array( - 'id' => 'relevanssi-boolean', - 'title' => __( 'Boolean operators', 'relevanssi' ), - 'content' => '
      ' . - '
    • ' . __( 'Relevanssi Premium offers limited support for Boolean logic. In addition of setting the default operator from Relevanssi settings, you can use AND and NOT operators in searches.', 'relevanssi' ) . '
    • ' . - '
    • ' . __( 'To use the NOT operator, prefix the search term with a minus sign:', 'relevanssi' ) . - sprintf( '
      %s
      ', __( 'cats -dogs', 'relevanssi' ) ) . - __( "This would only show posts that have the word 'cats' but not the word 'dogs'.", 'relevanssi' ) . '
    • ' . - '
    • ' . __( 'To use the AND operator, set the default operator to OR and prefix the search term with a plus sign:', 'relevanssi' ) . - sprintf( '
      %s
      ', __( '+cats dogs mice', 'relevanssi' ) ) . - __( "This would show posts that have the word 'cats' and either 'dogs' or 'mice' or both, and would prioritize posts that have all three.", 'relevanssi' ) . '
    • ' . - '
    ', - ) - ); - - /* Translators: first placeholder is the_permalink(), the second is relevanssi_the_permalink() */ - $permalinks_to_users = sprintf( esc_html__( "Permalinks to user profiles may not always work on search results templates. %1\$s should work, but if it doesn't, you can replace it with %2\$s.", 'relevanssi' ), 'the_permalink()', 'relevanssi_the_permalink()' ); - /* Translators: the placeholder is the name of the relevanssi_index_user_fields option */ - $index_user_fields = sprintf( esc_html__( 'To control which user meta fields are indexed, you can use the %s option. It should have a comma-separated list of user meta fields. It can be set like this (you only need to run this code once):', 'relevanssi' ), 'relevanssi_index_user_fields' ); - /* Translators: the first placeholder opens the link, the second closes the link */ - $knowledge_base = sprintf( esc_html__( 'For more details on user profiles and search results templates, see %1$sthis knowledge base entry%2$s.', 'relevanssi' ), "", '' ); - - $screen->add_help_tab( - array( - 'id' => 'relevanssi-title-user-profiles', - 'title' => __( 'User profiles', 'relevanssi' ), - 'content' => '
      ' . - "
    • $permalinks_to_users
    • " . - "
    • $index_user_fields" . - "
      update_option( 'relevanssi_index_user_fields', 'field_a,field_b,field_c' );
    • " . - "
    • $knowledge_base
    • " . - '
    ', - ) - ); - $screen->add_help_tab( - array( - 'id' => 'relevanssi-internal-links', - 'title' => __( 'Internal links', 'relevanssi' ), - 'content' => '
      ' . - '
    • ' . __( 'This option sets how Relevanssi handles internal links that point to your own site.', 'relevanssi' ) . '
    • ' . - '
    • ' . __( "If you choose 'No special processing', Relevanssi doesn’t care about links and indexes the link anchor (the text of the link) like it is any other text.", 'relevanssi' ) . '
    • ' . - '
    • ' . __( "If you choose 'Index internal links for target documents only', then the link is indexed like the link anchor text were the part of the link target, not the post where the link is.", 'relevanssi' ) . '
    • ' . - '
    • ' . __( "If you choose 'Index internal links for target and source', the link anchor text will count for both posts.", 'relevanssi' ) . '
    • ' . - '
    ', - ) - ); - $screen->add_help_tab( - array( - 'id' => 'relevanssi-stemming', - 'title' => __( 'Stemming', 'relevanssi' ), - 'content' => '
      ' . - '
    • ' . __( "By default Relevanssi doesn't understand anything about singular word forms, plurals or anything else. You can, however, add a stemmer that will stem all the words to their basic form, making all different forms equal in searching.", 'relevanssi' ) . '
    • ' . - '
    • ' . __( 'To enable the English-language stemmer, add this to the theme functions.php:', 'relevanssi' ) . - "
      add_filter( 'relevanssi_stemmer', 'relevanssi_simple_english_stemmer' );
      " . '
    • ' . - '
    • ' . __( 'After you add the code, rebuild the index to get correct results.', 'relevanssi' ) . '
    • ' . - '
    ', - ) - ); - - /* Translators: the placeholder has the WP CLI command */ - $wp_cli_command = sprintf( esc_html__( 'If you have WP CLI installed, Relevanssi Premium has some helpful commands. Use %s to get a list of available commands.', 'relevanssi' ), 'wp help relevanssi' ); - /* Translators: the first placeholder opens the link, the second closes the link */ - $wp_cli_manual = sprintf( esc_html__( 'You can also see %1$sthe user manual page%2$s.', 'relevanssi' ), "", '' ); - - $screen->add_help_tab( - array( - 'id' => 'relevanssi-wpcli', - 'title' => __( 'WP CLI', 'relevanssi' ), - 'content' => "
      -
    • $wp_cli_command
    • -
    • $wp_cli_manual
    • -
    ", - ) - ); - - $screen->set_help_sidebar( - '

    ' . __( 'For more information:', 'relevanssi' ) . '

    ' . - '

    ' . __( 'Plugin support page', 'relevanssi' ) . '

    ' . - '

    ' . __( 'WordPress.org forum', 'relevanssi' ) . '

    ' . - '

    Support email

    ' . - '

    ' . __( 'Plugin knowledge base', 'relevanssi' ) . '

    ' - ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/excerpts-highlights.php b/wp/wp-content/plugins/relevanssi-premium/premium/excerpts-highlights.php deleted file mode 100644 index cd06ce55..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/excerpts-highlights.php +++ /dev/null @@ -1,206 +0,0 @@ - 0, adds the excerpt to the list - * of excerpts. To avoid overlapping excerpts, similarity is calculated against - * other excerpts and only those excerpts with a similarity percentage of less - * than 50 are accepted. - * - * @param array $terms An array of relevant words. - * @param string $content The source text. - * @param int $excerpt_length The length of the excerpt, default 30 words. - * - * @return array An array of excerpts. In each excerpt, there are following - * parts: 'text' has the excerpt text, 'hits' the number of keyword matches in - * the excerpt, 'start' is true if the excerpt is from the beginning of the - * content. - */ -function relevanssi_extract_multiple_excerpts( $terms, $content, $excerpt_length = 30 ) { - if ( $excerpt_length < 1 ) { - return array( '', 0, false ); - } - - $words = array_filter( explode( ' ', $content ) ); - $offset = 0; - $tries = 0; - $count_words = count( $words ); - $start = false; - $gap = 0; - - $excerpts = array(); - - $excerpt_candidates = $count_words / $excerpt_length; - if ( $excerpt_candidates > 200 ) { - /** - * Adjusts the gap between excerpt candidates. - * - * The default value for the gap is number of words / 200 minus the - * excerpt length, which means Relevanssi tries to create 200 excerpts. - * - * @param int The gap between excerpt candidates. - * @param int $count_words The number of words in the content. - * @param int $excerpt_length The length of the excerpt. - */ - $gap = apply_filters( - 'relevanssi_excerpt_gap', - floor( $count_words / 200 - $excerpt_length ), - $count_words, - $excerpt_length - ); - } - - while ( $offset < $count_words ) { - if ( $offset + $excerpt_length > $count_words ) { - $offset = $count_words - $excerpt_length; - if ( $offset < 0 ) { - $offset = 0; - } - } - $excerpt_slice = array_slice( $words, $offset, $excerpt_length ); - $excerpt_slice = ' ' . implode( ' ', $excerpt_slice ); - $count_matches = relevanssi_count_matches( $terms, $excerpt_slice ); - if ( $count_matches > 0 ) { - if ( 0 === $offset ) { - $start = true; - } else { - $start = false; - } - - $similarity = 0; - array_walk( - $excerpts, - function ( $item ) use ( &$similarity, $excerpt_slice ) { - similar_text( $item['text'], $excerpt_slice, $percentage ); - if ( $percentage > $similarity ) { - $similarity = $percentage; - } - } - ); - if ( $similarity < 50 ) { - $excerpt = array( - 'hits' => $count_matches, - 'text' => trim( $excerpt_slice ), - 'start' => $start, - ); - $excerpts[] = $excerpt; - } - } - $tries++; - - /** - * Enables the excerpt optimization. - * - * If your posts are very long, building excerpts can be really slow. - * To speed up the process, you can enable optimization, which means - * Relevanssi only creates 50 excerpt candidates. - * - * @param boolean Return true to enable optimization, default false. - */ - if ( apply_filters( 'relevanssi_optimize_excerpts', false ) ) { - if ( $tries > 50 ) { - // An optimization trick: try only 50 times. - break; - } - } - - $offset += $excerpt_length + $gap; - } - - if ( empty( $excerpts ) && $gap > 0 ) { - $result = relevanssi_get_first_match( $words, $terms, $excerpt_length ); - - if ( ! empty( $result['excerpt'] ) ) { - $excerpts[] = array( - 'text' => $result['excerpt'], - 'hits' => $result['best_excerpt_term_hits'], - 'start' => $result['start'], - ); - } - } - - if ( empty( $excerpts ) ) { - /** - * Nothing found, take the beginning of the post. +2, because the first - * index is an empty space and the last index is the rest of the post. - */ - $words = explode( ' ', $content, $excerpt_length + 2 ); - array_pop( $words ); - $text = implode( ' ', $words ); - $excerpt = array( - 'text' => $text, - 'hits' => 0, - 'start' => true, - ); - $excerpts[] = $excerpt; - } - - return $excerpts; -} - -/** - * Adds the "source" attribute to the excerpts in the array. - * - * @param array $excerpts The excerpts array, passed as a reference. - * @param string $source The source value to add to the excerpts. - */ -function relevanssi_add_source_to_excerpts( &$excerpts, $source ) { - if ( ! is_array( $excerpts ) ) { - return; - } - array_walk( - $excerpts, - function( &$item ) use ( $source ) { - $item['source'] = $source; - } - ); -} - -/** - * Combines multiple arrays of excerpts together, sorts them and slices them. - * - * Returns a slice with the n excerpts with most term hits. - * - * @param int $post_id The current post ID. - * @param array ...$excerpt_sources Arrays containing excerpts. - * - * @return array An array containing the n best excerpts. - */ -function relevanssi_combine_excerpts( $post_id, ...$excerpt_sources ) { - $excerpts = array_merge( ...$excerpt_sources ); - usort( - $excerpts, - function( $a, $b ) { - return $b['hits'] - $a['hits']; - } - ); - $number_of_excerpts = get_option( 'relevanssi_max_excerpts', 1 ); - - $excerpts = array_slice( - /** - * Filters the excerpt. - * - * Filters the post excerpts generated by Relevanssi before the - * highlighting is applied. - * - * @param array $excerpt An array of excerpts. - * @param int $post->ID The post ID. - */ - apply_filters( 'relevanssi_excerpts', $excerpts, $post_id ), - 0, - $number_of_excerpts - ); - - return $excerpts; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar.php b/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar.php deleted file mode 100644 index dff4d85b..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar.php +++ /dev/null @@ -1,393 +0,0 @@ - '_relevanssi_hide_post', - 'description' => 'Hide this post', - ), - array( - 'meta_key' => '_relevanssi_hide_content', - 'description' => 'Hide post content', - ), - array( - 'meta_key' => '_relevanssi_pin_for_all', - 'description' => 'Pin for all searches', - ), - array( - 'meta_key' => '_relevanssi_pin_keywords', - 'description' => 'Pin for these keywords', - ), - array( - 'meta_key' => '_relevanssi_unpin_keywords', - 'description' => 'Block for these keywords', - ), - array( - 'meta_key' => '_relevanssi_related_keywords', - 'description' => 'Keywords for related posts searches', - ), - array( - 'meta_key' => '_relevanssi_related_include_ids', - 'description' => 'Post IDs for included related posts', - ), - array( - 'meta_key' => '_relevanssi_related_exclude_ids', - 'description' => 'Post IDs for excluded related posts', - ), - array( - 'meta_key' => '_relevanssi_related_no_append', - 'description' => "Don't append related posts to this post", - ), - array( - 'meta_key' => '_relevanssi_related_not_related', - 'description' => 'Disable related posts for this post', - ), - array( - 'meta_key' => '_relevanssi_related_posts', - 'description' => 'Related posts for this post', - ), - array( - 'meta_key' => '_relevanssi_noindex_reason', - 'description' => 'Reason this post is not indexed', - ), - ); - - foreach ( $relevanssi_meta_fields as $meta_field ) { - register_meta( - 'post', - $meta_field['meta_key'], - array( - 'type' => 'string', - 'description' => $meta_field['description'], - 'single' => true, - 'show_in_rest' => true, - 'auth_callback' => '__return_true', - ) - ); - } -} - -/** - * Registers the Gutenberg sidebar script. - * - * Registers the Gutenberg sidebar script, exact version depending on whether - * the RELEVANSSI_DEVELOP constant is set or not, includes the dependencies and - * the translations. - * - * @since 2.5.0 - */ -function relevanssi_register_gutenberg_script() { - global $relevanssi_variables; - - if ( ! function_exists( 'wp_set_script_translations' ) ) { - return; - } - - global $post; - if ( ! $post ) { - return; - } - if ( $post && ! post_type_supports( $post->post_type, 'custom-fields' ) ) { - return; - } - - if ( ! current_user_can( - /** - * Filters the capability required to access the Relevanssi sidebar. - * - * @param string The capability required, default 'edit_others_posts'. - */ - apply_filters( 'relevanssi_sidebar_capability', $relevanssi_variables['sidebar_capability'] ) - ) - ) { - return; - } - - $file_location = 'premium/gutenberg-sidebar/'; - if ( RELEVANSSI_DEVELOP ) { - $file_location = 'build/'; - } - wp_register_script( - 'relevanssi-sidebar', - plugin_dir_url( $relevanssi_variables['plugin_basename'] ) . $file_location . 'index.js', - array( 'wp-api-fetch', 'wp-i18n', 'wp-blocks', 'wp-edit-post', 'wp-element', 'wp-editor', 'wp-components', 'wp-data', 'wp-plugins', 'wp-edit-post' ), - 1, - true - ); - wp_set_script_translations( 'relevanssi-sidebar', 'relevanssi', $relevanssi_variables['plugin_dir'] . 'languages' ); -} - -/** - * Enqueues the Gutenberg sidebar script. - * - * @since 2.5.0 - */ -function relevanssi_block_editor_assets() { - relevanssi_register_gutenberg_script(); - wp_enqueue_script( 'relevanssi-sidebar' ); -} - -/** - * Adds a REST API endpoint for "How Relevanssi sees this post". - * - * Takes in a post ID and returns the "How Relevanssi sees this post" data for - * that post. - * - * @param array $data The post ID in $data['id']. - * - * @return array The indexed terms for various parts of the post in an - * associative array. - * - * @uses relevanssi_fetch_sees_data() - * - * @since 2.5.0 - */ -function relevanssi_sees_post_endpoint( $data ) { - return relevanssi_fetch_sees_data( $data['id'] ); -} - -/** - * Adds a REST API endpoint for listing the related posts. - * - * @param array $data The post ID in $data['id']. - * - * @return array The related posts in an array format (id, URL and title). - * - * @since 2.5.0 - */ -function relevanssi_list_related_posts_endpoint( $data ) { - return relevanssi_generate_related_list( $data['id'], 'ARRAY' ); -} - -/** - * Adds a REST API endpoint for listing the excluded related posts. - * - * @param array $data The post ID in $data['id']. - * - * @return array The excluded posts in an array format (id, URL and title). - * - * @since 2.5.0 - */ -function relevanssi_list_excluded_posts_endpoint( $data ) { - return relevanssi_generate_excluded_list( $data['id'], 'ARRAY' ); -} - -/** - * Adds a REST API endpoint for excluding a post from related posts. - * - * @param array $data The post ID in $data['post_id'], the ID of the post to - * exclude in $data['exclude']. - * - * @return array The excluded posts in an array format (id, URL and title). - * - * @since 2.5.0 - */ -function relevanssi_exclude_related_post_endpoint( $data ) { - relevanssi_exclude_a_related_post( $data['post_id'], $data['exclude'] ); - return relevanssi_generate_excluded_list( $data['post_id'], 'ARRAY' ); -} - -/** - * Adds a REST API endpoint for unexcluding a post from related posts. - * - * @param array $data The post ID in $data['post_id'], the ID of the post to - * return in $data['return']. - * - * @return array The excluded posts in an array format (id, URL and title). - * - * @since 2.5.0 - */ -function relevanssi_unexclude_related_post_endpoint( $data ) { - relevanssi_unexclude_a_related_post( $data['post_id'], $data['return'] ); - return relevanssi_generate_excluded_list( $data['post_id'], 'ARRAY' ); -} - -/** - * Adds a REST API endpoint for regenerating the related posts list. - * - * This is triggered when either the keywords or the post ID list for the - * related posts is changed. This will get the key and the value of the changed - * meta field as a parameter and will either empty or update the meta field and - * then trigger related posts list regeneration. - * - * @param array $data The post ID in $data['id'], the meta key name in - * $data['meta_key'] and the new value in $data['meta_value']. - * - * @return array The related posts in an array format (id, URL and title). - * - * @since 2.5.0 - */ -function relevanssi_regenerate_related_endpoint( $data ) { - if ( 0 === $data['meta_value'] ) { - delete_post_meta( $data['id'], $data['meta_key'] ); - } else { - update_post_meta( $data['id'], $data['meta_key'], $data['meta_value'] ); - } - delete_post_meta( $data['id'], '_relevanssi_related_posts' ); - return relevanssi_generate_related_list( $data['id'], 'ARRAY' ); -} - -/** - * Adds a REST API endpoint for listing common search terms. - * - * @param array $data The post ID in $data['id']. - * - * @return array The common terms in an array format (id, query, and count). - * - * @since 2.5.0 - */ -function relevanssi_list_insights_common_terms( $data ) { - return relevanssi_generate_tracking_insights_most_common( $data['id'], 'ARRAY' ); -} - -/** - * Adds a REST API endpoint for listing low-ranking search terms. - * - * @param array $data The post ID in $data['id']. - * - * @return array The terms in an array format (id, query, rank). - * - * @since 2.5.0 - */ -function relevanssi_list_insights_low_ranking_terms( $data ) { - return relevanssi_generate_tracking_insights_low_ranking( $data['id'], 'ARRAY' ); -} - -/** - * Registers the REST API endpoints. - * - * @see register_rest_route() - * - * @since 2.5.0 - */ -function relevanssi_register_gutenberg_rest_routes() { - $routes = array( - array( - 'path' => '/excluderelatedpost/(?P\d+)/(?P\d+)', - 'callback' => 'relevanssi_exclude_related_post_endpoint', - 'args' => array( - 'exclude' => 'numeric', - 'post_id' => 'numeric', - ), - ), - array( - 'path' => '/unexcluderelatedpost/(?P\d+)/(?P\d+)', - 'callback' => 'relevanssi_unexclude_related_post_endpoint', - 'args' => array( - 'return' => 'numeric', - 'post_id' => 'numeric', - ), - ), - array( - 'path' => '/listexcluded/(?P\d+)', - 'callback' => 'relevanssi_list_excluded_posts_endpoint', - 'args' => array( - 'id' => 'numeric', - ), - ), - array( - 'path' => '/listrelated/(?P\d+)', - 'callback' => 'relevanssi_list_related_posts_endpoint', - 'args' => array( - 'id' => 'numeric', - ), - ), - array( - 'path' => '/sees/(?P\d+)', - 'callback' => 'relevanssi_sees_post_endpoint', - 'args' => array( - 'id' => 'numeric', - ), - ), - array( - 'path' => '/regeneraterelatedposts/(?P\d+)/(?P\w+)/(?P[^/]+)', - 'callback' => 'relevanssi_regenerate_related_endpoint', - 'args' => array( - 'id' => 'numeric', - 'meta_key' => 'metakey', - 'meta_value' => 'urldecode', - ), - ), - array( - 'path' => '/listinsightscommon/(?P\d+)', - 'callback' => 'relevanssi_list_insights_common_terms', - 'args' => array( - 'id' => 'numeric', - ), - ), - array( - 'path' => '/listinsightslowranking/(?P\d+)', - 'callback' => 'relevanssi_list_insights_low_ranking_terms', - 'args' => array( - 'id' => 'numeric', - ), - ), - ); - - foreach ( $routes as $route ) { - $args = array(); - foreach ( $route['args'] as $name => $type ) { - switch ( $type ) { - case 'metakey': - $args[ $name ] = array( - 'validate_callback' => function( $param, $request, $key ) { - return in_array( $param, array( '_relevanssi_related_keywords', '_relevanssi_related_include_ids' ), true ); - }, - ); - break; - case 'urldecode': - $args[ $name ] = array( - 'sanitize_callback' => function( $param, $request, $key ) { - return urldecode( $param ); - }, - ); - break; - case 'numeric': - default: - $args[ $name ] = array( - 'validate_callback' => function( $param, $request, $key ) { - return is_numeric( $param ); - }, - ); - } - } - - register_rest_route( - 'relevanssi/v1', - $route['path'], - array( - 'methods' => 'GET', - 'callback' => $route['callback'], - 'args' => $args, - 'permission_callback' => function () { - global $relevanssi_variables; - // Filter documented in /premium/gutenberg-sidebar.php. - return current_user_can( apply_filters( 'relevanssi_sidebar_capability', $relevanssi_variables['sidebar_capability'] ) ); - }, - ) - ); - } -} - diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.asset.php b/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.asset.php deleted file mode 100644 index 88eeb121..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '3cf891ee5aaa21141e30e23ad95d485e'); \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.js b/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.js deleted file mode 100644 index 0933fb81..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/gutenberg-sidebar/index.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var r=n(18),o=n(19),l=n(20),c=n(22);e.exports=function(e,t){return r(e)||o(e,t)||l(e,t)||c()}},function(e,t){e.exports=window.wp.data},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=window.wp.editPost},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","import {\n\tPanel,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n\tTextareaControl,\n\tCheckboxControl,\n\tButton,\n\twithFocusOutside,\n} from \"@wordpress/components\"\nimport { registerPlugin } from \"@wordpress/plugins\"\nimport { PluginSidebar, PluginSidebarMoreMenuItem } from \"@wordpress/edit-post\"\nimport { __ } from \"@wordpress/i18n\"\nimport { select, withSelect, withDispatch } from \"@wordpress/data\"\nimport { compose } from \"@wordpress/compose\"\nimport { useState, useEffect } from \"@wordpress/element\"\n\nconst relevanssiIcon = wp.element.createElement(\n\t\"svg\",\n\t{\n\t\twidth: 20,\n\t\theight: 20,\n\t},\n\twp.element.createElement(\"path\", {\n\t\td:\n\t\t\t\"M5.644 20.665 C6.207 20.545 6.612 20.029 6.574 19.438 6.469 17.784 6.492 16.554 6.617 15.602 L7.388 19.228 C7.454 19.538 7.576 19.815 7.737 20.058 7.742 20.12 7.749 20.181 7.763 20.243 L8.444 23.384 C10.112 23.233 11.311 22.775 11.214 23.077 L10.82 21.227 C10.875 21.218 10.929 21.211 10.984 21.199 10.995 21.197 11.004 21.193 11.015 21.191 L11.35 22.766 C11.571 22.305 13.613 22.092 14.187 21.891 L13.42 19.11 C13.529 18.742 13.553 18.346 13.466 17.936 L12.445 13.134 C12.535 13.088 12.62 13.03 12.698 12.959 12.737 12.929 12.786 12.899 12.84 12.864 13.25 12.596 14.097 12.042 14.433 10.839 L20.429 12.98 C20.642 13.056 20.862 13.067 21.069 13.023 21.456 12.941 21.792 12.667 21.934 12.267 22.154 11.655 21.835 10.981 21.222 10.763 L14.393 8.324 C14.385 8.291 14.379 8.26 14.37 8.226 14.212 7.595 13.573 7.212 12.94 7.372 12.887 7.385 12.838 7.402 12.789 7.422 12.873 6.845 12.859 6.245 12.731 5.643 12.145 2.884 9.422 1.118 6.661 1.705 3.901 2.292 2.132 5.012 2.718 7.771 3.304 10.529 6.027 12.295 8.788 11.708 10.041 11.442 11.088 10.735 11.805 9.786 11.917 9.894 12.05 9.981 12.203 10.04 12.148 10.37 11.997 10.56 11.811 10.71 10.72 11.467 10.238 11.826 9.318 12.07 L8.678 12.167 C7.581 12.344 6.407 12.307 5.457 11.871 4.141 13.689 3.972 15.683 4.221 19.589 4.263 20.238 4.823 20.73 5.473 20.688 5.531 20.685 5.589 20.677 5.644 20.665 Z M8.568 10.67 C6.38 11.135 4.222 9.735 3.758 7.55 3.293 5.364 4.695 3.208 6.883 2.743 9.07 2.278 11.229 3.677 11.693 5.863 12.158 8.049 10.755 10.205 8.568 10.67 Z\",\n\t}),\n\twp.element.createElement(\"path\", {\n\t\td:\n\t\t\t\"M8.009 5.745 C7.25 5.906 6.576 5.754 6.502 5.406 6.496 5.377 6.496 5.348 6.498 5.318 6.012 5.752 5.765 6.429 5.911 7.115 6.127 8.132 7.122 8.783 8.132 8.568 9.142 8.353 9.786 7.354 9.57 6.338 9.483 5.928 9.269 5.58 8.98 5.323 8.755 5.503 8.411 5.66 8.009 5.745 Z\",\n\t})\n)\n\nconst { Fragment } = wp.element\n\nregisterPlugin(\"relevanssi-premium\", {\n\trender: function () {\n\t\tconst [relevanssiSees, setRelevanssiSees] = useState([])\n\t\tconst [relevanssiRelated, setRelevanssiRelated] = useState([])\n\t\tconst [relevanssiExcluded, setRelevanssiExcluded] = useState([])\n\t\tconst [relevanssiExcludedIds, setRelevanssiExcludedIds] = useState([])\n\n\t\tconst regenerateRelatedPosts = (postId, metaKey, metaValue) => {\n\t\t\tif (!metaValue) metaValue = \"0\"\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/regeneraterelatedposts/${postId}/${metaKey}/${metaValue}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiRelated(createRelatedList(data))\n\t\t\t})\n\t\t}\n\n\t\tconst RelatedPostControl = withFocusOutside(\n\t\t\tclass extends React.Component {\n\t\t\t\thandleFocusOutside() {\n\t\t\t\t\tregenerateRelatedPosts(\n\t\t\t\t\t\twp.data.select(\"core/editor\").getCurrentPostId(),\n\t\t\t\t\t\tthis.props.metaKey,\n\t\t\t\t\t\twp.data.select(\"core/editor\").getEditedPostAttribute(\"meta\")[\n\t\t\t\t\t\t\tthis.props.metaKey\n\t\t\t\t\t\t]\n\t\t\t\t\t)\n\t\t\t\t}\n\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\n\t\tconst MetaControl = compose(\n\t\t\twithDispatch((dispatch, props) => {\n\t\t\t\treturn {\n\t\t\t\t\tsetMetaValue: function (metaValue) {\n\t\t\t\t\t\tdispatch(\"core/editor\").editPost({\n\t\t\t\t\t\t\tmeta: { [props.metaKey]: metaValue },\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}),\n\t\t\twithSelect((select, props) => {\n\t\t\t\tlet metaValue = select(\"core/editor\").getEditedPostAttribute(\"meta\")[\n\t\t\t\t\tprops.metaKey\n\t\t\t\t]\n\t\t\t\tif (metaValue === \"0\") metaValue = \"\"\n\t\t\t\treturn {\n\t\t\t\t\tmetaValue,\n\t\t\t\t}\n\t\t\t})\n\t\t)((props) => {\n\t\t\tlet args = {\n\t\t\t\tlabel: props.title,\n\t\t\t\tvalue: props.metaValue,\n\t\t\t\tonChange: function (content) {\n\t\t\t\t\tprops.setMetaValue(content)\n\t\t\t\t},\n\t\t\t}\n\t\t\tif (props.control == CheckboxControl) {\n\t\t\t\tconst checked = props.metaValue == \"on\" ? true : false\n\t\t\t\targs.value = \"\"\n\t\t\t\targs.checked = checked\n\t\t\t\targs.onChange = function (content) {\n\t\t\t\t\tcontent = content ? \"on\" : \"off\"\n\t\t\t\t\tprops.setMetaValue(content)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn wp.element.createElement(props.control, args)\n\t\t})\n\n\t\tconst excludeRelatedPost = (excludedPostId, postId) => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/excluderelatedpost/${excludedPostId}/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiExcludedIds(data)\n\t\t\t})\n\t\t}\n\n\t\tconst unExcludeRelatedPost = (excludedPostId, postId) => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/unexcluderelatedpost/${excludedPostId}/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiExcludedIds(data)\n\t\t\t})\n\t\t}\n\n\t\tconst postId = select(\"core/editor\").getCurrentPostId()\n\t\tuseEffect(() => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/sees/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiSees(data)\n\t\t\t})\n\t\t}, [postId])\n\n\t\t/*\n\n\n\t\t\t\t\t\t\t*/\n\n\t\tconst createRelatedList = (data) => {\n\t\t\treturn data.map((row) => {\n\t\t\t\treturn (\n\t\t\t\t\t
  • \n\t\t\t\t\t\t{row.title}{\" \"}\n\t\t\t\t\t\t\n\t\t\t\t\t
  • \n\t\t\t\t)\n\t\t\t})\n\t\t}\n\t\tuseEffect(() => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/listrelated/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tsetRelevanssiRelated(createRelatedList(data))\n\t\t\t})\n\t\t}, [postId, relevanssiExcludedIds])\n\n\t\tuseEffect(() => {\n\t\t\twp.apiFetch({\n\t\t\t\tpath: `/relevanssi/v1/listexcluded/${postId}`,\n\t\t\t}).then((data) => {\n\t\t\t\tconst list = data.map((row) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t{row.title}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
  • \n\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\tsetRelevanssiExcluded(list)\n\t\t\t})\n\t\t}, [postId, relevanssiExcludedIds])\n\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tRelevanssi Premium\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{relevanssiSees.title && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Title:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.title}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.content && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Content:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.content}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.author && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Author:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.author}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.category && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Categories:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.category}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.tag && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Tags:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.tag}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.taxonomy && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Other taxonomies:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.taxonomy}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.comment && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Comments:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.comment}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.customfield && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Custom fields:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.customfield}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.excerpt && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Excerpt:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.excerpt}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.link && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"Links to this post:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.link}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.mysql && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t{__(\"MySQL columns:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.mysql}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{relevanssiSees.reason && (\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{__(\"Reason this post is not indexed:\", \"relevanssi\")}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\t\t{relevanssiSees.reason}\n\t\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t

    {__(\"Related posts for this post:\", \"relevanssi\")}

    \n\t\t\t\t\t\t\t
      {relevanssiRelated}
    \n\n\t\t\t\t\t\t\t

    {__(\"Excluded posts for this post:\", \"relevanssi\")}

    \n\t\t\t\t\t\t\t
      {relevanssiExcluded}
    \n\t\t\t\t\t\t\n\t\t\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t)\n\t},\n})\n","(function() { module.exports = window[\"wp\"][\"components\"]; }());","(function() { module.exports = window[\"wp\"][\"compose\"]; }());","(function() { module.exports = window[\"wp\"][\"data\"]; }());","(function() { module.exports = window[\"wp\"][\"editPost\"]; }());","(function() { module.exports = window[\"wp\"][\"element\"]; }());","(function() { module.exports = window[\"wp\"][\"i18n\"]; }());","(function() { module.exports = window[\"wp\"][\"plugins\"]; }());"],"sourceRoot":""} \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/indexing.php b/wp/wp-content/plugins/relevanssi-premium/premium/indexing.php deleted file mode 100644 index 32dca435..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/indexing.php +++ /dev/null @@ -1,1813 +0,0 @@ -ID ); - } - } -} - -/** - * Indexes taxonomy terms when term is updated. - * - * @param string $term The term. - * @param int $taxonomy_term_id The term taxonomy ID (not used here). - * @param string $taxonomy The taxonomy. - */ -function relevanssi_edit_term( $term, $taxonomy_term_id, $taxonomy ) { - $update = true; - relevanssi_do_term_indexing( $term, $taxonomy, $update ); -} - -/** - * Indexes taxonomy terms when term is added. - * - * @param string $term The term. - * @param int $taxonomy_term_id The term taxonomy ID (not used here). - * @param string $taxonomy The taxonomy. - */ -function relevanssi_add_term( $term, $taxonomy_term_id, $taxonomy ) { - $update = false; - relevanssi_do_term_indexing( $term, $taxonomy, $update ); -} - -/** - * Indexes taxonomy term, if taxonomy term indexing is enabled. - * - * @param string $term The term. - * @param string $taxonomy The taxonomy. - * @param boolean $update If true, term is updated; if false, it is added. - */ -function relevanssi_do_term_indexing( $term, $taxonomy, $update ) { - if ( 'on' === get_option( 'relevanssi_index_taxonomies' ) ) { - $taxonomies = get_option( 'relevanssi_index_terms' ); - if ( in_array( $taxonomy, $taxonomies, true ) ) { - relevanssi_index_taxonomy_term( $term, $taxonomy, $update ); - } - } -} - -/** - * Deletes an user from Relevanssi index. - * - * Deletes an user from the Relevanssi index. Attached to the 'delete_user' action. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param int $user User ID to delete. - */ -function relevanssi_delete_user( int $user ) { - global $wpdb, $relevanssi_variables; - $user = intval( $user ); - $wpdb->query( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . " WHERE item = $user AND type = 'user'" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared -} - -/** - * Deletes a taxonomy term from Relevanssi index. - * - * Deletes a taxonomy term from the Relevanssi index. Attached to the 'delete_term' action. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param int $term Term ID to remove. - * @param int $term_taxonomy_id Term taxonomy ID (not used). - * @param string $taxonomy The taxonomy. - */ -function relevanssi_delete_taxonomy_term( $term, $term_taxonomy_id, $taxonomy ) { - global $wpdb, $relevanssi_variables; - $wpdb->query( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . " WHERE item = $term AND type = '$taxonomy'" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared -} - -/** - * Generates the custom field detail field for indexing. - * - * Premium stores more detail about custom field indexing. This function - * generates the custom field detail. - * - * @param array $insert_data Data used to generate the INSERT queries. - * @param string $token The indexed token. - * @param int $count The number of matches. - * @param string $field Name of the custom field. - * - * @return array $insert_data New source data for the INSERT queries added. - */ -function relevanssi_customfield_detail( $insert_data, $token, $count, $field ) { - if ( isset( $insert_data[ $token ]['customfield_detail'] ) ) { - // Custom field detail for this token already exists. - $custom_field_detail = json_decode( $insert_data[ $token ]['customfield_detail'], true ); - } else { - // Nothing yet, create new. - $custom_field_detail = array(); - } - - relevanssi_increase_value( $custom_field_detail[ $field ], $count ); - - $insert_data[ $token ]['customfield_detail'] = wp_json_encode( $custom_field_detail ); - return $insert_data; -} - -/** - * Indexes custom MySQL column content. - * - * Generates the INSERT query base data for MySQL column content. - * - * @global $wpdb The WordPress database interface. - * - * @param array $insert_data Data used to generate the INSERT queries. - * @param string $post_id Post ID. - * - * @return array $insert_data New source data for the INSERT queries added. - */ -function relevanssi_index_mysql_columns( $insert_data, $post_id ) { - $custom_columns = get_option( 'relevanssi_mysql_columns' ); - if ( ! empty( $custom_columns ) ) { - global $wpdb; - - // Get a list of possible column names. - $column_list = wp_cache_get( 'relevanssi_column_list' ); - if ( false === $column_list ) { - $column_list = $wpdb->get_results( "SHOW COLUMNS FROM $wpdb->posts" ); - wp_cache_set( 'relevanssi_column_list', $column_list ); - } - $valid_columns = array(); - foreach ( $column_list as $column ) { - array_push( $valid_columns, $column->Field ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - } - - // This is to remove problems where the list ends in a comma. - $custom_column_array = explode( ',', $custom_columns ); - $custom_column_list_array = array(); - foreach ( $custom_column_array as $column ) { - $column = trim( $column ); - if ( in_array( $column, $valid_columns, true ) ) { - $custom_column_list_array[] = $column; - } - } - $custom_column_list = implode( ', ', $custom_column_list_array ); - - $custom_column_data = $wpdb->get_row( "SELECT $custom_column_list FROM $wpdb->posts WHERE ID=$post_id", ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $remove_stopwords = true; - $minimum_word_length = get_option( 'relevanssi_min_word_length', 3 ); - if ( is_array( $custom_column_data ) ) { - foreach ( $custom_column_data as $column => $data ) { - /** This filter is documented in common/indexing.php */ - $data = apply_filters( - 'relevanssi_indexing_tokens', - relevanssi_tokenize( $data, $remove_stopwords, $minimum_word_length, 'indexing' ), - 'mysql-content' - ); - if ( count( $data ) > 0 ) { - foreach ( $data as $term => $count ) { - if ( isset( $insert_data[ $term ]['mysqlcolumn'] ) ) { - $insert_data[ $term ]['mysqlcolumn'] += $count; - } else { - $insert_data[ $term ]['mysqlcolumn'] = $count; - } - $insert_data = relevanssi_mysqlcolumn_detail( $insert_data, $term, $count, $column ); - } - } - } - } - } - return $insert_data; -} - -/** - * Generates the MySQL column detail field for indexing. - * - * This function generates the MySQL column detail. - * - * @param array $insert_data Data used to generate the INSERT queries. - * @param string $token The indexed token. - * @param int $count The number of matches. - * @param string $column Name of the column. - * - * @return array $insert_data New source data for the INSERT queries added. - */ -function relevanssi_mysqlcolumn_detail( $insert_data, $token, $count, $column ) { - if ( isset( $insert_data[ $token ]['mysqlcolumn_detail'] ) ) { - // Custom field detail for this token already exists. - $mysqlcolumn_detail = json_decode( $insert_data[ $token ]['mysqlcolumn_detail'], true ); - } else { - // Nothing yet, create new. - $mysqlcolumn_detail = array(); - } - - relevanssi_increase_value( $mysqlcolumn_detail[ $column ], $count ); - - $insert_data[ $token ]['mysqlcolumn_detail'] = wp_json_encode( $mysqlcolumn_detail ); - - return $insert_data; -} - -/** - * Processes internal links. - * - * Process the internal links the way user wants: no indexing, indexing, or stripping. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param string $contents Post content. - * @param int $post_id Post ID. - * - * @return string $contents Contents, modified. - */ -function relevanssi_process_internal_links( $contents, $post_id ) { - $internal_links_behaviour = get_option( 'relevanssi_internal_links', 'noindex' ); - - if ( 'noindex' !== $internal_links_behaviour ) { - global $relevanssi_variables, $wpdb; - $min_word_length = get_option( 'relevanssi_min_word_length', 3 ); - - // Index internal links. - $internal_links = relevanssi_get_internal_links( $contents ); - - if ( ! empty( $internal_links ) ) { - foreach ( $internal_links as $link => $text ) { - $link_id = url_to_postid( $link ); - if ( ! empty( $link_id ) ) { - /** This filter is documented in common/indexing.php */ - $link_words = apply_filters( 'relevanssi_indexing_tokens', relevanssi_tokenize( $text, true, $min_word_length, 'indexing' ), 'internal-links' ); - if ( count( $link_words ) > 0 ) { - foreach ( $link_words as $word => $count ) { - $wpdb->query( - $wpdb->prepare( - 'INSERT IGNORE INTO ' . $relevanssi_variables['relevanssi_table'] . ' (doc, term, term_reverse, link, item) VALUES (%d, %s, REVERSE(%s), %d, %d)', // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $link_id, - $word, - $word, - $count, - $post_id - ) - ); - } - } - } - } - - if ( 'strip' === $internal_links_behaviour ) { - $contents = relevanssi_strip_internal_links( $contents ); - } - } - } - - return $contents; -} - -/** - * Finds internal links. - * - * A function to find all internal links in the parameter text. - * - * @param string $text Text where the links are extracted from. - * - * @return array $links All links in the post, or false if fails. - */ -function relevanssi_get_internal_links( $text ) { - $links = array(); - if ( preg_match_all( '@]*?href="(' . home_url() . '[^"]*?)"[^>]*?>(.*?)@siu', $text, $m ) ) { - foreach ( $m[1] as $i => $link ) { - if ( ! isset( $links[ $link ] ) ) { - $links[ $link ] = ''; - } - $links[ $link ] .= ' ' . $m[2][ $i ]; - } - } - if ( preg_match_all( '@]*?href="(/[^"]*?)"[^>]*?>(.*?)@siu', $text, $m ) ) { - foreach ( $m[1] as $i => $link ) { - if ( ! isset( $links[ $link ] ) ) { - $links[ $link ] = ''; - } - $links[ $link ] .= ' ' . $m[2][ $i ]; - } - } - if ( count( $links ) > 0 ) { - return $links; - } - return false; -} - -/** - * Strips internal links. - * - * A function to strip all internal links from the parameter text. - * - * @param string $text Text where the links are extracted from. - * - * @return array $links The text without the links. - */ -function relevanssi_strip_internal_links( $text ) { - $text = preg_replace( - array( - '@]*?href="' . home_url() . '[^>]*?>.*?@siu', - ), - ' ', - $text - ); - $text = preg_replace( - array( - '@]*?href="/[^>]*?>.*?@siu', - ), - ' ', - $text - ); - return $text; -} - -/** - * Applies the thousands separator rule to text. - * - * Finds numbers separated by the chosen thousand separator and combine them. - * - * @param string $string The string to fix. - * - * @return string $string The fixed string. - */ -function relevanssi_apply_thousands_separator( $string ) { - $thousands_separator = get_option( 'relevanssi_thousand_separator', '' ); - if ( ! empty( $thousands_separator ) ) { - $pattern = '/(\d+)' . preg_quote( $thousands_separator, '/' ) . '(\d+)/u'; - $string = preg_replace( $pattern, '$1$2', $string ); - } - return $string; -} - -/** - * Adds a stemmer-enabling filter. - * - * This filter introduces a new filter hook that runs the stemmers. - * - * @param string $string The string that is stemmed. - * - * @return string $string The string after stemming. - */ -function relevanssi_enable_stemmer( $string ) { - /** - * Applies stemmer to document content and search terms. - * - * @param string $string The string that is stemmed. - * - * @return string $string The string after stemming. - */ - $string = apply_filters( 'relevanssi_stemmer', $string ); - return $string; -} - -/** - * Does simple English stemming. - * - * A simple suffix stripper that can be used to stem English texts. - * - * @param string $term Search term to stem. - * - * @return string $term The stemmed term. - */ -function relevanssi_simple_english_stemmer( $term ) { - $len = strlen( $term ); - - $end1 = substr( $term, -1, 1 ); - if ( 's' === $end1 && $len > 3 ) { - $term = substr( $term, 0, -1 ); - $len--; - } - $end = substr( $term, -3, 3 ); - - if ( 'ing' === $end && $len > 5 ) { - return substr( $term, 0, -3 ); - } - if ( 'est' === $end && $len > 5 ) { - return substr( $term, 0, -3 ); - } - - $end = substr( $end, 1 ); - if ( 'es' === $end && $len > 3 ) { - return substr( $term, 0, -2 ); - } - if ( 'ie' === $end && $len > 3 ) { - return substr( $term, 0, -1 ); - } - if ( 'ed' === $end && $len > 3 ) { - return substr( $term, 0, -2 ); - } - if ( 'en' === $end && $len > 3 ) { - return substr( $term, 0, -2 ); - } - if ( 'er' === $end && $len > 3 ) { - return substr( $term, 0, -2 ); - } - if ( 'ly' === $end && $len > 4 ) { - return substr( $term, 0, -2 ); - } - - $end = substr( $end, -1 ); - if ( 'y' === $end && $len > 3 ) { - return substr( $term, 0, -1 ) . 'i'; - } - - return $term; -} - -/** - * Creates the synonym replacement array. - * - * A helper function that generates a synonym replacement array. The array - * is then stored in a global variable, so that it only needs to generated - * once per running the script. - * - * @global $relevanssi_variables The global Relevanssi variables, used to - * store the synonym database. - */ -function relevanssi_create_synonym_replacement_array() { - global $relevanssi_variables; - - $synonym_data = get_option( 'relevanssi_synonyms' ); - $current_language = relevanssi_get_current_language(); - $synonyms = array(); - - if ( isset( $synonym_data[ $current_language ] ) ) { - $synonym_data = relevanssi_strtolower( $synonym_data[ $current_language ] ); - $pairs = explode( ';', $synonym_data ); - - foreach ( $pairs as $pair ) { - if ( empty( $pair ) ) { - continue; - } - $parts = explode( '=', $pair ); - $key = strval( trim( $parts[0] ) ); - $value = trim( $parts[1] ); - if ( ! isset( $synonyms[ $value ] ) ) { - $synonyms[ $value ] = "$value $key"; - } else { - $synonyms[ $value ] .= " $key"; - } - } - } - $relevanssi_variables['synonyms'] = $synonyms; -} - -/** - * Adds synonyms to post content and titles for indexing. - * - * In order to use synonyms in AND searches, the synonyms must be indexed within the posts. - * This function adds synonyms for post content and titles when indexing posts. - * - * @global $relevanssi_variables The global Relevanssi variables, used for the synonym database. - * - * @param array $tokens An array of tokens and their frequencies. - * - * @return array An array of filtered token-frequency pairs. - */ -function relevanssi_add_indexing_synonyms( $tokens ) { - global $relevanssi_variables; - - if ( ! isset( $relevanssi_variables['synonyms'] ) ) { - relevanssi_create_synonym_replacement_array(); - } - - $new_tokens = array(); - $synonyms = $relevanssi_variables['synonyms']; - - foreach ( $tokens as $token => $tf ) { - if ( isset( $synonyms[ $token ] ) ) { - $token_and_the_synonyms = explode( ' ', $synonyms[ $token ] ); - foreach ( $token_and_the_synonyms as $new_token ) { - $new_tokens[ $new_token ] = $tf; - } - } else { - $new_tokens[ $token ] = $tf; - } - } - - return $new_tokens; -} - -/** - * Adds synonyms to a content. - * - * @global $relevanssi_variables The global Relevanssi variables, used for the synonym database. - * - * @param string $content The content to add synonyms to. - * - * @return string $content The content with synonyms. - */ -function relevanssi_prepare_indexing_content( $content ) { - global $relevanssi_variables; - - if ( ! isset( $relevanssi_variables['synonyms'] ) ) { - relevanssi_create_synonym_replacement_array(); - } - - $synonyms = $relevanssi_variables['synonyms']; - $content = relevanssi_strtolower( $content ); - $content = preg_split( '/[\s,.()!?]/', $content ); - $ret = array(); - $len = count( $content ); - for ( $i = 0; $i < $len; ++$i ) { - $val = $content[ $i ]; - if ( 0 === strlen( $val ) ) { - continue; - } - - if ( isset( $synonyms[ $val ] ) ) { - $ret[] = $synonyms[ $val ]; - } else { - $ret[] = $val; - } - } - - return implode( ' ', $ret ); -} - - -/** - * Adds ACF repeater fields to the list of custom fields. - * - * Goes through custom fields, finds fields that match the fieldname_%_subfieldname - * pattern, finds the number of fields from the fieldname custom field and then - * adds the fieldname_0_subfieldname... fields to the list of custom fields. Only - * works one level deep. - * - * @param array $custom_fields The list of custom fields, used as a reference. - * @param int $post_id The post ID of the current post. - */ -function relevanssi_add_repeater_fields( &$custom_fields, $post_id ) { - global $wpdb; - - /** - * Filters the list of custom fields to index before the repeater fields - * are expanded. If you want to add repeater fields using the - * field_%_subfield notation from code, you can use this filter hook. - * - * @param array $custom_fields The list of custom fields. This array - * includes all custom fields that are to be indexed, so make sure you add - * new fields here and don't remove anything you want included in the index. - */ - $custom_fields = apply_filters( 'relevanssi_custom_fields_before_repeaters', $custom_fields ); - $repeater_fields = array(); - foreach ( $custom_fields as $field ) { - $number_of_levels = substr_count( $field, '%' ); - if ( $number_of_levels > 0 ) { - $field = str_replace( '\%', '%', $wpdb->esc_like( $field ) ); - $fields = $wpdb->get_col( $wpdb->prepare( "SELECT meta_key FROM $wpdb->postmeta WHERE meta_key LIKE %s AND post_id = %d", $field, $post_id ) ); - - $repeater_fields = array_merge( $repeater_fields, $fields ); - } else { - continue; - } - } - - $custom_fields = array_merge( $custom_fields, $repeater_fields ); -} - -/** - * Adds the PDF data from child posts to parent posts. - * - * Takes the PDF content data from child posts for indexing purposes. - * - * @global $wpdb The WordPress database interface. - * - * @param array $insert_data The base data for INSERT queries. - * @param int $post_id The post ID. - * - * @return array $insert_data The INSERT data with new content added. - */ -function relevanssi_index_pdf_for_parent( $insert_data, $post_id ) { - $option = get_option( 'relevanssi_index_pdf_parent', '' ); - if ( empty( $option ) || 'off' === $option ) { - return $insert_data; - } - - global $wpdb; - - $post_id = intval( $post_id ); - $query = "SELECT meta_value FROM $wpdb->postmeta AS pm, $wpdb->posts AS p WHERE pm.post_id = p.ID AND p.post_parent = $post_id AND meta_key = '_relevanssi_pdf_content'"; - /** - * Filters the database query that fetches the PDF content for the parent post. - * - * @param string $query The MySQL query. - * @param int $post_id The parent post ID. - */ - $query = apply_filters( 'relevanssi_pdf_for_parent_query', $query, $post_id ); - $pdf_content = $wpdb->get_col( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - if ( is_array( $pdf_content ) ) { - foreach ( $pdf_content as $row ) { - /** This filter is documented in common/indexing.php */ - $data = apply_filters( 'relevanssi_indexing_tokens', relevanssi_tokenize( $row, true, get_option( 'relevanssi_min_word_length', 3 ), 'indexing' ), 'pdf-content' ); - if ( count( $data ) > 0 ) { - foreach ( $data as $term => $count ) { - if ( isset( $insert_data[ $term ]['customfield'] ) ) { - $insert_data[ $term ]['customfield'] += $count; - } else { - $insert_data[ $term ]['customfield'] = $count; - } - $insert_data = relevanssi_customfield_detail( $insert_data, $term, $count, '_relevanssi_pdf_content' ); - } - } - } - } - - /** - * Filters the index data for the PDF contents. - * - * @param array $insert_data The data for INSERT clauses, format is - * $insert_data[ term ][ column ] = frequency. - * @param int $post_id The parent post ID. - */ - return apply_filters( 'relevanssi_pdf_for_parent_insert_data', $insert_data, $post_id ); -} - -/** - * Indexes all users. - * - * Runs indexing on all users. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - */ -function relevanssi_index_users() { - global $wpdb, $relevanssi_variables; - - // Delete all users from the Relevanssi index first. - $wpdb->query( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . " WHERE type = 'user'" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - $users = relevanssi_get_users( array() ); - - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress = WP_CLI\Utils\make_progress_bar( 'Indexing users', count( $users ) ); - } - - $update = false; - foreach ( $users as $user ) { - /** - * Checks if the user can be indexed. - * - * @param boolean $index Should the user be indexed, default true. - * @param object $user The user object. - * - * @return boolean $index If false, do not index the user. - */ - $index_this_user = apply_filters( 'relevanssi_user_index_ok', true, $user ); - - if ( $index_this_user ) { - relevanssi_index_user( $user, $update ); - } - - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress->tick(); - } - } - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress->finish(); - } -} - -/** - * Indexes users in AJAX context. - * - * Runs indexing on all users in AJAX context. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param int $limit Number of users to index on one go. - * @param int $offset Indexing offset. - * - * @return array $response AJAX response, number of users indexed in the $response['indexed']. - */ -function relevanssi_index_users_ajax( $limit, $offset ) { - $args = array( - 'number' => intval( $limit ), - 'offset' => intval( $offset ), - ); - - $users = relevanssi_get_users( $args ); - - $indexed_users = 0; - $update = false; - foreach ( $users as $user ) { - /** - * Checks if the user can be indexed. - * - * @param boolean $index Should the user be indexed, default true. - * @param object $user The user object. - * - * @return boolean $index If false, do not index the user. - */ - $index_this_user = apply_filters( 'relevanssi_user_index_ok', true, $user ); - if ( $index_this_user ) { - relevanssi_index_user( $user, $update ); - $indexed_users++; - } - } - - $response = array( - 'indexed' => $indexed_users, - ); - - return $response; -} - -/** - * Gets the list of users. - * - * @param array $args The user indexing arguments. - * - * @return array An array of user profiles. - */ -function relevanssi_get_users( array $args ) { - $index_subscribers = get_option( 'relevanssi_index_subscribers' ); - if ( 'on' !== $index_subscribers ) { - $args['role__not_in'] = array( 'subscriber' ); - } - - /** - * Filters the user fetching arguments. - * - * Useful to control the user role, for example: just set 'role__in' to whatever - * you need. - * - * @param array User fetching arguments. - */ - $users_list = get_users( apply_filters( 'relevanssi_user_indexing_args', $args ) ); - $users = array(); - foreach ( $users_list as $user ) { - $users[] = get_userdata( $user->ID ); - } - - return $users; -} - -/** - * Indexes one user. - * - * Indexes one user profile. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param object|int $user The user object or user ID. - * @param boolean $remove_first Should the user be deleted first or not, default false. - */ -function relevanssi_index_user( $user, $remove_first = false ) { - global $wpdb, $relevanssi_variables; - - if ( is_numeric( $user ) ) { - // Not an object, make it an object. - $user = get_userdata( $user ); - if ( false === $user ) { - // Invalid user ID given, no user found. Exit. - return; - } - } - - if ( $remove_first ) { - relevanssi_delete_user( $user->ID ); - } - - /** - * Allows manipulating the user object before indexing. - * - * This filter can be used to manipulate the user object before it is - * processed for indexing. It's possible to add extra data (for example to - * user description field) or to change the existing data. - * - * @param object $user The user object. - */ - $user = apply_filters( 'relevanssi_user_add_data', $user ); - - $insert_data = array(); - $min_length = get_option( 'relevanssi_min_word_length', 3 ); - $remove_stopwords = true; - - $values = relevanssi_get_user_field_content( $user->ID ); - foreach ( $values as $field => $value ) { - /** This filter is documented in common/indexing.php */ - $tokens = apply_filters( 'relevanssi_indexing_tokens', relevanssi_tokenize( $value, $remove_stopwords, $min_length, 'indexing' ), 'user-fields' ); - foreach ( $tokens as $term => $tf ) { - if ( isset( $insert_data[ $term ]['customfield'] ) ) { - $insert_data[ $term ]['customfield'] += $tf; - } else { - $insert_data[ $term ]['customfield'] = $tf; - } - $insert_data = relevanssi_customfield_detail( $insert_data, $term, $tf, $field ); - } - } - - if ( isset( $user->description ) && '' !== $user->description ) { - /** This filter is documented in common/indexing.php */ - $tokens = apply_filters( 'relevanssi_indexing_tokens', relevanssi_tokenize( $user->description, $remove_stopwords, $min_length, 'indexing' ), 'user-description' ); - foreach ( $tokens as $term => $tf ) { - if ( isset( $insert_data[ $term ]['content'] ) ) { - $insert_data[ $term ]['content'] += $tf; - } else { - $insert_data[ $term ]['content'] = $tf; - } - } - } - - if ( isset( $user->first_name ) && '' !== $user->first_name ) { - $parts = explode( ' ', strtolower( $user->first_name ) ); - foreach ( $parts as $part ) { - if ( empty( $part ) ) { - continue; - } - if ( isset( $insert_data[ $part ]['title'] ) ) { - $insert_data[ $part ]['title']++; - } else { - $insert_data[ $part ]['title'] = 1; - } - } - } - - if ( isset( $user->last_name ) && ' ' !== $user->last_name ) { - $parts = explode( ' ', strtolower( $user->last_name ) ); - foreach ( $parts as $part ) { - if ( empty( $part ) ) { - continue; - } - if ( isset( $insert_data[ $part ]['title'] ) ) { - $insert_data[ $part ]['title']++; - } else { - $insert_data[ $part ]['title'] = 1; - } - } - } - - if ( isset( $user->display_name ) && ' ' !== $user->display_name ) { - $parts = explode( ' ', strtolower( $user->display_name ) ); - foreach ( $parts as $part ) { - if ( empty( $part ) ) { - continue; - } - if ( isset( $insert_data[ $part ]['title'] ) ) { - $insert_data[ $part ]['title']++; - } else { - $insert_data[ $part ]['title'] = 1; - } - } - } - - /** - * Allows the user insert data to be manipulated. - * - * This function manipulates the user insert data used to create the INSERT queries. - * - * @param array $insert_data The source data for the INSERT queries. - * @param object $user The user object. - */ - $insert_data = apply_filters( 'relevanssi_user_data_to_index', $insert_data, $user ); - - foreach ( $insert_data as $term => $data ) { - $fields = array( 'content', 'title', 'comment', 'tag', 'link', 'author', 'category', 'excerpt', 'taxonomy', 'customfield', 'customfield_detail' ); - foreach ( $fields as $field ) { - if ( ! isset( $data[ $field ] ) ) { - $data[ $field ] = 0; - } - } - - $content = $data['content']; - $title = $data['title']; - $comment = $data['comment']; - $tag = $data['tag']; - $link = $data['link']; - $author = $data['author']; - $category = $data['category']; - $excerpt = $data['excerpt']; - $taxonomy = $data['taxonomy']; - $customfield = $data['customfield']; - $cf_detail = $data['customfield_detail']; - - $wpdb->query( - $wpdb->prepare( - 'INSERT IGNORE INTO ' . $relevanssi_variables['relevanssi_table'] . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - ' (item, doc, term, term_reverse, content, title, comment, tag, link, author, category, excerpt, taxonomy, customfield, type, customfield_detail, taxonomy_detail, mysqlcolumn_detail) - VALUES (%d, %d, %s, REVERSE(%s), %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s, %s, %s, %s)', - $user->ID, - -1, - $term, - $term, - $content, - $title, - $comment, - $tag, - $link, - $author, - $category, - $excerpt, - $taxonomy, - $customfield, - 'user', - $cf_detail, - '', - '' - ) - ); - } -} - -/** - * Counts users. - * - * Figures out how many users there are to index. - * - * @global $wpdb The WordPress database interface. - * - * @return int $count_users Number of users, -1 if user indexing is disabled. - */ -function relevanssi_count_users() { - $index_users = get_option( 'relevanssi_index_users' ); - if ( empty( $index_users ) || 'off' === $index_users ) { - return -1; - } - - $args = array( - 'fields' => 'ID', - ); - - $index_subscribers = get_option( 'relevanssi_index_subscribers' ); - if ( 'on' !== $index_subscribers ) { - $args['role__not_in'] = array( 'subscriber' ); - } - - $users = get_users( - /** - * Documented in /premium/indexing.php. - */ - apply_filters( 'relevanssi_user_indexing_args', $args ) - ); - $count_users = count( $users ); - - return $count_users; -} - -/** - * Counts taxonomy terms. - * - * Figures out how many taxonomy terms there are to index. - * - * @global $wpdb The WordPress database interface. - * - * @return int $count_terms Number of taxonomy terms, -1 if taxonomy term indexing is disabled. - */ -function relevanssi_count_taxonomy_terms() { - $index_taxonomies = get_option( 'relevanssi_index_taxonomies' ); - if ( empty( $index_taxonomies ) || 'off' === $index_taxonomies ) { - return -1; - } - - global $wpdb; - - $taxonomies = get_option( 'relevanssi_index_terms' ); - if ( empty( $taxonomies ) ) { - // No taxonomies chosen for indexing. - return -1; - } - $count_terms = 0; - foreach ( $taxonomies as $taxonomy ) { - if ( ! taxonomy_exists( $taxonomy ) ) { - // Non-existing taxonomy. Shouldn't be possible, but better be sure. - continue; - } - - /** - * Determines whether empty terms are indexed or not. - * - * @param boolean $hide_empty_terms If true, empty terms are not indexed. Default true. - */ - $hide_empty = apply_filters( 'relevanssi_hide_empty_terms', true ); - - $count = ''; - if ( $hide_empty ) { - $count = 'AND tt.count > 0'; - } - - $terms = $wpdb->get_col( "SELECT t.term_id FROM $wpdb->terms AS t, $wpdb->term_taxonomy AS tt WHERE t.term_id = tt.term_id $count AND tt.taxonomy = '$taxonomy'" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - $count_terms += count( $terms ); - } - return $count_terms; -} - -/** - * Returns the list of taxonomies chosen for indexing. - * - * Returns the list of taxonomies chosen for indexing from the 'relevanssi_index_terms' option. - * - * @return array $taxonomies A list of taxonomies chosen to be indexed. - */ -function relevanssi_list_taxonomies() { - return get_option( 'relevanssi_index_terms' ); -} - -/** - * Indexes taxonomy terms in AJAX context. - * - * Runs indexing on taxonomy terms in one taxonomy in AJAX context. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param string $taxonomy The taxonomy to index. - * @param int $limit Number of users to index on one go. - * @param int $offset Indexing offset. - * - * @return array $response AJAX response, number of taxonomy terms indexed in the - * $response['indexed'] and a boolean value in $response['taxonomy_completed'] that - * tells whether the taxonomy is indexed completely or not. - */ -function relevanssi_index_taxonomies_ajax( $taxonomy, $limit, $offset ) { - global $wpdb; - - $indexed_terms = 0; - $end_reached = false; - - $terms = relevanssi_get_terms( $taxonomy, intval( $limit ), intval( $offset ) ); - - if ( count( $terms ) < $limit ) { - $end_reached = true; - } - - foreach ( $terms as $term_id ) { - $update = false; - $term = get_term( $term_id, $taxonomy ); - relevanssi_index_taxonomy_term( $term, $taxonomy, $update ); - $indexed_terms++; - } - - $response = array( - 'indexed' => $indexed_terms, - 'taxonomy_completed' => 'not', - ); - if ( $end_reached ) { - $response['taxonomy_completed'] = 'done'; - } - - return $response; -} - -/** - * Indexes all taxonomies. - * - * Runs indexing on all taxonomies. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param boolean $is_ajax Whether indexing is done in the AJAX context, default false. - * - * @return array $response If $is_ajax is true, the function returns indexing status in an array. - */ -function relevanssi_index_taxonomies( $is_ajax = false ) { - global $wpdb, $relevanssi_variables; - - $wpdb->query( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . " WHERE doc = -1 AND type NOT IN ('user', 'post_type')" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - $taxonomies = get_option( 'relevanssi_index_terms' ); - $indexed_terms = 0; - foreach ( $taxonomies as $taxonomy ) { - $terms = relevanssi_get_terms( $taxonomy, 0, 0 ); - - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress = WP_CLI\Utils\make_progress_bar( "Indexing $taxonomy", count( $terms ) ); - } - - $update = false; - foreach ( $terms as $term ) { - relevanssi_index_taxonomy_term( $term, $taxonomy, $update ); - $indexed_terms++; - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress->tick(); - } - } - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress->finish(); - } - } - - if ( $is_ajax ) { - if ( $indexed_terms > 0 ) { - // translators: the number of taxonomy terms. - return sprintf( __( 'Indexed %d taxonomy terms.', 'relevanssi' ), $indexed_terms ); - } else { - return __( 'No taxonomies to index.', 'relevanssi' ); - } - } -} - -/** - * Gets a list of taxonomy terms. - * - * @param string $taxonomy The taxonomy to index. - * @param int $limit Number of users to index on one go. - * @param int $offset Indexing offset. - * - * @return array A list of taxonomy terms. - */ -function relevanssi_get_terms( string $taxonomy, int $limit = 0, int $offset = 0 ) : array { - global $wpdb; - - /** - * Determines whether empty terms are indexed or not. - * - * @param boolean $hide_empty_terms If true, empty terms are not indexed. Default true. - */ - $hide_empty = apply_filters( 'relevanssi_hide_empty_terms', true ); - $count = ''; - if ( $hide_empty ) { - $count = 'AND tt.count > 0'; - } - - $limit_sql = ''; - if ( $limit && $offset ) { - $limit_sql = $wpdb->prepare( 'LIMIT %d OFFSET %d', $limit, $offset ); - } - - $terms = $wpdb->get_col( - $wpdb->prepare( - "SELECT t.term_id FROM $wpdb->terms AS t, $wpdb->term_taxonomy AS tt - WHERE t.term_id = tt.term_id $count AND tt.taxonomy = %s $limit_sql ", // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $taxonomy - ) - ); - - return $terms; -} - -/** - * Indexes one taxonomy term. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param object|int $term The term object or term ID. - * @param string $taxonomy The name of the taxonomy. - * @param boolean $remove_first Should the term be deleted first or not, default false. - * @param boolean $debug If true, print out debug information, default false. - */ -function relevanssi_index_taxonomy_term( $term, $taxonomy, $remove_first = false, $debug = false ) { - global $wpdb, $relevanssi_variables; - - if ( is_numeric( $term ) ) { - // Not an object, so let's get the object. - $term = get_term( $term, $taxonomy ); - } - - /** - * Allows the term object to be handled before indexing. - * - * This filter can be used to add data to term objects before indexing, or to manipulate the object somehow. - * - * @param object $term The term object. - * @param string $taxonomy The taxonomy. - */ - $term = apply_filters( 'relevanssi_term_add_data', $term, $taxonomy ); - - $temp_post = new stdClass(); - $temp_post->post_content = $term->description; - $temp_post->post_title = $term->name; - - /** - * Allows modifying the fake post for the taxonomy term. - * - * In order to index taxonomy terms, Relevanssi generates fake posts from the - * terms. This filter lets you modify the post object. The term description - * is in the post_content and the term name in the post_title. - * - * @param object $temp_post The post object. - * @param object $term The term object. - */ - $temp_post = apply_filters( 'relevanssi_post_to_index', $temp_post, $term ); - - $term->description = $temp_post->post_content; - $term->name = $temp_post->post_title; - - $index_this_post = true; - - /** - * Determines whether a term is indexed or not. - * - * If this filter returns true, this term should not be indexed. - * - * @param boolean $block If true, do not index this post. Default false. - * @param WP_Term $term The term object. - * @param string $taxonomy The term taxonomy. - */ - if ( true === apply_filters( 'relevanssi_do_not_index_term', false, $term, $taxonomy ) ) { - // Filter says no. - if ( $debug ) { - relevanssi_debug_echo( 'relevanssi_do_not_index_term returned true.' ); - } - $index_this_post = false; - } - - if ( $remove_first ) { - // The 0 doesn't mean anything, but because of WP hook parameters, it needs to be there - // so the taxonomy can be passed as the third parameter. - relevanssi_delete_taxonomy_term( $term->term_id, 0, $taxonomy ); - } - - // This needs to be here, after the call to relevanssi_delete_taxonomy_term(), because otherwise - // a post that's in the index but shouldn't be there won't get removed. - if ( ! $index_this_post ) { - return 'donotindex'; - } - - $insert_data = array(); - $remove_stopwords = true; - - $min_length = get_option( 'relevanssi_min_word_length', 3 ); - if ( ! isset( $term->description ) ) { - $term->description = ''; - } - /** - * Allows adding extra content to the term before indexing. - * - * The term description is passed through this filter, so if you want to add - * extra content to the description, you can use this filter. - * - * @param string $term->description The term description. - * @param object $term The term object. - */ - $description = apply_filters( 'relevanssi_tax_term_additional_content', $term->description, $term ); - if ( ! empty( $description ) ) { - /** This filter is documented in common/indexing.php */ - $tokens = apply_filters( 'relevanssi_indexing_tokens', relevanssi_tokenize( $description, $remove_stopwords, $min_length, 'indexing' ), 'term-description' ); - foreach ( $tokens as $t_term => $tf ) { - if ( ! isset( $insert_data[ $t_term ]['content'] ) ) { - $insert_data[ $t_term ]['content'] = 0; - } - $insert_data[ $t_term ]['content'] += $tf; - } - } - - if ( isset( $term->name ) && ! empty( $term->name ) ) { - /** This filter is documented in common/indexing.php */ - $tokens = apply_filters( 'relevanssi_indexing_tokens', relevanssi_tokenize( $term->name, $remove_stopwords, $min_length, 'indexing' ), 'term-name' ); - foreach ( $tokens as $t_term => $tf ) { - if ( ! isset( $insert_data[ $t_term ]['title'] ) ) { - $insert_data[ $t_term ]['title'] = 0; - } - $insert_data[ $t_term ]['title'] += $tf; - } - } - - foreach ( $insert_data as $t_term => $data ) { - $fields = array( 'content', 'title', 'comment', 'tag', 'link', 'author', 'category', 'excerpt', 'taxonomy', 'customfield' ); - foreach ( $fields as $field ) { - if ( ! isset( $data[ $field ] ) ) { - $data[ $field ] = 0; - } - } - - $content = $data['content']; - $title = $data['title']; - $comment = $data['comment']; - $tag = $data['tag']; - $link = $data['link']; - $author = $data['author']; - $category = $data['category']; - $excerpt = $data['excerpt']; - $customfield = $data['customfield']; - $t_term = trim( $t_term ); // Numeric terms start with a space. - - $wpdb->query( - $wpdb->prepare( - 'INSERT IGNORE INTO ' . $relevanssi_variables['relevanssi_table'] . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - ' (item, doc, term, term_reverse, content, title, comment, tag, link, author, category, excerpt, taxonomy, customfield, type, customfield_detail, taxonomy_detail, mysqlcolumn_detail) - VALUES (%d, %d, %s, REVERSE(%s), %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s, %s, %s, %s)', - $term->term_id, - -1, - $t_term, - $t_term, - $content, - $title, - $comment, - $tag, - $link, - $author, - $category, - $excerpt, - '', - $customfield, - $taxonomy, - '', - '', - '' - ) - ); - } -} - -/** - * Removes a document from the index. - * - * This Premium version also takes care of internal linking keywords, either keeping them (in case of - * an update) or removing them (if the post is removed). - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param int $post_id The post ID. - * @param boolean $keep_internal_linking If true, do not remove internal link keywords from this post. - */ -function relevanssi_premium_remove_doc( $post_id, $keep_internal_linking ) { - global $wpdb, $relevanssi_variables; - - $post_id = intval( $post_id ); - if ( empty( $post_id ) ) { - // No post ID specified. - return; - } - - $internal_links = ''; - if ( $keep_internal_linking ) { - $internal_links = 'AND link = 0'; - } - - $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . " WHERE doc=%s $internal_links", $post_id ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - - if ( ! $keep_internal_linking ) { - $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . ' WHERE link > 0 AND doc=%s', $post_id ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - } -} - -/** - * Deletes an item (user or taxonomy term) from the index. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the database table names. - * - * @param int $item_id The item ID number. - * @param string $type The item type. - */ -function relevanssi_remove_item( $item_id, $type ) { - global $wpdb, $relevanssi_variables; - - $item_id = intval( $item_id ); - - if ( 0 === $item_id && 'post' === $type ) { - // Security measures. - return; - } - - $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . ' WHERE item = %d AND type = %s', $item_id, $type ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared -} - -/** - * Checks if post is hidden. - * - * Used in indexing process to check if post is hidden. Checks the - * '_relevanssi_hide_post' custom field. - * - * @param int $post_id The post ID to check. - * - * @return boolean $hidden Is the post hidden? - */ -function relevanssi_hide_post( $post_id ) { - $hidden = false; - $field_value = get_post_meta( $post_id, '_relevanssi_hide_post', true ); - if ( 'on' === $field_value ) { - $hidden = true; - } - return $hidden; -} - -/** - * Indexes post type archive pages. - * - * Goes through all the post type archive pages and indexes them using - * relevanssi_index_post_type_archive(). - * - * @see relevanssi_index_post_type_archive() - * @since 2.2 - * - * @global object $wpdb The WordPress database object. - */ -function relevanssi_index_post_type_archives() { - if ( 'on' === get_option( 'relevanssi_index_post_type_archives' ) ) { - global $wpdb, $relevanssi_variables; - - // Delete all post types from the Relevanssi index first. - $wpdb->query( - 'DELETE FROM ' . $relevanssi_variables['relevanssi_table'] . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - " WHERE type = 'post_type'" - ); - - $post_types = relevanssi_get_indexed_post_type_archives(); - if ( ! empty( $post_types ) ) { - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress = WP_CLI\Utils\make_progress_bar( - 'Indexing post type archives', - count( $post_types ) - ); - } - foreach ( $post_types as $post_type ) { - relevanssi_index_post_type_archive( $post_type ); - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress->tick(); - } - } - if ( defined( 'WP_CLI' ) && WP_CLI ) { - $progress->finish(); - } - } else { - if ( defined( 'WP_CLI' ) && WP_CLI ) { - WP_CLI::log( 'No post types available for post type archive indexing.' ); - } - } - } else { - if ( defined( 'WP_CLI' ) && WP_CLI ) { - WP_CLI::error( 'Post type archive indexing disabled.' ); - } - } -} - -/** - * Indexes post type archive pages in AJAX context. - * - * Runs indexing on all post type archives in AJAX context. - * - * @return array $response AJAX response, number of post type archives indexed - * in the$response['indexed']. - */ -function relevanssi_index_post_type_archives_ajax() { - $post_types = relevanssi_get_indexed_post_type_archives(); - - if ( empty( $post_types ) ) { - $response = array( - 'indexed' => 0, - ); - return $response; - } - - $indexed_post_types = 0; - foreach ( $post_types as $post_type ) { - relevanssi_index_post_type_archive( $post_type ); - $indexed_post_types++; - } - - $response = array( - 'indexed' => $indexed_post_types, - ); - - return $response; -} - -/** - * Assigns numeric IDs for post types. - * - * Relevanssi requires numeric IDs for post types for indexing purposes. This - * function assigns numbers for each post type, in alphabetical order. This is a - * bit of a hack, and fails if new post types are added, but hopefully that - * doesn't happen too often. The assigned numbers are stored in the option - * relevanssi_post_type_ids. - * - * @since 2.2 - * - * @return array The post type ID arrays (by ID and by name). - */ -function relevanssi_assign_post_type_ids() { - $post_types = relevanssi_get_indexed_post_type_archives(); - sort( $post_types ); - - $post_type_ids_by_id = array(); - $post_type_ids_by_name = array(); - - $id = 1; - foreach ( $post_types as $post_type ) { - $post_type_ids_by_id[ $id ] = $post_type; - $post_type_ids_by_name[ $post_type ] = $id; - $id++; - } - update_option( - 'relevanssi_post_type_ids', - array( - 'by_id' => $post_type_ids_by_id, - 'by_name' => $post_type_ids_by_name, - ) - ); - - return array( - 'by_id' => $post_type_ids_by_id, - 'by_name' => $post_type_ids_by_name, - ); -} - -/** - * Gets the post type ID by post type name. - * - * Fetches the post type ID from the relevanssi_post_type_ids option by the post - * type name. If the option is empty, will populate it with values. If the post - * type can't be found in the list, the function tries to regenerate the list in - * case there's a new post type Relevanssi doesn't know. - * - * @see relevanssi_assign_post_type_ids() - * @see relevanssi_get_post_type_by_id() - * @since 2.2 - * - * @param string $post_type The name of the post type. - * - * @return integer|null The post type ID number or null if not a valid post - * type. - */ -function relevanssi_get_post_type_by_name( $post_type ) { - $post_type_ids = get_option( 'relevanssi_post_type_ids', false ); - if ( empty( $post_type_ids ) ) { - $post_type_ids = relevanssi_assign_post_type_ids(); - } - if ( ! isset( $post_type_ids['by_name'][ $post_type ] ) ) { - $post_type_ids = relevanssi_assign_post_type_ids(); - } - if ( isset( $post_type_ids['by_name'][ $post_type ] ) ) { - return $post_type_ids['by_name'][ $post_type ]; - } else { - return null; - } -} - -/** - * Gets the post type name by post type ID. - * - * Fetches the post type name from the relevanssi_post_type_ids option by the - * post type ID. If the option is empty, will populate it with values. If the - * post type can't be found in the list, the function tries to regenerate the - * list in case there's a new post type Relevanssi doesn't know. - * - * @see relevanssi_assign_post_type_ids() - * @see relevanssi_get_post_type_by_name() - * @since 2.2 - * - * @param integer $id The ID number of the post type. - * - * @return string|null The post type name or null if not a valid post type. - */ -function relevanssi_get_post_type_by_id( $id ) { - $post_type_ids = get_option( 'relevanssi_post_type_ids', false ); - if ( empty( $post_type_ids ) ) { - $post_type_ids = relevanssi_assign_post_type_ids(); - } - if ( ! isset( $post_type_ids['by_id'][ $id ] ) ) { - $post_type_ids = relevanssi_assign_post_type_ids(); - } - if ( isset( $post_type_ids['by_id'][ $id ] ) ) { - return $post_type_ids['by_id'][ $id ]; - } else { - return null; - } -} - -/** - * Indexes a post type archive page. - * - * Indexes a post type archive page, indexing the archive label and the - * description which can be set when the post type is registered. The filter - * hook relevanssi_post_type_additional_content can be used to add additional - * content to the post type archive description. - * - * @since 2.2 - * - * @param string $post_type The name of the post type. - * @param boolean $remove_first Should the post type be removed first from the - * index. - * - * @global object $wpdb The WordPress database object. - * @global array $relevanssi_variables The Relevanssi global variables. - */ -function relevanssi_index_post_type_archive( $post_type, $remove_first = true ) { - $post_type_object = get_post_type_object( $post_type ); - global $wpdb, $relevanssi_variables; - - /** - * Allows excluding post type archives from the index. - * - * If this filter hook returns false, the post type archive won't be - * indexed and if it's already indexed, it will be removed from the index. - * - * @param boolean If true, index the archive. Default true. - * @param object The post type object. - */ - if ( ! apply_filters( 'relevanssi_post_type_archive_ok', true, $post_type ) ) { - relevanssi_delete_post_type_object( $post_type ); - return; - } - - $temp_post = new stdClass(); - $temp_post->post_content = $post_type_object->description; - $temp_post->post_title = $post_type_object->name; - - /** - * Allows modifying the fake post for the post type archive. - * - * In order to index post type archives, Relevanssi generates fake posts - * from the post types. This filter lets you modify the post object. The - * post type description is in the post_content and the post type name in - * the post_title. - * - * @param object $temp_post The post object. - * @param object $post_type The post type object. - */ - $temp_post = apply_filters( - 'relevanssi_post_to_index', - $temp_post, - $post_type_object - ); - - $post_type_object->description = $temp_post->post_content; - $post_type_object->name = $temp_post->post_title; - - if ( $remove_first ) { - relevanssi_delete_post_type_object( $post_type ); - } - - $insert_data = array(); - $remove_stopwords = true; - - $min_length = get_option( 'relevanssi_min_word_length', 3 ); - if ( ! isset( $post_type_object->description ) ) { - $post_type_object->description = ''; - } - /** - * Allows adding extra content to the post type before indexing. - * - * The post type description is passed through this filter, so if you want - * to add extra content to the description, you can use this filter. - * - * @param string $post_type_object->description The post type description. - * @param object $post_type_object The post type object. - */ - $description = apply_filters( - 'relevanssi_post_type_additional_content', - $post_type_object->description, - $post_type_object - ); - if ( ! empty( $description ) ) { - /** This filter is documented in lib/indexing.php */ - $tokens = apply_filters( - 'relevanssi_indexing_tokens', - relevanssi_tokenize( $description, $remove_stopwords, $min_length, 'indexing' ), - 'posttype-description' - ); - foreach ( $tokens as $t_term => $tf ) { - if ( ! isset( $insert_data[ $t_term ]['content'] ) ) { - $insert_data[ $t_term ]['content'] = 0; - } - $insert_data[ $t_term ]['content'] += $tf; - } - } - - if ( isset( $post_type_object->name ) && ! empty( $post_type_object->name ) ) { - /** This filter is documented in lib/indexing.php */ - $tokens = apply_filters( - 'relevanssi_indexing_tokens', - relevanssi_tokenize( $post_type_object->label, $remove_stopwords, $min_length, 'indexing' ), - 'posttype-name' - ); - foreach ( $tokens as $t_term => $tf ) { - if ( ! isset( $insert_data[ $t_term ]['title'] ) ) { - $insert_data[ $t_term ]['title'] = 0; - } - $insert_data[ $t_term ]['title'] += $tf; - } - } - - $post_type_id = relevanssi_get_post_type_by_name( $post_type ); - foreach ( $insert_data as $t_term => $data ) { - $fields = array( 'content', 'title', 'comment', 'tag', 'link', 'author', 'category', 'excerpt', 'taxonomy', 'customfield' ); - foreach ( $fields as $field ) { - if ( ! isset( $data[ $field ] ) ) { - $data[ $field ] = 0; - } - } - - $content = $data['content']; - $title = $data['title']; - $comment = $data['comment']; - $tag = $data['tag']; - $link = $data['link']; - $author = $data['author']; - $category = $data['category']; - $excerpt = $data['excerpt']; - $customfield = $data['customfield']; - $t_term = trim( $t_term ); // Numeric terms start with a space. - - $wpdb->query( - $wpdb->prepare( - 'INSERT IGNORE INTO ' . $relevanssi_variables['relevanssi_table'] . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - ' (item, doc, term, term_reverse, content, title, comment, tag, link, author, category, excerpt, taxonomy, customfield, type, customfield_detail, taxonomy_detail, mysqlcolumn_detail) - VALUES (%d, %d, %s, REVERSE(%s), %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s, %s, %s, %s)', - $post_type_id, - -1, - $t_term, - $t_term, - $content, - $title, - $comment, - $tag, - $link, - $author, - $category, - $excerpt, - '', - $customfield, - 'post_type', - '', - '', - '' - ) - ); - } -} - -/** - * Deletes a post type archive from Relevanssi index. - * - * @global $wpdb The WordPress database interface. - * @global $relevanssi_variables The global Relevanssi variables, used for the - * database table names. - * - * @param string $post_type Name of the post type to remove. - */ -function relevanssi_delete_post_type_object( $post_type ) { - global $wpdb, $relevanssi_variables; - $id = relevanssi_get_post_type_by_name( $post_type ); - if ( $id ) { - $wpdb->query( - 'DELETE FROM ' . - $relevanssi_variables['relevanssi_table'] . " WHERE item = $id " . // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "AND type = 'post_type'" - ); - } -} - -/** - * Returns the list of post type archives indexed. - * - * Returns a list of post types that have _builtin set to false and has_archive - * set to true. The list can be adjusted with the - * relevanssi_indexed_post_type_archives filter hook. - * - * @return array An array of post types. - */ -function relevanssi_get_indexed_post_type_archives() { - $args = array( - '_builtin' => false, - 'has_archive' => true, - ); - $post_types = get_post_types( $args ); - /** - * Filters the list of post type archives that are indexed by Relevanssi. - * - * @param array An array of post types. - * - * @return array An array of post types. - */ - return apply_filters( 'relevanssi_indexed_post_type_archives', $post_types ); -} - -/** - * Runs taxonomy, user and post type archive indexing if necessary. - */ -function relevanssi_premium_indexing() { - if ( 'on' === get_option( 'relevanssi_index_taxonomies' ) ) { - relevanssi_index_taxonomies(); - } - if ( 'on' === get_option( 'relevanssi_index_users' ) ) { - relevanssi_index_users(); - } - if ( 'on' === get_option( 'relevanssi_index_post_type_archives' ) ) { - relevanssi_index_post_type_archives(); - } -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/interface.php b/wp/wp-content/plugins/relevanssi-premium/premium/interface.php deleted file mode 100644 index 089cfb6f..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/interface.php +++ /dev/null @@ -1,1574 +0,0 @@ - - - - - - - .
    - -

    - - - - - - - - - -

    - - - - - - - - - -

    - - - - - - - - - - -

    - Deutsch (de_DE), español (es_ES), français (fr_FR), suomi (fi)

    - - - - - - - - - - -

    - - - - - - - - - -

    - - - - - - - -
    - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - - - - - - - - -
    - - - -
    - - - - - - - - - -

    - - - - - - - - - -

    - - - get_results( "SHOW COLUMNS FROM $wpdb->posts" ); - wp_cache_set( 'relevanssi_column_list', $column_list ); - } - $columns = array(); - foreach ( $column_list as $column ) { - array_push( $columns, $column->Field ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase - } - $columns = implode( ', ', $columns ); - - ?> - - - - - - -

    - wp_posts' ); - echo esc_html( $columns ); - ?> -

    - - - - - - - - -
    - - -

    -
    - - - - - - - - - /> -

    - - - -

    - - - - - - - > - - - - - > - - - -
    - - -
    - - -

    -

    -
    -
    - - -
    - - -

    -
    -
    - - -
    -

    -
    - -

    - - - - - -
    - - -
    - - -
    -

    - dog = hound to the synonym list and enable this feature, every time the indexer sees hound in post content or post title, it will index it as hound dog. Thus, the post will be found when searching with either word. This makes it possible to use synonyms with AND searches, but will slow down indexing, especially with large databases and large lists of synonyms. You can use multi-word values, but phrases do not work.', 'relevanssi' ); // phpcs:ignore WordPress.Security.EscapeOutput.UnsafePrintingFunction - ?> -

    -
    - - -

    - - - - - - - - -

    - - - - - - - > - - - - - - - - - - -
    - - - -

    relevanssi_post_type_additional_content' ); ?>

    -
    - - - > - - - - - ' . esc_html( implode( ', ', $post_types ) ) . '

    '; - ?> - -

    has_archive', 'relevanssi_indexed_post_type_archives' ); ?>

    - - - - - - - - - - /> -

    - - - post_type ) { - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - wp_enqueue_script( - 'relevanssi_admin_pdf_js', - $plugin_dir_url . 'premium/admin_pdf_scripts.js', - array( 'jquery' ), - $relevanssi_variables['plugin_version'], - true - ); - wp_localize_script( - 'relevanssi_admin_pdf_js', - 'admin_pdf_data', - array( - 'send_pdf_nonce' => wp_create_nonce( 'relevanssi_send_pdf' ), - ) - ); - } - wp_enqueue_script( - 'relevanssi_metabox_js', - $plugin_dir_url . 'premium/admin_metabox_scripts.js', - array( 'jquery' ), - $relevanssi_variables['plugin_version'], - true - ); - wp_localize_script( - 'relevanssi_metabox_js', - 'relevanssi_metabox_data', - array( - 'metabox_nonce' => wp_create_nonce( 'relevanssi_metabox_nonce' ), - ) - ); - wp_enqueue_style( - 'relevanssi_metabox_css', - $plugin_dir_url . 'premium/metabox_styles.css', - array(), - $relevanssi_variables['plugin_version'] - ); - - } - - $nonce = array( - 'taxonomy_indexing_nonce' => wp_create_nonce( 'relevanssi_taxonomy_indexing_nonce' ), - 'user_indexing_nonce' => wp_create_nonce( 'relevanssi_user_indexing_nonce' ), - 'indexing_nonce' => wp_create_nonce( 'relevanssi_indexing_nonce' ), - 'post_type_archive_indexing_nonce' => wp_create_nonce( 'relevanssi_post_type_archive_indexing_nonce' ), - 'searching_nonce' => wp_create_nonce( 'relevanssi_admin_search_nonce' ), - ); - - wp_localize_script( 'relevanssi_admin_js_premium', 'nonce', $nonce ); -} - -/** - * Imports Relevanssi Premium options. - * - * Takes the options array and does the actual updating of options using - * update_options(). - * - * @param string $options JSON-formatted array. Key has the option name, value - * the option value. - */ -function relevanssi_import_options( $options ) { - $unserialized = json_decode( stripslashes( $options ) ); - foreach ( $unserialized as $key => $value ) { - if ( in_array( - $key, - array( - 'relevanssi_post_type_weights', - 'relevanssi_recency_bonus', - 'relevanssi_punctuation', - 'relevanssi_related_style', - 'relevanssi_related_settings', - 'relevanssi_synonyms', - 'relevanssi_body_stopwords', - 'relevanssi_stopwords', - 'relevanssi_spamblock', - ), - true - ) ) { - // The options are associative arrays that are translated to - // objects in JSON and need to be changed back to arrays. - $value = (array) $value; - } - if ( 'relevanssi_redirects' === $key ) { - $value = json_decode( wp_json_encode( $value ), true ); - } - update_option( $key, $value ); - } - - echo "
    " . esc_html__( 'Options updated!', 'relevanssi' ) . '
    '; -} - -/** - * Updates Relevanssi Premium options. - * - * @global array $relevanssi_variables Relevanssi global variables, used to - * access the plugin file name. - * - * Reads in the options from $_REQUEST and updates the correct options, - * depending on which tab has been active. - */ -function relevanssi_update_premium_options() { - global $relevanssi_variables; - check_admin_referer( plugin_basename( $relevanssi_variables['file'] ), 'relevanssi_options' ); - - $request = $_REQUEST; // WPCS: Input var okay. - if ( ! isset( $request['tab'] ) ) { - $request['tab'] = ''; - } - - relevanssi_update_floatval( $request, 'relevanssi_link_boost', true, '0.75' ); - - if ( empty( $request['relevanssi_api_key'] ) ) { - unset( $request['relevanssi_api_key'] ); - } - - if ( 'overview' === $request['tab'] ) { - relevanssi_turn_off_options( - $request, - array( - 'relevanssi_do_not_call_home', - 'relevanssi_update_translations', - 'relevanssi_hide_post_controls', - 'relevanssi_show_post_controls', - ) - ); - } - - if ( 'indexing' === $request['tab'] ) { - relevanssi_turn_off_options( - $request, - array( - 'relevanssi_index_pdf_parent', - 'relevanssi_index_post_type_archives', - 'relevanssi_index_subscribers', - 'relevanssi_index_synonyms', - 'relevanssi_index_taxonomies', - 'relevanssi_index_users', - ) - ); - } - - if ( 'attachments' === $request['tab'] ) { - relevanssi_turn_off_options( - $request, - array( - 'relevanssi_link_pdf_files', - 'relevanssi_read_new_files', - 'relevanssi_send_pdf_files', - ) - ); - } - - if ( 'searching' === $request['tab'] ) { - if ( isset( $request['relevanssi_recency_bonus'] ) && isset( $request['relevanssi_recency_days'] ) ) { - $relevanssi_recency_bonus = array(); - $relevanssi_recency_bonus['bonus'] = floatval( $request['relevanssi_recency_bonus'] ); - $relevanssi_recency_bonus['days'] = intval( $request['relevanssi_recency_days'] ); - update_option( 'relevanssi_recency_bonus', $relevanssi_recency_bonus ); - } - - if ( ! isset( $request['relevanssi_searchblogs_all'] ) ) { - $request['relevanssi_searchblogs_all'] = 'off'; - } - } - - if ( 'logging' === $request['tab'] ) { - relevanssi_turn_off_options( - $request, - array( - 'relevanssi_click_tracking', - 'relevanssi_hide_branding', - ) - ); - relevanssi_update_intval( $request, 'relevanssi_trim_click_logs', true, 180 ); - } - - if ( 'excerpts' === $request['tab'] ) { - relevanssi_update_intval( $request, 'relevanssi_max_excerpts', true, 1 ); - relevanssi_update_intval( $request, 'relevanssi_trim_click_logs', true, 180 ); - } - - if ( 'related' === $request['tab'] ) { - $settings = get_option( 'relevanssi_related_settings', relevanssi_related_default_settings() ); - - $settings['enabled'] = relevanssi_off_or_on( $request, 'relevanssi_related_enabled' ); - $settings['number'] = relevanssi_intval( $request, 'relevanssi_related_number' ); - $settings['months'] = relevanssi_intval( $request, 'relevanssi_related_months' ); - $settings['nothing'] = relevanssi_legal_value( - $request, - 'relevanssi_related_nothing', - array( 'random', 'random_cat' ), - 'nothing' - ); - $settings['notenough'] = relevanssi_legal_value( - $request, - 'relevanssi_related_notenough', - array( 'random', 'random_cat' ), - 'nothing' - ); - $settings['append'] = relevanssi_implode( $request, 'relevanssi_related_append' ); - $settings['post_types'] = ''; - if ( isset( $request['relevanssi_related_post_types'] ) && is_array( $request['relevanssi_related_post_types'] ) ) { - $settings['post_types'] = implode( ',', $request['relevanssi_related_post_types'] ); - if ( false !== stripos( $settings['post_types'], 'matching_post_type' ) ) { - $settings['post_types'] = 'matching_post_type'; - } - } - $settings['keyword'] = relevanssi_implode( $request, 'relevanssi_related_keyword' ); - $settings['restrict'] = relevanssi_implode( $request, 'relevanssi_related_restrict' ); - $settings['cache_for_admins'] = relevanssi_off_or_on( $request, 'relevanssi_related_cache_for_admins' ); - - update_option( 'relevanssi_related_settings', $settings ); - - if ( 'off' === $settings['enabled'] ) { - relevanssi_flush_related_cache(); - } - if ( isset( $request['relevanssi_flush_related_cache'] ) && 'off' !== $request['relevanssi_flush_related_cache'] ) { - relevanssi_flush_related_cache(); - } - - $style = get_option( 'relevanssi_related_style', relevanssi_related_default_styles() ); - - $style['width'] = relevanssi_intval( $request, 'relevanssi_related_width' ); - $style['excerpts'] = relevanssi_off_or_on( $request, 'relevanssi_related_excerpts' ); - $style['titles'] = relevanssi_off_or_on( $request, 'relevanssi_related_titles' ); - $style['thumbnails'] = relevanssi_off_or_on( $request, 'relevanssi_related_thumbnails' ); - $style['default_thumbnail'] = relevanssi_intval( $request, 'relevanssi_default_thumbnail' ); - - if ( isset( $request['relevanssi_remove_default_thumbnail'] ) && 'off' !== $request['relevanssi_remove_default_thumbnail'] ) { - $style['default_thumbnail'] = 0; - } - update_option( 'relevanssi_related_style', $style ); - } - - if ( 'spamblock' === $request['tab'] ) { - $settings['keywords'] = stripslashes( $request['relevanssi_spamblock_keywords'] ); - $settings['regex'] = stripslashes( $request['relevanssi_spamblock_regex'] ); - - $settings['chinese'] = relevanssi_off_or_on( $request, 'relevanssi_spamblock_chinese' ); - $settings['cyrillic'] = relevanssi_off_or_on( $request, 'relevanssi_spamblock_cyrillic' ); - $settings['emoji'] = relevanssi_off_or_on( $request, 'relevanssi_spamblock_emoji' ); - $settings['bots'] = relevanssi_off_or_on( $request, 'relevanssi_spamblock_bots' ); - - update_option( 'relevanssi_spamblock', $settings ); - } - - if ( isset( $request['relevanssi_remove_api_key'] ) ) { - update_option( 'relevanssi_api_key', '', false ); - } - relevanssi_update_off_or_on( $request, 'relevanssi_click_tracking', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_do_not_call_home', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_hide_branding', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_hide_post_controls', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_index_pdf_parent', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_index_post_type_archives', true ); - relevanssi_update_off_or_on( $request, 'relevanssi_index_subscribers', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_index_synonyms', true ); - relevanssi_update_off_or_on( $request, 'relevanssi_index_taxonomies', true ); - relevanssi_update_off_or_on( $request, 'relevanssi_index_users', true ); - relevanssi_update_off_or_on( $request, 'relevanssi_link_pdf_files', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_read_new_files', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_searchblogs_all', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_send_pdf_files', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_show_post_controls', false ); - relevanssi_update_off_or_on( $request, 'relevanssi_update_translations', false ); - relevanssi_update_sanitized( $request, 'relevanssi_api_key', true ); - relevanssi_update_sanitized( $request, 'relevanssi_disable_shortcodes', false ); - relevanssi_update_sanitized( $request, 'relevanssi_index_user_fields', false ); - relevanssi_update_sanitized( $request, 'relevanssi_internal_links', false ); - relevanssi_update_sanitized( $request, 'relevanssi_mysql_columns', false ); - relevanssi_update_sanitized( $request, 'relevanssi_searchblogs', false ); - relevanssi_update_sanitized( $request, 'relevanssi_thousand_separator', false ); - - relevanssi_update_legal_value( - $request, - 'relevanssi_server_location', - array( 'us', 'eu' ), - 'us', - false - ); - - if ( 'redirects' === $request['tab'] ) { - $value = relevanssi_process_redirects( $request ); - update_option( 'relevanssi_redirects', $value ); - } -} - -/** - * Adds Relevanssi Premium tabs to Relevanssi settings page. - * - * @global array $relevanssi_variables Used for the plugin path. - * - * @param array $tabs The array of tab items. - * - * @return array The tab array with Premium tabs added. - */ -function relevanssi_premium_add_tabs( $tabs ) { - global $relevanssi_variables; - - $slugs = wp_list_pluck( $tabs, 'slug' ); - $redirects_id = array_search( 'redirects', $slugs, true ); - $attachments_id = array_search( 'attachments', $slugs, true ); - - $tabs[ $redirects_id ] = array( - 'slug' => 'redirects', - 'name' => __( 'Redirects', 'relevanssi' ), - 'require' => dirname( $relevanssi_variables['file'] ) - . '/premium/tabs/redirects-tab.php', - 'callback' => 'relevanssi_redirects_tab', - 'save' => true, - ); - $tabs[ $attachments_id ] = array( - 'slug' => 'attachments', - 'name' => __( 'Attachments', 'relevanssi' ), - 'require' => dirname( $relevanssi_variables['file'] ) - . '/premium/tabs/attachments-tab.php', - 'callback' => 'relevanssi_attachments_tab', - 'save' => true, - ); - - $tabs[] = array( - 'slug' => 'importexport', - 'name' => __( 'Import / Export options', 'relevanssi' ), - 'require' => dirname( $relevanssi_variables['file'] ) - . '/premium/tabs/import-export-tab.php', - 'callback' => 'relevanssi_import_export_tab', - 'save' => true, - ); - $tabs[] = array( - 'slug' => 'related', - 'name' => __( 'Related', 'relevanssi' ), - 'require' => dirname( $relevanssi_variables['file'] ) - . '/premium/tabs/related-tab.php', - 'callback' => 'relevanssi_related_tab', - 'save' => true, - ); - $tabs[] = array( - 'slug' => 'spamblock', - 'name' => __( 'Spam Block', 'relevanssi' ), - 'require' => dirname( $relevanssi_variables['file'] ) - . '/premium/tabs/spamblock-tab.php', - 'callback' => 'relevanssi_spamblock_tab', - 'save' => true, - ); - $tabs[] = array( - 'slug' => 'support', - 'name' => __( 'Support', 'relevanssi' ), - 'require' => dirname( $relevanssi_variables['file'] ) - . '/premium/tabs/support-tab.php', - 'callback' => 'relevanssi_support_tab', - 'save' => false, - ); - return $tabs; -} - -/** - * Handles the "Reset relevanssi_words" functionality on the debugging tab. - */ -function relevanssi_form_reset_words() { - $text = esc_attr__( 'Reset the option', 'relevanssi' ); - $reset = << - -

    -EOH; - - if ( isset( $_REQUEST['relevanssi_words'] ) ) { - wp_verify_nonce( '_relevanssi_nonce', 'relevanssi_how_relevanssi_sees' ); - $success = delete_option( 'relevanssi_words' ); - if ( $success ) { - $reset = '

    ' . esc_html__( 'Option successfully reset!', 'relevanssi' ) . '

    '; - } else { - $reset = '

    ' . esc_html__( "Couldn't reset the option, reload the page to try again.", 'relevanssi' ) . '

    '; - } - } - - ?> -

    - -

    - relevanssi_words. - esc_html__( - 'If you are having problems with the Did you mean? feature, you can reset the %1$s option that keeps a cache. Next time the Did you mean? suggestions are needed the option is regenerated.', - 'relevanssi' - ), - 'relevanssi_words' - ); - ?> -

    - -
    ' . $message; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -} - -/** - * Generates a message giving the reason for API key and license problems. - * - * @return string The message. - */ -function relevanssi_get_api_key_notification() { - global $relevanssi_variables; - - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - - if ( ! $api_key ) { - $url = add_query_arg( - 'page', - 'relevanssi-premium%2Frelevanssi.php', - get_admin_url() . 'options-general.php' - ); - if ( is_plugin_active_for_network( plugin_basename( $relevanssi_variables['file'] ) ) ) { - $url = network_admin_url( 'admin.php?page=relevanssi-premium%2Frelevanssi.php' ); - } - $message = sprintf( - // Translators: %1$s opens the link to the Relevanssi Premium settings page, %3$s opens the link to the Relevanssi Premium license purchase page. %2$s closes the links. - esc_html__( "The API key is not set. Please enter your API key in the %1\$sthe Relevanssi settings%2\$s. If you don't have one, %3\$syou can buy a new license here%2\$s.", 'relevanssi' ), - '', - '', - '' - ); - } else { - $message = sprintf( - // Translators: %1$s opens the link to the Relevanssi Premium license purchase page. %2$s closes the link. - esc_html__( "Your API key is set, but it looks like you don't have a valid license. %1\$sYou can buy a new license here%2\$s.", 'relevanssi' ), - '', - '' - ); - } - return $message; -} - -/** - * Adds the Relevanssi columns to the post list. - * - * @param array $columns The columns. - * @param string $post_type The post type. - */ -function relevanssi_manage_columns( $columns, $post_type = 'page' ) { - $post_types = get_option( 'relevanssi_index_post_types' ); - if ( ! in_array( $post_type, $post_types, true ) ) { - return $columns; - } - - $columns['pinned_keywords'] = __( 'Pinned keywords', 'relevanssi' ); - $columns['unpinned_keywords'] = __( 'Excluded keywords', 'relevanssi' ); - $columns['pin_for_all'] = __( 'Pin for all searches', 'relevanssi' ); - $columns['exclude_post'] = __( 'Exclude post', 'relevanssi' ); - $columns['ignore_content'] = __( 'Ignore post content', 'relevanssi' ); - return $columns; -} - -/** - * Adds the Relevanssi Premium columns to the post list. - * - * @param array $column The column name. - * @param int $post_id The post ID. - */ -function relevanssi_manage_custom_column( $column, $post_id ) { - switch ( $column ) { - case 'pinned_keywords': - $keywords = get_post_meta( $post_id, '_relevanssi_pin_keywords', true ); - if ( ! empty( $keywords ) ) { - echo esc_html( $keywords ); - } - break; - case 'unpinned_keywords': - $keywords = get_post_meta( $post_id, '_relevanssi_unpin_keywords', true ); - if ( ! empty( $keywords ) ) { - echo esc_html( $keywords ); - } - break; - case 'pin_for_all': - $pin_for_all = get_post_meta( $post_id, '_relevanssi_pin_for_all', true ); - if ( ! empty( $pin_for_all ) ) { - echo '✓'; - } else { - echo '✗'; - } - break; - case 'exclude_post': - $hide_post = get_post_meta( $post_id, '_relevanssi_hide_post', true ); - if ( ! empty( $hide_post ) ) { - echo '✓'; - } else { - echo '✗'; - } - break; - case 'ignore_content': - $hide_content = get_post_meta( $post_id, '_relevanssi_hide_content', true ); - if ( ! empty( $hide_content ) ) { - echo '✓'; - } else { - echo '✗'; - } - break; - } -} - -/** - * Adds the Relevanssi custom fields to the quick edit box. - * - * @param string $column The column name. - * @param string $post_type The post type. - */ -function relevanssi_quick_edit_custom_box( $column, $post_type ) { - switch ( $column ) { - case 'pinned_keywords': - ?> - -
    - -
    -
    - - - -
    -
    -
    - -
    -
    - - - - - -
    -
    - - -

    %s

    ', esc_html__( 'Relevanssi network options', 'relevanssi' ) ); - - if ( ! empty( $_POST ) ) { // WPCS: Input var okay. - if ( isset( $_REQUEST['submit'] ) ) { // WPCS: Input var okay. - check_admin_referer( plugin_basename( $relevanssi_variables['file'] ), 'relevanssi_network_options' ); - relevanssi_update_network_options(); - } - if ( isset( $_REQUEST['copytoall'] ) ) { // WPCS: Input var okay. - check_admin_referer( plugin_basename( $relevanssi_variables['file'] ), 'relevanssi_network_options' ); - relevanssi_copy_options_to_subsites( $_REQUEST ); // WPCS: Input var okay. - } - } - - $this_page = '?page=relevanssi/relevanssi.php'; - if ( RELEVANSSI_PREMIUM ) { - $this_page = '?page=relevanssi-premium/relevanssi.php'; - } - - echo sprintf( "
    ", esc_attr( $this_page ) ); - - wp_nonce_field( plugin_basename( $relevanssi_variables['file'] ), 'relevanssi_network_options' ); - - ?> - - -
    - ' class='button button-primary' /> -
    - -

    -

    - -
    - - - - - - - -
    - 2000 ) ); - $blog_list = array(); - foreach ( $raw_blog_list as $blog ) { - $details = get_blog_details( $blog->blog_id ); - $blog_list[ $details->blogname ] = $blog->blog_id; - } - ksort( $blog_list ); - echo "'; - - ?> - ' class='button button-primary' /> -
    -
    - - ' . esc_html__( 'Copying options from blog %s', 'relevanssi' ) . '', esc_html( $sourceblog ) ); - global $wpdb; - switch_to_blog( $sourceblog ); - $q = "SELECT * FROM $wpdb->options WHERE option_name LIKE 'relevanssi%'"; - restore_current_blog(); - - $results = $wpdb->get_results( $q ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - - $blog_list = get_sites( array( 'number' => 2000 ) ); - foreach ( $blog_list as $blog ) { - if ( $blog->blog_id === $sourceblog ) { - continue; - } - switch_to_blog( $blog->blog_id ); - - /* translators: %s is the blog ID */ - printf( '

    ' . esc_html__( 'Processing blog %s:', 'relevanssi' ) . '
    ', esc_html( $blog->blog_id ) ); - if ( ! is_plugin_active( 'relevanssi-premium/relevanssi.php' ) ) { - echo esc_html__( 'Relevanssi is not active in this blog.', 'relevanssi' ) . '

    '; - continue; - } - foreach ( $results as $option ) { - if ( is_serialized( $option->option_value ) ) { - $value = unserialize( $option->option_value ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions - } else { - $value = $option->option_value; - } - update_option( $option->option_name, $value ); - } - echo esc_html__( 'Options updated.', 'relevanssi' ) . '

    '; - restore_current_blog(); - } -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/pdf-upload.php b/wp/wp-content/plugins/relevanssi-premium/premium/pdf-upload.php deleted file mode 100644 index 736f7679..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/pdf-upload.php +++ /dev/null @@ -1,851 +0,0 @@ - $post_id ) - ); - // Remove the usual relevanssi_publish action because - // relevanssi_index_pdf() already indexes the post. - remove_action( 'add_attachment', 'relevanssi_publish', 12 ); - } -} - -/** - * Checks the MIME type of the attachment to determine if it's allowed or not. - * - * By default this function blocks all images, all video, and zip files. - * - * @param string $mime_type The attachment MIME type. - * - * @return boolean True, if ok to read the attachment, false if not. - */ -function relevanssi_mime_type_ok( $mime_type ) { - $read_this = true; - $mime_parts = explode( '/', $mime_type ); - if ( in_array( $mime_parts[0], array( 'image', 'video' ), true ) ) { - $read_this = false; - } - if ( isset( $mime_parts[1] ) && in_array( $mime_parts[1], array( 'zip', 'octet-stream', 'x-zip-compressed', 'x-zip' ), true ) ) { - $read_this = false; - } - /** - * Allows the filtering of attachment reading based on MIME type. - * - * @param boolean $read_this True, if ok to read the attachment, false if not. - * @param string $mime_type The attachment MIME type. - * - * @return boolean True, if ok to read the attachment, false if not. - */ - $read_this = apply_filters( 'relevanssi_accept_mime_type', $read_this, $mime_type ); - return $read_this; -} - -/** - * Includes the PDF content custom field in the list of custom fields. - * - * This function works on 'relevanssi_index_custom_fields' filter and makes sure the - * '_relevanssi_pdf_content' custom field is included. - * - * @since 2.0.0 - * - * @param array $custom_fields The custom fields array. - * - * @return array $custom_fields The custom fields array. - */ -function relevanssi_add_pdf_customfield( $custom_fields ) { - if ( ! is_array( $custom_fields ) ) { - $custom_fields = array(); - } - if ( ! in_array( '_relevanssi_pdf_content', $custom_fields, true ) ) { - $custom_fields[] = '_relevanssi_pdf_content'; - } - return $custom_fields; -} - -/** - * Reads in all _relevanssi_pdf_content for found posts to avoid database calls. - * - * @global array An array of the PDF content. - * - * @param array $hits An array of posts found. - * @param WP_Query $query The WP_Query object. - * - * @return array The posts found, untouched. - */ -function relevanssi_prime_pdf_content( $hits, $query ) { - global $relevanssi_pdf_content; - - if ( ! isset( $query->query_vars['fields'] ) || empty( $query->query_vars['fields'] ) ) { - $relevanssi_pdf_content = relevanssi_get_post_meta_for_all_posts( - wp_list_pluck( $hits, 'ID' ), - '_relevanssi_pdf_content' - ); - } - - return $hits; -} - - -/** - * Includes the PDF content custom field for excerpt-building. - * - * This function works on 'relevanssi_pre_excerpt_content' filter and makes sure - * the '_relevanssi_pdf_content' custom field content is included when excerpts - * are built. - * - * @since 2.0.0 - * - * @see relevanssi_prime_pdf_content - * - * @param string $content The post content. - * @param object $post The post object. - * - * @return string $content The post content. - */ -function relevanssi_add_pdf_content_to_excerpt( $content, $post ) { - global $relevanssi_pdf_content; - $pdf_content = $relevanssi_pdf_content[ $post->ID ] ?? ''; - $content .= ' ' . $pdf_content; - return $content; -} - -/** - * Adds the PDF control metabox. - * - * Adds the PDF control metaboxes on post edit pages for posts in the - * 'attachment' post type, with a MIME type that is not 'image/*' or - * 'video/*'. - * - * @since 2.0.0 - * - * @param object $post The post object. - */ -function relevanssi_add_pdf_metaboxes( $post ) { - // Do not display on image pages. - $mime_parts = explode( '/', $post->post_mime_type ); - if ( in_array( $mime_parts[0], array( 'image', 'video' ), true ) ) { - return; - } - - add_meta_box( - 'relevanssi_pdf_box', - __( 'Relevanssi attachment controls', 'relevanssi' ), - 'relevanssi_attachment_metabox', - $post->post_type - ); -} - -/** - * Prints out the attachment control metabox. - * - * Prints out the attachment control metabox used for reading attachments and - * examining the read attachment content. - * - * @global object $post The global post object. - * @global array $relevanssi_variables The Relevanssi global variables array, - * used to get the file name for nonce. - * - * @since 2.0.0 - */ -function relevanssi_attachment_metabox() { - global $post, $relevanssi_variables; - wp_nonce_field( plugin_basename( $relevanssi_variables['file'] ), 'relevanssi_pdfcontent' ); - - $pdf_modified = get_post_meta( $post->ID, '_relevanssi_pdf_modified', true ); - - $url = wp_get_attachment_url( $post->ID ); - $id = $post->ID; - $button_text = $pdf_modified ? __( 'Reread the attachment content', 'relevanssi' ) : __( 'Read the attachment content', 'relevanssi' ); - $api_key = get_network_option( null, 'relevanssi_api_key' ); - $action = 'sendUrl'; - $explanation = __( 'Indexer will fetch the file from your server.', 'relevanssi' ); - if ( 'on' === get_option( 'relevanssi_send_pdf_files' ) ) { - $action = 'sendPdf'; - $explanation = __( 'The file will be uploaded to the indexer.', 'relevanssi' ); - } - - if ( ! $api_key ) { - // get_network_option() falls back to get_option(), but if this is a single - // install on a multisite, it won't work correctly. - $api_key = get_option( 'relevanssi_api_key' ); - } - - if ( ! $api_key ) { - printf( '

    %s

    ', esc_html__( 'No API key set. API key is required for attachment indexing.', 'relevanssi' ) ); - } else { - printf( - '

    ', - esc_attr( $action ), - esc_attr( $button_text ), - esc_attr( $api_key ), - intval( $id ), - esc_attr( $url ), - esc_attr( $explanation ) - ); - - if ( $pdf_modified ) { - esc_html_e( "The attachment content has been modified and won't be reread from the file when doing a general rereading. If you want to reread the attachment contents from the file, you can force rereading here.", 'relevanssi' ); - } - - $pdf_content = get_post_meta( $post->ID, '_relevanssi_pdf_content', true ); - if ( $pdf_content ) { - $pdf_content_title = __( 'Attachment content', 'relevanssi' ); - printf( - '

    ', - esc_html( $pdf_content_title ), - esc_html( $pdf_content ) - ); - } - - $pdf_error = get_post_meta( $post->ID, '_relevanssi_pdf_error', true ); - if ( false !== strpos( $pdf_error, 'R_ERR05' ) ) { - printf( - '

    %s

    ', - esc_html__( 'Relevanssi is currently in process of reading the file contents, please return here later.', 'relevanssi' ) - ); - } elseif ( $pdf_error ) { - $pdf_error_title = __( 'Attachment error message', 'relevanssi' ); - printf( - '

    ', - esc_html( $pdf_error_title ), - esc_html( $pdf_error ) - ); - } - - if ( empty( $pdf_content ) && empty( $pdf_error ) ) { - printf( - '

    %s

    ', - esc_html__( 'No attachment content found for this post at the moment.', 'relevanssi' ) - ); - } - } -} - -/** - * Reads in attachment content from a attachment file. - * - * Reads in the attachment content, either by sending an URL or the file itself to - * the Relevanssi attachment reading service. - * - * @param int $post_id The attachment post ID. - * @param boolean $ajax Is this in AJAX context? Default false. - * @param string $send_file Should the file be sent ('on'), or just the URL ('off')? - * Default null. - * - * @return array An array with two items: boolean 'success' and 'error' - * containing the possible error message. - * - * @since 2.0.0 - */ -function relevanssi_index_pdf( $post_id, $ajax = false, $send_file = null ) { - $hide_post = get_post_meta( $post_id, '_relevanssi_hide_post', true ); - /** - * Filters whether the attachment should be read or not. - * - * @param boolean $hide_post True if the attachment shouldn't be read, - * false if it should. - * @param int $post_id The attachment post ID. - */ - $hide_post = apply_filters( 'relevanssi_do_not_read', $hide_post, $post_id ); - if ( $hide_post ) { - delete_post_meta( $post_id, '_relevanssi_pdf_content' ); - update_post_meta( $post_id, '_relevanssi_pdf_error', RELEVANSSI_ERROR_01 ); - - $result = array( - 'success' => false, - 'error' => RELEVANSSI_ERROR_01, - ); - - return $result; - } - - $mime_type = get_post_mime_type( $post_id ); - if ( ! relevanssi_mime_type_ok( $mime_type ) ) { - delete_post_meta( $post_id, '_relevanssi_pdf_content' ); - update_post_meta( $post_id, '_relevanssi_pdf_error', RELEVANSSI_ERROR_03 ); - - $result = array( - 'success' => false, - 'error' => RELEVANSSI_ERROR_03, - ); - - return $result; - } - - if ( is_null( $send_file ) ) { - $send_file = get_option( 'relevanssi_send_pdf_files' ); - } else { - if ( $send_file ) { - $send_file = 'on'; - } - } - - /** - * Filters whether the PDF files are uploaded for indexing or not. - * - * If you have some files that need to be uploaded and some where it's - * better if the indexer reads them from a URL, you can use this filter - * hook to adjust the setting on a per-file basis. - * - * @param string $sendfile If 'on', upload the file, otherwise the file - * will be read from the URL. - * @param int $post_id The post ID of the attachment post. - */ - $send_file = apply_filters( 'relevanssi_send_pdf_files', $send_file, $post_id ); - - $api_key = get_network_option( null, 'relevanssi_api_key' ); - if ( ! $api_key ) { - $api_key = get_option( 'relevanssi_api_key' ); - } - $server_url = relevanssi_get_server_url(); - - if ( 'on' === get_option( 'relevanssi_do_not_call_home' ) ) { - if ( in_array( $server_url, array( RELEVANSSI_EU_SERVICES_URL, RELEVANSSI_US_SERVICES_URL ), true ) ) { - delete_post_meta( $post_id, '_relevanssi_pdf_content' ); - update_post_meta( $post_id, '_relevanssi_pdf_error', RELEVANSSI_ERROR_02 ); - - $result = array( - 'success' => false, - 'error' => RELEVANSSI_ERROR_02, - ); - - return $result; - } - } - if ( 'on' === $send_file ) { - /** - * Filters the attachment file name. - * - * If you want to make Relevanssi index attached file content from - * files that are stored outside the WP attachment system, use this - * filter to provide the name of the file. - * - * @param string The filename of the attached file. - * @param int The post ID of the attachment post. - */ - $file_name = apply_filters( - 'relevanssi_get_attached_file', - get_attached_file( $post_id ), - $post_id - ); - - $file = fopen( $file_name, 'r' ); // phpcs:ignore WordPress.WP.AlternativeFunctions - if ( false === $file ) { - $response = new WP_Error( 'fopen', 'Could not open the file for reading.' ); - } else { - $file_size = filesize( $file_name ); - $file_data = fread( $file, $file_size ); // phpcs:ignore WordPress.WP.AlternativeFunctions - $args = array( - 'headers' => array( - 'accept' => 'application/json', // The API returns JSON. - 'content-type' => 'application/binary', // Set content type to binary. - ), - 'body' => $file_data, - /** - * Changes the default reading timeout. - * - * By default, the timeout period is 45 seconds. If that's not - * enough, you can adjust the timeout period with this filter. - * - * @param int $timeout The timeout in seconds, default 45. - */ - 'timeout' => apply_filters( 'relevanssi_pdf_read_timeout', 45 ), - ); - $response = wp_safe_remote_post( - $server_url . 'index.php?key=' . $api_key . '&upload=true', - $args - ); - } - } else { - /** - * Filters the attachment URL. - * - * If you want to make Relevanssi index attached file content from - * files that are stored outside the WP attachment system, use this - * filter to provide the URL of the file. - * - * @param string The URL of the attached file. - * @param int The post ID of the attachment post. - */ - $url = apply_filters( - 'relevanssi_get_attachment_url', - wp_get_attachment_url( $post_id ), - $post_id - ); - - $args = array( - 'body' => array( - 'key' => $api_key, - 'url' => $url, - ), - 'method' => 'POST', - /** - * Changes the default reading timeout. - * - * By default, the timeout period is 45 seconds. If that's not - * enough, you can adjust the timeout period with this filter. - * - * @param int $timeout The timeout in seconds, default 45. - */ - 'timeout' => apply_filters( 'relevanssi_pdf_read_timeout', 45 ), - ); - - $response = wp_safe_remote_post( $server_url, $args ); - } - - $result = relevanssi_process_server_response( $response, $post_id ); - - if ( $ajax ) { - echo wp_json_encode( $result ); - wp_die(); - } - - // The PDF count is cached because the query is slow; delete the cache now, as - // the value just changed. - wp_cache_delete( 'relevanssi_pdf_count' ); - wp_cache_delete( 'relevanssi_pdf_error_count' ); - - return $result; -} - -/** - * Processes the attachment reading server response. - * - * Takes in the response from the attachment reading server and stores the attachment - * content or the error message to the appropriate custom fields. - * - * @param array|object $response The server response. - * @param int $post_id The attachment post ID. - * - * @since 2.0.0 - */ -function relevanssi_process_server_response( $response, $post_id ) { - $success = null; - $response_error = ''; - if ( is_wp_error( $response ) ) { - $error_message = $response->get_error_message(); - $response_error .= $error_message . '\n'; - - delete_post_meta( $post_id, '_relevanssi_pdf_content' ); - delete_post_meta( $post_id, '_relevanssi_pdf_modified' ); - update_post_meta( $post_id, '_relevanssi_pdf_error', $error_message ); - $success = false; - } else { - if ( isset( $response['body'] ) ) { - $content = $response['body']; - $content = json_decode( $content ); - - $content_error = ''; - - if ( 413 === $response['response']['code'] ) { - $content_error = RELEVANSSI_ERROR_04; - } - - if ( isset( $content->error ) ) { - $content_error = $content->error; - $content = $content->error; - } - - if ( stristr( $content, 'java.lang.OutOfMemoryError' ) ) { - $content_error = RELEVANSSI_ERROR_04; - } - - if ( empty( $content ) ) { - $content_error = RELEVANSSI_ERROR_06; - } - - if ( ! empty( $content_error ) ) { - delete_post_meta( $post_id, '_relevanssi_pdf_content' ); - delete_post_meta( $post_id, '_relevanssi_pdf_modified' ); - update_post_meta( $post_id, '_relevanssi_pdf_error', $content_error ); - - $response_error .= $content_error; - $success = false; - } else { - delete_post_meta( $post_id, '_relevanssi_pdf_error' ); - delete_post_meta( $post_id, '_relevanssi_pdf_modified' ); - /** - * Filters the read file content before it is saved. - * - * @param string $content The file content as a string. - * @param int $post_id The post ID of the attachment post. - */ - $success = update_post_meta( $post_id, '_relevanssi_pdf_content', apply_filters( 'relevanssi_file_content', $content, $post_id ) ); - relevanssi_index_doc( $post_id, false, relevanssi_get_custom_fields(), true ); - if ( 'on' === get_option( 'relevanssi_index_pdf_parent' ) ) { - if ( function_exists( 'get_post_parent' ) ) { - $parent = get_post_parent( $post_id ); - } else { - // For WP < 5.7 compatibility, remove eventually. - $_post = get_post( $post_id ); - $parent = ! empty( $_post->post_parent ) ? get_post( $_post->post_parent ) : null; - } - if ( $parent ) { - relevanssi_index_doc( $parent->ID, true, relevanssi_get_custom_fields(), true ); - } - } - - if ( ! $success ) { - $response_error = __( 'Could not save the file content to the custom field.', 'relevanssi' ); - } - } - } - } - - $response = array( - 'success' => $success, - 'error' => $response_error, - ); - - return $response; -} - -/** - * Gets the posts with attachments. - * - * Finds the posts with non-image attachments that don't have read content or - * errors. The posts that have timeout or connection errors (cURL error 7 and - * 28, R_ERR06) and those that haven't been read for privacy mode issues - * (R_ERR02) will be included for indexing, but the posts with other errors - * (R_ERR01: post excluded by user, R_ERR03: blocked MIME type and R_ERR04: file - * too large) will not be indexed. - * - * @since 2.0.0 - * - * @param int $limit The number of posts to fetch, default 1. - * - * @return array The posts with attachments. - */ -function relevanssi_get_posts_with_attachments( $limit = 1 ) { - global $wpdb; - - $meta_query_args = array( - 'relation' => 'AND', - array( - 'key' => '_relevanssi_pdf_content', - 'compare' => 'NOT EXISTS', - ), - array( - 'relation' => 'OR', - array( - 'key' => '_relevanssi_pdf_error', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_relevanssi_pdf_error', - 'compare' => 'LIKE', - 'value' => 'R_ERR02:', - ), - array( - 'key' => '_relevanssi_pdf_error', - 'compare' => 'LIKE', - 'value' => 'R_ERR06:', - ), - array( - 'key' => '_relevanssi_pdf_error', - 'compare' => 'LIKE', - 'value' => 'cURL error 7:', - ), - array( - 'key' => '_relevanssi_pdf_error', - 'compare' => 'LIKE', - 'value' => 'cURL error 28:', - ), - array( - 'key' => '_relevanssi_pdf_error', - 'compare' => 'LIKE', - 'value' => 'is not valid.', - ), - ), - ); - $meta_query = new WP_Meta_Query( $meta_query_args ); - $meta_query_sql = $meta_query->get_sql( 'post', $wpdb->posts, 'ID' ); - $meta_join = ''; - $meta_where = ''; - if ( $meta_query_sql ) { - $meta_join = $meta_query_sql['join']; - $meta_where = $meta_query_sql['where']; - } - - // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - if ( $limit > 0 ) { - $query = $wpdb->prepare( - /** - * Filters the SQL query that fetches posts with attachments. - * - * If you want to make Relevanssi index attachments that are not in - * the WP Media Library, you need to adjust this filter to change - * the SQL query so that it fetches the correct posts. - * - * @param string The SQL query - * @param int $limit The number of posts to fetch. - * @param string $meta_join The SQL query join clause. - * @param string $meta_where The SQL query where clause. - */ - apply_filters( - 'relevanssi_get_attachment_posts_query', - "SELECT DISTINCT(ID) FROM $wpdb->posts $meta_join WHERE post_type = 'attachment' AND post_status = 'inherit' AND post_mime_type LIKE %s $meta_where LIMIT %d", - $limit, - $meta_join, - $meta_where - ), - 'application/%', - $limit - ); - } else { - $query = $wpdb->prepare( - /** Filter documented in /premium/pdf-upload.php. */ - apply_filters( - 'relevanssi_get_attachment_posts_query', - "SELECT DISTINCT(ID) FROM $wpdb->posts $meta_join WHERE post_type = 'attachment' AND post_status = 'inherit' AND post_mime_type LIKE %s $meta_where", - 0, - $meta_join, - $meta_where - ), - 'application/%' - ); - } - // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - $posts = $wpdb->get_col( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - - return $posts; -} - -/** - * Prints out the Javascript for PDF content reading. - * - * @since 2.0.0 - */ -function relevanssi_pdf_action_javascript() { - $list_pdfs_nonce = wp_create_nonce( 'relevanssi-list-pdfs' ); - $wipe_pdfs_nonce = wp_create_nonce( 'relevanssi-wipe-pdfs' ); - $index_pdfs_nonce = wp_create_nonce( 'relevanssi-index-pdfs' ); - - ?> - - get_results( "SELECT * FROM $wpdb->postmeta WHERE ( meta_key = '_relevanssi_pin' OR meta_key = '_relevanssi_unpin' OR meta_key = '_relevanssi_pin_for_all' ) AND meta_value != '' LIMIT 1" ); - if ( empty( $results ) ) { - // No, nothing is pinned. - return $hits; - } - - // Disable all filter functions on 'relevanssi_stemmer'. - if ( isset( $wp_filter['relevanssi_stemmer'] ) ) { - $callbacks = $wp_filter['relevanssi_stemmer']->callbacks; - $wp_filter['relevanssi_stemmer']->callbacks = null; - } - - $terms = relevanssi_tokenize( $hits[1], false, -1, 'search_query' ); - - // Re-enable the removed filters. - if ( isset( $wp_filter['relevanssi_stemmer'] ) ) { - $wp_filter['relevanssi_stemmer']->callbacks = $callbacks; - } - - $escaped_terms = array(); - foreach ( array_keys( $terms ) as $term ) { - $escaped_terms[] = esc_sql( trim( $term ) ); - } - - $term_list = array(); - $count_escaped_terms = count( $escaped_terms ); - for ( $length = 1; $length <= $count_escaped_terms; $length++ ) { - for ( $offset = 0; $offset <= $count_escaped_terms - $length; $offset++ ) { - $slice = array_slice( $escaped_terms, $offset, $length ); - $term_list[] = implode( ' ', $slice ); - } - } - - $full_search_phrase = esc_sql( trim( $hits[1] ) ); - if ( ! in_array( $full_search_phrase, $term_list, true ) ) { - $term_list[] = $full_search_phrase; - } - - /** - * Doing this instead of individual get_post_meta() calls can cut hundreds - * of database queries! - */ - $posts_pinned_for_all = array_flip( - $wpdb->get_col( - "SELECT post_id FROM $wpdb->postmeta - WHERE meta_key = '_relevanssi_pin_for_all' - AND meta_value = 'on'" - ) - ); - - /** - * If the search query is "foo bar baz", $term_list now contains "foo", "bar", - *"baz", "foo bar", "bar baz", and "foo bar baz". - */ - - if ( is_array( $term_list ) ) { - $term_list = implode( "','", $term_list ); - $term_list = "'$term_list'"; - - $positive_ids = array(); - $negative_ids = array(); - - $pins_fetched = false; - $pinned_posts = array(); - $other_posts = array(); - foreach ( $hits[0] as $hit ) { - $object_array = relevanssi_get_an_object( $hit ); - $hit = $object_array['object']; - $return_value = $object_array['format']; - - $blog_id = 0; - if ( isset( $hit->blog_id ) ) { - // Multisite, so switch_to_blog() to correct blog and process - // the pinned hits per blog. - $blog_id = $hit->blog_id; - switch_to_blog( $blog_id ); - if ( ! isset( $pins_fetched[ $blog_id ] ) ) { - $positive_ids[ $blog_id ] = $wpdb->get_col( 'SELECT post_id FROM ' . $wpdb->prefix . "postmeta WHERE meta_key = '_relevanssi_pin' AND meta_value IN ( $term_list )" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $negative_ids[ $blog_id ] = $wpdb->get_col( 'SELECT post_id FROM ' . $wpdb->prefix . "postmeta WHERE meta_key = '_relevanssi_unpin' AND meta_value IN ( $term_list )" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - if ( ! is_array( $pins_fetched ) ) { - $pins_fetched = array(); - } - $pins_fetched[ $blog_id ] = true; - } - restore_current_blog(); - } else { - // Single site. - if ( ! $pins_fetched ) { - $positive_ids[0] = $wpdb->get_col( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pin' AND meta_value IN ( $term_list )" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $negative_ids[0] = $wpdb->get_col( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_unpin' AND meta_value IN ( $term_list )" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $pins_fetched = true; - } - } - $hit_id = strval( $hit->ID ); // The IDs from the database are strings, the one from the post is an integer in some contexts. - - $positive_match = isset( $positive_ids[ $blog_id ] ) - && is_array( $positive_ids[ $blog_id ] ) - && in_array( $hit_id, $positive_ids[ $blog_id ], true ); - $negative_match = isset( $negative_ids[ $blog_id ] ) - && is_array( $negative_ids[ $blog_id ] ) - && in_array( $hit_id, $negative_ids[ $blog_id ], true ); - $pinned_for_all = isset( $hit->ID ) && isset( $posts_pinned_for_all[ $hit->ID ] ); - - if ( $hit_id && $positive_match && ! $negative_match ) { - $hit->relevanssi_pinned = 1; - $pinned_posts[] = relevanssi_return_value( $hit, $return_value ); - } else { - if ( $pinned_for_all && ! $negative_match ) { - $hit->relevanssi_pinned = 1; - $pinned_posts[] = relevanssi_return_value( $hit, $return_value ); - } elseif ( ! $negative_match ) { - $other_posts[] = relevanssi_return_value( $hit, $return_value ); - } - } - } - - $hits[0] = array_merge( $pinned_posts, $other_posts ); - } - return $hits; -} - -/** - * Adds pinned words to post content. - * - * Adds pinned terms to post content to make sure posts are found with the - * pinned terms. - * - * @param string $content Post content. - * @param object $post The post object. - */ -function relevanssi_add_pinned_words_to_post_content( $content, $post ) { - $pin_words = get_post_meta( $post->ID, '_relevanssi_pin', false ); - foreach ( $pin_words as $word ) { - $content .= " $word"; - } - return $content; -} - -/** - * Adds pinned words to post title. - * - * If the `relevanssi_index_content` filter hook returns `false`, ie. post - * content is not indexed, this function will add the pinned words to the post - * title instead to guarantee they are found in the search. - * - * @param string $content Titlecontent. - * @param object $post The post object. - */ -function relevanssi_pinning_backup( $content, $post ) { - if ( false === apply_filters( 'relevanssi_index_content', true ) ) { - $content = relevanssi_add_pinned_words_to_post_content( $content, $post ); - } - return $content; -} - -/** - * Provides the pinning functionality for the admin search. - * - * @param object $post The post object. - * @param string $query The search query. - * - * @return array First item is a string containing the pinning buttons, the second - * item is a string containing the "pinned" notice if the post is - * pinned. - */ -function relevanssi_admin_search_pinning( $post, $query ) { - $pinned = ''; - $pinning_buttons = array(); - - $pinned_words = array(); - if ( isset( $post->relevanssi_pinned ) ) { - $pinned_words = get_post_meta( $post->ID, '_relevanssi_pin' ); - $pinned = '' . __( '(pinned)', 'relevanssi' ) . ''; - } - - if ( ! current_user_can( 'edit_post', $post->ID ) ) { - return array( '', $pinned ); - } - - $tokens = relevanssi_tokenize( $query, true, -1, 'search_query' ); - foreach ( array_keys( $tokens ) as $token ) { - if ( ! in_array( $token, $pinned_words, true ) ) { - /* Translators: %s is the search term. */ - $pinning_button = sprintf( '', $post->ID, $token, sprintf( __( "Pin for '%s'", 'relevanssi' ), $token ) ); - $pinning_buttons[] = $pinning_button; - } else { - /* Translators: %s is the search term. */ - $pinning_button = sprintf( '', $post->ID, $token, sprintf( __( "Unpin for '%s'", 'relevanssi' ), $token ) ); - $pinning_buttons[] = $pinning_button; - } - } - $pinning_buttons = implode( ' ', $pinning_buttons ); - - return array( $pinning_buttons, $pinned ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/post-metabox.php b/wp/wp-content/plugins/relevanssi-premium/premium/post-metabox.php deleted file mode 100644 index 5ebebb1a..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/post-metabox.php +++ /dev/null @@ -1,590 +0,0 @@ -post_type, $indexed_post_types, true ) ) { - return; - } - add_meta_box( - 'relevanssi_hidebox', - __( 'Relevanssi', 'relevanssi' ), - 'relevanssi_post_metabox', - array( $post->post_type, 'edit-category' ), - 'side', - 'default', - array( '__back_compat_meta_box' => true ) - ); - add_thickbox(); // Make sure Thickbox is enabled. -} - -/** - * Prints out the Relevanssi Post Controls meta box. - * - * Prints out the Relevanssi Post Controls meta box that is displayed on the post edit pages. - * - * @global array $relevanssi_variables The Relevanssi global variables array, used to get the file name for nonce. - * @global object $post The global post object. - */ -function relevanssi_post_metabox() { - global $relevanssi_variables, $post; - wp_nonce_field( plugin_basename( $relevanssi_variables['file'] ), 'relevanssi_hidepost' ); - - $hide_post = checked( 'on', get_post_meta( $post->ID, '_relevanssi_hide_post', true ), false ); - $hide_content = checked( 'on', get_post_meta( $post->ID, '_relevanssi_hide_content', true ), false ); - $pin_for_all = checked( 'on', get_post_meta( $post->ID, '_relevanssi_pin_for_all', true ), false ); - - $pins = get_post_meta( $post->ID, '_relevanssi_pin', false ); - $pin = implode( ', ', $pins ); - - $unpins = get_post_meta( $post->ID, '_relevanssi_unpin', false ); - $unpin = implode( ', ', $unpins ); - - // The actual fields for data entry. - ?> - - -

    - -

    -

    - - - - -

    - - -

    /> -

    - -

    -

    - - - -

    /> -

    - -

    /> -

    - - ID ); - } - - $display = false; - $element = relevanssi_generate_how_relevanssi_sees( $post->ID, $display ); - echo $element; // phpcs:ignore WordPress.Security.EscapeOutput -} - -/** - * Saves the Relevanssi Gutenberg sidebar meta data. - * - * When a post is saved in Gutenberg, this function saves the Relevanssi - * sidebar meta data. - * - * @param object $post The post object. - */ -function relevanssi_save_gutenberg_postdata( $post ) { - // Verify if this is an auto save routine. - // If it is, our form has not been submitted, so we dont want to do anything. - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { - return; - } - - // Check nonce here? - - $keywords = get_post_meta( $post->ID, '_relevanssi_pin_keywords', true ); - relevanssi_update_pin_fields( $post->ID, $keywords ); - - $keywords = get_post_meta( $post->ID, '_relevanssi_unpin_keywords', true ); - relevanssi_update_unpin_fields( $post->ID, $keywords ); -} - -/** - * Updates the _relevanssi_pin custom fields based on a list of keywords. - * - * @param int $post_id The post ID. - * @param string $keywords The keywords. - */ -function relevanssi_update_pin_fields( $post_id, $keywords ) { - if ( $keywords ) { - delete_post_meta( $post_id, '_relevanssi_pin' ); - $pins = explode( ',', sanitize_text_field( wp_unslash( $keywords ) ) ); - foreach ( $pins as $pin ) { - $pin = trim( $pin ); - if ( ! empty( $pin ) ) { - add_post_meta( $post_id, '_relevanssi_pin', $pin ); - } - } - } else { - delete_post_meta( $post_id, '_relevanssi_pin' ); - } -} - -/** - * Updates the _relevanssi_unpin custom fields based on a list of keywords. - * - * @param int $post_id The post ID. - * @param string $keywords The keywords. - */ -function relevanssi_update_unpin_fields( $post_id, $keywords ) { - if ( $keywords ) { - delete_post_meta( $post_id, '_relevanssi_unpin' ); - $pins = explode( ',', sanitize_text_field( wp_unslash( $keywords ) ) ); - foreach ( $pins as $pin ) { - $pin = trim( $pin ); - if ( ! empty( $pin ) ) { - add_post_meta( $post_id, '_relevanssi_unpin', $pin ); - } - } - } else { - delete_post_meta( $post_id, '_relevanssi_unpin' ); - } -} - -/** - * Saves Relevanssi metabox data. - * - * When a post is saved in the Classic Editor, this function saves the - * Relevanssi Post Controls metabox data. - * - * @param int $post_id The post ID that is being saved. - */ -function relevanssi_save_postdata( $post_id ) { - global $relevanssi_variables; - // Verify if this is an auto save routine. If it is, our form has not been - // submitted, so we dont want to do anything. - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { - return; - } - - // Verify the nonce. - if ( isset( $_POST['relevanssi_hidepost'] ) ) { // WPCS: input var okey. - if ( ! wp_verify_nonce( - sanitize_key( $_POST['relevanssi_hidepost'] ), - plugin_basename( $relevanssi_variables['file'] ) - ) - ) { // WPCS: input var okey. - return; - } - } - - $post = $_POST; // WPCS: input var okey. - - // If relevanssi_metabox is not set, it's a quick edit. - if ( ! isset( $post['relevanssi_metabox'] ) ) { - return; - } - - // Check permissions. - if ( isset( $post['post_type'] ) ) { - if ( 'page' === $post['post_type'] ) { - if ( ! current_user_can( 'edit_page', $post_id ) ) { - return; - } - } else { - if ( ! current_user_can( 'edit_post', $post_id ) ) { - return; - } - } - } - - $hide = ''; - if ( isset( $post['relevanssi_hide_post'] ) && 'on' === $post['relevanssi_hide_post'] ) { - $hide = 'on'; - } - - if ( 'on' === $hide ) { - // Post is marked hidden, so remove it from the index. - relevanssi_remove_doc( $post_id ); - } - - if ( 'on' === $hide ) { - update_post_meta( $post_id, '_relevanssi_hide_post', $hide ); - } else { - delete_post_meta( $post_id, '_relevanssi_hide_post' ); - } - - $hide_content = ''; - if ( isset( $post['relevanssi_hide_content'] ) && 'on' === $post['relevanssi_hide_content'] ) { - $hide_content = 'on'; - } - - if ( 'on' === $hide_content ) { - update_post_meta( $post_id, '_relevanssi_hide_content', $hide_content ); - } else { - delete_post_meta( $post_id, '_relevanssi_hide_content' ); - } - - $pin_for_all = ''; - if ( isset( $post['relevanssi_pin_for_all'] ) && 'on' === $post['relevanssi_pin_for_all'] ) { - $pin_for_all = 'on'; - } - - if ( 'on' === $pin_for_all ) { - update_post_meta( $post_id, '_relevanssi_pin_for_all', $pin_for_all ); - } else { - delete_post_meta( $post_id, '_relevanssi_pin_for_all' ); - } - - if ( isset( $post['relevanssi_pin'] ) ) { - delete_post_meta( $post_id, '_relevanssi_pin' ); - $pins = explode( ',', sanitize_text_field( wp_unslash( $post['relevanssi_pin'] ) ) ); - foreach ( $pins as $pin ) { - $pin = trim( $pin ); - if ( ! empty( $pin ) ) { - add_post_meta( $post_id, '_relevanssi_pin', $pin ); - } - } - } else { - delete_post_meta( $post_id, '_relevanssi_pin' ); - } - - if ( isset( $post['relevanssi_unpin'] ) ) { - delete_post_meta( $post_id, '_relevanssi_unpin' ); - $pins = explode( ',', sanitize_text_field( wp_unslash( $post['relevanssi_unpin'] ) ) ); - foreach ( $pins as $pin ) { - $pin = trim( $pin ); - if ( ! empty( $pin ) ) { - add_post_meta( $post_id, '_relevanssi_unpin', $pin ); - } - } - } else { - delete_post_meta( $post_id, '_relevanssi_unpin' ); - } - - $no_append = ''; - if ( isset( $post['relevanssi_related_no_append'] ) && 'on' === $post['relevanssi_related_no_append'] ) { - $no_append = 'on'; - } - - if ( 'on' === $no_append ) { - update_post_meta( $post_id, '_relevanssi_related_no_append', $no_append ); - } else { - delete_post_meta( $post_id, '_relevanssi_related_no_append' ); - } - - $not_related = ''; - if ( isset( $post['relevanssi_related_not_related'] ) && 'on' === $post['relevanssi_related_not_related'] ) { - $not_related = 'on'; - } - - if ( 'on' === $not_related ) { - update_post_meta( $post_id, '_relevanssi_related_not_related', $not_related ); - } else { - delete_post_meta( $post_id, '_relevanssi_related_not_related' ); - } - - if ( isset( $post['relevanssi_related_keywords'] ) ) { - delete_post_meta( $post_id, '_relevanssi_related_keywords' ); - $keywords = sanitize_text_field( $post['relevanssi_related_keywords'] ); - if ( $keywords ) { - add_post_meta( $post_id, '_relevanssi_related_keywords', $keywords ); - } - } else { - delete_post_meta( $post_id, '_relevanssi_related_keywords' ); - } - - if ( isset( $post['relevanssi_related_include_ids'] ) ) { - delete_post_meta( $post_id, '_relevanssi_related_include_ids' ); - $include_ids_array = explode( ',', $post['relevanssi_related_include_ids'] ); - $valid_ids = array(); - foreach ( $include_ids_array as $id ) { - $id = (int) trim( $id ); - if ( is_int( $id ) ) { - if ( get_post( $id ) ) { - $valid_ids[] = $id; - } - } - } - if ( ! empty( $valid_ids ) ) { - $id_string = implode( ',', $valid_ids ); - add_post_meta( $post_id, '_relevanssi_related_include_ids', $id_string ); - } - } else { - delete_post_meta( $post_id, '_relevanssi_related_include_ids' ); - } - - // Clear the related posts cache for this post. - delete_post_meta( $post_id, '_relevanssi_related_posts' ); -} - -/** - * Prints out the metabox part for related posts. - * - * @param int $post_id The post ID. - */ -function relevanssi_related_posts_metabox( $post_id ) { - $related = get_post_meta( $post_id, '_relevanssi_related_keywords', true ); - $include_ids = get_post_meta( $post_id, '_relevanssi_related_include_ids', true ); - $no_append = checked( 'on', get_post_meta( $post_id, '_relevanssi_related_no_append', true ), false ); - $not_related = checked( 'on', get_post_meta( $post_id, '_relevanssi_related_not_related', true ), false ); - - if ( '0' === $include_ids ) { - $include_ids = ''; - } - ?> -

    - -

    - -

    - -

    -

    - -

    - -

    :

    -

    - -

    - - - - -

    :

    -
      - -
    - -

    -

    The most common search terms for this post:

    -
      - -
    - -

    Low-ranking search terms for this post:

    -
      - -
    - get_results( - $wpdb->prepare( - "SELECT DISTINCT(query), COUNT(*) AS `count` FROM $table" . // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - ' WHERE post_id = %d - GROUP BY query - ORDER BY count DESC - LIMIT 5', - $post_id - ) - ); - - if ( $common_terms ) { - if ( $output_html ) { - $list = '
  • ' . implode( - '
  • ', - array_map( - function( $v ) { - return "$v->query ($v->count)"; - }, - $common_terms - ) - ) . '
  • '; - } else { - $list = $common_terms; - } - } - - return $list; -} - -/** - * Generates tracking insights. - * - * @param int $post_id The post ID. - * @param string $output If 'HTML', output HTML code. If 'ARRAY', output an - * array. Default value is 'HTML'. - */ -function relevanssi_generate_tracking_insights_low_ranking( int $post_id, string $output = 'HTML' ) { - global $wpdb, $relevanssi_variables; - $table = $relevanssi_variables['tracking_table']; - - $output_html = 'ARRAY' !== $output ? true : false; - if ( $output_html ) { - $list = ''; - } else { - $list = array(); - } - - $low_ranking_terms = $wpdb->get_results( - $wpdb->prepare( - "SELECT `query`, `rank` FROM $table" . // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - ' WHERE post_id = %d - AND `rank` > 1 - ORDER BY `rank` DESC - LIMIT 5', - $post_id - ) - ); - - if ( $low_ranking_terms ) { - if ( $output_html ) { - $list = '
  • ' . implode( - '
  • ', - array_map( - function( $v ) { - return "$v->query ($v->rank)"; - }, - $low_ranking_terms - ) - ) . '
  • '; - } else { - $list = $low_ranking_terms; - } - } - - return $list; -} - -/** - * Generates a list of related posts for the related posts metabox. - * - * @param int $post_id The post ID. - * @param string $output If 'HTML', output HTML code. If 'ARRAY', output an - * array. Default value is 'HTML'. - */ -function relevanssi_generate_related_list( $post_id, $output = 'HTML' ) { - $output_html = 'ARRAY' !== $output ? true : false; - if ( $output_html ) { - $list = ''; - } else { - $list = array(); - } - $related_posts = relevanssi_get_related_post_ids( $post_id ); - foreach ( $related_posts as $related_post_id ) { - $title = get_the_title( $related_post_id ); - $link = get_permalink( $related_post_id ); - if ( $output_html ) { - $list .= '
  • ' - . esc_html( $title ) . ' ' - . '()
  • '; - } else { - $list[] = array( - 'id' => $related_post_id, - 'title' => $title, - 'link' => $link, - ); - } - } - return $list; -} - -/** - * Generates a list of excluded posts for the related posts metabox. - * - * @param int $post_id The post ID. - * @param string $output If 'HTML', output HTML code. If 'ARRAY', output an - * array. Default value is 'HTML'. - */ -function relevanssi_generate_excluded_list( $post_id, $output = 'HTML' ) { - $output_html = 'ARRAY' !== $output ? true : false; - if ( $output_html ) { - $list = ''; - } else { - $list = array(); - } - $excluded_posts = get_post_meta( $post_id, '_relevanssi_related_exclude_ids', true ); - if ( $excluded_posts ) { - $excluded_array = explode( ',', $excluded_posts ); - foreach ( $excluded_array as $excluded_post_id ) { - $title = get_the_title( $excluded_post_id ); - $link = get_permalink( $excluded_post_id ); - if ( $output_html ) { - $list .= '
  • ' . esc_html( $title ) . ' ()
  • '; - } else { - $list[] = array( - 'id' => $excluded_post_id, - 'title' => $title, - 'link' => $link, - ); - } - } - } else { - if ( $output_html ) { - $list .= '
  • ' . esc_html__( 'Nothing excluded.', 'relevanssi' ) . '
  • '; - } - } - return $list; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/proximity.php b/wp/wp-content/plugins/relevanssi-premium/premium/proximity.php deleted file mode 100644 index 17ddb01f..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/proximity.php +++ /dev/null @@ -1,181 +0,0 @@ - weight pairs. This function - * ignores the weight and only cares about the post ID. - * - * @return array The $doc_weight array untouched. - */ -function relevanssi_add_distance( $doc_weight ) { - global $relevanssi_coordinates; - - /** - * Filters the comparison coordinates Relevanssi uses. - * - * @param string The coordinates in "latitude, longitude" format. - */ - $compare_coordinates = apply_filters( - 'relevanssi_proximity_comparison', - $relevanssi_coordinates // // phpcs:ignore WordPress.Security.NonceVerification - ); - - if ( ! $compare_coordinates ) { - return $doc_weight; - } - - list( $latitude_from, $longitude_from ) = explode( ',', $compare_coordinates ); - - $latitude_from = floatval( $latitude_from ); - $longitude_from = floatval( $longitude_from ); - - global $relevanssi_distance; - $relevanssi_distance = array(); - - foreach ( array_keys( $doc_weight ) as $post_id ) { - /** - * Filters the coordinates for each post. - * - * @param string The coordinates. - * @param int The post ID. - */ - $hit_coordinates = apply_filters( - 'relevanssi_proximity_coordinates', - '', - $post_id - ); - if ( ! $hit_coordinates ) { - /** - * Filters the default distance for posts without coordinates. - * - * @param int The default distance, default PHP_INT_MAX. - */ - $default_distance = apply_filters( - 'relevanssi_proximity_default_distance', - PHP_INT_MAX - ); - $relevanssi_distance[ $post_id ] = $default_distance; - } - - list( $latitude_to, $longitude_to ) = explode( ',', $hit_coordinates ); - - $latitude_to = floatval( $latitude_to ); - $longitude_to = floatval( $longitude_to ); - - $distance = relevanssi_get_distance( - $latitude_from, - $longitude_from, - $latitude_to, - $longitude_to - ); - - $relevanssi_distance[ $post_id ] = $distance; - } - - return $doc_weight; -} - -/** - * Calculates the great-circle distance between two points. - * - * Uses the Haversine formula. - * - * @param float $latitude_from Latitude of start point in [deg decimal]. - * @param float $longitude_from Longitude of start point in [deg decimal]. - * @param float $latitude_to Latitude of target point in [deg decimal]. - * @param float $longitude_to Longitude of target point in [deg decimal]. - * - * @return float Distance between points in kilometers. - */ -function relevanssi_get_distance( float $latitude_from, float $longitude_from, float $latitude_to, float $longitude_to ) : float { - $earth_radius = 6371; - - $lat_from = deg2rad( $latitude_from ); - $lon_from = deg2rad( $longitude_from ); - $lat_to = deg2rad( $latitude_to ); - $lon_to = deg2rad( $longitude_to ); - - $lat_delta = $lat_to - $lat_from; - $lon_delta = $lon_to - $lon_from; - - $angle = 2 * asin( - sqrt( - pow( sin( $lat_delta / 2 ), 2 ) - + cos( $lat_from ) * cos( $lat_to ) - * pow( sin( $lon_delta / 2 ), 2 ) - ) - ); - - return $angle * $earth_radius; -} - -/** - * Returns the distances for compared posts. - * - * Gets the distances from the $relevanssi_distance global array. - * - * @param object $post_a The first post object. - * @param object $post_b The second post object. - * - * @return array Array containing the distance to post A and to post B. Default - * value is 0. - */ -function relevanssi_get_proximity_values( $post_a, $post_b ) { - global $relevanssi_distance; - - $distance_to_a = $relevanssi_distance[ $post_a->ID ] ?? 0; - $distance_to_b = $relevanssi_distance[ $post_b->ID ] ?? 0; - return array( $distance_to_a, $distance_to_b ); -} - -/** - * Takes the 'coordinates' query variable and stores it to a global variable. - * - * Stores the comparison coordinates from the 'coordinates' query variable in - * the $relevanssi_coordinates global variable, because that is the easiest way - * to access that data in the relevanssi_add_distance() function. - * - * @see relevanssi_add_distance(). - * - * @param array $params The search parameters; ignored. - * @param WP_Query $query The query object. - * - * @return array The search parameters untouched. - */ -function relevanssi_pick_up_coordinates( $params, $query ) { - global $relevanssi_coordinates; - $relevanssi_coordinates = $query->query_vars['coordinates']; - return $params; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/redirects.php b/wp/wp-content/plugins/relevanssi-premium/premium/redirects.php deleted file mode 100644 index 6bb60590..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/redirects.php +++ /dev/null @@ -1,216 +0,0 @@ -is_search && ! $url ) { - if ( empty( $query ) && isset( $redirects['no_terms'] ) ) { - $url = $redirects['no_terms']; - } elseif ( 0 === $wp_query->found_posts && isset( $redirects['empty'] ) ) { - $url = $redirects['empty']; - } - } - - if ( $url ) { - if ( wp_redirect( $url ) ) { // phpcs:ignore WordPress.Security.SafeRedirect - exit(); - } - } -} - -/** - * Helper function to update the redirect for the hit counting. - * - * Takes the new redirect, finds the old one by the `query` field and replaces - * the redirect in the option. - * - * @param array $redirect The redirect array to be added to the option. - */ -function relevanssi_update_redirect( $redirect ) { - $redirects = get_option( 'relevanssi_redirects', array() ); - $key = array_search( - $redirect['query'], - array_column( $redirects, 'query' ), - true - ); - - update_option( - 'relevanssi_redirects', - array_replace( $redirects, array( $key => $redirect ) ) - ); -} - -/** - * Makes relatives URLs absolute and validates all URLs. - * - * Uses site_url() to make relative URLs absolute and then passes all URLs - * through wp_http_validate_url(). - * - * @see wp_http_validate_url() - * - * @param string $value A relative or absolute URL to validate. - * - * @return string|false The URL, converted to absolute if necessary, and - * validated. Returns false on failure. - */ -function relevanssi_validate_url( $value ) { - if ( 'http' !== substr( $value, 0, 4 ) ) { - // Relative URL, make absolute. - if ( '/' !== substr( $value, 0, 1 ) ) { - $value = '/' . $value; - } - $value = site_url() . $value; - } - return wp_http_validate_url( $value ); -} - -/** - * Reads the redirects from the request array and validates the URLs. - * - * All relative URLs are converted to absolute URLs for validation and redirects - * with both the query and URL parameters are kept. - * - * @param array $request The options request array. - * - * @return array The redirect array. - * - * @since 2.2.3 - */ -function relevanssi_process_redirects( $request ) { - $redirects = array(); - foreach ( $request as $key => $value ) { - if ( 'redirect_empty_searches' === $key && ! empty( $value ) ) { - $url = relevanssi_validate_url( $value ); - if ( ! empty( $url ) ) { - $redirects['empty'] = $url; - } - } - if ( 'redirect_no_terms' === $key && ! empty( $value ) ) { - $url = relevanssi_validate_url( $value ); - if ( ! empty( $url ) ) { - $redirects['no_terms'] = $url; - } - } - if ( 'query' !== substr( $key, 0, 5 ) ) { - continue; - } - $suffix = substr( $key, 5 ); - $query = stripslashes( relevanssi_strtolower( $value ) ); - $partial = false; - if ( isset( $request[ 'partial' . $suffix ] ) ) { - $partial = true; - } - $url = null; - if ( isset( $request[ 'url' . $suffix ] ) ) { - $url = relevanssi_validate_url( $request[ 'url' . $suffix ] ); - } - $hits = $request[ 'hits' . $suffix ] ?? 0; - if ( ! empty( $url ) && ! empty( $query ) ) { - $redirect = array( - 'query' => $query, - 'partial' => $partial, - 'url' => $url, - 'hits' => $hits, - ); - $redirects[] = $redirect; - } - } - return $redirects; -} - -/** - * Gets the search query for FacetWP searches. - * - * @return string The search query, empty string if nothing is found. - * - * @author Jan Willem Oostendorp - */ -function relevanssi_get_facetwp_query() { - $query = ''; - - if ( ! empty( FWP()->helper->settings['facets'] ) && ! empty( FWP()->request->url_vars ) ) { - $facet_searches = array(); - $url_vars = FWP()->request->url_vars; - foreach ( FWP()->helper->settings['facets'] as $facet ) { - if ( 'search' === $facet['type'] && 'relevanssi' === $facet['search_engine'] && ! empty( $url_vars[ $facet['name'] ] ) ) { - $facet_searches = array_merge( $facet_searches, $url_vars[ $facet['name'] ] ); - } - } - - // If there are multiple search queries we won't even try. - if ( 1 === count( $facet_searches ) ) { - $query = $facet_searches[0]; - } - } - - return strtolower( $query ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/related.php b/wp/wp-content/plugins/relevanssi-premium/premium/related.php deleted file mode 100644 index af64d288..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/related.php +++ /dev/null @@ -1,763 +0,0 @@ -'; - } - /** - * Filters the related posts output. - * - * @param string The output, ready to be displayed. - */ - return apply_filters( 'relevanssi_related_output', $related ); - } else { - // Post ID custom field returned results, but the transient has - // expired. Let's refresh the custom field as well. - $use_cache = false; - } - } - - $related_posts = relevanssi_get_related_post_ids( $post_id, $use_cache ); - - if ( $just_objects ) { - // Deprecated, remove this functionality eventually. - $related_post_objects = array(); - foreach ( $related_posts as $related_id ) { - array_push( $related_post_objects, get_post( $related_id ) ); - } - set_transient( $transient_name, $related_post_objects, WEEK_IN_SECONDS * 2 ); - } elseif ( ! $no_template ) { - $template = locate_template( 'templates/relevanssi-related.php', false ); - if ( ! $template ) { - $template = $relevanssi_variables['plugin_dir'] . 'premium/templates/relevanssi-related.php'; - } - - ob_start(); - include $template; - $related = ob_get_clean(); - - set_transient( $transient_name, $related, WEEK_IN_SECONDS * 2 ); - } - - /** - * Filters the related posts output. - * - * @param string The output, ready to be displayed. - */ - return apply_filters( 'relevanssi_related_output', $related ); -} - -/** - * Returns related post objects for the specific post. - * - * @param int $post_id The post ID. Default null, in which case global $post - * is used. - * - * @return WP_Post[] An array of WordPress post objects. - */ -function relevanssi_get_related_post_objects( $post_id ) { - if ( ! $post_id ) { - $post_id = get_the_ID(); - if ( ! $post_id ) { - return array(); - } - } - - $settings = get_option( - 'relevanssi_related_settings', - relevanssi_related_default_settings() - ); - - $transient_name = apply_filters( 'relevanssi_related_posts_cache_id', 'relevanssi_related_posts_' . $post_id . '_jo' ); - $use_cache = relevanssi_related_cache_available( $post_id, $settings ); - - if ( $use_cache ) { - $related = get_transient( $transient_name ); - if ( $related ) { - return $related; - } else { - $use_cache = false; - } - } - - $related_posts = relevanssi_get_related_post_ids( $post_id, $use_cache ); - - $related_post_objects = array(); - foreach ( $related_posts as $related_id ) { - array_push( $related_post_objects, get_post( $related_id ) ); - } - set_transient( $transient_name, $related_post_objects, WEEK_IN_SECONDS * 2 ); - - return $related_post_objects; -} - -/** - * Returns true if related post cache is available for the current post. - * - * @param int $post_id The post ID. - * @param array $settings The Relevanssi related posts settings. - * - * @return boolean True, if related post IDs have been cached for the post. - */ -function relevanssi_related_cache_available( $post_id, $settings ) { - $use_cache = true; - /** - * Disables the caching for related posts. Do not use unless you know - * what you are doing. - * - * @param boolean Set true to disable caching. Default false. - */ - if ( apply_filters( 'relevanssi_disable_related_cache', false ) ) { - $use_cache = false; - } elseif ( 'on' !== $settings['cache_for_admins'] && current_user_can( 'manage_options' ) ) { - $use_cache = false; - } else { - // For cache control: if the meta field is empty, cache has been flushed. - $post_ids = get_post_meta( $post_id, '_relevanssi_related_posts', true ); - if ( empty( $post_ids ) ) { - $use_cache = false; - } - } - - return $use_cache; -} - -/** - * Fetches related post IDs. - * - * @param int $post_id The post ID. - * @param boolean $use_cache If false, discard cached results. Default true. - * - * @return int[] An array of related post IDs. - */ -function relevanssi_get_related_post_ids( $post_id, $use_cache = true ) { - global $wpdb; - - $settings = get_option( - 'relevanssi_related_settings', - relevanssi_related_default_settings() - ); - - $related_posts_string = get_post_meta( - $post_id, - '_relevanssi_related_posts', - true - ); - - if ( ! empty( $related_posts_string ) && $use_cache ) { - $related_posts = explode( ',', $related_posts_string ); - return $related_posts; - } - - $post_types = explode( ',', $settings['post_types'] ); - - if ( 'matching_post_type' === $settings['post_types'] || empty( $post_types ) ) { - $post_types = array( get_post_type( $post_id ) ); - } - - /** - * Runs before the related posts searches and can be used to adjust the - * Relevanssi settings. By default disables query logging. - */ - do_action( 'pre_relevanssi_related' ); - - $words = relevanssi_related_generate_keywords( $post_id ); - $related_posts = array(); - - $include_ids = get_post_meta( - $post_id, - '_relevanssi_related_include_ids', - true - ); - if ( $include_ids ) { - $related_posts = explode( ',', $include_ids ); - } - - $exclude_ids = get_post_meta( - $post_id, - '_relevanssi_related_exclude_ids', - true - ); - if ( $exclude_ids ) { - $exclude_ids = explode( ',', $exclude_ids ); - } - if ( ! is_array( $exclude_ids ) ) { - $exclude_ids = array(); - } - $exclude_ids[] = $post_id; // Always exclude the current post. - - // These posts are marked as "not related to anything". - $global_exclude_ids = $wpdb->get_col( - "SELECT post_id FROM $wpdb->postmeta - WHERE meta_key = '_relevanssi_related_not_related' - AND meta_value <> ''" - ); - - $exclude_ids = array_merge( $exclude_ids, $global_exclude_ids ); - $exclude_ids = array_merge( $exclude_ids, $related_posts ); - $exclude_ids = array_keys( array_flip( $exclude_ids ) ); - - $date_query = array(); - if ( isset( $settings['months'] ) && intval( $settings['months'] ) > 0 ) { - $date_query = array( - 'after' => '-' . $settings['months'] . ' months', - ); - } - if ( ! empty( $words ) ) { - $count = count( $related_posts ); - if ( $settings['number'] - $count > 0 ) { - $args = array( - 's' => $words, - 'posts_per_page' => $settings['number'] - $count, - 'post_type' => $post_types, - 'post__not_in' => $exclude_ids, - 'fields' => 'ids', - 'operator' => 'OR', - 'post_status' => 'publish', - ); - if ( $date_query ) { - $args['date_query'] = $date_query; - } - $related_posts_query = new WP_Query(); - $related_posts_query->parse_query( - /** - * Filters the related posts search arguments. - * - * Notice that the defaults vary depending on which related posts - * query is done. Avoid overriding default values; preferably just - * add extra criteria. - * - * @param array The related posts arguments. - * @param string Which query is run. Values include "or", - * "random fill", "random". - */ - apply_filters( - 'relevanssi_related_args', - $args, - 'or' - ) - ); - relevanssi_do_query( $related_posts_query ); - $related_posts = array_merge( $related_posts, $related_posts_query->posts ); - - // There may be null results in the set and those may cause problems - // further down the line. - $related_posts = array_filter( - $related_posts, - function( $value ) { - return $value; - } - ); - } - } - - /** - * Runs after the related posts searches and can be used to adjust the - * Relevanssi settings. - */ - do_action( 'post_relevanssi_related' ); - - $tax_query = array(); - if ( 'random_cat' === $settings['notenough'] || 'random_cat' === $settings['nothing'] ) { - $cats = get_the_category( $post_id ); - $cat_ids = array_map( - function( $cat ) { - return $cat->term_id; - }, - $cats - ); - $tax_query = array( - 'relation' => 'OR', - array( - 'taxonomy' => 'category', - 'field' => 'term_id', - 'terms' => $cat_ids, - 'operator' => 'IN', - ), - ); - } - $random_fill = in_array( - $settings['notenough'], - array( 'random', 'random_cat' ), - true - ) ? true : false; - if ( $random_fill && ( null === $related_posts || count( $related_posts ) < $settings['number'] ) ) { - // Not enough results and user wants a random fillup. - if ( null === $related_posts ) { - $related_posts = array(); - } - $count = count( $related_posts ); - - $exclude_ids = array_merge( $exclude_ids, $related_posts ); - $exclude_ids = array_keys( array_flip( $exclude_ids ) ); - - $args = array( - 'posts_per_page' => $settings['number'] - $count, - 'post_type' => $post_types, - 'post__not_in' => $exclude_ids, - 'fields' => 'ids', - 'orderby' => 'rand', - 'post_status' => 'publish', - ); - if ( $date_query ) { - $args['date_query'] = $date_query; - } - if ( 'random_cat' === $settings['notenough'] ) { - $args['tax_query'] = $tax_query; - } - /** Documented in premium/related.php */ - $more_related_posts = new WP_Query( - apply_filters( - 'relevanssi_related_args', - $args, - 'random fill' - ) - ); - $related_posts = array_merge( - $related_posts, - $more_related_posts->posts - ); - } - $all_random = in_array( - $settings['nothing'], - array( 'random', 'random_cat' ), - true - ) ? true : false; - if ( empty( $related_posts ) && $all_random ) { - $query = new WP_Query(); - // No related posts found, user has requested random posts. - $args = array( - 'posts_per_page' => $settings['number'], - 'post_type' => $post_types, - 'post__not_in' => $exclude_ids, - 'fields' => 'ids', - 'orderby' => 'rand', - 'post_status' => 'publish', - ); - if ( $date_query ) { - $args['date_query'] = $date_query; - } - if ( 'random_cat' === $settings['nothing'] ) { - $args['tax_query'] = $tax_query; - } - $query->query( - /** Documented in premium/related.php */ - apply_filters( - 'relevanssi_related_args', - $args, - 'random' - ) - ); - $related_posts = $query->posts; - } - - /* - * Sometimes a thoughtless relevanssi_hits_filter filter function may - * cause the $related_posts array to contain post objects instead of - * post IDs. This step makes sure the array has post IDs. - */ - $related_posts = array_map( - function( $item ) { - if ( is_object( $item ) && isset( $item->ID ) ) { - return $item->ID; - } else { - return $item; - } - }, - $related_posts - ); - - if ( ! $related_posts ) { - // For some reason nothing was found. - $related_posts = array(); - } - - $related_posts_string = implode( ',', $related_posts ); - update_post_meta( $post_id, '_relevanssi_related_posts', $related_posts_string ); - - return $related_posts; -} - -/** - * Echoes out the related posts. - * - * @param int $post_id The post ID. Default null, in which case global $post is used. - */ -function relevanssi_the_related_posts( $post_id = null ) { - echo relevanssi_related_posts( $post_id ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -} - -/** - * Returns the related posts for the relevanssi_related_posts shortcode. - * - * @param array $atts The shortcode parameters; only one used is post_id, which - * defaults to null and global $post. - */ -function relevanssi_related_posts_shortcode( $atts ) { - $post_id = null; - if ( isset( $atts['post_id'] ) && is_int( $atts['post_id'] ) ) { - $post_id = $atts['post_id']; - } - return relevanssi_related_posts( $post_id ); -} -add_shortcode( 'relevanssi_related_posts', 'relevanssi_related_posts_shortcode' ); - -/** - * Sets the default settings for related posts. - * - * @return array Array containing the default settings. - */ -function relevanssi_related_default_settings() { - return array( - 'enabled' => 'off', - 'number' => 6, - 'nothing' => 'nothing', - 'notenough' => 'random', - 'post_types' => 'post', - 'keyword' => 'title', - 'append' => '', - 'cache_for_admins' => 'off', - 'months' => 0, - 'restrict' => '', - ); -} - -/** - * Sets the default styles for related posts. - * - * @return array Array containing the default styles. - */ -function relevanssi_related_default_styles() { - return array( - 'width' => 250, - 'titles' => 'on', - 'excerpts' => 'off', - 'thumbnails' => 'on', - 'default_thumbnail' => '', - ); -} - -/** - * A wrapper function to attach the related posts to the_content. - * - * @param string $content The post content. - * - * @return string The post content with the related posts appended. - */ -function relevanssi_related_posts_the_content_wrapper( $content ) { - $settings = get_option( - 'relevanssi_related_settings', - relevanssi_related_default_settings() - ); - $post_types = explode( ',', $settings['append'] ); - if ( is_singular() && in_the_loop() && in_array( get_post_type(), $post_types, true ) ) { - global $post; - if ( 'on' !== get_post_meta( $post->ID, '_relevanssi_related_no_append', true ) ) { - $content .= relevanssi_related_posts(); - } - } - return $content; -} - -/** - * Generates keywords from the post. - * - * @param int $post_id The post ID. - */ -function relevanssi_related_generate_keywords( $post_id ) { - global $wpdb, $relevanssi_variables; - - $settings = get_option( - 'relevanssi_related_settings', - relevanssi_related_default_settings() - ); - $keywords = explode( ',', $settings['keyword'] ); - $restrict = explode( ',', $settings['restrict'] ); - - $title_words = array(); - $tag_words = array(); - $cat_words = array(); - $tax_words = array(); - - foreach ( $keywords as $keyword ) { - if ( empty( $keyword ) ) { - continue; - } - if ( 'title' === $keyword ) { - $title_words = $wpdb->get_col( - $wpdb->prepare( - 'SELECT term FROM ' - . $relevanssi_variables['relevanssi_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE doc = %d AND title > 0', - $post_id - ) - ); - } elseif ( 'post_tag' === $keyword ) { - $tag_words = $wpdb->get_col( - $wpdb->prepare( - 'SELECT term FROM ' - . $relevanssi_variables['relevanssi_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE doc = %d AND tag > 0 ORDER BY tag DESC', - $post_id - ) - ); - } elseif ( 'category' === $keyword ) { - $cat_words = $wpdb->get_col( - $wpdb->prepare( - 'SELECT term FROM ' - . $relevanssi_variables['relevanssi_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE doc = %d AND category > 0 ORDER BY category DESC', - $post_id - ) - ); - } else { - $new_tax_words = $wpdb->get_col( - $wpdb->prepare( - 'SELECT term FROM ' - . $relevanssi_variables['relevanssi_table'] // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - . ' WHERE doc = %d AND taxonomy > 0 AND taxonomy_detail LIKE %s ORDER BY taxonomy DESC', - $post_id, - '%' . $keyword . '%' - ) - ); - $new_tax_words = array_map( - function ( $a ) use ( $keyword ) { - return array( - 'word' => $a, - 'taxonomy' => $keyword, - ); - }, - $new_tax_words - ); - $tax_words = array_merge( $tax_words, $new_tax_words ); - } - } - - $custom_words = get_post_meta( $post_id, '_relevanssi_related_keywords', true ); - if ( $custom_words ) { - $custom_words = explode( ',', $custom_words ); - } else { - $custom_words = array(); - } - - $tax_words = array_map( - function ( $word ) use ( $restrict ) { - return in_array( - $word['taxonomy'], - $restrict, - true - ) ? '{' . $word['taxonomy'] . ':' . $word['word'] . '}' : $word['word']; - }, - $tax_words - ); - if ( in_array( 'post_tag', $restrict, true ) ) { - $tag_words = array_map( - function ( $word ) { - return '{post_tag:' . $word . '}'; - }, - $tag_words - ); - } - if ( in_array( 'category', $restrict, true ) ) { - $cat_words = array_map( - function ( $word ) { - return '{category:' . $word . '}'; - }, - $cat_words - ); - } - - $words = array_merge( - $title_words, - $tag_words, - $cat_words, - $tax_words, - $custom_words - ); - $words = array_keys( array_flip( $words ) ); - - /** - * Filters the source words for related posts. - * - * This filter sees the words right before they are fed into Relevanssi to - * find the related posts. - * - * @param string A space-separated list of keywords for related posts. - * @param int The post ID. - */ - return apply_filters( - 'relevanssi_related_words', - implode( ' ', $words ), - $post_id - ); -} - -/** - * Flushes the related post caches. - * - * Deletes all the _relevanssi_related_posts meta fields. This flushes the - * cache. The actual cache is stored in transients, but we don't have a list of - * all the transient names and one shouldn't simply remove the transients from - * the wp_options database table, because it's possible they're not there. - * - * So, instead of deleting the transients, Relevanssi deletes the meta fields - * which contain a list of post IDs (this is helpful for other uses as well), - * which then forces a cache flush. - * - * @global object $wpdb The WordPress database object. - * - * @param int $clean_id If specified, only remove meta fields that contain this - * ID. Default null, which flushes all caches. - */ -function relevanssi_flush_related_cache( $clean_id = null ) { - global $wpdb; - - if ( is_int( $clean_id ) ) { - $clean_id = '%' . $clean_id . '%'; - $wpdb->query( - $wpdb->prepare( - "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_posts' AND meta_value LIKE %s", - $clean_id - ) - ); - // Not perfect, since this will match also rows where post ID contains the - // wanted ID, but it's an acceptable minor cost for a simple solution. - } else { - $wpdb->query( - "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_posts'" - ); - } -} - -/** - * Flushes the caches when a post is made a draft or deleted. - * - * Called from 'transition_post_status' action hook when a post is made into a draft, - * or deleted. Will flush the related post caches where that post appears. - * - * @global object $wpdb The WP database interface. - * - * @param string $new_status The new status. - * @param string $old_status The old status. - * @param object $post The post object. - */ -function relevanssi_flush_caches_on_transition( $new_status, $old_status, $post ) { - // Safety check, for WordPress Editorial Calendar incompatibility. - if ( ! isset( $post ) || ! isset( $post->ID ) ) { - return; - } - - if ( 'publish' !== $new_status ) { - // The post isn't public anymore. - relevanssi_flush_related_cache( $post->ID ); - } -} - -add_action( 'pre_relevanssi_related', 'relevanssi_pre_related_posts' ); -/** - * Runs before the related posts queries and disables logging. - */ -function relevanssi_pre_related_posts() { - // We don't want to log these queries. - add_filter( 'relevanssi_ok_to_log', '__return_false' ); - add_filter( 'pre_option_relevanssi_searchblogs', '__return_false' ); - add_filter( 'pre_option_relevanssi_searchblogs_all', 'relevanssi_return_off' ); -} - -add_action( 'post_relevanssi_related', 'relevanssi_post_related_posts' ); -/** - * Runs after the related posts queries and enables logging. - */ -function relevanssi_post_related_posts() { - remove_filter( 'relevanssi_ok_to_log', '__return_false' ); - remove_filter( 'pre_option_relevanssi_searchblogs', '__return_false' ); - remove_filter( 'pre_option_relevanssi_searchblogs_all', 'relevanssi_return_off' ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/search-multi.php b/wp/wp-content/plugins/relevanssi-premium/premium/search-multi.php deleted file mode 100644 index fe865dcd..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/search-multi.php +++ /dev/null @@ -1,514 +0,0 @@ - 2000 ) ); // There's likely flaming death with even lower values of 'number'. - $blog_list = array(); - foreach ( $raw_blog_list as $blog ) { - $blog_list[] = $blog->blog_id; - } - $search_blogs = implode( ',', $blog_list ); - } - - $search_blogs = explode( ',', $search_blogs ); - if ( ! is_array( $search_blogs ) ) { - // No blogs to search, so let's quit. - return $hits; - } - - $post_type_weights = get_option( 'relevanssi_post_type_weights' ); - - foreach ( $search_blogs as $blogid ) { - $search_again = false; - - if ( ! relevanssi_is_blog_ok( $blogid ) ) { - continue; - } - - // Ok, we should have a valid blog. - switch_to_blog( $blogid ); - $relevanssi_table = $wpdb->prefix . 'relevanssi'; - - $list_of_tables = $wpdb->get_col( 'SHOW TABLES' ); - if ( ! in_array( $relevanssi_table, $list_of_tables, true ) ) { - restore_current_blog(); - continue; - } - - $query_data = relevanssi_process_multi_query_args( $filtered_args ); - $query_restrictions = $query_data['query_restrictions']; - $query_join = $query_data['query_join']; - $q = $query_data['query_query']; - $q_no_synonyms = $query_data['query_no_synonyms']; - $phrase_queries = $query_data['phrase_queries']; - - if ( 'OR' === $operator ) { - $q = relevanssi_add_synonyms( $q ); - } - - $remove_stopwords = false; - $terms = relevanssi_tokenize( $q, $remove_stopwords, 1, 'search_query' ); - - if ( count( $terms ) < 1 ) { - // Tokenizer killed all the search terms. - continue; - } - $terms = array_keys( $terms ); // Don't care about tf in query. - - /** - * Filters the query restrictions in Relevanssi. - * - * Approximately the same purpose as the default 'posts_where' filter hook. - * Can be used to add additional query restrictions to the Relevanssi query. - * - * @param string $query_restrictions MySQL added to the Relevanssi query. - * - * @author Charles St-Pierre. - */ - $query_restrictions = apply_filters( 'relevanssi_where', $query_restrictions ); - - // Go get the count from the options, but run the full query if it's not available. - $doc_count = get_option( 'relevanssi_doc_count' ); - if ( ! $doc_count || $doc_count < 1 ) { - $doc_count = relevanssi_update_doc_count(); - } - - $no_matches = true; - $doc_weight = array(); - $term_hits = array(); - - do { - $df_counts = relevanssi_generate_df_counts( - $terms, - array( - 'no_terms' => false, - 'operator' => $operator, - 'phrase_queries' => $phrase_queries, - 'query_join' => $query_join, - 'query_restrictions' => $query_restrictions, - 'search_again' => $search_again, - ) - ); - - foreach ( $df_counts as $term => $df ) { - $this_query_restrictions = relevanssi_add_phrase_restrictions( - $query_restrictions, - $phrase_queries, - $term, - $operator - ); - - $query = relevanssi_generate_search_query( $term, $search_again, false, $query_join, $this_query_restrictions ); - $matches = $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared - if ( count( $matches ) < 1 ) { - continue; - } else { - $no_matches = false; - } - - $total_hits += count( $matches ); - - $idf = log( $doc_count / ( 1 + $df ) ); - foreach ( $matches as $match ) { - $match->doc = relevanssi_adjust_match_doc( $match ); - $match->tf = relevanssi_calculate_tf( $match, $post_type_weights ); - $match->weight = relevanssi_calculate_weight( $match, $idf, $post_type_weights, $q ); - - /** - * Documented in /lib/search.php. - */ - $match = apply_filters( 'relevanssi_match', $match, $idf, $term ); - - if ( $match->weight <= 0 ) { - continue; // The filters killed the match. - } - - $post_ok = true; - /** - * Filters whether the user is allowed to see the post. - * - * Can this post be included in the search results? This is the hook - * you’ll use if you want to add support for a membership plugin, for - * example. Based on the post ID, your function needs to return true - * or false. - * - * @param boolean $post_ok Can the post be shown in results? - * @param int $doc The post ID. - */ - $post_ok = apply_filters( 'relevanssi_post_ok', $post_ok, $match->doc ); - if ( ! $post_ok ) { - continue; - } - - relevanssi_update_term_hits( $term_hits, $match_arrays, $match, $term ); - - $doc_id = $blogid . '|' . $match->doc; - - $doc_terms[ $match->doc ][ $term ] = true; // Count how many terms are matched to a doc. - if ( ! isset( $doc_weight[ $doc_id ] ) ) { - $doc_weight[ $match->doc ] = 0; - } - $doc_weight[ $match->doc ] += $match->weight; - } - } - - if ( $no_matches ) { - if ( $search_again ) { - // No hits even with partial matching. - $search_again = false; - } else { - if ( 'sometimes' === get_option( 'relevanssi_fuzzy' ) ) { - $search_again = true; - } - } - } else { - $search_again = false; - } - } while ( $search_again ); - - $strip_stopwords = true; - $terms_without_stops = array_keys( relevanssi_tokenize( implode( ' ', $terms ), $strip_stopwords, -1, 'search_query' ) ); - $total_terms = count( $terms_without_stops ); - - if ( isset( $doc_weight ) ) { - /** - * Filters the results Relevanssi finds for one site in multisite - * search. - * - * This is similar to 'relevanssi_results' in single site searching, - * but only applies to results fetched from one subsite, the ID of - * which can be found in the filter parameters. - * - * @param array $doc_weight An array of (post ID, weight) pairs. - * @param int $blogid The blog ID. - */ - $doc_weight = apply_filters( 'relevanssi_site_results', $doc_weight, $blogid ); - } - - if ( isset( $doc_weight ) && count( $doc_weight ) > 0 && ! $no_matches ) { - arsort( $doc_weight ); - $i = 0; - foreach ( $doc_weight as $doc => $weight ) { - if ( count( $doc_terms[ $doc ] ) < $total_terms && 'AND' === $operator ) { - // AND operator in action: $doc didn't match all terms, so it's discarded. - continue; - } - - $post_object = relevanssi_get_multisite_post( $blogid, $doc ); - $post_object->blog_id = $blogid; - - $object_id = $blogid . '|' . $doc; - $hitsbyweight[ $object_id ] = $weight; - $post_objects[ $object_id ] = $post_object; - } - } - restore_current_blog(); - } - - /** - * Filters all results found in the multisite search. - * - * This is similar to 'relevanssi_results', but is applied to multisite - * searches (where 'relevanssi_results' is not used). This filter hook - * filters an array of ID => weight pairs, where ID is in the format - * '[blog ID]|[post ID]'. - * - * You can also use 'relevanssi_site_results', which is more like the - * original 'relevanssi_results'; it's applied to results from a single - * site. - * - * @param array $hitsbyweight The ID => weight pairs. - */ - $hitsbyweight = apply_filters( 'relevanssi_multi_results', $hitsbyweight ); - arsort( $hitsbyweight ); - - $i = 0; - foreach ( $hitsbyweight as $hit => $weight ) { - $hit = $post_objects[ $hit ]; - $hits[ intval( $i ) ] = $hit; - $hits[ intval( $i ) ]->relevance_score = round( $weight, 2 ); - $i++; - } - - if ( count( $hits ) < 1 ) { - if ( 'AND' === $operator && 'on' !== get_option( 'relevanssi_disable_or_fallback' ) ) { - $or_args = $multi_args; - $or_args['operator'] = 'OR'; - $return = relevanssi_search_multi( $or_args ); - $hits = $return['hits']; - $match_arrays['body'] = $return['body_matches']; - $match_arrays['title'] = $return['title_matches']; - $match_arrays['tag'] = $return['tag_matches']; - $match_arrays['category'] = $return['category_matches']; - $match_arrays['taxonomy'] = $return['taxonomy_matches']; - $match_arrays['comment'] = $return['comment_matches']; - $match_arrays['link'] = $return['link_matches']; - $match_arrays['author'] = $return['author_matches']; - $match_arrays['customfield'] = $return['customfield_matches']; - $match_arrays['mysqlcolumn'] = $return['mysqlcolumn_matches']; - $match_arrays['excerpt'] = $return['excerpt_matches']; - $term_hits = $return['term_hits']; - $query = $return['query']; - $doc_weight = $return['doc_weights']; - } - } - - relevanssi_sort_results( $hits, $orderby, $order, $meta_query ); - - $return = array( - 'hits' => $hits, - 'body_matches' => $match_arrays['body'], - 'title_matches' => $match_arrays['title'], - 'tag_matches' => $match_arrays['tag'], - 'category_matches' => $match_arrays['category'], - 'comment_matches' => $match_arrays['comment'], - 'taxonomy_matches' => $match_arrays['taxonomy'], - 'link_matches' => $match_arrays['link'], - 'customfield_matches' => $match_arrays['customfield'], - 'mysqlcolumn_matches' => $match_arrays['mysqlcolumn'], - 'author_matches' => $match_arrays['author'], - 'excerpt_matches' => $match_arrays['excerpt'], - 'term_hits' => $term_hits, - 'query' => $q, - 'query_no_synonyms' => $q_no_synonyms, - 'doc_weights' => $doc_weight, - ); - - return $return; -} - -/** - * Collects the multisite search arguments from the query variables. - * - * @param object $query The WP_Query object that contains the parameters. - * @param string $searchblogs A list of blogs to search, or 'all'. - * @param string $q The search query. - * - * @return array The multisite search parameters. - */ -function relevanssi_compile_multi_args( $query, $searchblogs, $q ) { - $multi_args = relevanssi_compile_common_args( $query ); - - $multi_args['q_no_synonyms'] = $q; - $multi_args['q'] = $q; - - if ( isset( $query->query_vars['searchblogs'] ) ) { - $multi_args['search_blogs'] = $query->query_vars['searchblogs']; - } else { - $multi_args['search_blogs'] = $searchblogs; - } - - $query->query_vars['operator'] = $multi_args['operator']; - - return $multi_args; -} - -/** - * Checks which blogs should be searched. - * - * @param object $query The WP Query object to check for the - * $query->query_vars['searchblogs'] query variable. - * - * @return boolean|string False, if not a multisite search; list of blogs or - * 'all' otherwise. - */ -function relevanssi_is_multisite_search( $query ) { - $searchblogs = false; - $search_multisite = false; - if ( isset( $query->query_vars['searchblogs'] ) - && (string) get_current_blog_id() !== $query->query_vars['searchblogs'] ) { - $search_multisite = true; - $searchblogs = $query->query_vars['searchblogs']; - } - - if ( ! isset( $query->query_vars['searchblogs'] ) && ! $search_multisite ) { - // Is searching all blogs enabled? - $searchblogs_all = get_option( 'relevanssi_searchblogs_all', 'off' ); - if ( 'off' === $searchblogs_all ) { - $searchblogs_all = false; - } - if ( $searchblogs_all ) { - $search_multisite = true; - $searchblogs = 'all'; - } - } - - if ( ! isset( $query->query_vars['searchblogs'] ) && ! $search_multisite ) { - // Searchblogs is not set from the query variables, check the option. - $searchblogs_setting = get_option( 'relevanssi_searchblogs' ); - if ( $searchblogs_setting ) { - $search_multisite = true; - $searchblogs = $searchblogs_setting; - } - } - return $searchblogs; -} - -/** - * Checks to see if a blog is good to use. - * - * Blog must exist, it has to be public and not archived, spam or deleted. The - * filter hook `relevanssi_multisite_public_status` can be used to allow - * Relevanssi to search non-public blogs. - * - * @param int $blogid The blog ID. - * - * @return bool True, if blog is public. - */ -function relevanssi_is_blog_ok( $blogid ) : bool { - // Only search blogs that are publicly available (unless filter says otherwise). - $public_status = (bool) get_blog_status( $blogid, 'public' ); - if ( null === $public_status ) { - // Blog doesn't actually exist. - return false; - } - - /** - * Adjusts the possible values of blog public status. - * - * By default Relevanssi requires blogs to be public so they can be searched. - * If you want a non-public blog in the search results, make this filter - * return true. - * - * @param boolean $public_status Is the blog public? - * @param int $blogid Blog ID. - */ - if ( false === apply_filters( 'relevanssi_multisite_public_status', $public_status, $blogid ) ) { - return false; - } - - // Don't search blogs that are marked "archived", "spam" or "deleted". - if ( get_blog_status( $blogid, 'archived' ) ) { - return false; - } - if ( get_blog_status( $blogid, 'spam' ) ) { - return false; - } - if ( get_blog_status( $blogid, 'delete' ) ) { - return false; - } - return true; -} - -/** - * Processes the arguments to create the query restrictions for multisite - * searches. - * - * All individual parts are tested. - * - * @param array $args The query arguments. - * - * @return array An array containing `query_restriction` and `query_join`. - */ -function relevanssi_process_multi_query_args( $args ) { - $query_restrictions = ''; - $query_join = ''; - $query = ''; - $query_no_synonyms = ''; - - $phrase_query_restrictions = array( - 'and' => '', - 'or' => array(), - ); - - if ( function_exists( 'wp_encode_emoji' ) ) { - $query = wp_encode_emoji( $args['q'] ); - $query_no_synonyms = wp_encode_emoji( $args['q_no_synonyms'] ); - } - - if ( $args['sentence'] ) { - $query = relevanssi_remove_quotes( $query ); - $query = '"' . $query . '"'; - } - - if ( is_array( $args['meta_query'] ) ) { - $processed_meta = relevanssi_process_meta_query( $args['meta_query'] ); - $query_restrictions .= $processed_meta['where']; - $query_join .= $processed_meta['join']; - } - - if ( $args['date_query'] instanceof WP_Date_Query ) { - $query_restrictions .= relevanssi_process_date_query( $args['date_query'] ); - } - - if ( $args['by_date'] ) { - $query_restrictions .= relevanssi_process_by_date( $args['by_date'] ); - } - - $phrases = relevanssi_recognize_phrases( $query, $args['operator'] ); - if ( $phrases ) { - $phrase_query_restrictions = $phrases; - } - - $query_restrictions .= relevanssi_process_post_type( - $args['post_type'], - $args['admin_search'], - $args['include_attachments'] - ); - - if ( $args['post_status'] ) { - $query_restrictions .= relevanssi_process_post_status( $args['post_status'] ); - } - - return array( - 'query_restrictions' => $query_restrictions, - 'query_join' => $query_join, - 'query_query' => $query, - 'query_no_synonyms' => $query_no_synonyms, - 'phrase_queries' => $phrase_query_restrictions, - ); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/search.php b/wp/wp-content/plugins/relevanssi-premium/premium/search.php deleted file mode 100644 index 08c33fb8..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/search.php +++ /dev/null @@ -1,242 +0,0 @@ - $recency_bonus, - 'cutoff' => $recency_cutoff_date, - ); -} - -/** - * Introduces the query variables for Relevanssi Premium. - * - * @param array $qv The WordPress query variable array. - */ -function relevanssi_premium_query_vars( $qv ) { - $qv[] = 'searchblogs'; - $qv[] = 'customfield_key'; - $qv[] = 'customfield_value'; - $qv[] = 'operator'; - $qv[] = 'include_attachments'; - $qv[] = 'coordinates'; - return $qv; -} - -/** - * Sets the operator parameter. - * - * The operator parameter is taken from $query->query_vars['operator'], - * or from the implicit operator setting. - * - * @param object $query The query object. - */ -function relevanssi_set_operator( $query ) { - if ( isset( $query->query_vars['operator'] ) ) { - $operator = $query->query_vars['operator']; - } else { - $operator = get_option( 'relevanssi_implicit_operator' ); - } - return $operator; -} - -/** - * Processes the negative and positive terms (ie. local AND and NOT operators). - * - * If negative terms are present, will remove them from the $terms array. If negative - * or positive terms are present, will return the query restrictions MySQL for them. - * - * @param array $terms An array of search terms. - * @param array $original_terms An array of unstemmed search terms. - * @param string $query The search query as a string. - * - * @return array An array containing the updated terms and the query restrictions. - */ -function relevanssi_process_terms( $terms, $original_terms, $query ) { - $negative_terms = relevanssi_recognize_negatives( $query ); - $positive_terms = relevanssi_recognize_positives( $query ); - - if ( $negative_terms ) { - $terms = array_diff( $terms, $negative_terms ); - $original_terms = array_diff( $original_terms, $negative_terms ); - } - - // Clean: escaped in the function. - $query_restrictions = relevanssi_negatives_positives( $negative_terms, $positive_terms ); - - return array( - 'terms' => $terms, - 'original_terms' => $original_terms, - 'query_restrictions' => $query_restrictions, - ); -} - -/** - * Replaces the wildcards (?, *) with strings to let them pass intact. - * - * The wildcards are only allowed inside words, so they must have a word - * character on both sides of them. - * - * @param string $str The query or content string to modify. - * - * @return string The parameter string modified. - */ -function relevanssi_wildcards_pre( $str ) { - /** - * If true, enables wildcard operators (*, ?). - * - * @param boolean If true, enable wildcard operator. Default false. - */ - if ( apply_filters( 'relevanssi_wildcard_search', false ) ) { - $str = preg_replace( '/(\w)\?(\w)/', '\1SINGLEWILDCARDSYMBOL\2', $str ); - $str = preg_replace( '/(\w)\*(\w)/', '\1MULTIWILDCARDSYMBOL\2', $str ); - } - return $str; -} - -/** - * Replaces the wildcard strings with wildcards (?, *). - * - * @param string $str The query or content string to modify. - * - * @return string The parameter string modified. - */ -function relevanssi_wildcards_post( $str ) { - /** - * Documented in /premium/search.php. - */ - if ( apply_filters( 'relevanssi_wildcard_search', false ) ) { - $str = preg_replace( '/SINGLEWILDCARDSYMBOL/', '?', $str ); - $str = preg_replace( '/MULTIWILDCARDSYMBOL/', '*', $str ); - } - return $str; -} - -/** - * Replaces the wildcards (?, *) with their MySQL equivalents (_, %). - * - * The ? is converted to _ (single character), while * is converted to % - * (zero or more). Hooks to the relevanssi_term_where filter hook to only - * apply this to the term WHERE condition part of the query. - * - * @see relevanssi_term_where - * - * @param string $query MySQL query to modify. - * - * @return string The modified MySQL query. - */ -function relevanssi_query_wildcards( $query ) { - /** - * Documented in /premium/search.php. - */ - if ( apply_filters( 'relevanssi_wildcard_search', false ) ) { - $query = str_replace( array( '?', '*' ), array( '_', '%' ), $query ); - } - return $query; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/spamblock.php b/wp/wp-content/plugins/relevanssi-premium/premium/spamblock.php deleted file mode 100644 index 77958f73..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/spamblock.php +++ /dev/null @@ -1,139 +0,0 @@ - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -

    - -

    - - - - - - - - -

    - -

    - -

    - -

    - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - | - -
    -
    0
    - - -
    - | - -
    -
    - - /> - - - - - - -
    - - - -

    - -

    - -

    - - -

    wp relevanssi regenerate_related' ); ?>

    - -

    - - - - - - - - - - - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - -

    - -

    - ' . esc_html( $relevanssi_variables['plugin_dir'] ) . 'premium/templates/relevanssi-related.php', '' . esc_html( get_stylesheet_directory() ) . '/templates/' ); - ?> -

    - - - - - - - - - - - - > - - - - - - - - - - - - - - - -

    - -

    - - - - - - - - - - - - - - - - -

    - -

    - -

    - ?s=', - '/search/', - 'relevanssi_search_url_prefix', - 'highlight' - ); - ?> -

    - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - -

    - -

    -add_action( 'do_robots', 'rlv_block_bots_robots_txt' );
    -function rlv_block_bots_robots_txt() {
    -	?>
    -User-agent: *
    -Disallow: /search/
    -Disallow: /?s=
    -	<?php
    -}
    -

    - -

    - -

    - - - get_remote_license(); - - ?> -

    - -

    - -

    - ', - '', - '' . esc_html( $support_email ) . '' - ); - ?> -

    - -

    - ', '' ); - ?> -

    - -

    - -

    - -
    - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    -

    -
    - -
    -

    -
    - - - - 0 ) { - $width = $style['width']; - } - - ?> - - posts ). diff --git a/wp/wp-content/plugins/relevanssi-premium/premium/uninstall.php b/wp/wp-content/plugins/relevanssi-premium/premium/uninstall.php deleted file mode 100644 index b6da6731..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/premium/uninstall.php +++ /dev/null @@ -1,157 +0,0 @@ -query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_hide_post'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_hide_content'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pin_for_all'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pin'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_unpin'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pdf_content'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pdf_error'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_pdf_modified'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_keywords'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_posts'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_include_ids'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_exclude_ids'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_no_append'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_related_not_related'" ); - $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key = '_relevanssi_noindex_reason'" ); - - // Unused options, removed in case they are still left. - delete_option( 'relevanssi_cache_seconds' ); - delete_option( 'relevanssi_custom_types' ); - delete_option( 'relevanssi_enable_cache' ); - delete_option( 'relevanssi_hidesponsor' ); - delete_option( 'relevanssi_index_attachments' ); - delete_option( 'relevanssi_index_drafts' ); - delete_option( 'relevanssi_index_limit' ); - delete_option( 'relevanssi_index_type' ); - delete_option( 'relevanssi_show_matches_txt' ); - delete_option( 'relevanssi_tag_boost' ); - delete_option( 'relevanssi_include_cats' ); - delete_option( 'relevanssi_include_tags' ); - delete_option( 'relevanssi_custom_taxonomies' ); - delete_option( 'relevanssi_taxonomies_to_index' ); - delete_option( 'relevanssi_highlight_docs_external' ); - delete_option( 'relevanssi_word_boundaries' ); - - if ( ! defined( 'UNINSTALLING_RELEVANSSI_PREMIUM' ) ) { - // The if clause is required to avoid nagging from testing. - define( 'UNINSTALLING_RELEVANSSI_PREMIUM', true ); - } - - wp_clear_scheduled_hook( 'relevanssi_update_counts' ); - - relevanssi_drop_database_tables(); -} diff --git a/wp/wp-content/plugins/relevanssi-premium/readme.txt b/wp/wp-content/plugins/relevanssi-premium/readme.txt deleted file mode 100644 index d51fc31f..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/readme.txt +++ /dev/null @@ -1,368 +0,0 @@ -=== Relevanssi Premium - A Better Search === -Contributors: msaari -Donate link: https://www.relevanssi.com/ -Tags: search, relevance, better search -Requires at least: 4.9 -Requires PHP: 7.0 -Tested up to: 6.1 -Stable tag: 2.20.4 - -Relevanssi Premium replaces the default search with a partial-match search that sorts results by relevance. It also indexes comments and shortcode content. - -== Description == - -Relevanssi replaces the standard WordPress search with a better search engine, with lots of features and configurable options. You'll get better results, better presentation of results - your users will thank you. - -= Key features = -* Search results sorted in the order of relevance, not by date. -* Fuzzy matching: match partial words, if complete words don't match. -* Find documents matching either just one search term (OR query) or require all words to appear (AND query). -* Search for phrases with quotes, for example "search phrase". -* Create custom excerpts that show where the hit was made, with the search terms highlighted. -* Highlight search terms in the documents when user clicks through search results. -* Search comments, tags, categories and custom fields. - -= Advanced features = -* Adjust the weighting for titles, tags and comments. -* Log queries, show most popular queries and recent queries with no hits. -* Restrict searches to categories and tags using a hidden variable or plugin settings. -* Index custom post types and custom taxonomies. -* Index the contents of shortcodes. -* Google-style "Did you mean?" suggestions based on successful user searches. -* Automatic support for [WPML multi-language plugin](http://wpml.org/). -* Automatic support for various membership plugins. -* Advanced filtering to help hacking the search results the way you want. -* Search result throttling to improve performance on large databases. -* Disable indexing of post content and post titles with a simple filter hook. -* Multisite support. - -= Premium features (only in Relevanssi Premium) = -* PDF content indexing. -* Search result throttling to improve performance on large databases. -* Improved spelling correction in "Did you mean?" suggestions. -* Searching over multiple subsites in one multisite installation. -* Indexing and searching user profiles. -* Weights for post types, including custom post types. -* Limit searches with custom fields. -* Index internal links for the target document (sort of what Google does). -* Search using multiple taxonomies at the same time. - -Relevanssi is available in two versions, regular and Premium. Regular Relevanssi is and will remain free to download and use. Relevanssi Premium comes with a cost, but will get all the new features. Standard Relevanssi will be updated to fix bugs, but new features will mostly appear in Premium. Also, support for standard Relevanssi depends very much on my mood and available time. Premium pricing includes support. - -= Other search plugins = -Relevanssi owes a lot to [wpSearch](https://wordpress.org/extend/plugins/wpsearch/) by Kenny Katzgrau. Relevanssi was built to replace wpSearch, when it started to fail. - - -== Installation == - -1. Extract all files from the ZIP file, and then upload the plugin's folder to /wp-content/plugins/. -1. If your blog is in English, skip to the next step. If your blog is in other language, rename the file *stopwords* in the plugin directory as something else or remove it. If there is *stopwords.yourlanguage*, rename it to *stopwords*. -1. Activate the plugin through the 'Plugins' menu in WordPress. -1. Go to the plugin settings and build the index following the instructions there. - -To update your installation, simply overwrite the old files with the new, activate the new version and if the new version has changes in the indexing, rebuild the index. - -= Note on updates = -If it seems the plugin doesn't work after an update, the first thing to try is deactivating and reactivating the plugin. If there are changes in the database structure, those changes do not happen without a deactivation, for some reason. - -= Changes to templates = -None necessary! Relevanssi uses the standard search form and doesn't usually need any changes in the search results template. - -If the search does not bring any results, your theme probably has a query_posts() call in the search results template. That throws Relevanssi off. For more information, see [The most important Relevanssi debugging trick](http://www.relevanssi.com/knowledge-base/query_posts/). - -= How to index = -Check the options to make sure they're to your liking, then click "Save indexing options and build the index". If everything's fine, you'll see the Relevanssi options screen again with a message "Indexing successful!" - -If something fails, usually the result is a blank screen. The most common problem is a timeout: server ran out of time while indexing. The solution to that is simple: just return to Relevanssi screen (do not just try to reload the blank page) and click "Continue indexing". Indexing will continue. Most databases will get indexed in just few clicks of "Continue indexing". You can follow the process in the "State of the Index": if the amount of documents is growing, the indexing is moving along. - -If the indexing gets stuck, something's wrong. I've had trouble with some plugins, for example Flowplayer video player stopped indexing. I had to disable the plugin, index and then activate the plugin again. Try disabling plugins, especially those that use shortcodes, to see if that helps. Relevanssi shows the highest post ID in the index - start troubleshooting from the post or page with the next highest ID. Server error logs may be useful, too. - -= Using custom search results = -If you want to use the custom search results, make sure your search results template uses `the_excerpt()` to display the entries, because the plugin creates the custom snippet by replacing the post excerpt. - -If you're using a plugin that affects excerpts (like Advanced Excerpt), you may run into some problems. For those cases, I've included the function `relevanssi_the_excerpt()`, which you can use instead of `the_excerpt()`. It prints out the excerpt, but doesn't apply `wp_trim_excerpt()` filters (it does apply `the_content()`, `the_excerpt()`, and `get_the_excerpt()` filters). - -To avoid trouble, use the function like this: - -`` - -See Frequently Asked Questions for more instructions on what you can do with Relevanssi. - -= The advanced hacker option = -If you're doing something unusual with your search and Relevanssi doesn't work, try using `relevanssi_do_query()`. See [Knowledge Base](http://www.relevanssi.com/knowledge-base/relevanssi_do_query/). - -= Uninstalling = -To uninstall the plugin remove the plugin using the normal WordPress plugin management tools (from the Plugins page, first Deactivate, then Delete). If you remove the plugin files manually, the database tables and options will remain. - -= Combining with other plugins = -Relevanssi doesn't work with plugins that rely on standard WP search. Those plugins want to access the MySQL queries, for example. That won't do with Relevanssi. [Search Light](http://wordpress.org/extend/plugins/search-light/), for example, won't work with Relevanssi. - -Some plugins cause problems when indexing documents. These are generally plugins that use shortcodes to do something somewhat complicated. One such plugin is [MapPress Easy Google Maps](http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/). When indexing, you'll get a white screen. To fix the problem, disable either the offending plugin or shortcode expansion in Relevanssi while indexing. After indexing, you can activate the plugin again. - -== Frequently Asked Questions == - -= Where is the Relevanssi search box widget? = -There is no Relevanssi search box widget. - -Just use the standard search box. - -= Where are the user search logs? = -See the top of the admin menu. There's 'User searches'. There. If the logs are empty, please note showing the results needs at least MySQL 5. - -= Displaying the number of search results found = - -The typical solution to showing the number of search results found does not work with Relevanssi. However, there's a solution that's much easier: the number of search results is stored in a variable within $wp_query. Just add the following code to your search results template: - -`found_posts . ' hits'; ?>` - -= Advanced search result filtering = - -If you want to add extra filters to the search results, you can add them using a hook. Relevanssi searches for results in the _relevanssi table, where terms and post_ids are listed. The various filtering methods work by listing either allowed or forbidden post ids in the query WHERE clause. Using the `relevanssi_where` hook you can add your own restrictions to the WHERE clause. - -These restrictions must be in the general format of ` AND doc IN (' . {a list of post ids, which could be a subquery} . ')` - -For more details, see where the filter is applied in the `relevanssi_search()` function. This is stricly an advanced hacker option for those people who're used to using filters and MySQL WHERE clauses and it is possible to break the search results completely by doing something wrong here. - -There's another filter hook, `relevanssi_hits_filter`, which lets you modify the hits directly. The filter passes an array, where index 0 gives the list of hits in the form of an array of post objects and index 1 has the search query as a string. The filter expects you to return an array containing the array of post objects in index 0 (`return array($your_processed_hit_array)`). - -= Direct access to query engine = -Relevanssi can't be used in any situation, because it checks the presence of search with the `is_search()` function. This causes some unfortunate limitations and reduces the general usability of the plugin. - -You can now access the query engine directly. There's a new function `relevanssi_do_query()`, which can be used to do search queries just about anywhere. The function takes a WP_Query object as a parameter, so you need to store all the search parameters in the object (for example, put the search terms in `$your_query_object->query_vars['s']`). Then just pass the WP_Query object to Relevanssi with `relevanssi_do_query($your_wp_query_object);`. - -Relevanssi will process the query and insert the found posts as `$your_query_object->posts`. The query object is passed as reference and modified directly, so there's no return value. The posts array will contain all results that are found. - -= Sorting search results = -If you want something else than relevancy ranking, you can use orderby and order parameters. Orderby accepts $post variable attributes and order can be "asc" or "desc". The most relevant attributes here are most likely "post_date" and "comment_count". - -If you want to give your users the ability to sort search results by date, you can just add a link to http://www.yourblogdomain.com/?s=search-term&orderby=post_date&order=desc to your search result page. - -Order by relevance is either orderby=relevance or no orderby parameter at all. - -= Filtering results by date = -You can specify date limits on searches with `by_date` search parameter. You can use it your search result page like this: http://www.yourblogdomain.com/?s=search-term&by_date=1d to offer your visitor the ability to restrict their search to certain time limit (see [RAPLIQ](http://www.rapliq.org/) for a working example). - -The date range is always back from the current date and time. Possible units are hour (h), day (d), week (w), month (m) and year (y). So, to see only posts from past week, you could use by_date=7d or by_date=1w. - -Using wrong letters for units or impossible date ranges will lead to either defaulting to date or no results at all, depending on case. - -Thanks to Charles St-Pierre for the idea. - -= Displaying the relevance score = -Relevanssi stores the relevance score it uses to sort results in the $post variable. Just add something like - -`echo $post->relevance_score` - -to your search results template inside a PHP code block to display the relevance score. - -= Did you mean? suggestions = -To use Google-style "did you mean?" suggestions, first enable search query logging. The suggestions are based on logged queries, so without good base of logged queries, the suggestions will be odd and not very useful. - -To use the suggestions, add the following line to your search result template, preferably before the have_posts() check: - -`Did you mean: ", "?

    ", 5); }?>` - -The first parameter passes the search term, the second is the text before the result, the third is the text after the result and the number is the amount of search results necessary to not show suggestions. With the default value of 5, suggestions are not shown if the search returns more than 5 hits. - -= Search shortcode = -Relevanssi also adds a shortcode to help making links to search results. That way users can easily find more information about a given subject from your blog. The syntax is simple: - -`[search]John Doe[/search]` - -This will make the text John Doe a link to search results for John Doe. In case you want to link to some other search term than the anchor text (necessary in languages like Finnish), you can use: - -`[search term="John Doe"]Mr. John Doe[/search]` - -Now the search will be for John Doe, but the anchor says Mr. John Doe. - -One more parameter: setting `[search phrase="on"]` will wrap the search term in quotation marks, making it a phrase. This can be useful in some cases. - -= Restricting searches to categories and tags = -Relevanssi supports the hidden input field `cat` to restrict searches to certain categories (or tags, since those are pretty much the same). Just add a hidden input field named `cat` in your search form and list the desired category or tag IDs in the `value` field - positive numbers include those categories and tags, negative numbers exclude them. - -This input field can only take one category or tag id (a restriction caused by WordPress, not Relevanssi). If you need more, use `cats` and use a comma-separated list of category IDs. - -You can also set the restriction from general plugin settings (and then override it in individual search forms with the special field). This works with custom taxonomies as well, just replace `cat` with the name of your taxonomy. - -If you want to restrict the search to categories using a dropdown box on the search form, use a code like this: - -`
    -
    - - 'All categories')); -?> - -
    -
    ` - -This produces a search form with a dropdown box for categories. Do note that this code won't work when placed in a Text widget: either place it directly in the template or use a PHP widget plugin to get a widget that can execute PHP code. - -= Restricting searches with taxonomies = - -You can use taxonomies to restrict search results to posts and pages tagged with a certain taxonomy term. If you have a custom taxonomy of "People" and want to search entries tagged "John" in this taxonomy, just use `?s=keyword&people=John` in the URL. You should be able to use an input field in the search form to do this, as well - just name the input field with the name of the taxonomy you want to use. - -It's also possible to do a dropdown for custom taxonomies, using the same function. Just adjust the arguments like this: - -`wp_dropdown_categories(array('show_option_all' => 'All people', 'name' => 'people', 'taxonomy' => 'people'));` - -This would do a dropdown box for the "People" taxonomy. The 'name' must be the keyword used in the URL, while 'taxonomy' has the name of the taxonomy. - -= Automatic indexing = -Relevanssi indexes changes in documents as soon as they happen. However, changes in shortcoded content won't be registered automatically. If you use lots of shortcodes and dynamic content, you may want to add extra indexing. Here's how to do it: - -`if (!wp_next_scheduled('relevanssi_build_index')) { - wp_schedule_event( time(), 'daily', 'relevanssi_build_index' ); -}` - -Add the code above in your theme functions.php file so it gets executed. This will cause WordPress to build the index once a day. This is an untested and unsupported feature that may cause trouble and corrupt index if your database is large, so use at your own risk. This was presented at [forum](http://wordpress.org/support/topic/plugin-relevanssi-a-better-search-relevanssi-chron-indexing?replies=2). - -= Highlighting terms = -Relevanssi search term highlighting can be used outside search results. You can access the search term highlighting function directly. This can be used for example to highlight search terms in structured search result data that comes from custom fields and isn't normally highlighted by Relevanssi. - -Just pass the content you want highlighted through `relevanssi_highlight_terms()` function. The content to highlight is the first parameter, the search query the second. The content with highlights is then returned by the function. Use it like this: - -`if (function_exists('relevanssi_highlight_terms')) { - echo relevanssi_highlight_terms($content, get_search_query()); -} -else { echo $content; }` - -= Multisite searching = -To search multiple blogs in the same WordPress network, use the `searchblogs` argument. You can add a hidden input field, for example. List the desired blog ids as the value. For example, searchblogs=1,2,3 would search blogs 1, 2, and 3. - -The features are very limited in the multiblog search, none of the advanced filtering works, and there'll probably be fairly serious performance issues if searching common words from multiple blogs. - -= What is tf * idf weighing? = - -It's the basic weighing scheme used in information retrieval. Tf stands for *term frequency* while idf is *inverted document frequency*. Term frequency is simply the number of times the term appears in a document, while document frequency is the number of documents in the database where the term appears. - -Thus, the weight of the word for a document increases the more often it appears in the document and the less often it appears in other documents. - -= What are stop words? = - -Each document database is full of useless words. All the little words that appear in just about every document are completely useless for information retrieval purposes. Basically, their inverted document frequency is really low, so they never have much power in matching. Also, removing those words helps to make the index smaller and searching faster. - -== Known issues and To-do's == -* Known issue: In general, multiple Loops on the search page may cause surprising results. Please make sure the actual search results are the first loop. -* Known issue: Relevanssi doesn't necessarily play nice with plugins that modify the excerpt. If you're having problems, try using relevanssi_the_excerpt() instead of the_excerpt(). -* Known issue: When a tag is removed, Relevanssi index isn't updated until the post is indexed again. - -== Thanks == -* Cristian Damm for tag indexing, comment indexing, post/page exclusion and general helpfulness. -* Marcus Dalgren for UTF-8 fixing. -* Warren Tape. -* Mohib Ebrahim for relentless bug hunting. -* John Blackbourn for amazing internal link feature and other fixes. -* John Calahan for extensive 2.0 beta testing. - -== Changelog == -= 2.20.4 = -* New feature: New filter hook `relevanssi_blocked_field_types` can be used to control which ACF field types are excluded from the index. By default, this includes 'repeater', 'flexible_content', and 'group'. -* New feature: New filter hook `relevanssi_acf_field_object` can be used to filter the ACF field object before Relevanssi indexes it. Return false to have Relevanssi ignore the field type. -* Minor fix: ACF field exclusion is now recursive. If a parent field is excluded, all sub fields will also be excluded. -* Minor fix: The indexing settings tab now checks if the wp_relevanssi database table exists and will create the table if it doesn't. -* Minor fix: Pinning code has been foolproofed to cover some situations that would lead to errors. -* Minor fix: Handling of data attributes in in-document highlighting had a bug that caused problems with third-party plugins. - -= 2.20.3 = -* New feature: Relevanssi now has a debug mode that will help troubleshooting and support. -* Minor fix: Using the_permalink() caused problems with search result links. That is now fixed. Relevanssi no longer hooks onto `the_permalink` hook and instead uses `post_link` and other similar hooks. -* Minor fix: Click tracking parameters have more control to avoid problems from malformed click tracking data. - -= 2.20.2 = -* Fixes the persistent update nag. - -= 2.20.1 = -* New feature: New filter hook `relevanssi_add_highlight_and_tracking` can be used to force Relevanssi to add the `highlight` and tracking parameters to permalinks. -* Changed behaviour: Exclusions now override pinning. If a post is pinned for 'foo' and excluded for 'foo bar', it will now be excluded when someone searches for 'foo bar'. Previously pinning overrode the exclusion. -* Changed behaviour: The 'relevanssi_wpml_filter' filter function now runs on priority 9 instead of 10 to avoid problems with custom filters on relevanssi_hits_filter. -* Minor fix: Page links didn't get the click tracking tags. This is fixed now. -* Minor fix: Including posts in the Related posts could cause duplicates. Now Relevanssi excludes the included posts from the search so that there won't be duplicates. -* Minor fix: Handle cases of missing posts better; relevanssi_get_post() now returns a WP_Error if no post is found. -* Minor fix: Avoid a slow query on the searching tab when the throttle is not enabled. -* Minor fix: Search queries that contain apostrophes and quotes can now be deleted from the log. - -= 2.20.0 = -* New feature: Relevanssi now shows the MySQL `max_allowed_packet` size on the debug tab. -* New feature: Relevanssi now shows the indexing query on the debug tab. -* New feature: You can now edit pinning and exclusions from Quick Edit. -* New feature: You can now remove queries from the search log from the query insights page. -* New feature: ACF field settings now include a 'Exclude from Relevanssi index' setting. You can use that to exclude ACF fields from the Relevanssi index. -* Changed behaviour: Click tracking is disabled in multisite searches. It causes problems with wrong links and isn't very reliable in the best case. -* Changed behaviour: Plugin translation updates are disabled, unless explicitly enabled either from the Overview settings or with the `relevanssi_update_translations` filter hook. -* Minor fix: Relevanssi was adding extra quotes around search terms in the `highlight` parameter. -* Minor fix: Metabox fields look nicer on Firefox. -* Minor fix: Adds the `relevanssi_related_posts_cache_id` filter to the relevanssi_related_posts() function. -* Minor fix: Yet another update to data attributes in highlighting. Thanks to Faeddur. -* Minor fix: Taxonomy query handling was improved. This should help in particular Polylang users who've had problems with Relevanssi ignoring Polylang language restrictions. -* Minor fix: Negative search terms in AND searches caused problems, but now work better. -* Minor fix: Pinning phrases that had the same word more than once (e.g. 'word by word') didn't work. Now it works better. - -= 2.19.1 = -* Minor fix: WooCommerce layered navigation compatibility caused enough problems that I've disabled it by default. You can enable it with `add_filter( 'woocommerce_get_filtered_term_product_counts_query', 'relevanssi_filtered_term_product_counts_query' );`. -* Minor fix: Data attribute handling for in-document highlighting is now better. - -= 2.19.0 = -* New feature: New CLI command `list_pinned_posts` lists all pinned and unpinned posts. -* New feature: New CLI command `list` lists indexed and unindexed posts, taxonomy terms and users. -* New feature: You can now look at how the posts appear in the database from the Debugging tab. -* New feature: Relevanssi now works with WooCommerce layered navigation filters. The filter post counts should now match the Relevanssi search results. -* New feature: You can now export the click tracking logs. -* New feature: New function `relevanssi_count_term_occurrances()` can be used to display how many times search terms appear in the database. -* Changed behaviour: Relevanssi post update trigger is now on `wp_after_insert_post` instead of `wp_insert_post`. This makes the indexing more reliable and better compatible with other plugins. -* Changed behaviour: Previously, throttling searches has been impossible when results are sorted by date. Now if you set Relevanssi to sort by post date from the searching settings, you can enable the throttle and the throttling will make sure to keep the most recent posts. This does not work if you set the `orderby` to `post_date` elsewhere. -* Minor fix: Prevents Relevanssi from interfering in fringe cases (including The Event Calendar event search). -* Minor fix: Relevanssi added the `highlight` parameter to home page URLs, even though it shouldn't. -* Minor fix: Indexing `nav_menu_item` posts is stopped earlier in the process to avoid problems with big menus. -* Minor fix: Add support for WooCommerce products attribute lookup table filtering. -* Minor fix: Improves Polylang language detection. -* Minor fix: Improve excerpts to avoid breaking HTML tags when tags are allowed. -* Minor fix: Add support for JetSmartFilters. -* Minor fix: With multiple excerpts, sometimes Relevanssi would return no excerpt at all. -* Minor fix: If the `sentence` query variable is used to enable phrase searching, Relevanssi now adds quotes to the `highlight` parameter. -* Minor fix: Add support for TablePress `table_filter` shortcodes. -* Minor fix: Improve WPFD file content indexing support. Relevanssi indexing now happens after the WPFD indexing is done. -* Minor fix: User profile update actions now happen at a later priority. This should reduce problems when indexing ACF fields, for example. -* Minor fix: Relevanssi now hyphenates long search terms in the User searches page. This prevents long search terms from messing up the display. -* Minor fix: Stopped some problems with Did you mean suggestions suggesting the same word if a hyphen was included. -* Minor fix: If the API key wasn't set in network settings for a multisite installation, Relevanssi wouldn't fall back to the current site API key setting when indexing attachment content. That works correctly now; still, set the API key on network settings level. -* Minor fix: Paging didn't work in admin searches for hierarchical post types (like pages). -* Minor fix: Relevanssi doesn't add click tracking or highlight parameters to admin searches anymore. -* Minor fix: The search log reset feature now also resets the click tracking log. -* Minor fix: In-document highlighting could break certain elements thanks to Relevanssi messing up data attributes. -* Minor fix: Relevanssi now recursively runs `relevanssi_block_to_render` and the CSS `relevanssi_noindex` filtering for inner blocks. -* Minor fix: Relevanssi redirects now work better with FacetWP searches. Thanks to Jan Willem Oostendorp. - -= 2.18.0 = -* New feature: Oxygen compatibility has been upgraded to support JSON data from Oxygen 4. This is still in early stages, so feedback from Oxygen users is welcome. -* New feature: New filter hook `relevanssi_oxygen_element` is used to filter Oxygen JSON elements. The earlier `relevanssi_oxygen_section_filters` and `relevanssi_oxygen_section_content` filters are no longer used with Oxygen 4; this hook is the only way to filter Oxygen elements. -* Changed behaviour: Relevanssi now applies `remove_accents()` to all strings. This is because default database collations do not care for accents and having accents may cause missing information in indexing. If you use a database collation that doesn't ignore accents, make sure you disable this filter. -* Minor fix: Stops drafts and pending posts from showing up in Relevanssi Live Ajax Searches. -* Minor fix: Remove array_flip() warnings from related posts. -* Minor fix: Relevanssi used `the_category` filter with too few parameters. The missing parameters have been added. -* Minor fix: Language translations didn't update. -* Minor fix: Phrases weren't used in some cases where a multiple-word phrase looked like a single-word phrase. -* Minor fix: Prevents fatal errors from `relevanssi_extract_rt()`. -* Minor fix: Prevents fatal errors from `relevanssi_strip_all_tags()`. - -== Upgrade notice == -= 2.20.4 = -* Better ACF field controls, bug fixes. - -= 2.20.3 = -* Fixes a bug with broken permalinks. - -= 2.20.2 = -* Fixes the persistent update nag. - -= 2.20.1 = -* Bug fixes and small improvements. - -= 2.20.0 = -* New features, performance improvements, bug fixes. - -= 2.19.1 = -* Disables the WooCommerce layered navigation support by default. - -= 2.19.0 = -* Large number of bug fixes and general improvements. \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/relevanssi.php b/wp/wp-content/plugins/relevanssi-premium/relevanssi.php deleted file mode 100644 index db99c362..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/relevanssi.php +++ /dev/null @@ -1,148 +0,0 @@ -. -*/ - -add_action( 'init', 'relevanssi_premium_init' ); -add_action( 'init', 'relevanssi_activate_auto_update' ); -add_action( 'profile_update', 'relevanssi_profile_update', 9999 ); -add_action( 'edit_user_profile_update', 'relevanssi_profile_update', 9999 ); -add_action( 'user_register', 'relevanssi_profile_update', 9999 ); -add_action( 'delete_user', 'relevanssi_delete_user' ); -add_action( 'created_term', 'relevanssi_add_term', 9999, 3 ); -add_action( 'edited_term', 'relevanssi_edit_term', 9999, 3 ); -add_action( 'delete_term', 'relevanssi_delete_taxonomy_term', 9999, 3 ); -add_action( 'save_post', 'relevanssi_save_postdata', 10 ); -add_action( 'edit_attachment', 'relevanssi_save_postdata' ); -add_action( 'edit_attachment', 'relevanssi_save_pdf_postdata' ); -add_action( 'plugins_loaded', 'relevanssi_spamblock' ); -add_filter( 'wpmu_drop_tables', 'relevanssi_wpmu_drop' ); -add_action( 'network_admin_menu', 'relevanssi_network_menu' ); -add_filter( 'attachment_link', 'relevanssi_post_link_replace', 10, 2 ); -add_action( 'admin_enqueue_scripts', 'relevanssi_premium_add_admin_scripts', 11 ); -add_filter( 'relevanssi_premium_tokenizer', 'relevanssi_enable_stemmer' ); -add_filter( 'query_vars', 'relevanssi_premium_query_vars' ); -add_filter( 'relevanssi_tabs', 'relevanssi_premium_add_tabs', 10 ); -add_filter( 'relevanssi_phrase_queries', 'relevanssi_premium_phrase_queries', 10, 3 ); - -global $wp_version; -if ( version_compare( $wp_version, '5.1', '>=' ) ) { - add_action( 'wp_insert_site', 'relevanssi_new_blog', 10, 1 ); -} else { - add_action( 'wpmu_new_blog', 'relevanssi_new_blog', 10, 1 ); -} - -global $wpdb; -global $relevanssi_variables; - -$relevanssi_variables['relevanssi_table'] = $wpdb->prefix . 'relevanssi'; -$relevanssi_variables['stopword_table'] = $wpdb->prefix . 'relevanssi_stopwords'; -$relevanssi_variables['log_table'] = $wpdb->prefix . 'relevanssi_log'; -$relevanssi_variables['tracking_table'] = $wpdb->prefix . 'relevanssi_tracking'; -$relevanssi_variables['post_type_weight_defaults']['post_tag'] = 0.5; -$relevanssi_variables['post_type_weight_defaults']['category'] = 0.5; -$relevanssi_variables['content_boost_default'] = 5; -$relevanssi_variables['title_boost_default'] = 5; -$relevanssi_variables['link_boost_default'] = 0.75; -$relevanssi_variables['comment_boost_default'] = 0.75; -$relevanssi_variables['database_version'] = 21; -$relevanssi_variables['plugin_version'] = '2.20.4'; -$relevanssi_variables['plugin_dir'] = plugin_dir_path( __FILE__ ); -$relevanssi_variables['plugin_basename'] = plugin_basename( __FILE__ ); -$relevanssi_variables['file'] = __FILE__; -$relevanssi_variables['sidebar_capability'] = 'edit_others_posts'; - -define( 'RELEVANSSI_PREMIUM', true ); -define( 'RELEVANSSI_EU_SERVICES_URL', 'https://eu.relevanssiservices.com/' ); -define( 'RELEVANSSI_US_SERVICES_URL', 'https://us.relevanssiservices.com/' ); -if ( ! defined( 'RELEVANSSI_DEVELOP' ) ) { - define( 'RELEVANSSI_DEVELOP', false ); -} - -require_once 'lib/admin-ajax.php'; -require_once 'lib/common.php'; -require_once 'lib/debug.php'; -require_once 'lib/didyoumean.php'; -require_once 'lib/excerpts-highlights.php'; -require_once 'lib/indexing.php'; -require_once 'lib/init.php'; -require_once 'lib/install.php'; -require_once 'lib/interface.php'; -require_once 'lib/log.php'; -require_once 'lib/options.php'; -require_once 'lib/phrases.php'; -require_once 'lib/privacy.php'; -require_once 'lib/search.php'; -require_once 'lib/search-tax-query.php'; -require_once 'lib/search-query-restrictions.php'; -require_once 'lib/shortcodes.php'; -require_once 'lib/stopwords.php'; -require_once 'lib/sorting.php'; -require_once 'lib/user-searches.php'; -require_once 'lib/utils.php'; - -require_once 'premium/admin-ajax.php'; -require_once 'premium/body-stopwords.php'; -require_once 'premium/class-relevanssi-language-packs.php'; -require_once 'premium/class-relevanssi-spellcorrector.php'; -require_once 'premium/class-relevanssi-wp-auto-update.php'; -require_once 'premium/click-tracking.php'; -require_once 'premium/common.php'; -require_once 'premium/excerpts-highlights.php'; -require_once 'premium/indexing.php'; -require_once 'premium/interface.php'; -require_once 'premium/network-options.php'; -require_once 'premium/pdf-upload.php'; -require_once 'premium/pinning.php'; -require_once 'premium/post-metabox.php'; -require_once 'premium/proximity.php'; -require_once 'premium/redirects.php'; -require_once 'premium/related.php'; -require_once 'premium/search.php'; -require_once 'premium/search-multi.php'; -require_once 'premium/spamblock.php'; - -if ( version_compare( $wp_version, '5.0', '>=' ) ) { - require_once 'premium/gutenberg-sidebar.php'; -} - -if ( defined( 'WP_CLI' ) && WP_CLI ) { - require_once 'premium/class-relevanssi-wp-cli-command.php'; -} diff --git a/wp/wp-content/plugins/relevanssi-premium/relevanssi.po b/wp/wp-content/plugins/relevanssi-premium/relevanssi.po deleted file mode 100644 index 152686c0..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/relevanssi.po +++ /dev/null @@ -1,4435 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Relevanssi Premium\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-09 15:41+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: Mikko Saari \n" -"Language-Team: \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-KeywordsList: _e;__;esc_attr__;esc_attr_e;esc_html__;_n;esc_html_e;" -"esc_html_x;esc_attr_x;_x;__ngettext;__ngettext_noop;_n_noop;_nx;_nx_noop;_ex;" -"_c;_nc\n" -"X-Poedit-Basepath: .\n" -"X-Generator: Poedit 3.2\n" -"X-Poedit-SearchPath-0: .\n" -"X-Poedit-SearchPath-1: premium\n" -"X-Poedit-SearchPath-2: lib\n" -"X-Poedit-SearchPathExcluded-0: src\n" -"X-Poedit-SearchPathExcluded-1: release\n" -"X-Poedit-SearchPathExcluded-2: build\n" -"X-Poedit-SearchPathExcluded-3: node_modules\n" -"X-Poedit-SearchPathExcluded-4: coverage\n" -"X-Poedit-SearchPathExcluded-5: vendor\n" - -#: lib/admin-ajax.php:35 lib/admin-ajax.php:189 -msgid "You do not have sufficient permissions to access this page." -msgstr "" - -#: lib/admin-ajax.php:114 -#, php-format -msgid "Indexed %1$d post (total %2$d), processed %3$d / %4$d." -msgstr "" - -#: lib/admin-ajax.php:251 lib/tabs/indexing-tab.php:130 -#: premium/tabs/attachments-tab.php:63 -msgid "Results" -msgstr "" - -#: lib/admin-ajax.php:255 -#, php-format -msgid "Found a total of %1$d posts, showing posts %2$d–%3$s." -msgstr "" - -#: lib/admin-ajax.php:257 -msgid "Previous page" -msgstr "" - -#: lib/admin-ajax.php:260 -msgid "Next page" -msgstr "" - -#: lib/admin-ajax.php:264 -msgid "Score:" -msgstr "" - -#: lib/admin-ajax.php:289 -msgid "Edit" -msgstr "" - -#: lib/admin-ajax.php:337 -msgid "Query variables" -msgstr "" - -#: lib/admin-ajax.php:406 -msgid "Filters" -msgstr "" - -#: lib/admin-ajax.php:407 -msgid "show" -msgstr "" - -#: lib/admin-ajax.php:408 -msgid "hide" -msgstr "" - -#: lib/common.php:147 -msgid "Missing" -msgstr "" - -#: lib/common.php:1120 -msgid "25 most common words in the index" -msgstr "" - -#: lib/common.php:1121 -msgid "" -"These words are excellent stopword material. A word that appears in most of " -"the posts in the database is quite pointless when searching. This is also an " -"easy way to create a completely new stopword list, if one isn't available in " -"your language. Click the word to add the word to the stopword list. The word " -"will also be removed from the index, so rebuilding the index is not " -"necessary." -msgstr "" - -#: lib/common.php:1127 -msgid "Stopword Candidates" -msgstr "" - -#: lib/common.php:1132 -msgid "Add to stopwords" -msgstr "" - -#: lib/common.php:1135 -msgid "Add to content stopwords" -msgstr "" - -#: lib/common.php:1502 -#, php-format -msgid "Nothing found for ID %d." -msgstr "" - -#: lib/common.php:1509 -msgid "Possible reasons this post is not indexed" -msgstr "" - -#: lib/common.php:1513 -msgid "The title" -msgstr "" - -#: lib/common.php:1517 -msgid "The content" -msgstr "" - -#: lib/common.php:1521 lib/tabs/indexing-tab.php:320 -msgid "Comments" -msgstr "" - -#: lib/common.php:1525 -msgid "Tags" -msgstr "" - -#: lib/common.php:1529 -msgid "Categories" -msgstr "" - -#: lib/common.php:1533 -msgid "Other taxonomies" -msgstr "" - -#: lib/common.php:1537 -msgid "Links" -msgstr "" - -#: lib/common.php:1541 -msgid "Authors" -msgstr "" - -#: lib/common.php:1545 -msgid "Excerpt" -msgstr "" - -#: lib/common.php:1549 lib/tabs/indexing-tab.php:334 -msgid "Custom fields" -msgstr "" - -#: lib/common.php:1553 -msgid "MySQL content" -msgstr "" - -#: lib/compatibility/acf.php:128 -msgid "Exclude from Relevanssi index" -msgstr "" - -#: lib/compatibility/acf.php:129 -msgid "" -"If this setting is enabled, Relevanssi will not index the value of this " -"field for posts." -msgstr "" - -#: lib/compatibility/aioseo.php:88 -msgid "Use All-in-One SEO noindex" -msgstr "" - -#: lib/compatibility/aioseo.php:93 -msgid "Use All-in-One SEO noindex." -msgstr "" - -#: lib/compatibility/aioseo.php:95 -msgid "" -"If checked, Relevanssi will not index posts marked as \"No index\" in All-in-" -"One SEO settings." -msgstr "" - -#: lib/compatibility/rankmath.php:80 -msgid "Use Rank Math SEO noindex" -msgstr "" - -#: lib/compatibility/rankmath.php:85 -msgid "Use Rank Math SEO noindex." -msgstr "" - -#: lib/compatibility/rankmath.php:87 -msgid "" -"If checked, Relevanssi will not index posts marked as \"No index\" in Rank " -"Math SEO settings." -msgstr "" - -#: lib/compatibility/seoframework.php:76 -msgid "Use SEO Framework noindex" -msgstr "" - -#: lib/compatibility/seoframework.php:81 -msgid "Use SEO Framework noindex." -msgstr "" - -#: lib/compatibility/seoframework.php:83 -msgid "" -"If checked, Relevanssi will not index posts marked as \"No index\" in SEO " -"Framework settings." -msgstr "" - -#: lib/compatibility/seopress.php:82 -msgid "Use SEOPress noindex" -msgstr "" - -#: lib/compatibility/seopress.php:87 -msgid "Use SEOPress noindex." -msgstr "" - -#: lib/compatibility/seopress.php:89 -msgid "" -"If checked, Relevanssi will not index posts marked as \"No index\" in " -"SEOPress settings." -msgstr "" - -#: lib/compatibility/yoast-seo.php:82 -msgid "Use Yoast SEO noindex" -msgstr "" - -#: lib/compatibility/yoast-seo.php:87 -msgid "Use Yoast SEO noindex." -msgstr "" - -#: lib/compatibility/yoast-seo.php:89 -msgid "" -"If checked, Relevanssi will not index posts marked as \"No index\" in Yoast " -"SEO settings." -msgstr "" - -#: lib/contextual-help.php:24 -#, php-format -msgid "" -"To adjust the post order, you can use the %1$s query parameter. With %1$s, " -"you can use multiple layers of different sorting methods. See WordPress Codex for more details on using arrays for orderby." -msgstr "" - -#: lib/contextual-help.php:26 -#, php-format -msgid "" -"To get inside-word highlights, uncheck the \"%s\" option. That has a side-" -"effect of enabling the inside-word highlights." -msgstr "" - -#: lib/contextual-help.php:26 -msgid "Uncheck this if you use non-ASCII characters" -msgstr "" - -#: lib/contextual-help.php:28 -#, php-format -msgid "In order to adjust the throttle limit, you can use the %s filter hook." -msgstr "" - -#: lib/contextual-help.php:33 lib/interface.php:198 -#: lib/tabs/overview-tab.php:59 -msgid "Searching" -msgstr "" - -#: lib/contextual-help.php:36 -msgid "" -"Inside-word matching is disabled by default, because it increases garbage " -"results that don't really match the search term. If you want to enable it, " -"add the following function to your theme functions.php:" -msgstr "" - -#: lib/contextual-help.php:44 -msgid "" -"It's not usually necessary to adjust the limit from 500, but in some cases " -"performance gains can be achieved by setting a lower limit. We don't suggest " -"going under 200, as low values will make the results worse." -msgstr "" - -#: lib/contextual-help.php:50 -#, php-format -msgid "For all the possible options, see the Codex documentation for %s." -msgstr "" - -#: lib/contextual-help.php:55 -msgid "Restrictions" -msgstr "" - -#: lib/contextual-help.php:57 -msgid "" -"If you want the general search to target all posts, but have a single search " -"form target only certain posts, you can add a hidden input variable to the " -"search form. " -msgstr "" - -#: lib/contextual-help.php:58 -msgid "" -"For example in order to restrict the search to categories 10, 14 and 17, you " -"could add this to the search form:" -msgstr "" - -#: lib/contextual-help.php:60 -msgid "" -"To restrict the search to posts tagged with alfa AND beta, you could add " -"this to the search form:" -msgstr "" - -#: lib/contextual-help.php:67 -#, php-format -msgid "" -"For more exclusion options, see the Codex documentation for %s. For example, " -"to exclude tag ID 10, use" -msgstr "" - -#: lib/contextual-help.php:69 -#, php-format -msgid "" -"To exclude posts from the index and not just from the search, you can use " -"the %s filter hook. This would not index posts that have a certain taxonomy " -"term:" -msgstr "" - -#: lib/contextual-help.php:71 lib/contextual-help.php:153 -#, php-format -msgid "" -"For more examples, see the related knowledge base posts." -msgstr "" - -#: lib/contextual-help.php:76 -msgid "Exclusions" -msgstr "" - -#: lib/contextual-help.php:95 -#, php-format -msgid "" -"By default, the User searches page shows 20 most common keywords. In order " -"to see more, you can adjust the value with the %s filter hook, like this:" -msgstr "" - -#: lib/contextual-help.php:97 -#, php-format -msgid "" -"The complete logs are stored in the %s database table, where you can access " -"them if you need more information than what the User searches page provides." -msgstr "" - -#: lib/contextual-help.php:102 -msgid "Logs" -msgstr "" - -#: lib/contextual-help.php:112 -#, php-format -msgid "" -"Custom snippets require that the search results template uses %s to print " -"out the excerpts." -msgstr "" - -#: lib/contextual-help.php:114 -#, php-format -msgid "" -"If you want more control over what content Relevanssi uses to create the " -"excerpts, you can use the %1$s and %2$s filter hooks to adjust the content." -msgstr "" - -#: lib/contextual-help.php:116 -#, php-format -msgid "" -"Some shortcode do not work well with Relevanssi excerpt-generation. " -"Relevanssi disables some shortcodes automatically to prevent problems. This " -"can be adjusted with the %s filter hook." -msgstr "" - -#: lib/contextual-help.php:118 -#, php-format -msgid "" -"If you want Relevanssi to build excerpts faster and don't mind that they may " -"be less than perfect in quality, add a filter that returns true on hook %s." -msgstr "" - -#: lib/contextual-help.php:123 lib/tabs/indexing-tab.php:393 -msgid "Excerpts" -msgstr "" - -#: lib/contextual-help.php:125 -msgid "" -"Building custom excerpts can be slow. If you are not actually using the " -"excerpts, make sure you disable the option." -msgstr "" - -#: lib/contextual-help.php:127 -msgid "" -"Generally, Relevanssi generates the excerpts from post content. If you want " -"to include custom field content in the excerpt-building, this can be done " -"with a simple setting from the excerpt settings." -msgstr "" - -#: lib/contextual-help.php:137 -#, php-format -msgid "" -"In order to see title highlights from Relevanssi, replace %1$s in the search " -"results template with %2$s. It does the same thing, but supports Relevanssi " -"title highlights." -msgstr "" - -#: lib/contextual-help.php:142 -msgid "Highlights" -msgstr "" - -#: lib/contextual-help.php:144 -msgid "" -"Title highlights don't appear automatically, because that led to problems " -"with highlights appearing in wrong places and messing up navigation menus, " -"for example." -msgstr "" - -#: lib/contextual-help.php:151 -#, php-format -msgid "" -"For more fine-tuned changes, you can use %1$s filter hook to adjust what is " -"replaced with what, and %2$s filter hook to completely override the default " -"punctuation control." -msgstr "" - -#: lib/contextual-help.php:158 -msgid "Punctuation" -msgstr "" - -#: lib/contextual-help.php:160 -msgid "" -"Relevanssi removes punctuation. Some punctuation is removed, some replaced " -"with spaces. Advanced indexing settings include some of the more common " -"settings people want to change." -msgstr "" - -#: lib/contextual-help.php:168 -#, php-format -msgid "" -"If you have content that you don't want indexed, you can wrap that content " -"in a %s shortcode." -msgstr "" - -#: lib/contextual-help.php:170 -#, php-format -msgid "" -"If you need a search form on some page on your site, you can use the %s " -"shortcode to print out a basic search form." -msgstr "" - -#: lib/contextual-help.php:172 -#, php-format -msgid "" -"If you need to add query variables to the search form, the shortcode takes " -"parameters, which are then printed out as hidden input fields. To get a " -"search form with a post type restriction, you can use %1$s. To restrict the " -"search to categories 10, 14 and 17, you can use %2$s and so on." -msgstr "" - -#: lib/contextual-help.php:174 -#, php-format -msgid "" -"You can use the %1$s parameter to add a taxonomy dropdown to the search " -"form. Just use the name of the taxonomy, like %2$s. This works best with " -"hierarchical taxonomies like categories with relatively few options " -"available." -msgstr "" - -#: lib/contextual-help.php:179 -msgid "Helpful shortcodes" -msgstr "" - -#: lib/contextual-help.php:190 -#, php-format -msgid "" -"For more details how to fix that issue, see WooCommerce tips in " -"Relevanssi user manual." -msgstr "" - -#: lib/contextual-help.php:195 -msgid "WooCommerce" -msgstr "" - -#: lib/contextual-help.php:197 -msgid "" -"If your SKUs include hyphens or other punctuation, do note that Relevanssi " -"replaces most punctuation with spaces. That's going to cause issues with SKU " -"searches." -msgstr "" - -#: lib/contextual-help.php:199 -msgid "" -"If you don't want to index products that are out of stock, excluded from the " -"catalog or excluded from the search, there's a product visibility filtering " -"method that is described in the user manual (see link above)." -msgstr "" - -#: lib/contextual-help.php:205 -#, php-format -msgid "" -"To adjust the amount of the exact match bonus, you can use the %s filter " -"hook. It works like this:" -msgstr "" - -#: lib/contextual-help.php:207 -#, php-format -msgid "The default values are %1$s for titles and %2$s for content." -msgstr "" - -#: lib/contextual-help.php:212 -msgid "Exact match bonus" -msgstr "" - -#: lib/contextual-help.php:223 premium/contextual-help.php:97 -msgid "For more information:" -msgstr "" - -#: lib/contextual-help.php:224 premium/contextual-help.php:101 -msgid "Plugin knowledge base" -msgstr "" - -#: lib/contextual-help.php:225 premium/contextual-help.php:99 -msgid "WordPress.org forum" -msgstr "" - -#: lib/indexing.php:31 -msgid "Relevanssi image attachment filter" -msgstr "" - -#: lib/indexing.php:480 premium/common.php:575 -msgid "Relevanssi index exclude" -msgstr "" - -#: lib/indexing.php:509 -msgid "Blocked by a filter function" -msgstr "" - -#: lib/init.php:124 -msgid "" -"You do not have an index! Remember to build the index (click the \"Build the " -"index\" button), otherwise searching won't work." -msgstr "" - -#: lib/init.php:136 -msgid "" -"Multibyte string functions are not available. Relevanssi may not work well " -"without them. Please install (or ask your host to install) the mbstring " -"extension." -msgstr "" - -#: lib/init.php:221 lib/init.php:222 lib/tabs/logging-tab.php:47 -#: lib/user-searches.php:18 -msgid "User searches" -msgstr "" - -#: lib/init.php:233 lib/init.php:234 lib/tabs/searching-tab.php:254 -msgid "Admin search" -msgstr "" - -#: lib/init.php:460 -msgid "Settings" -msgstr "" - -#: lib/init.php:463 -msgid "Go Premium!" -msgstr "" - -#: lib/interface.php:18 -msgid "Relevanssi Search Options" -msgstr "" - -#: lib/interface.php:20 -msgid "Relevanssi Premium Search Options" -msgstr "" - -#: lib/interface.php:108 -msgid "Admin Search" -msgstr "" - -#: lib/interface.php:137 -msgid "Logs clear!" -msgstr "" - -#: lib/interface.php:139 -msgid "Clearing the logs failed." -msgstr "" - -#: lib/interface.php:177 -msgid "Overview" -msgstr "" - -#: lib/interface.php:184 lib/tabs/overview-tab.php:47 -msgid "Indexing" -msgstr "" - -#: lib/interface.php:191 premium/interface.php:1190 -msgid "Attachments" -msgstr "" - -#: lib/interface.php:205 -msgid "Logging" -msgstr "" - -#: lib/interface.php:212 lib/tabs/overview-tab.php:63 -msgid "Excerpts and highlights" -msgstr "" - -#: lib/interface.php:219 lib/tabs/synonyms-tab.php:41 -#: lib/tabs/synonyms-tab.php:67 lib/tabs/synonyms-tab.php:98 -msgid "Synonyms" -msgstr "" - -#: lib/interface.php:226 lib/tabs/stopwords-tab.php:22 -#: lib/tabs/stopwords-tab.php:144 -msgid "Stopwords" -msgstr "" - -#: lib/interface.php:233 lib/tabs/redirects-tab.php:18 -#: premium/interface.php:1182 premium/tabs/redirects-tab.php:26 -msgid "Redirects" -msgstr "" - -#: lib/interface.php:240 lib/tabs/debugging-tab.php:54 -msgid "Debugging" -msgstr "" - -#: lib/interface.php:284 lib/tabs/indexing-tab.php:110 -#: premium/network-options.php:75 -msgid "Save the options" -msgstr "" - -#: lib/interface.php:348 -msgid "Click OK to copy Relevanssi options to all subsites" -msgstr "" - -#: lib/interface.php:349 -msgid "Are you sure you want to remove all stopwords?" -msgstr "" - -#: lib/interface.php:350 -msgid "Are you sure you want to delete the query?" -msgstr "" - -#: lib/interface.php:351 -msgid "Wiping out the index..." -msgstr "" - -#: lib/interface.php:352 -msgid "Done." -msgstr "" - -#: lib/interface.php:353 -msgid "Indexing users..." -msgstr "" - -#: lib/interface.php:354 -msgid "Indexing the following taxonomies:" -msgstr "" - -#: lib/interface.php:355 -msgid "Indexing attachments..." -msgstr "" - -#: lib/interface.php:356 -msgid "Counting posts..." -msgstr "" - -#: lib/interface.php:357 -msgid "Counting taxonomy terms..." -msgstr "" - -#: lib/interface.php:358 -msgid "Counting users..." -msgstr "" - -#: lib/interface.php:359 -msgid "Counting attachments..." -msgstr "" - -#: lib/interface.php:360 -msgid "posts found." -msgstr "" - -#: lib/interface.php:361 -msgid "taxonomy terms found." -msgstr "" - -#: lib/interface.php:362 -msgid "users found." -msgstr "" - -#: lib/interface.php:363 -msgid "attachments found." -msgstr "" - -#: lib/interface.php:364 -msgid "Taxonomy term indexing is disabled." -msgstr "" - -#: lib/interface.php:365 -msgid "User indexing is disabled." -msgstr "" - -#: lib/interface.php:366 -msgid "Indexing complete." -msgstr "" - -#: lib/interface.php:367 -msgid "posts excluded." -msgstr "" - -#: lib/interface.php:368 -msgid "Settings have changed, please save the options before indexing." -msgstr "" - -#: lib/interface.php:369 -msgid "Reload the page to refresh the state of the index." -msgstr "" - -#: lib/interface.php:370 -msgid "Are you sure you want to delete all attachment content from the index?" -msgstr "" - -#: lib/interface.php:371 -msgid "Relevanssi attachment data wiped clean." -msgstr "" - -#: lib/interface.php:372 -msgid "There were problems wiping the Relevanssi attachment data clean." -msgstr "" - -#: lib/interface.php:373 -msgid "hour" -msgstr "" - -#: lib/interface.php:374 -msgid "hours" -msgstr "" - -#: lib/interface.php:375 -msgid "about" -msgstr "" - -#: lib/interface.php:376 -msgid "about an hour" -msgstr "" - -#: lib/interface.php:377 -msgid "about an hour and a half" -msgstr "" - -#: lib/interface.php:378 -msgid "minute" -msgstr "" - -#: lib/interface.php:379 -msgid "minutes" -msgstr "" - -#: lib/interface.php:380 -msgid "less than a minute" -msgstr "" - -#: lib/interface.php:381 -msgid "we're done!" -msgstr "" - -#: lib/interface.php:448 -msgid "Tag weight" -msgstr "" - -#: lib/interface.php:456 -msgid "Category weight" -msgstr "" - -#: lib/log.php:151 -msgid "Logged searches" -msgstr "" - -#: lib/log.php:154 -msgid "Time" -msgstr "" - -#: lib/log.php:158 lib/user-searches.php:319 lib/user-searches.php:333 -#: premium/click-tracking.php:635 premium/tabs/redirects-tab.php:52 -msgid "Query" -msgstr "" - -#: lib/log.php:162 -msgid "Hits found" -msgstr "" - -#: lib/log.php:166 -msgid "IP address" -msgstr "" - -#: lib/log.php:252 -msgid "No search keywords logged." -msgstr "" - -#: lib/log.php:347 -#, php-format -msgid "The query '%s' deleted from the log." -msgstr "" - -#: lib/log.php:359 -#, php-format -msgid "Couldn't remove the query '%s' from the log." -msgstr "" - -#: lib/privacy.php:34 -msgid "What personal data we collect and why we collect it" -msgstr "" - -#: lib/privacy.php:36 -msgid "IP address for searches" -msgstr "" - -#: lib/privacy.php:37 -msgid "" -"All searches performed using the internal site search are logged in the " -"database, including the following information: the search query, the number " -"of hits found, user ID for users who are logged in, date and time and the IP " -"address. The IP address is stored for security and auditing purposes." -msgstr "" - -#: lib/privacy.php:39 -msgid "" -"All searches performed using the internal site search are logged in the " -"database, including the following information: the search query, the number " -"of hits found, user ID for users who are logged in and date and time." -msgstr "" - -#: lib/privacy.php:42 -msgid "How long we retain your data" -msgstr "" - -#: lib/privacy.php:45 -#, php-format -msgid "" -"The search logs are stored for %d days before they are automatically removed." -msgstr "" - -#: lib/privacy.php:47 -msgid "The search logs are stored indefinitely." -msgstr "" - -#: lib/privacy.php:64 lib/privacy.php:81 -msgid "Relevanssi Search Logs" -msgstr "" - -#: lib/shortcodes.php:166 -msgid "None" -msgstr "" - -#: lib/stopwords.php:38 -msgid "Added stopwords from the database." -msgstr "" - -#: lib/stopwords.php:53 -#, php-format -msgid "The stopword file for the language '%s' doesn't exist." -msgstr "" - -#: lib/stopwords.php:69 -msgid "Couldn't read the stopwords from the file." -msgstr "" - -#: lib/stopwords.php:79 -msgid "Added stopwords from the stopword file." -msgstr "" - -#: lib/stopwords.php:138 -#, php-format -msgid "Successfully added %1$d/%2$d terms to stopwords!" -msgstr "" - -#: lib/stopwords.php:157 -#, php-format -msgid "Term '%s' added to stopwords!" -msgstr "" - -#: lib/stopwords.php:166 -#, php-format -msgid "Couldn't add term '%s' to stopwords!" -msgstr "" - -#: lib/stopwords.php:317 -msgid "All stopwords removed! Remember to re-index." -msgstr "" - -#: lib/stopwords.php:325 -msgid "There was a problem, and stopwords couldn't be removed." -msgstr "" - -#: lib/stopwords.php:362 -#, php-format -msgid "Term '%s' removed from stopwords! Re-index to get it back to index." -msgstr "" - -#: lib/stopwords.php:375 -#, php-format -msgid "Couldn't remove term '%s' from stopwords!" -msgstr "" - -#: lib/tabs/attachments-tab.php:18 -msgid "Indexing attachment content" -msgstr "" - -#: lib/tabs/attachments-tab.php:20 -msgid "" -"With Relevanssi Premium, you can index the text contents of attachments " -"(PDFs, Word documents, Open Office documents and many other types). The " -"contents of the attachments are processed on an external service, which " -"makes the feature reliable and light on your own server performance." -msgstr "" - -#: lib/tabs/attachments-tab.php:22 lib/tabs/redirects-tab.php:22 -#, php-format -msgid "" -"In order to access this and many other delightful Premium features, %1$sbuy " -"Relevanssi Premium here%2$s." -msgstr "" - -#: lib/tabs/debugging-tab.php:56 -msgid "" -"In order to figure out problems with indexing posts, you can test how " -"Relevanssi sees the post by entering the post ID number in the field below." -msgstr "" - -#: lib/tabs/debugging-tab.php:60 -msgid "" -"You can also check user profiles and taxonomy terms by choosing the type " -"from the dropdown." -msgstr "" - -#: lib/tabs/debugging-tab.php:65 -#, php-format -msgid "" -"In Relevanssi Premium, you can find this feature for each post on the post " -"edit page. %1$sBuy Relevanssi Premium here%2$s." -msgstr "" - -#: lib/tabs/debugging-tab.php:68 lib/tabs/debugging-tab.php:110 -msgid "The ID" -msgstr "" - -#: lib/tabs/debugging-tab.php:83 premium/click-tracking.php:481 -msgid "Post" -msgstr "" - -#: lib/tabs/debugging-tab.php:87 -msgid "Taxonomy term" -msgstr "" - -#: lib/tabs/debugging-tab.php:91 -msgid "User" -msgstr "" - -#: lib/tabs/debugging-tab.php:100 lib/tabs/debugging-tab.php:122 -msgid "Check the post" -msgstr "" - -#: lib/tabs/debugging-tab.php:106 -msgid "How does the post look like in the database?" -msgstr "" - -#: lib/tabs/debugging-tab.php:108 -msgid "" -"This feature will show you how the post looks like in the database. It can " -"sometimes be very helpful for debugging why a post isn't indexed the way you " -"expect it to be." -msgstr "" - -#: lib/tabs/debugging-tab.php:128 -msgid "Debugging information" -msgstr "" - -#: lib/tabs/debugging-tab.php:143 -msgid "Indexing query" -msgstr "" - -#: lib/tabs/debugging-tab.php:168 -msgid "Post not found" -msgstr "" - -#: lib/tabs/excerpts-tab.php:84 -msgid "Custom excerpts/snippets" -msgstr "" - -#: lib/tabs/excerpts-tab.php:89 -msgid "Custom search result snippets" -msgstr "" - -#: lib/tabs/excerpts-tab.php:94 -msgid "Create custom search result snippets" -msgstr "" - -#: lib/tabs/excerpts-tab.php:96 -msgid "Only enable this if you actually use the custom excerpts." -msgstr "" - -#: lib/tabs/excerpts-tab.php:103 -#, php-format -msgid "" -"Looks like you are using Divi. In order to use custom excerpts with Divi, " -"you need to make some changes to your templates. %1$sSee instructions here" -"%2$s." -msgstr "" - -#: lib/tabs/excerpts-tab.php:115 -msgid "Length of the snippet" -msgstr "" - -#: lib/tabs/excerpts-tab.php:125 -msgid "Excerpt length type" -msgstr "" - -#: lib/tabs/excerpts-tab.php:133 -msgid "characters" -msgstr "" - -#: lib/tabs/excerpts-tab.php:134 -msgid "words" -msgstr "" - -#: lib/tabs/excerpts-tab.php:136 -msgid "" -"Using words is much faster than characters. Don't use characters, unless you " -"have a really good reason and your posts are short." -msgstr "" - -#: lib/tabs/excerpts-tab.php:152 -msgid "Allowable tags in excerpts" -msgstr "" - -#: lib/tabs/excerpts-tab.php:162 -msgid "" -"List all tags you want to allow in excerpts. For example: <p><a>" -"<strong>." -msgstr "" - -#: lib/tabs/excerpts-tab.php:173 -msgid "Use custom fields for excerpts" -msgstr "" - -#: lib/tabs/excerpts-tab.php:184 -msgid "Use custom field content for building excerpts" -msgstr "" - -#: lib/tabs/excerpts-tab.php:186 -msgid "" -"Use the custom fields setting for indexing for excerpt-making as well. " -"Enabling this option will show custom field content in Relevanssi-generated " -"excerpts." -msgstr "" - -#: lib/tabs/excerpts-tab.php:189 -msgid "Enable this option to use PDF content for excerpts." -msgstr "" - -#: lib/tabs/excerpts-tab.php:194 -msgid "Current custom field setting" -msgstr "" - -#: lib/tabs/excerpts-tab.php:197 -msgid "all visible custom fields" -msgstr "" - -#: lib/tabs/excerpts-tab.php:199 -msgid "all custom fields" -msgstr "" - -#: lib/tabs/excerpts-tab.php:203 -msgid "Just PDF content" -msgstr "" - -#: lib/tabs/excerpts-tab.php:205 -msgid "None selected" -msgstr "" - -#: lib/tabs/excerpts-tab.php:213 -msgid "Search hit highlighting" -msgstr "" - -#: lib/tabs/excerpts-tab.php:224 -msgid "Highlight type" -msgstr "" - -#: lib/tabs/excerpts-tab.php:234 -msgid "No highlighting" -msgstr "" - -#: lib/tabs/excerpts-tab.php:238 lib/tabs/excerpts-tab.php:248 -msgid "Text color" -msgstr "" - -#: lib/tabs/excerpts-tab.php:239 lib/tabs/excerpts-tab.php:262 -msgid "Background color" -msgstr "" - -#: lib/tabs/excerpts-tab.php:240 -msgid "CSS Style" -msgstr "" - -#: lib/tabs/excerpts-tab.php:241 -msgid "CSS Class" -msgstr "" - -#: lib/tabs/excerpts-tab.php:243 lib/tabs/excerpts-tab.php:406 -msgid "Requires custom snippets to work." -msgstr "" - -#: lib/tabs/excerpts-tab.php:276 -msgid "CSS style for highlights" -msgstr "" - -#: lib/tabs/excerpts-tab.php:287 -#, php-format -msgid "" -"The highlights will be wrapped in a %s with this CSS in the style parameter." -msgstr "" - -#: lib/tabs/excerpts-tab.php:292 -msgid "CSS class for highlights" -msgstr "" - -#: lib/tabs/excerpts-tab.php:303 -#, php-format -msgid "The highlights will be wrapped in a %s with this class." -msgstr "" - -#: lib/tabs/excerpts-tab.php:308 -msgid "Highlight in titles" -msgstr "" - -#: lib/tabs/excerpts-tab.php:319 -msgid "Highlight query terms in titles" -msgstr "" - -#: lib/tabs/excerpts-tab.php:322 -#, php-format -msgid "" -"Highlights in titles require changes to the search results template. You " -"need to replace %1$s in the search results template with %2$s. For more " -"information, see the contextual help." -msgstr "" - -#: lib/tabs/excerpts-tab.php:327 -msgid "Highlight in documents" -msgstr "" - -#: lib/tabs/excerpts-tab.php:338 -msgid "Highlight query terms in documents" -msgstr "" - -#: lib/tabs/excerpts-tab.php:341 -#, php-format -msgid "" -"Highlights hits when user opens the post from search results. This requires " -"an extra parameter (%s) to the links from the search results pages, which " -"Relevanssi should add automatically." -msgstr "" - -#: lib/tabs/excerpts-tab.php:346 -msgid "Highlight in comments" -msgstr "" - -#: lib/tabs/excerpts-tab.php:357 -msgid "Highlight query terms in comments" -msgstr "" - -#: lib/tabs/excerpts-tab.php:359 -msgid "" -"Highlights hits in comments when user opens the post from search results." -msgstr "" - -#: lib/tabs/excerpts-tab.php:364 -msgid "Expand highlights" -msgstr "" - -#: lib/tabs/excerpts-tab.php:375 -msgid "Expand highlights to cover full words" -msgstr "" - -#: lib/tabs/excerpts-tab.php:377 -msgid "" -"When a highlight matches part of the word, if this option is enabled, the " -"highlight will be expanded to highlight the whole word." -msgstr "" - -#: lib/tabs/excerpts-tab.php:382 -msgid "Breakdown of search results" -msgstr "" - -#: lib/tabs/excerpts-tab.php:393 -msgid "Breakdown of search hits in excerpts" -msgstr "" - -#: lib/tabs/excerpts-tab.php:404 -msgid "Show the breakdown of search hits in the excerpts." -msgstr "" - -#: lib/tabs/excerpts-tab.php:411 -msgid "The breakdown format" -msgstr "" - -#: lib/tabs/excerpts-tab.php:421 -msgid "" -"Use %body%, %title%, %categories%, %tags%, %taxonomies%, %comments%, " -"%customfields%, %author%, %excerpt% and %mysqlcolumns% to display the number " -"of hits (in different parts of the post), %total% for total hits, %score% to " -"display the document weight and %terms% to show how many hits each search " -"term got." -msgstr "" - -#: lib/tabs/indexing-tab.php:111 lib/tabs/indexing-tab.php:117 -msgid "Build the index" -msgstr "" - -#: lib/tabs/indexing-tab.php:112 lib/tabs/indexing-tab.php:119 -msgid "Index unindexed posts" -msgstr "" - -#: lib/tabs/indexing-tab.php:117 -#, php-format -msgid "%s empties the existing index and rebuilds it from scratch." -msgstr "" - -#: lib/tabs/indexing-tab.php:119 -#, php-format -msgid "" -"%s doesn't empty the index and only indexes those posts that are not " -"indexed. You can use it if you have to interrupt building the index." -msgstr "" - -#: lib/tabs/indexing-tab.php:122 -msgid "This doesn't index any taxonomy terms or users." -msgstr "" - -#: lib/tabs/indexing-tab.php:129 premium/tabs/attachments-tab.php:62 -msgid "Time elapsed" -msgstr "" - -#: lib/tabs/indexing-tab.php:129 premium/tabs/attachments-tab.php:62 -msgid "Time remaining" -msgstr "" - -#: lib/tabs/indexing-tab.php:129 premium/tabs/attachments-tab.php:62 -msgid "some time" -msgstr "" - -#: lib/tabs/indexing-tab.php:131 -msgid "" -"Indexing should respond quickly. If nothing happens in couple of minutes, " -"it's probably stuck. The most common reasons for indexing issues are " -"incompatible shortcodes, so try disabling the shortcode expansion setting " -"and try again. Also, if you've just updated Relevanssi, doing a hard refresh " -"in your browser will make sure your browser is not trying to use an outdated " -"version of the Relevanssi scripts." -msgstr "" - -#: lib/tabs/indexing-tab.php:135 -msgid "State of the index" -msgstr "" - -#: lib/tabs/indexing-tab.php:136 -msgid "document in the index." -msgstr "" - -#: lib/tabs/indexing-tab.php:138 -msgid "user in the index." -msgstr "" - -#: lib/tabs/indexing-tab.php:139 -msgid "taxonomy term in the index." -msgstr "" - -#: lib/tabs/indexing-tab.php:142 -msgid "term in the index." -msgstr "" - -#: lib/tabs/indexing-tab.php:143 -msgid "is the lowest post ID indexed." -msgstr "" - -#: lib/tabs/indexing-tab.php:145 -#, php-format -msgid "" -"These values may be inaccurate. If you need exact values, %1$supdate the " -"counts%2$s" -msgstr "" - -#: lib/tabs/indexing-tab.php:155 -msgid "" -"WARNING: You've chosen no post types to index. Nothing will be indexed. " -"Choose some post types to index." -msgstr "" - -#: lib/tabs/indexing-tab.php:160 -msgid "Indexing options" -msgstr "" - -#: lib/tabs/indexing-tab.php:162 -msgid "" -"Any changes to the settings on this page require reindexing before they take " -"effect." -msgstr "" - -#: lib/tabs/indexing-tab.php:166 -msgid "Post types" -msgstr "" - -#: lib/tabs/indexing-tab.php:170 -msgid "Post types to index" -msgstr "" - -#: lib/tabs/indexing-tab.php:174 -msgid "Type" -msgstr "" - -#: lib/tabs/indexing-tab.php:175 lib/tabs/indexing-tab.php:267 -#: premium/interface.php:720 -msgid "Index" -msgstr "" - -#: lib/tabs/indexing-tab.php:176 -msgid "Excluded from search?" -msgstr "" - -#: lib/tabs/indexing-tab.php:193 -#, php-format -msgid "Index post type %s" -msgstr "" - -#: lib/tabs/indexing-tab.php:195 lib/tabs/indexing-tab.php:289 -#: premium/interface.php:737 premium/interface.php:748 -msgid "yes" -msgstr "" - -#: lib/tabs/indexing-tab.php:197 -#, php-format -msgid "Post type %s is excluded from search" -msgstr "" - -#: lib/tabs/indexing-tab.php:199 lib/tabs/indexing-tab.php:285 -#: premium/interface.php:739 premium/interface.php:744 -msgid "no" -msgstr "" - -#: lib/tabs/indexing-tab.php:201 -#, php-format -msgid "Post type %s can be searched" -msgstr "" - -#: lib/tabs/indexing-tab.php:232 -msgid "" -"If you want to index a post type that's marked 'Excluded from search', you " -"can do that without worrying about it – but you need to uncheck the 'Respect " -"exclude_from_search' setting from the Searching tab." -msgstr "" - -#: lib/tabs/indexing-tab.php:244 -msgid "Index image files" -msgstr "" - -#: lib/tabs/indexing-tab.php:249 -msgid "Index image attachments" -msgstr "" - -#: lib/tabs/indexing-tab.php:251 -msgid "" -"If this option is enabled, Relevanssi will include image attachments in the " -"index. If the option is disabled, only other attachment types are included." -msgstr "" - -#: lib/tabs/indexing-tab.php:253 -#, php-format -msgid "" -"For more detailed control over the attachment type indexing, see " -"%1$sControlling attachment types in the Knowledge base%2$s." -msgstr "" - -#: lib/tabs/indexing-tab.php:259 premium/interface.php:713 -msgid "Taxonomies" -msgstr "" - -#: lib/tabs/indexing-tab.php:266 premium/interface.php:719 -msgid "Taxonomy" -msgstr "" - -#: lib/tabs/indexing-tab.php:268 premium/interface.php:721 -msgid "Public?" -msgstr "" - -#: lib/tabs/indexing-tab.php:284 -#, php-format -msgid "Index taxonomy %s" -msgstr "" - -#: lib/tabs/indexing-tab.php:287 premium/interface.php:746 -#, php-format -msgid "Taxonomy %s is not public" -msgstr "" - -#: lib/tabs/indexing-tab.php:291 premium/interface.php:750 -#, php-format -msgid "Taxonomy %s is public" -msgstr "" - -#: lib/tabs/indexing-tab.php:313 -msgid "" -"If you check a taxonomy here, the terms for that taxonomy are indexed with " -"the posts. If you for example choose \"post_tag\", searching for a tag will " -"find all posts that have the tag." -msgstr "" - -#: lib/tabs/indexing-tab.php:324 lib/tabs/indexing-tab.php:338 -msgid "none" -msgstr "" - -#: lib/tabs/indexing-tab.php:325 -msgid "comments" -msgstr "" - -#: lib/tabs/indexing-tab.php:326 -msgid "comments and pingbacks" -msgstr "" - -#: lib/tabs/indexing-tab.php:328 -msgid "" -"If you choose to index comments, you can choose if you want to index just " -"comments, or everything including comments and track- and pingbacks." -msgstr "" - -#: lib/tabs/indexing-tab.php:339 -msgid "all" -msgstr "" - -#: lib/tabs/indexing-tab.php:340 -msgid "visible" -msgstr "" - -#: lib/tabs/indexing-tab.php:341 lib/tabs/indexing-tab.php:373 -msgid "some" -msgstr "" - -#: lib/tabs/indexing-tab.php:345 -msgid "'All' indexes all custom fields for posts." -msgstr "" - -#: lib/tabs/indexing-tab.php:347 -msgid "" -"'Visible' only includes the custom fields that are visible in the user " -"interface (with names that don't start with an underscore)." -msgstr "" - -#: lib/tabs/indexing-tab.php:349 -msgid "'Some' lets you choose individual custom fields to index." -msgstr "" - -#: lib/tabs/indexing-tab.php:355 -msgid "" -"Advanced Custom Fields has lots of invisible custom fields with meta data. " -"Selecting \"all\" will include lots of garbage in the index and excerpts. " -"\"Visible\" is usually a better option with ACF." -msgstr "" - -#: lib/tabs/indexing-tab.php:366 -msgid "Custom fields to index" -msgstr "" - -#: lib/tabs/indexing-tab.php:368 -msgid "" -"Enter a comma-separated list of custom fields to include in the index. With " -"Relevanssi Premium, you can also use 'fieldname_%_subfieldname' notation for " -"ACF repeater fields." -msgstr "" - -#: lib/tabs/indexing-tab.php:369 -msgid "" -"You can use 'relevanssi_index_custom_fields' filter hook to adjust which " -"custom fields are indexed." -msgstr "" - -#: lib/tabs/indexing-tab.php:373 -#, php-format -msgid "" -"If you want the SKU included, choose %1$s and enter %2$s. Also see the " -"contextual help for more details." -msgstr "" - -#: lib/tabs/indexing-tab.php:380 -msgid "Author display names" -msgstr "" - -#: lib/tabs/indexing-tab.php:385 -msgid "Index the post author display name" -msgstr "" - -#: lib/tabs/indexing-tab.php:387 -msgid "" -"Searching for the post author display name will return posts by that author." -msgstr "" - -#: lib/tabs/indexing-tab.php:398 -msgid "Index the post excerpt" -msgstr "" - -#: lib/tabs/indexing-tab.php:400 -msgid "Relevanssi will find posts by the content in the excerpt." -msgstr "" - -#: lib/tabs/indexing-tab.php:402 -msgid "" -"WooCommerce stores the product short description in the excerpt, so it's a " -"good idea to index excerpts." -msgstr "" - -#: lib/tabs/indexing-tab.php:409 -msgid "Shortcodes" -msgstr "" - -#: lib/tabs/indexing-tab.php:414 -msgid "Expand shortcodes" -msgstr "" - -#: lib/tabs/indexing-tab.php:419 -msgid "Expand shortcodes when indexing" -msgstr "" - -#: lib/tabs/indexing-tab.php:422 -msgid "" -"WooCommerce has shortcodes that don't work well with Relevanssi. With " -"WooCommerce, make sure the option is disabled." -msgstr "" - -#: lib/tabs/indexing-tab.php:424 -msgid "" -"If checked, Relevanssi will expand shortcodes in post content before " -"indexing. Otherwise shortcodes will be stripped." -msgstr "" - -#: lib/tabs/indexing-tab.php:425 -msgid "" -"If you use shortcodes to include dynamic content, Relevanssi will not keep " -"the index updated, the index will reflect the status of the shortcode " -"content at the moment of indexing." -msgstr "" - -#: lib/tabs/indexing-tab.php:439 -msgid "Advanced indexing settings" -msgstr "" - -#: lib/tabs/indexing-tab.php:441 -msgid "Show advanced settings" -msgstr "" - -#: lib/tabs/indexing-tab.php:446 -msgid "Minimum word length" -msgstr "" - -#: lib/tabs/indexing-tab.php:450 -msgid "Words shorter than this many letters will not be indexed." -msgstr "" - -#: lib/tabs/indexing-tab.php:452 -#, php-format -msgid "" -"To enable one-letter searches, you need to add a filter function on the " -"filter hook %1$s that returns %2$s." -msgstr "" - -#: lib/tabs/indexing-tab.php:456 -msgid "Punctuation control" -msgstr "" - -#: lib/tabs/indexing-tab.php:457 -msgid "" -"Here you can adjust how the punctuation is controlled. For more information, " -"see help. Remember that any changes here require reindexing, otherwise " -"searches will fail to find posts they should." -msgstr "" - -#: lib/tabs/indexing-tab.php:461 -msgid "Hyphens and dashes" -msgstr "" - -#: lib/tabs/indexing-tab.php:465 lib/tabs/indexing-tab.php:492 -#: lib/tabs/indexing-tab.php:506 -msgid "Keep" -msgstr "" - -#: lib/tabs/indexing-tab.php:466 lib/tabs/indexing-tab.php:479 -#: lib/tabs/indexing-tab.php:493 lib/tabs/indexing-tab.php:507 -msgid "Replace with spaces" -msgstr "" - -#: lib/tabs/indexing-tab.php:467 lib/tabs/indexing-tab.php:480 -#: lib/tabs/indexing-tab.php:494 lib/tabs/indexing-tab.php:508 -#: premium/tabs/redirects-tab.php:66 premium/tabs/redirects-tab.php:108 -msgid "Remove" -msgstr "" - -#: lib/tabs/indexing-tab.php:469 -msgid "" -"How Relevanssi should handle hyphens and dashes (en and em dashes)? " -"Replacing with spaces is generally the best option, but in some cases " -"removing completely is the best option. Keeping them is rarely the best " -"option." -msgstr "" - -#: lib/tabs/indexing-tab.php:475 -msgid "Apostrophes and quotes" -msgstr "" - -#: lib/tabs/indexing-tab.php:482 -msgid "" -"How Relevanssi should handle apostrophes and quotes? It's not possible to " -"keep them; that would lead to problems. Default behaviour is to replace with " -"spaces, but sometimes removing makes sense." -msgstr "" - -#: lib/tabs/indexing-tab.php:488 -msgid "Ampersands" -msgstr "" - -#: lib/tabs/indexing-tab.php:496 -msgid "" -"How Relevanssi should handle ampersands? Replacing with spaces is generally " -"the best option, but if you talk a lot about D&D, for example, keeping " -"the ampersands is useful." -msgstr "" - -#: lib/tabs/indexing-tab.php:502 -msgid "Decimal separators" -msgstr "" - -#: lib/tabs/indexing-tab.php:510 -msgid "" -"How Relevanssi should handle periods between decimals? Replacing with spaces " -"is the default option, but that often leads to the numbers being removed " -"completely. If you need to search decimal numbers a lot, keep the periods." -msgstr "" - -#: lib/tabs/indexing-tab.php:520 -msgid "Hide advanced settings" -msgstr "" - -#: lib/tabs/logging-tab.php:32 -msgid "Enable logs" -msgstr "" - -#: lib/tabs/logging-tab.php:36 lib/tabs/logging-tab.php:39 -msgid "Keep a log of user queries." -msgstr "" - -#: lib/tabs/logging-tab.php:46 -#, php-format -msgid "" -"If enabled, Relevanssi will log user queries. The logs can be examined under " -"'%1$s' on the Dashboard admin menu and are stored in the %2$s database table." -msgstr "" - -#: lib/tabs/logging-tab.php:56 -msgid "Log user IP" -msgstr "" - -#: lib/tabs/logging-tab.php:60 lib/tabs/logging-tab.php:63 -msgid "Log the user's IP with the queries." -msgstr "" - -#: lib/tabs/logging-tab.php:66 -msgid "" -"If enabled, Relevanssi will log user's IP adress with the queries. Note that " -"this may be illegal where you live, and in EU will create a person registry " -"that falls under the GDPR." -msgstr "" - -#: lib/tabs/logging-tab.php:71 -msgid "Exclude users" -msgstr "" - -#: lib/tabs/logging-tab.php:75 -msgid "" -"Comma-separated list of numeric user IDs or user login names that will not " -"be logged." -msgstr "" - -#: lib/tabs/logging-tab.php:85 premium/click-tracking.php:729 -msgid "Trim logs" -msgstr "" - -#: lib/tabs/logging-tab.php:89 -msgid "How many days of logs to keep in the database." -msgstr "" - -#: lib/tabs/logging-tab.php:93 -msgid "" -"Big log database table will eventually start to slow down the search, so " -"it's a good idea to use some level of automatic log trimming." -msgstr "" - -#: lib/tabs/logging-tab.php:98 -#, php-format -msgid "Set to %d for no trimming." -msgstr "" - -#: lib/tabs/logging-tab.php:107 -msgid "Export logs" -msgstr "" - -#: lib/tabs/logging-tab.php:110 -msgid "Export the log as a CSV file" -msgstr "" - -#: lib/tabs/logging-tab.php:111 -msgid "Push the button to export the search log as a CSV file." -msgstr "" - -#: lib/tabs/logging-tab.php:122 premium/click-tracking.php:703 -msgid "Click tracking" -msgstr "" - -#: lib/tabs/logging-tab.php:123 -msgid "" -"Relevanssi Premium has a click tracking feature where you can track which " -"posts are clicked from the search results. That way you can tell what is " -"your most interesting content and how the search is actually used to access " -"posts." -msgstr "" - -#: lib/tabs/overview-tab.php:22 -msgid "Welcome to Relevanssi!" -msgstr "" - -#: lib/tabs/overview-tab.php:41 -msgid "Getting started" -msgstr "" - -#: lib/tabs/overview-tab.php:43 -msgid "" -"You've already installed Relevanssi. That's a great first step towards good " -"search experience!" -msgstr "" - -#: lib/tabs/overview-tab.php:47 -#, php-format -msgid "" -"Now, you need an index. Head over to the %1$s%2$s%3$s tab to set up the " -"basic indexing options and to build the index." -msgstr "" - -#: lib/tabs/overview-tab.php:48 -msgid "You need to check at least the following options:" -msgstr "" - -#: lib/tabs/overview-tab.php:49 -msgid "Make sure the post types you want to include in the index are indexed." -msgstr "" - -#: lib/tabs/overview-tab.php:51 -#, php-format -msgid "" -"Do you use custom fields to store content you want included? If so, add " -"those too. WooCommerce user? You probably want to include %s." -msgstr "" - -#: lib/tabs/overview-tab.php:52 -msgid "" -"Then just save the options and build the index. First time you have to do it " -"manually, but after that, it's fully automatic: all changes are reflected in " -"the index without reindexing. (That said, it's a good idea to rebuild the " -"index once a year.)" -msgstr "" - -#: lib/tabs/overview-tab.php:55 -msgid "Great, you already have an index!" -msgstr "" - -#: lib/tabs/overview-tab.php:59 -#, php-format -msgid "" -"On the %1$s%2$s%3$s tab, choose whether you want the default operator to be " -"AND (less results, but more precise) or OR (more results, less precise)." -msgstr "" - -#: lib/tabs/overview-tab.php:63 -#, php-format -msgid "" -"The next step is the %1$s%2$s%3$s tab, where you can enable the custom " -"excerpts that show the relevant part of post in the search results pages." -msgstr "" - -#: lib/tabs/overview-tab.php:64 -msgid "" -"There are couple of options related to that, so if you want highlighting in " -"the results, you can adjust the styles for that to suit the look of your " -"site." -msgstr "" - -#: lib/tabs/overview-tab.php:67 -msgid "" -"That's about it! Now you should have Relevanssi up and running. The rest of " -"the options is mostly fine-tuning." -msgstr "" - -#: lib/tabs/overview-tab.php:70 -msgid "" -"Relevanssi doesn't have a separate search widget. Instead, Relevanssi uses " -"the default search widget. Any standard search form will do!" -msgstr "" - -#: lib/tabs/overview-tab.php:74 -msgid "Relevanssi Live Ajax Search" -msgstr "" - -#: lib/tabs/overview-tab.php:77 -#, php-format -msgid "" -"If you want a live search results, you can use the Relevanssi Live Ajax " -"Search plugin. %1$sYou can find it in the plugin repository%2$s. It will " -"make your search forms show instant results, powered by Relevanssi." -msgstr "" - -#: lib/tabs/overview-tab.php:81 -msgid "Privacy and GDPR compliance" -msgstr "" - -#: lib/tabs/overview-tab.php:84 -#, php-format -msgid "" -"%1$sGDPR Compliance at Relevanssi knowledge base%2$s explains how using " -"Relevanssi affects the GDPR compliance and the privacy policies of your " -"site. Relevanssi also supports the %3$sprivacy policy tool%2$s and the " -"WordPress user data export and erase tools." -msgstr "" - -#: lib/tabs/overview-tab.php:88 -msgid "For more information" -msgstr "" - -#: lib/tabs/overview-tab.php:90 -msgid "" -"Relevanssi uses the WordPress contextual help. Click 'Help' on the top right " -"corner for more information on many Relevanssi topics." -msgstr "" - -#: lib/tabs/overview-tab.php:92 -#, php-format -msgid "" -"%1$sRelevanssi knowledge base%2$s has lots of information about advanced " -"Relevanssi use, including plenty of code samples." -msgstr "" - -#: lib/tabs/overview-tab.php:96 -msgid "Do you like Relevanssi?" -msgstr "" - -#: lib/tabs/overview-tab.php:98 -msgid "" -"If you do, the best way to show your appreciation is to spread the word and " -"perhaps give us a good review on WordPress.org." -msgstr "" - -#: lib/tabs/overview-tab.php:100 -#, php-format -msgid "" -"If you like Relevanssi, leaving a five-star review on WordPress.org will " -"help others discover Relevanssi. %1$sYou can add your review here%2$s." -msgstr "" - -#: lib/tabs/overview-tab.php:106 -msgid "Buy Relevanssi Premium" -msgstr "" - -#: lib/tabs/overview-tab.php:109 -msgid "Buy Relevanssi Premium now" -msgstr "" - -#: lib/tabs/overview-tab.php:111 -#, php-format -msgid "" -"use coupon code %1$s for 20%% discount (valid at least until the end of %2$s)" -msgstr "" - -#: lib/tabs/overview-tab.php:112 -msgid "Here are some improvements Relevanssi Premium offers:" -msgstr "" - -#: lib/tabs/overview-tab.php:114 -msgid "PDF content indexing" -msgstr "" - -#: lib/tabs/overview-tab.php:115 -msgid "A Related posts feature" -msgstr "" - -#: lib/tabs/overview-tab.php:116 -msgid "Index and search user profile pages" -msgstr "" - -#: lib/tabs/overview-tab.php:117 -msgid "Index and search taxonomy term pages" -msgstr "" - -#: lib/tabs/overview-tab.php:118 -msgid "Multisite searches across many subsites" -msgstr "" - -#: lib/tabs/overview-tab.php:119 -msgid "WP CLI commands" -msgstr "" - -#: lib/tabs/overview-tab.php:120 -msgid "Adjust weights separately for each post type and taxonomy" -msgstr "" - -#: lib/tabs/overview-tab.php:121 -msgid "Internal link anchors can be search terms for the target posts" -msgstr "" - -#: lib/tabs/overview-tab.php:122 -msgid "Index and search any columns in the wp_posts database" -msgstr "" - -#: lib/tabs/overview-tab.php:123 -msgid "" -"Hide Relevanssi branding from the User Searches page on a client installation" -msgstr "" - -#: lib/tabs/overview-tab.php:124 -msgid "Redirect search queries to custom URLs" -msgstr "" - -#: lib/tabs/redirects-tab.php:20 -msgid "" -"With Relevanssi Premium, you can set up redirects. These are keywords that " -"automatically redirect the user to certain page, without going through the " -"usual search process. For example, you could set it up so that all searches " -"for \"job\" automatically lead to your \"Careers\" page." -msgstr "" - -#: lib/tabs/search-page.php:18 -msgid "" -"You can use this search to perform Relevanssi searches without any " -"restrictions from WordPress. You can search all post types here." -msgstr "" - -#: lib/tabs/search-page.php:24 -msgid "Search terms" -msgstr "" - -#: lib/tabs/search-page.php:32 -msgid "Post type" -msgstr "" - -#: lib/tabs/search-page.php:36 -msgid "Any" -msgstr "" - -#: lib/tabs/search-page.php:55 -msgid "Users" -msgstr "" - -#: lib/tabs/search-page.php:64 -msgid "Posts per page" -msgstr "" - -#: lib/tabs/search-page.php:68 -msgid "All" -msgstr "" - -#: lib/tabs/search-page.php:77 -msgid "Search parameters" -msgstr "" - -#: lib/tabs/search-page.php:82 -#, php-format -msgid "" -"Use query parameter formatting here, the same that would appear on search " -"page results URL. For example %s." -msgstr "" - -#: lib/tabs/search-page.php:89 -msgid "Search" -msgstr "" - -#: lib/tabs/searching-tab.php:72 -msgid "Default operator" -msgstr "" - -#: lib/tabs/searching-tab.php:76 -msgid "AND - require all terms" -msgstr "" - -#: lib/tabs/searching-tab.php:77 -msgid "OR - any term present is enough" -msgstr "" - -#: lib/tabs/searching-tab.php:79 -msgid "This setting determines the default operator for the search." -msgstr "" - -#: lib/tabs/searching-tab.php:83 -#, php-format -msgid "" -"You can override this setting with the %1$s query parameter, like this: %2$s" -msgstr "" - -#: lib/tabs/searching-tab.php:90 -msgid "Fallback to OR" -msgstr "" - -#: lib/tabs/searching-tab.php:94 lib/tabs/searching-tab.php:97 -msgid "Disable the OR fallback." -msgstr "" - -#: lib/tabs/searching-tab.php:100 -msgid "" -"By default, if AND search fails to find any results, Relevanssi will switch " -"the operator to OR and run the search again. You can prevent that by " -"checking this option." -msgstr "" - -#: lib/tabs/searching-tab.php:105 -msgid "Default order" -msgstr "" - -#: lib/tabs/searching-tab.php:109 -msgid "Relevance (highly recommended)" -msgstr "" - -#: lib/tabs/searching-tab.php:110 -msgid "Post date" -msgstr "" - -#: lib/tabs/searching-tab.php:113 -#, php-format -msgid "" -"If you want to override this or use multi-layered ordering (eg. first order " -"by relevance, but sort ties by post title), you can use the %s query " -"variable. See Help for more information." -msgstr "" - -#: lib/tabs/searching-tab.php:115 -msgid "" -" If you want date-based results, see the recent post bonus in the Weights " -"section." -msgstr "" - -#: lib/tabs/searching-tab.php:121 -msgid "Keyword matching" -msgstr "" - -#: lib/tabs/searching-tab.php:125 -msgid "Whole words" -msgstr "" - -#: lib/tabs/searching-tab.php:126 lib/tabs/searching-tab.php:131 -msgid "Partial words" -msgstr "" - -#: lib/tabs/searching-tab.php:127 -msgid "Partial words if no hits for whole words" -msgstr "" - -#: lib/tabs/searching-tab.php:131 -#, php-format -msgid "" -"Choosing the \"%1$s\" option may lead to unexpected results. Most of the " -"time the \"%2$s\" option is the better choice." -msgstr "" - -#: lib/tabs/searching-tab.php:131 -msgid "Partial words if not hits for whole words" -msgstr "" - -#: lib/tabs/searching-tab.php:133 -msgid "" -"Whole words means Relevanssi only finds posts that include the whole search " -"term." -msgstr "" - -#: lib/tabs/searching-tab.php:134 -msgid "" -"Partial words also includes cases where the word in the index begins or ends " -"with the search term (searching for 'ana' will match 'anaconda' or 'banana', " -"but not 'banal'). See Help, if you want to make Relevanssi match also inside " -"words." -msgstr "" - -#: lib/tabs/searching-tab.php:139 -msgid "Weights" -msgstr "" - -#: lib/tabs/searching-tab.php:142 -msgid "" -"All the weights in the table are multipliers. To increase the weight of an " -"element, use a higher number. To make an element less significant, use a " -"number lower than 1." -msgstr "" - -#: lib/tabs/searching-tab.php:146 -msgid "Element" -msgstr "" - -#: lib/tabs/searching-tab.php:147 -msgid "Weight" -msgstr "" - -#: lib/tabs/searching-tab.php:152 -msgid "Content" -msgstr "" - -#: lib/tabs/searching-tab.php:160 -msgid "Titles" -msgstr "" - -#: lib/tabs/searching-tab.php:173 -msgid "Comment text" -msgstr "" - -#: lib/tabs/searching-tab.php:202 -msgid "Boost exact matches" -msgstr "" - -#: lib/tabs/searching-tab.php:206 lib/tabs/searching-tab.php:209 -msgid "Give boost to exact matches." -msgstr "" - -#: lib/tabs/searching-tab.php:213 -#, php-format -msgid "" -"If you enable this option, matches where the search query appears in title " -"or content as a phrase will get a weight boost. To adjust the boost, you can " -"use the %s filter hook. See Help for more details." -msgstr "" - -#: lib/tabs/searching-tab.php:221 -msgid "WPML" -msgstr "" - -#: lib/tabs/searching-tab.php:225 lib/tabs/searching-tab.php:228 -msgid "Limit results to current language." -msgstr "" - -#: lib/tabs/searching-tab.php:231 -msgid "" -"Enabling this option will restrict the results to the currently active " -"language. If the option is disabled, results will include posts in all " -"languages." -msgstr "" - -#: lib/tabs/searching-tab.php:238 -msgid "Polylang" -msgstr "" - -#: lib/tabs/searching-tab.php:242 lib/tabs/searching-tab.php:245 -msgid "Allow results from all languages." -msgstr "" - -#: lib/tabs/searching-tab.php:248 -msgid "" -"By default Polylang restricts the search to the current language. Enabling " -"this option will lift this restriction." -msgstr "" - -#: lib/tabs/searching-tab.php:258 lib/tabs/searching-tab.php:261 -msgid "Use Relevanssi for admin searches." -msgstr "" - -#: lib/tabs/searching-tab.php:264 -msgid "" -"If checked, Relevanssi will be used for searches in the admin interface. The " -"page search doesn't use Relevanssi, because WordPress works like that." -msgstr "" - -#: lib/tabs/searching-tab.php:270 -#, php-format -msgid "Respect %s" -msgstr "" - -#: lib/tabs/searching-tab.php:274 -msgid "Respect exclude_from_search for custom post types" -msgstr "" - -#: lib/tabs/searching-tab.php:278 -#, php-format -msgid "Respect %s for custom post types" -msgstr "" - -#: lib/tabs/searching-tab.php:280 -msgid "" -"If checked, Relevanssi won't display posts of custom post types that have " -"'exclude_from_search' set to true." -msgstr "" - -#: lib/tabs/searching-tab.php:292 -msgid "" -"You probably should uncheck this option, because you've set Relevanssi to " -"index the following non-public post types:" -msgstr "" - -#: lib/tabs/searching-tab.php:305 -msgid "Throttle searches" -msgstr "" - -#: lib/tabs/searching-tab.php:310 lib/tabs/searching-tab.php:313 -msgid "Throttle searches." -msgstr "" - -#: lib/tabs/searching-tab.php:317 -msgid "Your database is so small that you don't need to enable this." -msgstr "" - -#: lib/tabs/searching-tab.php:319 -msgid "" -"If this option is checked, Relevanssi will limit search results to at most " -"500 results per term. This will improve performance, but may cause some " -"relevant documents to go unfound. See Help for more details." -msgstr "" - -#: lib/tabs/searching-tab.php:321 -msgid "" -"You have the default ordering set to post date and have enabled user or " -"taxonomy term indexing. If you enable the throttle, the search results will " -"only include posts. Users and taxonomy terms will be excluded. Either keep " -"the throttle disabled or set the post ordering to relevance." -msgstr "" - -#: lib/tabs/searching-tab.php:328 lib/tabs/searching-tab.php:334 -msgid "Category restriction" -msgstr "" - -#: lib/tabs/searching-tab.php:354 -msgid "" -"You can restrict search results to a category for all searches. For " -"restricting on a per-search basis and more options (eg. tag restrictions), " -"see Help." -msgstr "" - -#: lib/tabs/searching-tab.php:359 lib/tabs/searching-tab.php:365 -msgid "Category exclusion" -msgstr "" - -#: lib/tabs/searching-tab.php:385 -msgid "" -"Posts in these categories are not included in search results. To exclude the " -"posts completely from the index, see Help." -msgstr "" - -#: lib/tabs/searching-tab.php:390 -msgid "Post exclusion" -msgstr "" - -#: lib/tabs/searching-tab.php:394 -msgid "" -"Enter a comma-separated list of post or page ID's to exclude those pages " -"from the search results." -msgstr "" - -#: lib/tabs/searching-tab.php:396 -msgid "" -"With Relevanssi Premium, it's better to use the check box on post edit " -"pages. That will remove the posts completely from the index, and will work " -"with multisite searches unlike this setting." -msgstr "" - -#: lib/tabs/stopwords-tab.php:29 -msgid "Content stopwords" -msgstr "" - -#: lib/tabs/stopwords-tab.php:38 -msgid "" -"Content stopwords are a premium feature where you can set stopwords that " -"only apply to the post content. Those stopwords will still be indexed if " -"they appear in post titles, tags, categories, custom fields or other parts " -"of the post. To use content stopwords, you need Relevanssi Premium." -msgstr "" - -#: lib/tabs/stopwords-tab.php:68 -msgid "" -"Enter a word here to add it to the list of stopwords. The word will " -"automatically be removed from the index, so re-indexing is not necessary. " -"You can enter many words at the same time, separate words with commas." -msgstr "" - -#: lib/tabs/stopwords-tab.php:76 -msgid "Stopword(s) to add" -msgstr "" - -#: lib/tabs/stopwords-tab.php:80 premium/body-stopwords.php:311 -msgid "Add" -msgstr "" - -#: lib/tabs/stopwords-tab.php:84 -msgid "" -"Here's a list of stopwords in the database. Click a word to remove it from " -"stopwords. Removing stopwords won't automatically return them to index, so " -"you need to re-index all posts after removing stopwords to get those words " -"back to index." -msgstr "" - -#: lib/tabs/stopwords-tab.php:89 -msgid "Current stopwords" -msgstr "" - -#: lib/tabs/stopwords-tab.php:111 -msgid "Remove all stopwords" -msgstr "" - -#: lib/tabs/stopwords-tab.php:118 -msgid "Add default stopwords" -msgstr "" - -#: lib/tabs/stopwords-tab.php:126 lib/tabs/stopwords-tab.php:129 -msgid "Exportable list of stopwords" -msgstr "" - -#: lib/tabs/stopwords-tab.php:131 -msgid "" -"You can copy the list of stopwords here if you want to back up the list, " -"copy it to a different blog or otherwise need the list." -msgstr "" - -#: lib/tabs/stopwords-tab.php:146 -msgid "" -"You are using Polylang and are in \"Show all languages\" mode. Please select " -"a language before adjusting the stopword settings." -msgstr "" - -#: lib/tabs/synonyms-tab.php:54 -msgid "No synonyms!" -msgstr "" - -#: lib/tabs/synonyms-tab.php:57 -msgid "" -"Synonyms are disabled because the searching operator is set to AND. Enable " -"OR searching to use the synonyms." -msgstr "" - -#: lib/tabs/synonyms-tab.php:59 -msgid "" -"If you want to use synonyms in AND searches, enable synonym indexing on the " -"Indexing tab. Also, any changes to the synonyms won't take effect until you " -"rebuild the index." -msgstr "" - -#: lib/tabs/synonyms-tab.php:61 -msgid "" -"Relevanssi Premium has a feature that allows you to include the synonyms in " -"the indexing. This makes it possible to use synonyms in AND searches." -msgstr "" - -#: lib/tabs/synonyms-tab.php:70 -msgid "" -"Add synonyms here to make the searches find better results. If you notice " -"your users frequently misspelling a product name, or for other reasons use " -"many names for one thing, adding synonyms will make the results better." -msgstr "" - -#: lib/tabs/synonyms-tab.php:72 -msgid "" -"Do not go overboard, though, as too many synonyms can make the search " -"confusing: users understand if a search query doesn't match everything, but " -"they get confused if the searches match to unexpected things." -msgstr "" - -#: lib/tabs/synonyms-tab.php:82 -msgid "" -"The format here is key = value. If you add dog = hound to the list of synonyms, searches for dog automatically " -"become a search for dog hound and will thus match to posts that " -"include either dog or hound. This only works in OR " -"searches: in AND searches the synonyms only restrict the search, as now the " -"search only finds posts that contain both dog " -"and hound." -msgstr "" - -#: lib/tabs/synonyms-tab.php:84 -msgid "" -"The synonyms are one direction only. If you want both directions, add the " -"synonym again, reversed: hound = dog." -msgstr "" - -#: lib/tabs/synonyms-tab.php:86 -msgid "" -"It's possible to use phrases for the value, but not for the key. dog = " -"\"great dane\" works, but \"great dane\" = dog doesn't." -msgstr "" - -#: lib/tabs/synonyms-tab.php:100 -msgid "" -"You are using Polylang and are in \"Show all languages\" mode. Please select " -"a language before adjusting the synonym settings." -msgstr "" - -#: lib/user-searches.php:20 -msgid "Relevanssi User Searches" -msgstr "" - -#: lib/user-searches.php:44 -msgid "Enable query logging to see stats here." -msgstr "" - -#: lib/user-searches.php:91 -msgid "From:" -msgstr "" - -#: lib/user-searches.php:92 -msgid "To:" -msgstr "" - -#: lib/user-searches.php:93 -msgid "Filter" -msgstr "" - -#: lib/user-searches.php:96 -msgid "Year so far" -msgstr "" - -#: lib/user-searches.php:97 -msgid "This month" -msgstr "" - -#: lib/user-searches.php:98 -msgid "Last month" -msgstr "" - -#: lib/user-searches.php:99 -msgid "30 days" -msgstr "" - -#: lib/user-searches.php:100 -msgid "This week" -msgstr "" - -#: lib/user-searches.php:101 -msgid "Last week" -msgstr "" - -#: lib/user-searches.php:102 -msgid "7 days" -msgstr "" - -#: lib/user-searches.php:103 -msgid "All history" -msgstr "" - -#: lib/user-searches.php:112 premium/click-tracking.php:469 -msgid "# of Searches" -msgstr "" - -#: lib/user-searches.php:120 -msgid "Total searches" -msgstr "" - -#: lib/user-searches.php:125 -msgid "Searches that found nothing" -msgstr "" - -#: lib/user-searches.php:137 -msgid "Successful searches" -msgstr "" - -#: lib/user-searches.php:138 -msgid "\"Hits\" is the average hits this search query has found." -msgstr "" - -#: lib/user-searches.php:142 -msgid "In order to see the clicks, you need Relevanssi Premium." -msgstr "" - -#: lib/user-searches.php:146 -msgid "" -"In order to see the clicks, you need to enable click tracking. Click " -"tracking is not currently enabled, and you're not collecting new clicks." -msgstr "" - -#: lib/user-searches.php:153 -msgid "Unsuccessful searches" -msgstr "" - -#: lib/user-searches.php:154 -msgid "These queries have found no results." -msgstr "" - -#: lib/user-searches.php:163 -msgid "Reset Logs" -msgstr "" - -#: lib/user-searches.php:169 -msgid "" -"To reset the logs, type \"reset\" into the box here and click the Reset " -"button" -msgstr "" - -#: lib/user-searches.php:176 -msgid "" -"To reset the logs, type \"reset\" into the box here and click the Reset " -"button. This will reset both the search log and the click tracking log." -msgstr "" - -#: lib/user-searches.php:186 -msgid "Reset" -msgstr "" - -#: lib/user-searches.php:320 premium/tabs/redirects-tab.php:55 -msgid "Hits" -msgstr "" - -#: lib/user-searches.php:321 -msgid "Clicks" -msgstr "" - -#: lib/utils.php:1385 -msgid "There is no excerpt because this is a protected post." -msgstr "" - -#: premium/admin-ajax.php:158 -msgid "Indexing complete!" -msgstr "" - -#: premium/admin-ajax.php:174 -#, php-format -msgid "Successfully indexed attachment id %d." -msgstr "" - -#: premium/admin-ajax.php:177 -#, php-format -msgid "Failed to index attachment id %1$d: %2$s" -msgstr "" - -#: premium/admin-ajax.php:262 -msgid "Attachment ID" -msgstr "" - -#: premium/admin-ajax.php:322 premium/admin-ajax.php:326 -#, php-format -msgid "%1$d taxonomy term, total %2$d / %3$d." -msgstr "" - -#: premium/admin-ajax.php:361 -msgid "disabled." -msgstr "" - -#: premium/admin-ajax.php:369 -#, php-format -msgid "%1$d post type archive indexed." -msgstr "" - -#: premium/admin-ajax.php:426 -#, php-format -msgid "Indexed %1$d user (total %2$d), processed %3$d / %4$d." -msgstr "" - -#: premium/body-stopwords.php:42 -#, php-format -msgid "Successfully added %1$d/%2$d terms to content stopwords!" -msgstr "" - -#: premium/body-stopwords.php:53 -#, php-format -msgid "Term '%s' added to content stopwords!" -msgstr "" - -#: premium/body-stopwords.php:56 -#, php-format -msgid "Couldn't add term '%s' to content stopwords!" -msgstr "" - -#: premium/body-stopwords.php:193 -msgid "All content stopwords removed! Remember to re-index." -msgstr "" - -#: premium/body-stopwords.php:198 -msgid "There was a problem, and content stopwords couldn't be removed." -msgstr "" - -#: premium/body-stopwords.php:251 -#, php-format -msgid "" -"Term '%s' removed from content stopwords! Re-index to get it back to index." -msgstr "" - -#: premium/body-stopwords.php:266 -#, php-format -msgid "Couldn't remove term '%s' from content stopwords!" -msgstr "" - -#: premium/body-stopwords.php:301 -msgid "" -"Post content stopwords are like stopwords, but they are only applied to the " -"post content. These words can be used for searching and will be found in " -"post titles, custom fields and other indexed content – just not in the post " -"body content. Sometimes a word can be very common, but also have a more " -"specific meaning and use on your site, and making it a content stopword will " -"make it easier to find the specific use cases." -msgstr "" - -#: premium/body-stopwords.php:307 -msgid "Content stopword(s) to add" -msgstr "" - -#: premium/body-stopwords.php:315 -msgid "" -"Here's a list of content stopwords in the database. Click a word to remove " -"it from content stopwords. You need to reindex the database to get the words " -"back in to the index." -msgstr "" - -#: premium/body-stopwords.php:320 -msgid "Current content stopwords" -msgstr "" - -#: premium/body-stopwords.php:337 -msgid "Remove all content stopwords" -msgstr "" - -#: premium/body-stopwords.php:342 premium/body-stopwords.php:345 -msgid "Exportable list of content stopwords" -msgstr "" - -#: premium/body-stopwords.php:347 -msgid "" -"You can copy the list of content stopwords from here if you want to back up " -"the list, copy it to a different blog or otherwise need the list." -msgstr "" - -#: premium/class-relevanssi-wp-cli-command.php:516 -msgid "all keywords" -msgstr "" - -#: premium/class-relevanssi-wp-cli-command.php:535 -msgid "Pinned posts" -msgstr "" - -#: premium/class-relevanssi-wp-cli-command.php:544 -msgid "Unpinned posts" -msgstr "" - -#: premium/class-relevanssi-wp-cli-command.php:552 -msgid "No pinned posts found." -msgstr "" - -#: premium/click-tracking.php:72 -msgid "Invalid click tracking value format." -msgstr "" - -#: premium/click-tracking.php:370 -#, php-format -msgid "The query '%s' deleted from the click tracking log." -msgstr "" - -#: premium/click-tracking.php:382 -#, php-format -msgid "Couldn't remove the query '%s' from the click tracking log." -msgstr "" - -#: premium/click-tracking.php:404 premium/click-tracking.php:570 -msgid "Back to the User Searches page" -msgstr "" - -#: premium/click-tracking.php:410 premium/click-tracking.php:576 -#, php-format -msgid "Search insights for %s" -msgstr "" - -#: premium/click-tracking.php:470 premium/click-tracking.php:624 -msgid "# of Clicks" -msgstr "" - -#: premium/click-tracking.php:476 -msgid "Posts found with this search term" -msgstr "" - -#: premium/click-tracking.php:482 premium/click-tracking.php:636 -msgid "Times clicked" -msgstr "" - -#: premium/click-tracking.php:483 premium/click-tracking.php:637 -msgid "Avg rank" -msgstr "" - -#: premium/click-tracking.php:484 premium/click-tracking.php:638 -msgid "Avg page" -msgstr "" - -#: premium/click-tracking.php:498 premium/click-tracking.php:584 -msgid "View post" -msgstr "" - -#: premium/click-tracking.php:499 premium/click-tracking.php:585 -msgid "Edit post" -msgstr "" - -#: premium/click-tracking.php:511 -msgid "Remove this query from the click log" -msgstr "" - -#: premium/click-tracking.php:517 premium/click-tracking.php:530 -msgid "Delete" -msgstr "" - -#: premium/click-tracking.php:524 -msgid "Remove this query from the search log" -msgstr "" - -#: premium/click-tracking.php:630 -msgid "Search queries for this post" -msgstr "" - -#: premium/click-tracking.php:705 -msgid "" -"Enabling this option will add click tracking information to the post URLs on " -"Relevanssi search results pages, allowing to you see stats on which posts " -"are clicked and what their rankings are. You can find the stats on " -"individual post edit pages in the Relevanssi sidebar, or from the User " -"searches page by clicking the search term." -msgstr "" - -#: premium/click-tracking.php:707 -msgid "" -"Click tracking stores post ID, the search query and ranking information for " -"the post. No personal information about the user doing the search are stored." -msgstr "" - -#: premium/click-tracking.php:712 -msgid "Enable click tracking" -msgstr "" - -#: premium/click-tracking.php:722 -msgid "Enable click tracking on Relevanssi search results pages." -msgstr "" - -#: premium/click-tracking.php:733 -msgid "How many days of click tracking logs to keep in the database." -msgstr "" - -#: premium/click-tracking.php:737 -#, php-format -msgid "" -"Set to %d for no trimming. The click tracking logs will be smaller than the " -"search logs, so this value can be bigger than the value for regular logs." -msgstr "" - -#: premium/click-tracking.php:745 -msgid "Export click logs" -msgstr "" - -#: premium/click-tracking.php:748 -msgid "Export the click tracking log as a CSV file" -msgstr "" - -#: premium/click-tracking.php:749 -msgid "Push the button to export the click tracking log as a CSV file." -msgstr "" - -#: premium/click-tracking.php:788 -msgid "Total clicks" -msgstr "" - -#: premium/click-tracking.php:795 -#, php-format -msgid "%s %% of all queries" -msgstr "" - -#: premium/click-tracking.php:800 -msgid "Click tracking insights" -msgstr "" - -#: premium/click-tracking.php:831 -msgid "These posts got the most clicks. This is content users like!" -msgstr "" - -#: premium/click-tracking.php:860 -msgid "" -"These posts were got clicks from a low ranking. Should they be boosted " -"higher?" -msgstr "" - -#: premium/click-tracking.php:891 -#, php-format -msgid "%1$s posts" -msgstr "" - -#: premium/click-tracking.php:896 -msgid "" -"You have search queries that generate clicks to many posts. Perhaps more " -"focus would be good?" -msgstr "" - -#: premium/click-tracking.php:904 -msgid "Sorry, no clicks recorded for this period!" -msgstr "" - -#: premium/click-tracking.php:998 -msgid "No search clicks logged." -msgstr "" - -#: premium/common.php:502 -msgid "" -"Your site is not public. By default, Relevanssi does not search private " -"sites. If you want to be able to search on this site, either make it public " -"or add a filter function that returns true on " -"'relevanssi_multisite_public_status' filter hook." -msgstr "" - -#: premium/common.php:1074 -msgid "Must have" -msgstr "" - -#: premium/contextual-help.php:23 -msgid "Boolean operators" -msgstr "" - -#: premium/contextual-help.php:25 -msgid "" -"Relevanssi Premium offers limited support for Boolean logic. In addition of " -"setting the default operator from Relevanssi settings, you can use AND and " -"NOT operators in searches." -msgstr "" - -#: premium/contextual-help.php:26 -msgid "To use the NOT operator, prefix the search term with a minus sign:" -msgstr "" - -#: premium/contextual-help.php:27 -msgid "cats -dogs" -msgstr "" - -#: premium/contextual-help.php:28 -msgid "" -"This would only show posts that have the word 'cats' but not the word 'dogs'." -msgstr "" - -#: premium/contextual-help.php:29 -msgid "" -"To use the AND operator, set the default operator to OR and prefix the " -"search term with a plus sign:" -msgstr "" - -#: premium/contextual-help.php:30 -msgid "+cats dogs mice" -msgstr "" - -#: premium/contextual-help.php:31 -msgid "" -"This would show posts that have the word 'cats' and either 'dogs' or 'mice' " -"or both, and would prioritize posts that have all three." -msgstr "" - -#: premium/contextual-help.php:37 -#, php-format -msgid "" -"Permalinks to user profiles may not always work on search results templates. " -"%1$s should work, but if it doesn't, you can replace it with %2$s." -msgstr "" - -#: premium/contextual-help.php:39 -#, php-format -msgid "" -"To control which user meta fields are indexed, you can use the %s option. It " -"should have a comma-separated list of user meta fields. It can be set like " -"this (you only need to run this code once):" -msgstr "" - -#: premium/contextual-help.php:41 -#, php-format -msgid "" -"For more details on user profiles and search results templates, see %1$sthis " -"knowledge base entry%2$s." -msgstr "" - -#: premium/contextual-help.php:46 -msgid "User profiles" -msgstr "" - -#: premium/contextual-help.php:58 premium/interface.php:156 -#: premium/interface.php:231 -msgid "Internal links" -msgstr "" - -#: premium/contextual-help.php:60 -msgid "" -"This option sets how Relevanssi handles internal links that point to your " -"own site." -msgstr "" - -#: premium/contextual-help.php:61 -msgid "" -"If you choose 'No special processing', Relevanssi doesn’t care about links " -"and indexes the link anchor (the text of the link) like it is any other text." -msgstr "" - -#: premium/contextual-help.php:62 -msgid "" -"If you choose 'Index internal links for target documents only', then the " -"link is indexed like the link anchor text were the part of the link target, " -"not the post where the link is." -msgstr "" - -#: premium/contextual-help.php:63 -msgid "" -"If you choose 'Index internal links for target and source', the link anchor " -"text will count for both posts." -msgstr "" - -#: premium/contextual-help.php:70 -msgid "Stemming" -msgstr "" - -#: premium/contextual-help.php:72 -msgid "" -"By default Relevanssi doesn't understand anything about singular word forms, " -"plurals or anything else. You can, however, add a stemmer that will stem all " -"the words to their basic form, making all different forms equal in searching." -msgstr "" - -#: premium/contextual-help.php:73 -msgid "" -"To enable the English-language stemmer, add this to the theme functions.php:" -msgstr "" - -#: premium/contextual-help.php:75 -msgid "After you add the code, rebuild the index to get correct results." -msgstr "" - -#: premium/contextual-help.php:81 -#, php-format -msgid "" -"If you have WP CLI installed, Relevanssi Premium has some helpful commands. " -"Use %s to get a list of available commands." -msgstr "" - -#: premium/contextual-help.php:83 -#, php-format -msgid "You can also see %1$sthe user manual page%2$s." -msgstr "" - -#: premium/contextual-help.php:88 -msgid "WP CLI" -msgstr "" - -#: premium/contextual-help.php:98 -msgid "Plugin support page" -msgstr "" - -#: premium/indexing.php:1123 -#, php-format -msgid "Indexed %d taxonomy terms." -msgstr "" - -#: premium/indexing.php:1125 -msgid "No taxonomies to index." -msgstr "" - -#: premium/interface.php:67 premium/interface.php:80 -msgid "API key" -msgstr "" - -#: premium/interface.php:70 -msgid "API key is set" -msgstr "" - -#: premium/interface.php:71 -msgid "Remove the API key." -msgstr "" - -#: premium/interface.php:72 premium/interface.php:85 -msgid "" -"A valid API key is required to use the automatic update feature and the PDF " -"indexing. Otherwise the plugin will work just fine without an API key. Get " -"your API key from Relevanssi.com." -msgstr "" - -#: premium/interface.php:83 -msgid "Set the API key:" -msgstr "" - -#: premium/interface.php:103 -msgid "Disable outside connections" -msgstr "" - -#: premium/interface.php:108 -msgid "Disable update version checking and attachment indexing" -msgstr "" - -#: premium/interface.php:110 -msgid "" -"If you check this box, Relevanssi will stop all outside connections. This " -"means the plugin won't check for updates from Relevanssi.com, won't read " -"attachment contents using Relevanssiservices.com attachment reader (using " -"custom attachment reader is still allowed), or update plugin translations. " -"Do not check this box unless you know what you're doing, because this will " -"disable Relevanssi updates." -msgstr "" - -#: premium/interface.php:126 -msgid "Update translations" -msgstr "" - -#: premium/interface.php:131 -msgid "Check for plugin translation updates" -msgstr "" - -#: premium/interface.php:133 -msgid "" -"If you check this box, Relevanssi will check for updates to the plugin " -"translations. At the moment, translations are available for: " -msgstr "" - -#: premium/interface.php:160 -msgid "No special processing for internal links" -msgstr "" - -#: premium/interface.php:161 -msgid "Index internal links for target documents only" -msgstr "" - -#: premium/interface.php:162 -msgid "Index internal links for both target and source" -msgstr "" - -#: premium/interface.php:164 -msgid "" -"Internal link anchor tags can be indexed for target document, both target " -"and source or source only. See Help for more details." -msgstr "" - -#: premium/interface.php:192 -msgid "Hide Relevanssi" -msgstr "" - -#: premium/interface.php:197 -msgid "Hide Relevanssi on edit pages" -msgstr "" - -#: premium/interface.php:199 -msgid "Enabling this option hides Relevanssi on all post edit pages." -msgstr "" - -#: premium/interface.php:204 -msgid "Show Relevanssi for admins" -msgstr "" - -#: premium/interface.php:208 -msgid "Show Relevanssi for admins on edit pages" -msgstr "" - -#: premium/interface.php:211 -msgid "Show Relevanssi on edit pages for admins" -msgstr "" - -#: premium/interface.php:215 -#, php-format -msgid "" -"If Relevanssi is hidden on post edit pages, enabling this option will show " -"Relevanssi features for admin-level users. Admin-level users are those with " -"%1$s capabilities, but if you want to use a different capability, you can " -"use the %2$s filter to modify that." -msgstr "" - -#: premium/interface.php:262 -#, php-format -msgid "Post type '%s':" -msgstr "" - -#: premium/interface.php:301 -#, php-format -msgid "Posts tagged with taxonomy '%s':" -msgstr "" - -#: premium/interface.php:331 -#, php-format -msgid "Terms in the taxonomy '%s':" -msgstr "" - -#: premium/interface.php:357 -msgid "Recent posts bonus weight:" -msgstr "" - -#: premium/interface.php:377 -msgid "Recent posts bonus cutoff" -msgstr "" - -#: premium/interface.php:380 -msgid "days" -msgstr "" - -#: premium/interface.php:381 -msgid "" -"Posts newer than the day cutoff specified here will have their weight " -"multiplied with the bonus above." -msgstr "" - -#: premium/interface.php:399 -msgid "Hide Relevanssi branding" -msgstr "" - -#: premium/interface.php:404 premium/interface.php:408 -#, php-format -msgid "Don't show Relevanssi branding on the '%s' screen." -msgstr "" - -#: premium/interface.php:404 premium/interface.php:408 -msgid "User Searches" -msgstr "" - -#: premium/interface.php:426 -msgid "Thousands separator" -msgstr "" - -#: premium/interface.php:430 -msgid "" -"If Relevanssi sees this character between numbers, it'll stick the numbers " -"together no matter how the character would otherwise be handled. Especially " -"useful if a space is used as a thousands separator." -msgstr "" - -#: premium/interface.php:446 -msgid "Disable these shortcodes" -msgstr "" - -#: premium/interface.php:450 -msgid "" -"Enter a comma-separated list of shortcodes. These shortcodes will not be " -"expanded if expand shortcodes above is enabled. This is useful if a " -"particular shortcode is causing problems in indexing." -msgstr "" - -#: premium/interface.php:480 -msgid "MySQL columns" -msgstr "" - -#: premium/interface.php:487 -#, php-format -msgid "" -"A comma-separated list of %s MySQL table columns to include in the index. " -"Following columns are available: " -msgstr "" - -#: premium/interface.php:510 premium/interface.php:517 -msgid "Search all subsites" -msgstr "" - -#: premium/interface.php:514 -msgid "Search all subsites." -msgstr "" - -#: premium/interface.php:519 -msgid "" -"If this option is checked, multisite searches will include all subsites. " -"Warning: if you have dozens of sites in your network, the searches may " -"become too slow. This can be overridden from the search form." -msgstr "" - -#: premium/interface.php:525 -msgid "Search some subsites" -msgstr "" - -#: premium/interface.php:535 -msgid "" -"Add a comma-separated list of blog ID values to have all search forms on " -"this site search these multisite subsites. This can be overridden from the " -"search form." -msgstr "" - -#: premium/interface.php:559 -msgid "Indexing user profiles" -msgstr "" - -#: premium/interface.php:564 -msgid "Index user profiles" -msgstr "" - -#: premium/interface.php:568 premium/interface.php:571 -msgid "Index user profiles." -msgstr "" - -#: premium/interface.php:573 -msgid "" -"Relevanssi will index user profiles. This includes first name, last name, " -"display name and user description." -msgstr "" - -#: premium/interface.php:574 -msgid "" -"This may require changes to search results template, see the contextual help." -msgstr "" - -#: premium/interface.php:580 -msgid "Index subscribers" -msgstr "" - -#: premium/interface.php:584 premium/interface.php:587 -msgid "Index also subscriber profiles." -msgstr "" - -#: premium/interface.php:589 -msgid "" -"By default, Relevanssi indexes authors, editors, contributors and admins, " -"but not subscribers. You can change that with this option." -msgstr "" - -#: premium/interface.php:596 -msgid "Extra fields" -msgstr "" - -#: premium/interface.php:600 -msgid "" -"A comma-separated list of extra user fields to include in the index. These " -"can be user fields or user meta." -msgstr "" - -#: premium/interface.php:616 -msgid "Indexing synonyms" -msgstr "" - -#: premium/interface.php:620 -msgid "Index synonyms" -msgstr "" - -#: premium/interface.php:624 premium/interface.php:627 -msgid "Index synonyms for AND searches." -msgstr "" - -#: premium/interface.php:632 -msgid "" -"If checked, Relevanssi will use the synonyms in indexing. If you add " -"dog = hound to the synonym list and enable this feature, every " -"time the indexer sees hound in post content or post title, it " -"will index it as hound dog. Thus, the post will be found when " -"searching with either word. This makes it possible to use synonyms with AND " -"searches, but will slow down indexing, especially with large databases and " -"large lists of synonyms. You can use multi-word values, but phrases do not " -"work." -msgstr "" - -#: premium/interface.php:652 -msgid "Indexing PDF content" -msgstr "" - -#: premium/interface.php:657 -msgid "Index for parent" -msgstr "" - -#: premium/interface.php:662 -msgid "Index PDF contents for parent post" -msgstr "" - -#: premium/interface.php:665 -#, php-format -msgid "" -"If checked, Relevanssi indexes the PDF content both for the attachment post " -"and the parent post. You can control the attachment post visibility by " -"indexing or not indexing the post type %s." -msgstr "" - -#: premium/interface.php:668 -#, php-format -msgid "" -"You have not chosen to index the post type %s. You won't see any PDF content " -"in the search results, unless you check this option." -msgstr "" - -#: premium/interface.php:672 -msgid "" -"Searching for PDF contents will now return both the attachment itself and " -"the parent post. Are you sure you want both in the results?" -msgstr "" - -#: premium/interface.php:696 -msgid "Indexing taxonomy terms" -msgstr "" - -#: premium/interface.php:701 -msgid "Index taxonomy terms" -msgstr "" - -#: premium/interface.php:706 -msgid "Index taxonomy terms." -msgstr "" - -#: premium/interface.php:708 -msgid "" -"Relevanssi will index taxonomy terms (categories, tags and custom " -"taxonomies). Searching for taxonomy term name will return the taxonomy term " -"page." -msgstr "" - -#: premium/interface.php:743 -#, php-format -msgid "Index terms for taxonomy %s" -msgstr "" - -#: premium/interface.php:795 -msgid "Index post type archives" -msgstr "" - -#: premium/interface.php:799 premium/interface.php:802 -msgid "Index post type archives." -msgstr "" - -#: premium/interface.php:805 -#, php-format -msgid "" -"Relevanssi will index post type archive pages. By default Relevanssi indexes " -"the post type label and the description set when the post type is " -"registered. If you want to index some other content, you can use the %s " -"filter hook to adjust the content." -msgstr "" - -#: premium/interface.php:811 -msgid "Post types indexed" -msgstr "" - -#: premium/interface.php:819 -#, php-format -msgid "" -"This list includes all post types that are not built in and have %1$s set to " -"true. If you want to adjust the list, you can use the %2$s filter hook." -msgstr "" - -#: premium/interface.php:836 -msgid "Number of excerpt snippets" -msgstr "" - -#: premium/interface.php:848 -msgid "" -"The maximum number of excerpt snippets Relevanssi will create for each post." -msgstr "" - -#: premium/interface.php:965 -msgid "Options updated!" -msgstr "" - -#: premium/interface.php:1199 -msgid "Import / Export options" -msgstr "" - -#: premium/interface.php:1207 -msgid "Related" -msgstr "" - -#: premium/interface.php:1215 -msgid "Spam Block" -msgstr "" - -#: premium/interface.php:1223 premium/tabs/support-tab.php:26 -msgid "Support" -msgstr "" - -#: premium/interface.php:1236 -msgid "Reset the option" -msgstr "" - -#: premium/interface.php:1250 -msgid "Option successfully reset!" -msgstr "" - -#: premium/interface.php:1252 -msgid "Couldn't reset the option, reload the page to try again." -msgstr "" - -#: premium/interface.php:1257 -msgid "Reset the relevanssi_words option" -msgstr "" - -#: premium/interface.php:1264 -#, php-format -msgid "" -"If you are having problems with the Did you mean? feature, you can reset the " -"%1$s option that keeps a cache. Next time the Did you mean? suggestions are " -"needed the option is regenerated." -msgstr "" - -#: premium/interface.php:1314 -#, php-format -msgid "" -"The API key is not set. Please enter your API key in the %1$sthe Relevanssi " -"settings%2$s. If you don't have one, %3$syou can buy a new license here%2$s." -msgstr "" - -#: premium/interface.php:1322 -#, php-format -msgid "" -"Your API key is set, but it looks like you don't have a valid license. " -"%1$sYou can buy a new license here%2$s." -msgstr "" - -#: premium/interface.php:1342 premium/interface.php:1428 -msgid "Pinned keywords" -msgstr "" - -#: premium/interface.php:1343 premium/interface.php:1437 -msgid "Excluded keywords" -msgstr "" - -#: premium/interface.php:1344 -msgid "Pin for all searches" -msgstr "" - -#: premium/interface.php:1345 -msgid "Exclude post" -msgstr "" - -#: premium/interface.php:1346 -msgid "Ignore post content" -msgstr "" - -#: premium/interface.php:1424 -msgid "Relevanssi pinning" -msgstr "" - -#: premium/interface.php:1451 premium/post-metabox.php:96 -msgid "Pin this post for all searches it appears in." -msgstr "" - -#: premium/interface.php:1459 premium/post-metabox.php:106 -msgid "Exclude this post or page from the index." -msgstr "" - -#: premium/interface.php:1467 premium/post-metabox.php:111 -msgid "Ignore post content in the indexing." -msgstr "" - -#: premium/network-options.php:47 -msgid "Relevanssi network options" -msgstr "" - -#: premium/network-options.php:78 -msgid "Copy options from one site to other sites" -msgstr "" - -#: premium/network-options.php:79 -msgid "" -"Choose a blog and copy all the options from that blog to all other blogs " -"that have active Relevanssi Premium. Be careful! There's no way to undo the " -"procedure!" -msgstr "" - -#: premium/network-options.php:86 -msgid "Copy options" -msgstr "" - -#: premium/network-options.php:104 -msgid "Copy options to all other subsites" -msgstr "" - -#: premium/network-options.php:154 -#, php-format -msgid "Copying options from blog %s" -msgstr "" - -#: premium/network-options.php:170 -#, php-format -msgid "Processing blog %s:" -msgstr "" - -#: premium/network-options.php:172 -msgid "Relevanssi is not active in this blog." -msgstr "" - -#: premium/network-options.php:183 -msgid "Options updated." -msgstr "" - -#: premium/pdf-upload.php:17 -msgid "Post excluded from the index by the user." -msgstr "" - -#: premium/pdf-upload.php:18 -msgid "" -"Relevanssi is in privacy mode and not allowed to contact Relevanssiservices." -"com." -msgstr "" - -#: premium/pdf-upload.php:19 -msgid "Attachment MIME type blocked." -msgstr "" - -#: premium/pdf-upload.php:20 -msgid "Attachment file size is too large." -msgstr "" - -#: premium/pdf-upload.php:21 -msgid "Attachment reading in process, please try again later." -msgstr "" - -#: premium/pdf-upload.php:22 -msgid "Server did not respond." -msgstr "" - -#: premium/pdf-upload.php:176 -msgid "Relevanssi attachment controls" -msgstr "" - -#: premium/pdf-upload.php:202 -msgid "Reread the attachment content" -msgstr "" - -#: premium/pdf-upload.php:202 -msgid "Read the attachment content" -msgstr "" - -#: premium/pdf-upload.php:205 -msgid "Indexer will fetch the file from your server." -msgstr "" - -#: premium/pdf-upload.php:208 -msgid "The file will be uploaded to the indexer." -msgstr "" - -#: premium/pdf-upload.php:218 -msgid "No API key set. API key is required for attachment indexing." -msgstr "" - -#: premium/pdf-upload.php:231 -msgid "" -"The attachment content has been modified and won't be reread from the file " -"when doing a general rereading. If you want to reread the attachment " -"contents from the file, you can force rereading here." -msgstr "" - -#: premium/pdf-upload.php:236 -msgid "Attachment content" -msgstr "" - -#: premium/pdf-upload.php:248 -msgid "" -"Relevanssi is currently in process of reading the file contents, please " -"return here later." -msgstr "" - -#: premium/pdf-upload.php:251 -msgid "Attachment error message" -msgstr "" - -#: premium/pdf-upload.php:262 -msgid "No attachment content found for this post at the moment." -msgstr "" - -#: premium/pdf-upload.php:533 -msgid "Could not save the file content to the custom field." -msgstr "" - -#: premium/pinning.php:199 -msgid "(pinned)" -msgstr "" - -#: premium/pinning.php:210 -#, php-format -msgid "Pin for '%s'" -msgstr "" - -#: premium/pinning.php:214 -#, php-format -msgid "Unpin for '%s'" -msgstr "" - -#: premium/post-metabox.php:43 -msgid "Relevanssi" -msgstr "" - -#: premium/post-metabox.php:79 -msgid "How Relevanssi sees this post" -msgstr "" - -#: premium/post-metabox.php:81 -msgid "Pin this post" -msgstr "" - -#: premium/post-metabox.php:82 -msgid "" -"A comma-separated list of single word keywords or multi-word phrases. If any " -"of these keywords are present in the search query, this post will be moved " -"on top of the search results." -msgstr "" - -#: premium/post-metabox.php:83 -msgid "Pinned keywords for this post" -msgstr "" - -#: premium/post-metabox.php:89 -msgid "" -"NOTE: You have set the post content weight to 0. This means that keywords " -"that don't appear elsewhere in the post won't work, because they are indexed " -"as part of the post content. If you set the post content weight to any " -"positive value, the pinned keywords will work again." -msgstr "" - -#: premium/post-metabox.php:99 -msgid "Exclude this post" -msgstr "" - -#: premium/post-metabox.php:100 -msgid "" -"A comma-separated list of single word keywords or multi-word phrases. If any " -"of these keywords are present in the search query, this post will be removed " -"from the search results." -msgstr "" - -#: premium/post-metabox.php:101 -msgid "Excluded keywords for this post" -msgstr "" - -#: premium/post-metabox.php:373 premium/tabs/related-tab.php:103 -#: premium/templates/relevanssi-related.php:25 -msgid "Related Posts" -msgstr "" - -#: premium/post-metabox.php:376 -msgid "Don't append the related posts to this page." -msgstr "" - -#: premium/post-metabox.php:379 -msgid "Don't show this as a related post for any post." -msgstr "" - -#: premium/post-metabox.php:381 -msgid "Related Posts keywords" -msgstr "" - -#: premium/post-metabox.php:382 -msgid "" -"A comma-separated list of keywords to use for the Related Posts feature. " -"Anything entered here will used when searching for related posts. Using " -"phrases with quotes is allowed, but will restrict the related posts to posts " -"including that phrase." -msgstr "" - -#: premium/post-metabox.php:383 -msgid "Related posts keywords for this post" -msgstr "" - -#: premium/post-metabox.php:386 -msgid "" -"A comma-separated list of post IDs to use as related posts for this post" -msgstr "" - -#: premium/post-metabox.php:389 -msgid "" -"These are the related posts Relevanssi currently will show for this post:" -msgstr "" - -#: premium/post-metabox.php:398 -msgid "These posts are excluded from related posts for this post" -msgstr "" - -#: premium/post-metabox.php:405 -msgid "Insights" -msgstr "" - -#: premium/post-metabox.php:541 -msgid "not this" -msgstr "" - -#: premium/post-metabox.php:575 -msgid "use this" -msgstr "" - -#: premium/post-metabox.php:586 -msgid "Nothing excluded." -msgstr "" - -#: premium/tabs/attachments-tab.php:53 -msgid "Read all unread attachments" -msgstr "" - -#: premium/tabs/attachments-tab.php:58 -#, php-format -msgid "" -"Clicking the button will read the contents of all the unread attachments " -"files and store the contents to the %s custom field for future indexing. " -"Attachments with errors will be skipped, except for the files with timeout " -"and connection related errors: those will be attempted again." -msgstr "" - -#: premium/tabs/attachments-tab.php:68 -msgid "State of the attachments" -msgstr "" - -#: premium/tabs/attachments-tab.php:83 -msgid "document has read attachment content." -msgstr "" - -#: premium/tabs/attachments-tab.php:84 -msgid "document has an attachment reading error." -msgstr "" - -#: premium/tabs/attachments-tab.php:86 -msgid "Show errors" -msgstr "" - -#: premium/tabs/attachments-tab.php:88 -msgid "Attachment reading errors" -msgstr "" - -#: premium/tabs/attachments-tab.php:93 -msgid "Server location" -msgstr "" - -#: premium/tabs/attachments-tab.php:96 -msgid "United States" -msgstr "" - -#: premium/tabs/attachments-tab.php:97 -msgid "European Union" -msgstr "" - -#: premium/tabs/attachments-tab.php:102 -msgid "Reset attachment content" -msgstr "" - -#: premium/tabs/attachments-tab.php:104 -msgid "Reset all attachment data from posts" -msgstr "" - -#: premium/tabs/attachments-tab.php:106 -#, php-format -msgid "" -"This will remove all %1$s and %2$s custom fields from all posts. If you want " -"to reread all attachment files, use this to clean up; clicking the reading " -"button doesn't wipe the slate clean like it does in regular indexing." -msgstr "" - -#: premium/tabs/attachments-tab.php:107 -msgid "" -"If you have posts where you have modified the attachment content after " -"reading it, this will leave those posts untouched." -msgstr "" - -#: premium/tabs/attachments-tab.php:112 -msgid "Read new files" -msgstr "" - -#: premium/tabs/attachments-tab.php:116 premium/tabs/attachments-tab.php:119 -msgid "Read new files automatically" -msgstr "" - -#: premium/tabs/attachments-tab.php:121 -msgid "" -"If this option is enabled, Relevanssi will automatically read the contents " -"of new attachments as they are uploaded. This may cause unexpected delays in " -"uploading posts. If this is not enabled, new attachments are not read " -"automatically and need to be manually read and reindexed." -msgstr "" - -#: premium/tabs/attachments-tab.php:127 -msgid "Upload files" -msgstr "" - -#: premium/tabs/attachments-tab.php:131 premium/tabs/attachments-tab.php:134 -msgid "Upload files for reading" -msgstr "" - -#: premium/tabs/attachments-tab.php:136 -msgid "" -"By default, Relevanssi only sends a link to the attachment to the attachment " -"reader. If your files are not accessible (for example your site is inside an " -"intranet, password protected, or a local dev site, and the files can't be " -"downloaded if given the URL of the file), check this option to upload the " -"whole file to the reader." -msgstr "" - -#: premium/tabs/attachments-tab.php:142 -msgid "Link to files" -msgstr "" - -#: premium/tabs/attachments-tab.php:146 premium/tabs/attachments-tab.php:149 -msgid "Link search results directly to the files" -msgstr "" - -#: premium/tabs/attachments-tab.php:151 -msgid "" -"If this option is checked, attachment results in search results will link " -"directly to the file. Otherwise the results will link to the attachment page." -msgstr "" - -#: premium/tabs/attachments-tab.php:154 -#, php-format -msgid "" -"You're not indexing the %s post type, so this setting doesn't have any " -"effect." -msgstr "" - -#: premium/tabs/attachments-tab.php:158 -#, php-format -msgid "" -"You're not indexing the %s post type and haven't connected the files to the " -"parent posts in the indexing settings. You won't be seeing any files in the " -"results." -msgstr "" - -#: premium/tabs/attachments-tab.php:164 -msgid "Instructions" -msgstr "" - -#: premium/tabs/attachments-tab.php:167 -#, php-format -msgid "" -"When Relevanssi reads attachment content, the text is extracted and saved in " -"the %s custom field for the attachment post. This alone does not add the " -"attachment content in the Relevanssi index; it just makes the contents of " -"the attachments easily available for the regular Relevanssi indexing process." -msgstr "" - -#: premium/tabs/attachments-tab.php:169 -#, php-format -msgid "" -"There are two ways to index the attachment content. If you choose to index " -"the %s post type, Relevanssi will show the attachment posts in the results." -msgstr "" - -#: premium/tabs/attachments-tab.php:170 -msgid "" -"You can also choose to index the attachment content for the parent post, in " -"which case Relevanssi will show the parent post in the results (this setting " -"can be found on the indexing settings). Obviously this does not find the " -"content in attachments that are not attached to another post – if you just " -"upload a file to the WordPress Media Library, it is not attached and won't " -"be found unless you index the attachment posts." -msgstr "" - -#: premium/tabs/attachments-tab.php:171 -msgid "" -"If you need to reread a file, you can do read individual files from Media " -"Library. Choose an attachment and click 'Edit more details' to read the " -"content." -msgstr "" - -#: premium/tabs/attachments-tab.php:175 -msgid "Key not valid?" -msgstr "" - -#: premium/tabs/attachments-tab.php:177 -msgid "" -"Are you a new Relevanssi customer and seeing 'Key xxxxxx is not valid' error " -"messages? New API keys are delivered to the server once per hour, so if try " -"again an hour later, the key should work." -msgstr "" - -#: premium/tabs/attachments-tab.php:178 -msgid "" -"A 'Key 0 is not valid' error message means you're on a multisite, but have " -"only entered the API key in the subsite settings. Set the API key in the " -"network settings to fix that." -msgstr "" - -#: premium/tabs/attachments-tab.php:182 -msgid "Important!" -msgstr "" - -#: premium/tabs/attachments-tab.php:184 -msgid "" -"In order to read the contents of the files, the files are sent over to " -"Relevanssiservices.com, a processing service hosted on a Digital Ocean " -"Droplet. There are two servers: one in the US and another in the EU. The " -"service creates a working copy of the files. The copy is removed after the " -"file has been processed, but there are no guarantees that someone with an " -"access to the server couldn't see the files. Do not read files with " -"confidential information in them. In order to block individual files from " -"reading, use the Relevanssi post controls on attachment edit page to exclude " -"attachment posts from indexing." -msgstr "" - -#: premium/tabs/import-export-tab.php:19 -msgid "Import or export options" -msgstr "" - -#: premium/tabs/import-export-tab.php:21 -msgid "" -"Here you find the current Relevanssi Premium options in a text format. Copy " -"the contents of the text field to make a backup of your settings. You can " -"also paste new settings here to change all settings at the same time. This " -"is useful if you have default settings you want to use on every system." -msgstr "" - -#: premium/tabs/import-export-tab.php:25 -msgid "Current Settings" -msgstr "" - -#: premium/tabs/import-export-tab.php:39 -msgid "Import settings" -msgstr "" - -#: premium/tabs/import-export-tab.php:46 -msgid "" -"Note! Make sure you've got correct settings from a right version of " -"Relevanssi. Settings from a different version of Relevanssi may or may not " -"work and may or may not mess your settings." -msgstr "" - -#: premium/tabs/redirects-tab.php:28 -msgid "" -"If you want a particular search to always lead to a specific page, you can " -"use the redirects. Whenever the search query matches a redirect, the search " -"is automatically bypassed and the user is redirected to the target page." -msgstr "" - -#: premium/tabs/redirects-tab.php:30 -msgid "" -"Enter the search term and the target URL, which may be relative to your site " -"home page or an absolute URL. If \"Partial match\" is checked, the redirect " -"happens if the query word appears anywhere in the search query, even inside " -"a word, so use it with care. If the search query matches multiple " -"redirections, the first one it matches will trigger." -msgstr "" - -#: premium/tabs/redirects-tab.php:32 -msgid "The \"Hits\" column shows how many times each redirect has been used." -msgstr "" - -#: premium/tabs/redirects-tab.php:37 -msgid "Redirect empty searches" -msgstr "" - -#: premium/tabs/redirects-tab.php:39 -msgid "" -"Enter an URL here to redirect all searches that find nothing to this URL." -msgstr "" - -#: premium/tabs/redirects-tab.php:42 -msgid "Redirect searches without terms" -msgstr "" - -#: premium/tabs/redirects-tab.php:44 -msgid "Enter an URL here to redirect all searches without any search terms." -msgstr "" - -#: premium/tabs/redirects-tab.php:53 premium/tabs/redirects-tab.php:115 -msgid "Partial match" -msgstr "" - -#: premium/tabs/redirects-tab.php:54 -msgid "URL" -msgstr "" - -#: premium/tabs/redirects-tab.php:65 premium/tabs/redirects-tab.php:107 -msgid "Copy" -msgstr "" - -#: premium/tabs/redirects-tab.php:98 -msgid "Query string" -msgstr "" - -#: premium/tabs/redirects-tab.php:127 -msgid "Target URL" -msgstr "" - -#: premium/tabs/redirects-tab.php:153 -msgid "Add a redirect" -msgstr "" - -#: premium/tabs/redirects-tab.php:155 -msgid "Once you're done, remember to click the save button below!" -msgstr "" - -#: premium/tabs/related-tab.php:105 -msgid "" -"Relevanssi Related Posts feature shows related posts on posts pages, based " -"on keywords like post title, tags and categories. This feature uses the " -"Relevanssi index to find the best-matching related posts. All results are " -"cached, so your site performance won't suffer." -msgstr "" - -#: premium/tabs/related-tab.php:108 -#, php-format -msgid "" -"A pro tip: you can regenerate related posts for all posts with the WP CLI " -"command %s." -msgstr "" - -#: premium/tabs/related-tab.php:110 -msgid "Displaying the related posts" -msgstr "" - -#: premium/tabs/related-tab.php:115 -msgid "Enable related posts" -msgstr "" - -#: premium/tabs/related-tab.php:120 -msgid "If this is unchecked, related posts will be completely disabled." -msgstr "" - -#: premium/tabs/related-tab.php:125 premium/tabs/related-tab.php:128 -msgid "Automatically add to these post types" -msgstr "" - -#: premium/tabs/related-tab.php:153 -#, php-format -msgid "" -"The related posts will be automatically displayed for these post types. The " -"element is added using %1$s filter hook with priority 99 (you can adjust " -"that with the %2$s filter hook)." -msgstr "" - -#: premium/tabs/related-tab.php:155 -#, php-format -msgid "" -"If you don't choose to display the related posts automatically, you need to " -"add them manually to your template. You can use the template function %1$s " -"or the shortcode %2$s to display the related posts." -msgstr "" - -#: premium/tabs/related-tab.php:160 -msgid "Choosing the related posts" -msgstr "" - -#: premium/tabs/related-tab.php:164 premium/tabs/related-tab.php:167 -msgid "Keyword sources" -msgstr "" - -#: premium/tabs/related-tab.php:174 -msgid "Title" -msgstr "" - -#: premium/tabs/related-tab.php:213 -msgid "Restrict to taxonomy " -msgstr "" - -#: premium/tabs/related-tab.php:225 -msgid "" -"The sources Relevanssi uses for related post keywords. Keywords from these " -"sources are then used to search the Relevanssi index to find related posts. " -"Make sure you choose something, otherwise you won't see results or will see " -"random results. In addition of these sources, you can also define your own " -"keywords for each post from the post edit screen." -msgstr "" - -#: premium/tabs/related-tab.php:226 -msgid "" -"If you choose to restrict to the taxonomy, those keywords will only match in " -"the same category. For example restricted category search terms will only " -"match to category, not to post content. This may lead to better precision, " -"depending on how the taxonomy terms are used." -msgstr "" - -#: premium/tabs/related-tab.php:232 -msgid "" -"These taxonomies are missing here, because Relevanssi isn't set to index " -"them:" -msgstr "" - -#: premium/tabs/related-tab.php:242 -msgid "Number of posts" -msgstr "" - -#: premium/tabs/related-tab.php:245 -msgid "The number of related posts to show." -msgstr "" - -#: premium/tabs/related-tab.php:249 -msgid "Months to use" -msgstr "" - -#: premium/tabs/related-tab.php:252 -msgid "" -"Use only posts published within this many months. (For more fine-grained " -"date controls, use filters.)" -msgstr "" - -#: premium/tabs/related-tab.php:256 premium/tabs/related-tab.php:259 -msgid "Post types to use" -msgstr "" - -#: premium/tabs/related-tab.php:270 -msgid "Matching post type" -msgstr "" - -#: premium/tabs/related-tab.php:271 -msgid "Uncheck this option to choose other post types." -msgstr "" - -#: premium/tabs/related-tab.php:303 -msgid "" -"The post types to use for related posts. Matching post type means that for " -"each post type, only posts from the same post type are used for related " -"posts." -msgstr "" - -#: premium/tabs/related-tab.php:307 -msgid "No related posts found" -msgstr "" - -#: premium/tabs/related-tab.php:310 -msgid "Show nothing" -msgstr "" - -#: premium/tabs/related-tab.php:311 -msgid "Random posts" -msgstr "" - -#: premium/tabs/related-tab.php:312 -msgid "Random posts from same category" -msgstr "" - -#: premium/tabs/related-tab.php:314 -msgid "" -"What to do when no related posts are found? The options are to show nothing " -"and just disable the whole element, or to show random posts (either fully " -"random, or from the same category). Do note that the related posts are " -"cached, so the random posts do not change on every page load." -msgstr "" - -#: premium/tabs/related-tab.php:318 -msgid "Not enough related posts found" -msgstr "" - -#: premium/tabs/related-tab.php:321 -msgid "Show the found posts" -msgstr "" - -#: premium/tabs/related-tab.php:322 -msgid "Fill with random posts" -msgstr "" - -#: premium/tabs/related-tab.php:323 -msgid "Fill with random posts from same category" -msgstr "" - -#: premium/tabs/related-tab.php:325 -msgid "" -"What to do when not enough related posts are found? The options are to show " -"what was found, or to fill up the display with random posts. Do note that " -"the related posts are cached, so the random posts do not change on every " -"page load." -msgstr "" - -#: premium/tabs/related-tab.php:330 -msgid "Style options" -msgstr "" - -#: premium/tabs/related-tab.php:332 -msgid "" -"When you add the related posts to your site, Relevanssi will use a template " -"to print out the results. These settings control how that template displays " -"the posts. If you need to modify the related posts in a way these settings " -"do not allow, you can always create your own template." -msgstr "" - -#: premium/tabs/related-tab.php:337 -#, php-format -msgid "" -"To create your own template, it's best if you begin with the default " -"Relevanssi template, which can be found in the file %1$s. Copy the template " -"in the %2$s folder in your theme and make the necessary changes. Relevanssi " -"will then use your template file to display the related posts." -msgstr "" - -#: premium/tabs/related-tab.php:344 -msgid "Display titles" -msgstr "" - -#: premium/tabs/related-tab.php:349 -msgid "Display titles for related posts." -msgstr "" - -#: premium/tabs/related-tab.php:355 -msgid "Display thumbnails" -msgstr "" - -#: premium/tabs/related-tab.php:360 -msgid "Display thumbnails for related posts." -msgstr "" - -#: premium/tabs/related-tab.php:362 -msgid "" -"If enabled, this will show the featured image for the post if the post has " -"one." -msgstr "" - -#: premium/tabs/related-tab.php:368 -msgid "Default thumbnail" -msgstr "" - -#: premium/tabs/related-tab.php:374 -msgid "Select image" -msgstr "" - -#: premium/tabs/related-tab.php:376 -msgid "" -"If a post doesn't have a featured image, this image will be used instead." -msgstr "" - -#: premium/tabs/related-tab.php:380 -msgid "Check this post to remove the default thumbnail." -msgstr "" - -#: premium/tabs/related-tab.php:387 -msgid "Display excerpts" -msgstr "" - -#: premium/tabs/related-tab.php:392 -msgid "Display excerpts for related posts." -msgstr "" - -#: premium/tabs/related-tab.php:395 -#, php-format -msgid "" -"This uses the manually created post excerpt if one exists, otherwise the " -"beginning of the post is used. Default length is 50 characters, use the %s " -"filter hook to adjust that." -msgstr "" - -#: premium/tabs/related-tab.php:401 -msgid "Minimum width" -msgstr "" - -#: premium/tabs/related-tab.php:402 -msgid "in pixels" -msgstr "" - -#: premium/tabs/related-tab.php:407 -msgid "The minimum width of the related post element." -msgstr "" - -#: premium/tabs/related-tab.php:412 -msgid "Caching" -msgstr "" - -#: premium/tabs/related-tab.php:414 -msgid "" -"The related posts are cached using WordPress transients. The related posts " -"for each post are stored in a transient that is stored for two weeks. The " -"cache for each post is flushed whenever the post is saved. When a post is " -"made non-public (returned to draft, trashed), Relevanssi automatically " -"flushes all related post caches where that post appears." -msgstr "" - -#: premium/tabs/related-tab.php:419 -msgid "Use cache for admins" -msgstr "" - -#: premium/tabs/related-tab.php:424 -msgid "Use the cache for admin users." -msgstr "" - -#: premium/tabs/related-tab.php:426 -msgid "" -"Disable this option when adjusting the settings to see changes on the site." -msgstr "" - -#: premium/tabs/related-tab.php:432 -msgid "Flush cache" -msgstr "" - -#: premium/tabs/related-tab.php:437 -msgid "Flush the caches." -msgstr "" - -#: premium/tabs/related-tab.php:439 -msgid "Check this box to flush all related posts caches." -msgstr "" - -#: premium/tabs/spamblock-tab.php:42 -msgid "Spam Blocking" -msgstr "" - -#: premium/tabs/spamblock-tab.php:44 -msgid "" -"These tools can be used to block spam searches on your site. It's best if " -"the spam searches can be blocked earlier on server level before WordPress " -"starts at all, but if that's not possible, this is a fine option." -msgstr "" - -#: premium/tabs/spamblock-tab.php:50 -#, php-format -msgid "" -"These filters are applied to all searches done using the %1$s parameter, the " -"%2$s pretty URLs (if your pretty URLs are using a different prefix, you can " -"use the %3$s filter hook to adjust the spam block) and also on page views " -"with the %4$s parameter." -msgstr "" - -#: premium/tabs/spamblock-tab.php:59 -msgid "" -"You can figure out the suitable keywords from your User searches page. Look " -"for common terms. Often spam queries contain URLs, and the top level domain " -"names are good keywords, things like '.shop', '.online', '.com' – those " -"appear rarely in legitimate searches." -msgstr "" - -#: premium/tabs/spamblock-tab.php:64 -msgid "Keyword spam blocking" -msgstr "" - -#: premium/tabs/spamblock-tab.php:66 -msgid "" -"Enter keywords, one per line. If these keywords appear anywhere in the " -"search string, the search will be stopped. Use as short keywords as " -"possible, but be careful to avoid blocking legitimate searches. The keywords " -"are case insensitive." -msgstr "" - -#: premium/tabs/spamblock-tab.php:69 -msgid "Regex keywords" -msgstr "" - -#: premium/tabs/spamblock-tab.php:72 -#, php-format -msgid "" -"These keywords support the use of regular expressions with preg_match(). The " -"keywords will be wrapped with %1$s." -msgstr "" - -#: premium/tabs/spamblock-tab.php:75 -msgid "Block Chinese queries" -msgstr "" - -#: premium/tabs/spamblock-tab.php:77 -msgid "Block queries that contain Chinese characters." -msgstr "" - -#: premium/tabs/spamblock-tab.php:80 -msgid "Block Cyrillic queries" -msgstr "" - -#: premium/tabs/spamblock-tab.php:82 -msgid "Block queries that contain Cyrillic characters." -msgstr "" - -#: premium/tabs/spamblock-tab.php:85 -msgid "Block emoji queries" -msgstr "" - -#: premium/tabs/spamblock-tab.php:87 -msgid "Block queries that contain emoji characters." -msgstr "" - -#: premium/tabs/spamblock-tab.php:90 -msgid "Block bot queries" -msgstr "" - -#: premium/tabs/spamblock-tab.php:92 -msgid "" -"Block queries from bots. Only applied to searches, not to page views with " -"highlights." -msgstr "" - -#: premium/tabs/spamblock-tab.php:95 -msgid "Current list of bots: " -msgstr "" - -#: premium/tabs/spamblock-tab.php:101 -#, php-format -msgid "You can add new bots to the list with the filter hook %1$s." -msgstr "" - -#: premium/tabs/spamblock-tab.php:108 -msgid "Blocking bots" -msgstr "" - -#: premium/tabs/spamblock-tab.php:110 -msgid "" -"You can use the Relevanssi spam block to also block requests from bots. In " -"general there's very little reason to allow bots to crawl search results " -"pages. They can create lots of really quite pointless traffic. On one of my " -"sites, out of 20.000 search queries, 16.000 were useless queries by the Bing " -"bot. Nice bots will obey the robots.txt instructions. This code snippet adds " -"robots.txt rules that block rule-obeying bots from accessing search results " -"pages:" -msgstr "" - -#: premium/tabs/spamblock-tab.php:123 -msgid "Blocking at the server level" -msgstr "" - -#: premium/tabs/spamblock-tab.php:125 -msgid "" -"It's best if the blocking is done before WordPress starts up in the first " -"place: that will increase security and will save server resources. These " -"tools can be used to block bot traffic on your site, but using them requires " -"expertise on server settings. Use them only if you know what you're doing, " -"or have a professional help you." -msgstr "" - -#: premium/tabs/support-tab.php:38 -#, php-format -msgid "" -"This form sends out an email to the Relevanssi support. If you have a " -"question, please fill in the form below and we will get back to you as soon " -"as possible. If you don't hear from us in a day or two, it's possible your " -"email has gone astray. In that case, please contact us again and use %1$sthe " -"support form at Relevanssi.com%2$s. You can also email us directly at %3$s. " -"Expect slower response times during June and July." -msgstr "" - -#: premium/tabs/support-tab.php:49 -#, php-format -msgid "" -"We have a large knowledge base. %1$sTake a look there%2$s, perhaps your " -"question is already answered there." -msgstr "" - -#: premium/tabs/support-tab.php:53 -msgid "" -"Instead of telling us \"X doesn't work\", please try be as specific as " -"possible. Please tell us what you expect to happen and what actually happens." -msgstr "" - -#: premium/tabs/support-tab.php:55 -msgid "" -"Feel free to ask questions in English or Finnish. Please do not send us " -"video questions." -msgstr "" - -#: premium/tabs/support-tab.php:62 -msgid "Your email address" -msgstr "" - -#: premium/tabs/support-tab.php:66 -msgid "Subject" -msgstr "" - -#: premium/tabs/support-tab.php:70 -msgid "Message" -msgstr "" - -#: premium/tabs/support-tab.php:75 -msgid "Send" -msgstr "" - -#: premium/tabs/support-tab.php:111 -msgid "Email sent!" -msgstr "" - -#: premium/tabs/support-tab.php:117 -msgid "Email failed!" -msgstr "" diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.cs_CZ b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.cs_CZ deleted file mode 100644 index 9e8b426a..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.cs_CZ +++ /dev/null @@ -1,327 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.de_DE b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.de_DE deleted file mode 100644 index be4105ea..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.de_DE +++ /dev/null @@ -1,1037 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_CA b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_CA deleted file mode 100644 index 86215bda..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_CA +++ /dev/null @@ -1,323 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_GB b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_GB deleted file mode 100644 index 86215bda..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_GB +++ /dev/null @@ -1,323 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_US b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_US deleted file mode 100644 index 86215bda..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.en_US +++ /dev/null @@ -1,323 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.es_ES b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.es_ES deleted file mode 100644 index 4dbeea01..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.es_ES +++ /dev/null @@ -1,386 +0,0 @@ - diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fi b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fi deleted file mode 100644 index c9e56028..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fi +++ /dev/null @@ -1,365 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fr_FR b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fr_FR deleted file mode 100644 index 87290ad5..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.fr_FR +++ /dev/null @@ -1,72 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.it_IT b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.it_IT deleted file mode 100644 index 10aa1b0f..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.it_IT +++ /dev/null @@ -1,666 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.pt_BR b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.pt_BR deleted file mode 100644 index b0798a02..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.pt_BR +++ /dev/null @@ -1,173 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.zh_TW b/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.zh_TW deleted file mode 100644 index 5e13ccad..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/stopwords/stopwords.zh_TW +++ /dev/null @@ -1,769 +0,0 @@ - \ No newline at end of file diff --git a/wp/wp-content/plugins/relevanssi-premium/uninstall.php b/wp/wp-content/plugins/relevanssi-premium/uninstall.php deleted file mode 100644 index ff56fb0c..00000000 --- a/wp/wp-content/plugins/relevanssi-premium/uninstall.php +++ /dev/null @@ -1,32 +0,0 @@ -get_col( "SELECT blog_id FROM $wpdb->blogs" ); - $old_blogid = $wpdb->blogid; - foreach ( $blogids as $uninstall_blog_id ) { - switch_to_blog( $uninstall_blog_id ); - relevanssi_uninstall(); - restore_current_blog(); - } - - delete_site_option( 'relevanssi_api_key' ); -} else { - relevanssi_uninstall(); -} diff --git a/wp/wp-content/plugins/search-filter-divi/README.txt b/wp/wp-content/plugins/search-filter-divi/README.txt deleted file mode 100644 index d88a7bb5..00000000 --- a/wp/wp-content/plugins/search-filter-divi/README.txt +++ /dev/null @@ -1,72 +0,0 @@ -=== Search & Filter Pro - Divi Extension === -Contributors: CodeAmp -Donate link: -Tags: posts, custom posts, products, category, filter, taxonomy, post meta, custom fields, search, wordpress, post type, post date, author -Requires at least: 4.0 -Tested up to: 5.4 -Stable tag: 1.0.7 - -A bridge Plugin enabling easy integration of the Divi Blog, Portfolio and Shop modules with Search & Filter Pro - -== Description == - -A bridge Plugin enabling easy integration of the Divi Blog, Portfolio and Shop modules with Search & Filter Pro - - -== Installation == - - -= Uploading in WordPress Dashboard = - -1. Navigate to the 'Add New' in the plugins dashboard -2. Navigate to the 'Upload' area -3. Select `search-filter-divi.zip` from your computer -4. Click 'Install Now' -5. Activate the plugin in the Plugin dashboard - - -= Using FTP = - -1. Download `search-filter-divi.zip` -2. Extract the `search-filter-divi` directory to your computer -3. Upload the `search-filter-divi` directory to the `/wp-content/plugins/` directory -4. Activate the plugin in the Plugin dashboard - - -== Frequently Asked Questions == - - -== Screenshots == - - -== Changelog == - -= 1.0.7 = -* Fix - an with our search form no longer showing up in the Divi Builder - -= 1.0.6 = -* Fix - a PHP issue with paramater order - -= 1.0.5 = -* Fix - an issue with pagination not working properly when using modules + filtering on the homepage -* Fix - a PHP 8 issue -* Add support for wp pagenavi plugin -* Add hooks before/after the posts module - -= 1.0.4 = -* Fix - an with our query for fetching search forms not being handled correctly in certain situations - -= 1.0.3 = -* Fix an issue with custom CSS classes being lost with S&F results/modules - -= 1.0.2 = -* Fix an issue with an option disappearing from the Blog module - -= 1.0.1 = -* Fix an issue with the Shop module not being filtered - -= 1.0.0 = -* Initial release - -== Upgrade Notice == - diff --git a/wp/wp-content/plugins/search-filter-divi/includes/loader.php b/wp/wp-content/plugins/search-filter-divi/includes/loader.php deleted file mode 100644 index 07f5daeb..00000000 --- a/wp/wp-content/plugins/search-filter-divi/includes/loader.php +++ /dev/null @@ -1,14 +0,0 @@ - 'https://searchandfilter.com/', - 'author' => 'Code Amp', - 'author_uri' => 'https://codeamp.com/', - ); - - public function init() { - $this->name = esc_html__( 'Search & Filter Form', 'search-filter-divi' ); - /*$this->whitelisted_fields = array( - 'search_form', - );*/ - $this->advanced_fields = array( - 'fonts' => array( - 'search_form' => array( - 'label' => __('Search & Filter Form', "search-filter-divi"), - 'css' => array( - 'main' => "%%order_class%% .sf_divi_select_text", - ), - 'line_height' => array('default' => '1em',), - 'font_size' => array('default' => '14px',), - ), - ), - ); - $this->settings_modal_toggles = array( - 'general' => array( - 'toggles' => array( - 'sg1' => __('Search & Filter Settings', "search-filter-divi"), - ), - ), - ); - } - - public function get_fields() { - - $search_form_options = $this->get_search_form_options(); - - return array( - 'search_form' => array( - 'label' => esc_html__( 'Choose a Search Form', 'sfdivi-search-filter-divi' ), - 'type' => 'select', - 'option_category' => 'basic_option', - 'description' => __('Display your Search Form.', "sfdivi-search-filter-divi"), - 'toggle_slug' => 'sg1', - - 'options' => array_merge(array('' => 'Choose a Search Form'), $search_form_options), - //'options' => $search_form_options, - ), - ); - } - - public function get_search_form_options() - { - if(empty($this->search_form_options)){ - - $custom_posts = new WP_Query('post_type=search-filter-widget&post_status=publish&posts_per_page=-1'); - - $this->search_form_options = array(); - foreach($custom_posts->posts as $post){ - $this->search_form_options['search-filter-id-'.$post->ID] = get_the_title($post->ID); - } - - wp_reset_postdata(); - } - - return $this->search_form_options; - } - - public function render( $attrs, $content, $render_slug ) { - $search_filter_id = intval(str_replace("search-filter-id-", "", $this->props['search_form'])); - return do_shortcode('[searchandfilter id="'.$search_filter_id.'"]'); - } -} - -new SFDIVI_SearchForm; diff --git a/wp/wp-content/plugins/search-filter-divi/includes/modules/SimpleHeader/SimpleHeader.php b/wp/wp-content/plugins/search-filter-divi/includes/modules/SimpleHeader/SimpleHeader.php deleted file mode 100644 index 8a1192d4..00000000 --- a/wp/wp-content/plugins/search-filter-divi/includes/modules/SimpleHeader/SimpleHeader.php +++ /dev/null @@ -1,20 +0,0 @@ -name = esc_html__( 'Simple Header', 'simp-simple-extension' ); - } - - public function get_fields() { - return array(); - } - - public function render( $unprocessed_props, $content, $render_slug ) { - - } -} - -new SIMP_SimpleHeader; diff --git a/wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-extension.php b/wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-extension.php deleted file mode 100644 index cdb876dc..00000000 --- a/wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-extension.php +++ /dev/null @@ -1,47 +0,0 @@ -plugin_dir = plugin_dir_path( __FILE__ ); - $this->plugin_dir_url = plugin_dir_url( $this->plugin_dir ); - - parent::__construct( $name, $args ); - - } -} - -new Search_Filter_Divi_Extension; diff --git a/wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-query.php b/wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-query.php deleted file mode 100644 index 9d7f1f9e..00000000 --- a/wp/wp-content/plugins/search-filter-divi/includes/search-filter-divi-query.php +++ /dev/null @@ -1,356 +0,0 @@ -init(); - - } - public function init(){ - - // add S&F option to portoflio and blog module settings - add_filter( 'et_pb_all_fields_unprocessed_et_pb_portfolio', array($this, 'render_settings_field') ); - add_filter( 'et_pb_all_fields_unprocessed_et_pb_blog', array($this, 'render_settings_field')); - add_filter( 'et_pb_all_fields_unprocessed_et_pb_shop', array($this, 'render_settings_field'), 1000 ); - - //we used to do it a different way for shop, but lets unify all for consistent experience - //add_filter( 'et_pb_all_fields_unprocessed_et_pb_shop', array($this, 'render_shop_settings_field'), 1000 ); - - //add S&F class to portfolio and blog modules, attach pre_get_posts - add_filter( 'et_pb_module_shortcode_attributes', array($this, 'module_attributes'), 1000, 3 ); - add_filter( 'et_pb_module_shortcode_attributes', array($this, 'module_shop_attributes'), 1000, 3 ); - - //remove pre_get_posts and add hooks for content above / below the blog module - add_filter( 'et_module_shortcode_output', array($this, 'shortcode_output'), 1000, 3 ); - - //add Divi option to `display method` in S&F settings - add_filter( 'search_filter_admin_option_display_results', array($this, 'search_filter_admin_option_display_results'), 10, 2 ); - - //override the ajax container, and pagination selectors in search form attributes - add_filter( 'search_filter_form_attributes', array($this, 'search_filter_form_attributes'), 10, 2 ); - - // retrieving wp_query information from this action - add_filter( 'et_builder_blog_query', array($this, 'get_blog_query'), 10, 2 ); - - } - - - public function filter_query($query){ - - - //attach S&F to the query - if( 0 !== $this->active_query_id ) { - $query->set( "search_filter_id", $this->active_query_id ); - - // pagination stops working on the homepage, so we have to set these vars again - if ( is_front_page() || is_home() ) { - $sfpaged = 1; - if( isset( $_GET['sf_paged'] ) ) { - $sfpaged = intval( $_GET[ 'sf_paged' ] ); - global $paged; - $paged = $sfpaged; - set_query_var( "paged", $paged ); //some plugins / themes use `get_query_var`, they often shouldn't - } - } - - } - $this->active_query_id = 0; - } - - public function shortcode_output($output, $render_slug, $module){ - - if( ('et_pb_portfolio' !== $render_slug) && ('et_pb_blog' !== $render_slug) && ('et_pb_shop' !== $render_slug) ){ - return $output; - } - - if ( is_array( $output ) ) { - return $output; - } - - // shortcode output means the query has been run, so remove pre_get_posts - remove_action( 'pre_get_posts', array( $this, 'filter_query' ), 1000 ); - remove_filter( 'woocommerce_shortcode_products_query', array($this, 'woocommerce_shortcode_cache_breaker'), 1000 ); - - // now allow actions to insert content - ob_start(); - do_action( 'search_filter_divi_module_start_render', $this->current_query ); - $pre_render_html = ob_get_clean(); - - ob_start(); - do_action( 'search_filter_divi_module_end_render', $this->current_query ); - $after_render_html = ob_get_clean(); - - // injecting the pre_render_html inside the ajax container - $output = preg_replace( '~
    ~', $pre_render_html . '
    ', $output ); - - // find the last closing div - $closing_div = '
    '; - $last_div_pos = strrpos( $output, $closing_div ); - if( $last_div_pos !== false ) { - //and insert html just before - $output = substr_replace( $output, $after_render_html . $closing_div, $last_div_pos, strlen( $closing_div )); - } - return $output; - } - - public function get_blog_query( $wp_query ){ - $this->current_query = $wp_query; - return $wp_query; - } - - public function module_attributes($props, $attrs, $render_slug){ - - if( ('et_pb_portfolio' !== $render_slug) && ('et_pb_blog' !== $render_slug) ){ - return $props; - } - - if((!isset($props['search_filter_link']))||(!isset($props['search_filter_id']))){ - return $props; - } - - if("yes" !== $props['search_filter_link']){ - return $props; - } - - //the value of search_filter_id will be something like `search-filter-id-X` where X is the ID - $search_filter_id = intval(str_replace("search-filter-id-", "", $props['search_filter_id'])); - $search_filter_results_class = 'search-filter-results-'.$search_filter_id; - - // if the class is not already there, add it - if ( strpos( $props['module_class'], $search_filter_results_class ) === false) { - $props['module_class'] .= ' ' . $search_filter_results_class . ' '; //add a class for easy Ajax integration - } - - $this->active_query_id = $search_filter_id; - add_action( 'pre_get_posts', array($this, 'filter_query'), 1000 ); - - return $props; - } - - public function products_shortcode_attributes($out, $pairs, $atts) { - - //remove products shortcode caching - $out['cache'] = false; - remove_filter( 'shortcode_atts_products', array($this, 'products_shortcode_attributes'), 1000, 3 ); - return $out; - } - public function module_shop_attributes($props, $attrs, $render_slug) { - - if( ('et_pb_shop' !== $render_slug) ){ - return $props; - } - - if((!isset($props['search_filter_link']))||(!isset($props['search_filter_id']))){ - return $props; - } - - if("yes" !== $props['search_filter_link']){ - return $props; - } - - //the value of search_filter_id will be something like `search-filter-id-X` where X is the ID - $search_filter_id = intval( str_replace( "search-filter-id-", "", $props['search_filter_id'] ) ); - $props['module_class'] = " search-filter-results-".$search_filter_id." "; //add a class for easy Ajax integration - $this->active_query_id = $search_filter_id; - - //filter the query - add_action( 'pre_get_posts', array($this, 'filter_query'), 1000 ); - - //add cache=false to `products` shortcode - add_filter( 'shortcode_atts_products', array($this, 'products_shortcode_attributes'), 1000, 3 ); - - return $props; - } - - /* - * Attach S&F settings to portfolio and blog modules (search form choice) - */ - public function render_settings_field( $field_unprocessed ){ - - $show_if = array( - 'search_filter_link' => 'yes', - ); - - $fields = array( - 'search_filter_link' => array( - 'label' => __('Link with a Search & Filter Form?', 'search-filter-divi'), - 'type' => 'select', - 'default' => 'no', - 'option_category' => 'configuration', - 'options' => array( - 'no' => 'No', - 'yes' => 'Yes', - ), - 'toggle_slug' => 'main_content', - 'affects' => array('search_filter_id'), //,'posts_number','include_categories', - 'vb_support' => true, - ), - 'search_filter_id' => array( - 'label' => __('Choose a Search Form', 'search-filter-divi'), - 'type' => 'select', - 'default' => '0', - 'option_category' => 'configuration', - 'options' => array_merge(array('' => 'Choose a Search Form'), $this->get_search_form_options()), - //'show_if' => $show_if, - 'depends_show_if_not' => 'no', - 'toggle_slug' => 'main_content', - 'vb_support' => true, - - ) - ); - - //hide query related options unless S&F query is off - //editing existing dependencies doesn't really seem to work anymore - /*$show_if_value = "no"; - $show_if = array( - 'search_filter_link' => $show_if_value, - ); - - $field_unprocessed['posts_number']['depends_show_if_not'] = 'no'; - $field_unprocessed['include_categories']['depends_show_if_not'] = 'no'; - $field_unprocessed['post_type']['show_if']['search_filter_link'] = 'off';*/ - - //return $field_unprocessed + $fields; - - return array_merge($fields, $field_unprocessed); - } - public function render_shop_settings_field($field_unprocessed){ - - $show_if = array( - 'type' => 'search_filter', - ); - - if(isset($field_unprocessed['type'])){ - - if(isset($field_unprocessed['type']['options'])){ - if(is_array($field_unprocessed['type']['options'])){ - $field_unprocessed['type']['options']['search_filter'] = 'Search & Filter Results'; - } - } - } - - $fields = array( - 'search_filter_id' => array( - 'label' => __('Choose a Search Form', 'search-filter-divi'), - 'type' => 'select', - 'default' => '1', - 'option_category' => 'configuration', - 'options' => array_merge(array('' => 'Choose a Search Form'), $this->get_search_form_options()), - 'show_if' => $show_if, - 'toggle_slug' => 'main_content', - - ) - ); - - //hide query related options unless S&F query is off - //doesn't work so well anymore - /*$show_if = array( - 'search_filter_link' => 'no', - ); - $field_unprocessed['posts_number']['show_if'] = $show_if; - $field_unprocessed['include_categories']['show_if'] = $show_if;*/ - - return $fields + $field_unprocessed; - } - /* - * Override the settings for the ajax container and pagination - */ - public function search_filter_form_attributes($attributes, $sfid){ - - if(isset($attributes['data-display-result-method'])) - { - if($attributes['data-display-result-method']=="divi_post_module" && ! function_exists('wp_pagenavi') ) - { - $attributes['data-ajax-target'] = '.search-filter-results-'.$sfid; - $attributes['data-ajax-links-selector'] = '.pagination a'; - } - else if ($attributes['data-display-result-method']=="divi_post_module" && function_exists('wp_pagenavi') ) { - $attributes['data-ajax-target'] = '.search-filter-results-'.$sfid; - $attributes['data-ajax-links-selector'] = '.wp-pagenavi a'; - } - else if($attributes['data-display-result-method']=="divi_shop_module") - { - $attributes['data-ajax-target'] = '.search-filter-results-'.$sfid; - $attributes['data-ajax-links-selector'] = '.page-numbers a'; - } - else if($attributes['data-display-result-method']=="custom_woocommerce_store") - { - $attributes['data-ajax-target'] = '.search-filter-results-'.$sfid; - $attributes['data-ajax-links-selector'] = '.page-numbers a'; - } - else if($attributes['data-display-result-method']=="post_type_archive") - { - $attributes['data-ajax-target'] = '.search-filter-results-'.$sfid; - $attributes['data-ajax-links-selector'] = '.pagination a'; - } - } - - return $attributes; - } - - /* - * Add a `display result` method for divi - */ - public function search_filter_admin_option_display_results($display_results_options){ - - $display_results_options['divi_post_module'] = array( - 'label' => __('Divi Blog / Portfolio Module'), - 'description' => - '

    '.__('Search Results will displayed using a Divi Blog or Portfolio.', 'search-filter-divi').'

    '. - '

    '.__('Remember to update the setting in your module to use the Search & Filter Query.', 'search-filter-divi').'

    ', - 'base' => 'shortcode' - ); - $display_results_options['divi_shop_module'] = array( - 'label' => __('Divi Shop Module'), - 'description' => - '

    '.__('Search Results will displayed using a Divi Shop Module.', 'search-filter-divi').'

    '. - '

    '.__('Remember to update the setting in your module to use the Search & Filter Query.', 'search-filter-divi').'

    ', - 'base' => 'shortcode' - ); - - return $display_results_options; - } - /* - * Get available search forms as key => label array, for populating a `select` - */ - private function get_search_form_options() { - - if(empty($this->search_form_options)){ - - $custom_posts = new WP_Query('post_type=search-filter-widget&post_status=publish&posts_per_page=-1'); - - if( $custom_posts->post_count > 0 ) { - foreach ($custom_posts->posts as $post){ - $this->search_form_options[ 'search-filter-id-' . $post->ID ] = get_post_field( 'post_name', $post->ID ); - } - } - } - - return $this->search_form_options; - } -} - -new Search_Filter_Divi_Query(); diff --git a/wp/wp-content/plugins/search-filter-divi/scripts/builder-bundle.min.js b/wp/wp-content/plugins/search-filter-divi/scripts/builder-bundle.min.js deleted file mode 100644 index 7c37fef7..00000000 --- a/wp/wp-content/plugins/search-filter-divi/scripts/builder-bundle.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=1)}([function(e,t){},function(e,t,r){r(2),e.exports=r(3)},function(e,t,r){"use strict"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r.n(n),i=r(5);o()(window).on("et_builder_api_ready",function(e,t){t.registerModules(i.a)})},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";var n=r(6);t.a=[n.a]},function(e,t,r){"use strict";var n=r(7),o=r.n(n),i=r(8),u=r.n(i),c=r(0);r.n(c);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r0){ - //if yes, then its likely this page is a results page for S&F, so remove the DIVI events - removeDiviPaginationEvents = true; - } - } - }); - - $(document).ready( function(){ - if(removeDiviPaginationEvents){ - //this is the only way to remove those events - $( 'body' ).off( 'click', '.et_pb_ajax_pagination_container .wp-pagenavi a, .et_pb_ajax_pagination_container .pagination a'); - } - }); - - $(document).on("sf:ajaxfinish", ".searchandfilter", function(e, searchForm){ - if( (searchForm.object.display_result_method == "divi_post_module") || (searchForm.object.display_result_method == "post_type_archive") ){ - var $grids = $( searchForm.targetSelector + ' .et_pb_salvattore_content' ); - if( $grids.length > 0 ){ - salvattore['register_grid']($grids.get(0)); - salvattore['recreate_columns']($grids.get(0)); - } - } - }); - -}(jQuery)); \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-divi/search-filter-divi-plugin-updater.php b/wp/wp-content/plugins/search-filter-divi/search-filter-divi-plugin-updater.php deleted file mode 100644 index 4470e7c2..00000000 --- a/wp/wp-content/plugins/search-filter-divi/search-filter-divi-plugin-updater.php +++ /dev/null @@ -1,572 +0,0 @@ -api_url = trailingslashit( $_api_url ); - $this->api_data = $_api_data; - $this->name = plugin_basename( $_plugin_file ); - $this->slug = basename( $_plugin_file, '.php' ); - $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->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ); - - $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 ); - remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 ); - add_action( 'after_plugin_row_' . $this->name, 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 ) { - - global $pagenow; - - if ( ! is_object( $_transient_data ) ) { - $_transient_data = new stdClass; - } - - if ( 'plugins.php' == $pagenow && is_multisite() ) { - return $_transient_data; - } - - if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) { - return $_transient_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 ) ); - - $this->set_version_info_cache( $version_info ); - - } - - if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) { - - if ( version_compare( $this->version, $version_info->new_version, '<' ) ) { - - $_transient_data->response[ $this->name ] = $version_info; - - // Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo. - $_transient_data->response[ $this->name ]->plugin = $this->name; - - } - - $_transient_data->last_checked = time(); - $_transient_data->checked[ $this->name ] = $this->version; - - } - - return $_transient_data; - } - - /** - * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise! - * - * @param string $file - * @param array $plugin - */ - public function show_update_notification( $file, $plugin ) { - - if ( is_network_admin() ) { - return; - } - - if( ! current_user_can( 'update_plugins' ) ) { - return; - } - - if( ! is_multisite() ) { - return; - } - - if ( $this->name != $file ) { - return; - } - - // Remove our filter on the site transient - remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 ); - - $update_cache = get_site_transient( 'update_plugins' ); - - $update_cache = is_object( $update_cache ) ? $update_cache : new stdClass(); - - if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) { - - $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 ) ); - - // Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now: - if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) { - $version_info->banners = $this->convert_object_to_array( $version_info->banners ); - } - - if ( isset( $version_info->sections ) && ! is_array( $version_info->sections ) ) { - $version_info->sections = $this->convert_object_to_array( $version_info->sections ); - } - - if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) { - $version_info->icons = $this->convert_object_to_array( $version_info->icons ); - } - - $this->set_version_info_cache( $version_info ); - } - - if ( ! is_object( $version_info ) ) { - return; - } - - if ( version_compare( $this->version, $version_info->new_version, '<' ) ) { - - $update_cache->response[ $this->name ] = $version_info; - - } - - $update_cache->last_checked = time(); - $update_cache->checked[ $this->name ] = $this->version; - - set_site_transient( 'update_plugins', $update_cache ); - - } else { - - $version_info = $update_cache->response[ $this->name ]; - - } - - // Restore our filter - add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) ); - - if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) { - - // build a plugin list row, with update notification - $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); - # - echo ''; - echo ''; - echo '
    '; - - $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' ); - - if ( empty( $version_info->download_link ) ) { - printf( - __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads' ), - esc_html( $version_info->name ), - '', - esc_html( $version_info->new_version ), - '' - ); - } else { - printf( - __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'easy-digital-downloads' ), - esc_html( $version_info->name ), - '', - esc_html( $version_info->new_version ), - '', - '', - '' - ); - } - - do_action( "in_plugin_update_message-{$file}", $plugin, $version_info ); - - echo '
    '; - } - } - - /** - * 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 ( $_action != 'plugin_information' ) { - - 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(), - ) - ); - - $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ); - - // Get the transient where we store the api request for this plugin for 24 hours - $edd_api_request_transient = $this->get_cached_version_info( $cache_key ); - - //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 ); - - // Expires in 3 hours - $this->set_version_info_cache( $api_response, $cache_key ); - - if ( false !== $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 ); - } - - if( ! isset( $_data->plugin ) ) { - $_data->plugin = $this->name; - } - - 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 ) { - $new_data = array(); - foreach ( $data as $key => $value ) { - $new_data[ $key ] = $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 ) { - - $verify_ssl = $this->verify_ssl(); - if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) { - $args['sslverify'] = $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 - */ - private function api_request( $_action, $_data ) { - - global $wp_version, $edd_plugin_url_available; - - $verify_ssl = $this->verify_ssl(); - - // Do a quick status check on this domain if we haven't already checked it. - $store_hash = md5( $this->api_url ); - if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) { - $test_url_parts = parse_url( $this->api_url ); - - $scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http'; - $host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : ''; - $port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : ''; - - if ( empty( $host ) ) { - $edd_plugin_url_available[ $store_hash ] = false; - } else { - $test_url = $scheme . '://' . $host . $port; - $response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl ) ); - $edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true; - } - } - - if ( false === $edd_plugin_url_available[ $store_hash ] ) { - return; - } - - $data = array_merge( $this->api_data, $_data ); - - if ( $data['slug'] != $this->slug ) { - return; - } - - if( $this->api_url == trailingslashit ( home_url() ) ) { - return false; // Don't allow a plugin to ping itself - } - - $api_params = array( - 'edd_action' => 'get_version', - 'license' => ! empty( $data['license'] ) ? $data['license'] : '', - 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false, - 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false, - 'version' => isset( $data['version'] ) ? $data['version'] : false, - 'slug' => $data['slug'], - 'author' => $data['author'], - 'url' => home_url(), - 'beta' => ! empty( $data['beta'] ), - ); - - $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) ); - - if ( ! is_wp_error( $request ) ) { - $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; - } - - public function show_changelog() { - - global $edd_plugin_data; - - if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) { - return; - } - - if( empty( $_REQUEST['plugin'] ) ) { - return; - } - - if( empty( $_REQUEST['slug'] ) ) { - return; - } - - if( ! current_user_can( 'update_plugins' ) ) { - wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) ); - } - - $data = $edd_plugin_data[ $_REQUEST['slug'] ]; - $beta = ! empty( $data['beta'] ) ? true : false; - $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' ); - $version_info = $this->get_cached_version_info( $cache_key ); - - if( false === $version_info ) { - - $api_params = array( - 'edd_action' => 'get_version', - 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false, - 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false, - 'slug' => $_REQUEST['slug'], - 'author' => $data['author'], - 'url' => home_url(), - 'beta' => ! empty( $data['beta'] ) - ); - - $verify_ssl = $this->verify_ssl(); - $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) ); - - if ( ! is_wp_error( $request ) ) { - $version_info = json_decode( wp_remote_retrieve_body( $request ) ); - } - - - if ( ! empty( $version_info ) && isset( $version_info->sections ) ) { - $version_info->sections = maybe_unserialize( $version_info->sections ); - } else { - $version_info = false; - } - - if( ! empty( $version_info ) ) { - foreach( $version_info->sections as $key => $section ) { - $version_info->$key = (array) $section; - } - } - - $this->set_version_info_cache( $version_info, $cache_key ); - - } - - if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) { - echo '
    ' . $version_info->sections['changelog'] . '
    '; - } - - exit; - } - - public function get_cached_version_info( $cache_key = '' ) { - - if( empty( $cache_key ) ) { - $cache_key = $this->cache_key; - } - - $cache = get_option( $cache_key ); - - if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) { - return false; // Cache is expired - } - - // 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']; - - } - - public function set_version_info_cache( $value = '', $cache_key = '' ) { - - if( empty( $cache_key ) ) { - $cache_key = $this->cache_key; - } - - $data = array( - 'timeout' => strtotime( '+3 hours', time() ), - 'value' => json_encode( $value ) - ); - - update_option( $cache_key, $data, 'no' ); - - } - - /** - * 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 ); - } - -} diff --git a/wp/wp-content/plugins/search-filter-divi/search-filter-divi.php b/wp/wp-content/plugins/search-filter-divi/search-filter-divi.php deleted file mode 100644 index 10bb5ebb..00000000 --- a/wp/wp-content/plugins/search-filter-divi/search-filter-divi.php +++ /dev/null @@ -1,118 +0,0 @@ - admin_url( 'admin-ajax.php' ), 'home_url' => (home_url('/')) )); - wp_enqueue_script( 'search-filter-divi' ); - } - - /** - * Init Divi Extension - * - * @since 1.0.0 - * - * @access public - */ - public function initialise_divi_extension() { - - require_once plugin_dir_path( __FILE__ ) . 'includes/search-filter-divi-extension.php'; - } - - /** - * Handle plugin updates - * - * @since 1.0.0 - * - * @access public - */ - public function update_plugin_handler() { - - // setup the updater - $edd_updater = new Search_Filter_Divi_Plugin_Updater( self::PLUGIN_UPDATE_URL, __FILE__, - array( - 'version' => self::VERSION, - 'license' => 'search-filter-extension-free', - 'item_id' => self::PLUGIN_UPDATE_ID, // ID of the product - 'author' => 'Search & Filter', // author of this plugin - 'beta' => false, - ) - ); - - } - -} - -if( !class_exists( 'Search_Filter_Divi_Plugin_Updater' ) ) { - // load our custom updater - include( dirname( __FILE__ ) . '/search-filter-divi-plugin-updater.php' ); -} - -if( !class_exists( 'Search_Filter_Divi_Query' ) ) { - include( dirname( __FILE__ ) . '/includes/search-filter-divi-query.php' ); -} diff --git a/wp/wp-content/plugins/search-filter-divi/styles/style-dbp.min.css b/wp/wp-content/plugins/search-filter-divi/styles/style-dbp.min.css deleted file mode 100644 index e69de29b..00000000 diff --git a/wp/wp-content/plugins/search-filter-divi/styles/style.min.css b/wp/wp-content/plugins/search-filter-divi/styles/style.min.css deleted file mode 100644 index e69de29b..00000000 diff --git a/wp/wp-content/plugins/search-filter-pro/README.txt b/wp/wp-content/plugins/search-filter-pro/README.txt deleted file mode 100644 index 6cb8f849..00000000 --- a/wp/wp-content/plugins/search-filter-pro/README.txt +++ /dev/null @@ -1,685 +0,0 @@ -=== Search & Filter Pro === -Contributors: DesignsAndCode, CodeAmp -Donate link: -Tags: posts, custom posts, products, category, filter, taxonomy, post meta, custom fields, search, wordpress, post type, post date, author -Requires at least: 5.1 -Tested up to: 6.0 -Stable tag: 2.5.16 - -Search and Filtering for posts, products and custom posts. Allow your users to Search & Filter by taxonomies, custom fields and more. - -== Description == - -Search & Filter Pro is a advanced search and filtering plugin for WordPress. It allows you to Search & Filter your posts / custom posts / products by any number of parameters allowing your users to easily find what they are looking for on your site, whether it be a blog post, a product in an online shop and much more. - -Users can filter by Categories, Tags, Taxonomies, Custom Fields, Post Meta, Post Dates, Post Types and Authors, or any combination of these easily. - -Great for searching in your online shop, tested with: WooCommerce and WP eCommerce, Easy Digital Downloads - - -= Field types include: = - -* dropdown selects -* checkboxes -* radio buttons -* multi selects -* range slider -* number range -* date picker -* single or multiselect comboboxes with autocomplete - - -== Installation == - - -= Uploading in WordPress Dashboard = - -1. Navigate to the 'Add New' in the plugins dashboard -2. Navigate to the 'Upload' area -3. Select `search-filter-pro.zip` from your computer -4. Click 'Install Now' -5. Activate the plugin in the Plugin dashboard - - -= Using FTP = - -1. Download `search-filter-pro.zip` -2. Extract the `search-filter-pro` directory to your computer -3. Upload the `search-filter-pro` directory to the `/wp-content/plugins/` directory -4. Activate the plugin in the Plugin dashboard - - -== Frequently Asked Questions == - - -== Screenshots == - - -== Changelog == - -= 2.5.16 = -* Fix - an issue with our pagination functions causing fatal errors. - -= 2.5.15 = -* New - Add debugging hooks -* Fix - an undefined index warning in the active query class -* Fix - undefined index warnings when "include with children" is used in a taxonomy field -* Fix - check to make sure wc_get_product is available before using it -* Fix - add date sorting options to the secondary sort in the query settings -* Fix - add new pagination functions for our results.php template to work around issues with pagination not displaying in some scenarios -* Fix - infinite scroll was not triggering in some scenarios when the class name used was found on other parts of the page - -= 2.5.14 = -* New - Add support for PODS date format in our date picker -* New - Add `search_filter_cache_should_index_post` filter to conditionally exclude posts from the cache -* Fix - An issue where a product variation was not synced correctly when only the variation was updated -* Fix - An issue when using a number range field and using a step value between 0 and 1. -* Improvement - hide ajax settings when using 3rd party integrations -* Improvement - add support for PHP 8.1 and 8.2 - -= 2.5.13 = -* Fix - an issue with infinite scroll triggering after pressing "back" in certain browsers. -* Fix - an issue with canonical redirects being triggered when using Polylang Pro + WooCommerce. -* Fix - remove replaceAll polyfill which was causing conflicts with other plugins. - -= 2.5.12 = -* Fix - Support ajax in multiple results areas when using our third party integrations -* Fix - an issue with the author field not hiding admin authors (when that option was enabled) -* Fix - pagination issues with some of our integrations when using multiple search forms + results -* Fix - an issue where the query was not integrating with the Custom Layouts block -* Fix - issues in the admin UI since WordPress 5.9 -* Fix - update to using wp_initialize_site for multisite - thanks to Chrissyd -* Update - minimum required WordPress version to 5.1 - -= 2.5.11 = -* Fix - an issue with ajax and the results URL not being correctly detected -* Fix - updated some of our plugin update procedures -* New - options to use text input control for selecting post meta keys (to prevent loading of all meta keys in large databases) - available via the settings page -* New - action - `search_filter_remove_pagination` - use this before your template pagination functions to stop S&F from modifying the pagination - -= 2.5.10 = -* Fix - Fix an ajax issue for Dynamic Content maps - * Note: if you are using the maps + posts display method, you might need to reset this option. -* Fix - Translate the labels for options in the `sort` field via WPMLs Advanced Translation editor - -= 2.5.9 = -* Fix - Update fix for Dynamic Content maps integration -* Fix - An issue with with WPML Advanced Translation Editor (the text for our submit and reset buttons was not being detected) - -= 2.5.8 = -* Fix - an issue with Ajax and Dynamic Content's Google maps widget -* Fix - a PHP notice in our admin notices -* New - experimental hook for displaying WooCommerce variations individually - -= 2.5.7 = -* Fix - scroll (on pagination only) was not working correctly -* Fix - duplicate search form stopped working in a previous update -* Fix - an issue with the cache not progressing on nginx + php8 -* Fix - a PHP8 admin issue where checkboxes were not being set -* New - initial support for Dynamic.ooo Posts + Maps combined -* New - basic support for multiple ajax areas via hooks -* New - support for WPMLs advanced translation editor - -= 2.5.6 = -* Fix - a PHP 5.x error due to a trailing comma - -= 2.5.5 = -* Fix - an issue where the cache wouldn't restart because of an incorrect permissions check -* Fix - a PHP error that would be thrown under certain conditions -* Fix - an issue with WPML + ACF, and syncing data for relationship fields -* Fix - PHP 8 Compatibility -* Fix - Issues with multiple Dynamic Content Posts widgets + Search Forms on the same page (update required for DC to 1.13.0) -* New - Add support for Dynamic Content Google Maps widget -* Compatibility + tested upto WP 5.7 - -= 2.5.4 = -* Fix - a WooCommerce issue that was introduced where variations data was not being saved correctly - -= 2.5.3 = -* Fix - `hide empty` in taxonomy fields was ignoring certain posts completely based on their post stati -* Fix - issues with the combobox "No Results Message" with post meta fields -* Fix - js warnings on admin pages -* Fix - issues relating to jQuery migrate plugin being removed -* Fix - an issue with refocussing the search box after pressing enter to submit -* Fix - a css issue with the datepicker dropdown -* Remove - js library dependency for admin tooltips -* Update - Select2 library to 4.0.13 -* Compatibility + tested upto WP 5.6 -* New - Display Results method - integration with Dynamic Posts v2 from Dynamic Content for Elementor - -= 2.5.2 = -* Fix - a warning about stripslashes expecting a string -* Fix - an issue where getting labels for ACF fields was failing on private posts -* Fix - an issue with infinite scroll not working when the pagination selector was not set -* Fix - a JS warning where we using attribute to set checked state in certain admin screens -* Fix - an issue where infinite scroll was causing issues on taxonomy archives -* Fix - an issue where scrolling to results was fired before the content had loaded, causing an unwanted offset -* Fix - an issue with EDD Purchase buttons not using ajax to add to cart after a search -* Fix - an issue when WooCommerce is enabled with S&F, and interference being caused to non related search forms -* Fix - some compatibility issues with WPML and WooCommerce product variations -* New - better integration with WC products shortcode, simply add a `search_filter_id` argument to integrate - -= 2.5.1 = -* NOTICE - if you are using Search & Filter with Easy Digital Downloads please read the new integration notes first -* Fix - a PolyLang issue when permalinks were disabled and the default language is not in the URL params -* Fix - an issue with range min / max being detected, when using certain post stati -* Fix - an issue with a loop not using `wp_reset_postdata` after -* Fix - change another loop so that it improves compatibility with plugins + themes -* Fix - respect `infinite-scroll-end` when it is found on the first page of results -* Fix - some compatibility issues with php7.4 using the `implode` function -* Fix - our tables were not being created on some server setups - modified dbdelta sql -* Fix - admin - an issue where pagination selector was showing when it shouldn't be -* Fix - an issue with setting wpdb prefix at too early, causing an issue in some multisites -* Fix - an issue with custom post stati not being picked up properly on cache rebuild -* Fix - an issue with Polylang working with our page builder extensions -* New - action - `search_filter_filter_next_query` - runs when the shortcode is run -* Improvement - integration with EDD - simply add `search_filter_id` to you downloads shortcode to get up and running -* Security - fix a potential security issue + add some hardening measures - -= 2.5.0 = -* Fix - issues with number range fields not setting the "max" value by default -* Fix - some errors were being thrown when checking if a term exists -* Fix - some php warnings related to an object being countable -* Fix - issues with forming the URL for taxonomy archives in certain circumstances -* Fix - an issue with the current author being detected when enabling this feature on author archives -* Fix - issues with multiple date pickers and auto submit activating properly when selecting a date -* Fix - a warning about an undefined variable -* Fix - an issue with reset form not working properly on taxonomy archives -* Fix - allow `update_post_cache` action in admin -* Fix - an issue with URL encoding in pagination -* Fix - an issue with whitespace being removed from user choices in choice fields -* Fix - a Polylang issue with the wrong language form being loaded, when auto submit is off -* Fix - an issue with URL encoding in sort order fields -* Fix - an issue where our meta queries (in query settings) were not respecting WordPress Time Zone when "current date" was used -* Fix - an issue when using the OR comparison inside a field, and non latin characters -* Fix - an issue with searches not working when pressing the back button on iOS Safari -* Fix - an issue with stock status not being stored on the parent product in a variable product -* Fix - an issue with WooCommerce shop page, where it was not registering as `filtered` when using the search input box -* Fix - issues detecting post meta for WC variations -* Fix - added date and datetime meta type options for ordering by meta values -* Fix - re-fix mobile Safari back button issue -* Fix - an issue where multiple meta keys with the same name (but different cases) were not being correctly detected -* New - added "Relevance" to default order by and sort fields -* Improvement - updates to license page - -= 2.4.6 = -* Fix - properly disable `maintain search form state` as this was causing potential security issues -* Fix - a character encoding issue when checking if ajax can be enabled on a particular page -* Fix - an issue with the sf-option-active class not being removed when using the reset button and submit form is disabled -* Fix - some issue with sf-option-active not being set correctly on radio buttons in certain circumstances -* Improvement - add support for pagination without the `page` prefix, ie, the updated Elementor Pro Posts widget uses /%postname%/%pageno% -* Improvement - set `paged` using `set_query_var` for better compatibility with other plugins - -= 2.4.5 = -* Fix - an issue with noUiSlider when "Display values as" is set to "text" in range fields -* Fix - an issue with Beaver Builder Themer auto scrolling to results on page load (when using our display method "archive") -* Fix - an issue with Ajax requests and Polylang -* Fix - some issues with filtering WC shop in some themes - -= 2.4.4 = -* Fix - an error being thrown when creating new sites in wpmu -* Fix - return the original IDs of taxonomy terms, when no translated term is found (when using translation plugins) - this allows for taxonomies that are not translated to retain their settings -* Fix - an issue where some of our 3rd party integrations were not working in ajax requests (very rare) -* Fix - an issue where the `filter_next_query` shortcode was being ignored in ajax requests -* Fix - an issue with Ajax URLs not always being set correctly when using PolyLang -* Updated - noUiSlider to v11.1.0 -* Updated - chosen to v1.8.7 -* New - added a `skip` argument for our `filter_next_query` shortcode, to access those tricky queries - -= 2.4.3 = -* Fix - refix enable_taxonomy_archives variable warnings -* Fix - an issue with Beaver Builder Themer scrolling to the results on page load (this occured when pagination was set) -* Fix - silenced (@)set_time_limit as this was throwing warnings on some hosts -* Update - update the plugin to point to our new domain for auth and updates, searchandfilter.com :) - -= 2.4.2 = -* Fix - removed an unwanted `exit` causing various and seemingly unrelated issues - -= 2.4.1 = -* New - added JS events `sf:ajaxformstart` and `sf:ajaxformfinish` to detect when updating the form has started/finished -* Improvement - speed improvements to the cache, when saving posts and when rebuilding the entire cache -* Fix - an issue where filtering on taxonomy archives was not working with WooCommerce -* Fix - WooCommerce variations were not being taking into consideration in the batch size when rebuilding the cache -* Fix - an issue with WC not showing category/taxonomy descriptions or sub categories on archives -* Fix - exclude products from results that are "not in catalog" for WC -* Fix - an issue where the count was incorrect when using the private publish option with WooCommerce products -* Fix - changing a search form settings to include product variations, or not, didn't trigger a rebuild of the cache in some cases -* Fix - some WC issues when converting child IDs to parent IDs -* Fix - an issue with pagination on taxonomy archives -* Fix - an issue with ACF where option labels were not being correctly detected -* Fix - an issue with uninstall not working correctly sometimes -* Fix - an issue with infinite scroll not activating when the `Only use Ajax on the results page` setting is off -* Fix - an issue with Polylang when searching posts that are not managed by Polylang - -= 2.4.0 = -* NOTICE - If you are using S&F with Woocommerce Variations and experiencing issues, you may need to rebuild the S&F cache -* New - change the "no results" message for comboboxes -* Fix - WooCommerce deprecated `woocommerce_get_page_id` in 3.0 -* Fix - various WooCommerce issues relating to Variations - Woocommerce users' who use variations may need to rebuild S&F cache -* Fix - correctly set the `sf-option-active` class on multi select items (this includes checkboxes) -* Fix - properly escape some strings -* Fix - destroy noUiSlider (if it exists) before init, in case it has been init by another plugin (improved compatibility) -* Fix - some issues with levels / nesting of hierarchical taxonomies -* Fix - some issues with polylang and ajax requests -* Fix - an issue with a number range field not resetting properly -* Fix - an issue with the range slider in firefox, when ajax was disabled and auto submit was on -* Fix - an issue with `enable on taxonomy archives` when taxonomies were shared between multiple post types -* Fix - a PHP error when using multiple date pickers with post meta -* Fix - the infinite scroll loader will now check the parent it is attached to and use the correct html tag for the loader -* Fix - an issue with the icon not loading for available fields -* Fix - an issue with "enable on taxonomy archives" and pagination not working correctly -* Fix - an issue with min / max values being correctly autodetected for range fields -* Fix - some issues with rounding & formatting on numeric and slider range fields -* Fix - range dropdown & radio fields were not respecting the step value when it came to the last / max option -* Fix - some layout issues in the admin -* Fix - issues with the later versions of Relevanssi -* Fix - some issues with refocusing the search box after a search is performed -* Fix - issues with taxonomy rewrites when using `enable on taxonomy archives` -* Fix - an issue with the date range fields being auto submitted when only 1 has been selected -* Fix - an issue with ACF using `get_field_object` - and returning the wrong options depending on language -* Fix - some issues with the cache building in the background -* Fix - some issues with ajax filtering with fragment urls -* Fix - a PHP warning when creating the first search form after install -* Fix - a PHP warning - incorrect usage of `count`, displaying warnings when saving posts that are to be cached -* Update - update chosen to v1.8.2 -* Update - update select2 to v4.0.5 - -= 2.3.4 = -* Fix - issues in some environments where infinite scroll wasn't activating after a performing search, or getting the page var wrong -* Fix - infinite scroll offset was not being applied correctly -* Improvement - changed scope of some CSS classes in admin ui for better compatibility with other plugins -* Fix - some bugs causing issues with 3rd part plugin compatibility -* Fix - a bug where S&F wouldn't cache new items added to media - -= 2.3.3 = -* New - added action `search_filter_api_header`, to allow for modification of the headers that are sent with our ajax requests -* New - added offset for activation of infinite scroll in the display results tab -* New - added new shortcode action `filter_next_query` - this will apply filtering to the next `WP_Query` found -* Fix - an issue with infinite scroll activating multiple times, if you have multiple instances of a search form on a page -* Fix - speed issues with WPML when using media library grid view (and S&F is set to search media) -* Fix - incorrect type cast of a settings variable causing settings not to be loaded correctly in some circumstances - -= 2.3.2 = -* Fix - PHP warnings & errors when using WooCommerce & Taxonomy Archive display mode -* Fix - Some issues with the correct fields appearing in the "display results" tab - -= 2.3.1 = -* New - Plugin data (such as saved search forms & cache) will no longer be deleted when uninstalling - to remove all data use the new option in the settings page -* New - Search & Filter can now be used to filter your taxonomy archives - currently only works with "Post Type Archive" and "WooCommerce" display methods -* Fix - WPML issue was re-introduced in 2.3.0 -* Fix - A Polylang issue when using the shortcode display method & ajax -* Fix - `sf-option-active` class was not updating when using ajax, with autocount off (as the form no longer gets refreshed) -* Fix - issue with "include children in parents" for taxonomy fields -* Fix - an issue with `?sf_data` being appended to pagination in ajax requests -* Fix - issue with Visual Composer plugin only working after first interaction (ajax) -* Fix - an issue with infinite scroll triggering on incorrect pages -* Fix - an issue where the `sf_results_url` filter was not being applied to pagination -* Fix - an issue with Archive display method & polylang -* Compatibility - store the results URL in its own custom field for better compatibility with migration tools which search/replace urls. *Notice*, you will need to edit and hit "save" in your search forms before migrating your sites (so the url can be copied in to the correct custom field) - -= 2.3.0 = -* New - Added support for visual composer post grids (free addon plugin required) - create results layouts using visual composer! -* New - Infinite scroll for all display methods - how to setup - https://searchandfilter.com/documentation/search-results/infinite-scroll/ -* New - Added support for ACF relationship fields -* New - added `none` sort order option for choice meta fields, allowing preservation of the order of options (if set from external plugins) -* New - added option to specify decimal seperator for number range fields -* Update - Select2 JS library to 4.0.3 -* Update - Chosen JS library to 1.6.2 -* Update - noUiSlider JS library to 8.5.1 -* Performance - improvements when generating forms with many options -* Performance - do not reload the S&F form (ajax) if auto count is not enabled - speed improvement -* Performance - store search related data in transients so that search forms are rendered quickly when used outside of Results Pages (enable via settings page) -* Performance - improved cache building speeds -* Fix - combobox issues on touch devices -* Fix - thousands seperator was not displaying for certain input types -* Fix - some issues with Polylang plugin after Polylang updates -* Fix - issues with the post type field not being set -* Fix - IDs for input fields are now generated randomly based on current timestamp - using the same search form multiple times on a page caused errors with labels & IDs (clicking a label in one form would update the other instance) -* Fix - an issue when using `update_post_cache` filter on already deleted posts -* Fix - PHP notices when using Woocommerce with a static homepage -* Fix - variatons not working correctly in woocommerce, S&F was returning matches for attribute combinations (of variations) which did not exist, but did exist within a particular product -* Fix - potential infinite loop when results contain results shortcodes :/ -* Fix - "Only use Ajax on the results page" was not working correctly on post type archives when the taxonomy archives were based of the post type archive URL -* Fix - S&F pagination was taking over taxonomy archive pagination when the display method was set to `post type archive` and the taxonomy archives path had the post type as base rewrite -* Fix - `hide empty` and `show count` options no longer have any effect when auto count is disabled. -* Fix - default sorting by numeric meta keys was not working when they were decimals / floating point numbers.. all numeric sorting is now converted to decimal sorting to 4 decimal places which also works for standard numeric sorting -* Fix - an issue where numerical ranges using the "overlap" comparison were not returning the correct results -* Fix - an issue where numerical ranges were not auto detecing the max value correctly, when using different start/end meta keys -* Fix - issues with WPML & PolyLang -* Fix - some issues with Ajax when using ajax in certain display modes -* Fix - issues when search forms are within the results area, and replaced with an ajax request -* Removed - help tab on admin screens as it was unused - -= 2.2.0 = -* New - field - posts per page -* New - added system status screen -* New - Added Select2 JS as an alternative to Chosen for comboboxes - seems to have better mobile support - change this in main S&F settings screen -* New - added support for custom post stati (statuses) -* New - use slugs instead of IDs in shortcodes (check the shortcodes metabox) -* Improved - allow post meta keys and values to contain spaces & special characters -* Improved - updated Chosen JS to - v1.5.2 -* Improved - reset button - choose if the reset button submits the form after resetting it -* Improved - new admin notices for settings that can potentially cause errors -* Improved - admin UI tweaks -* Improved - added `stop()` to scrolling animations before starting to scroll the page -* Fix - issues with PHP 7 -* Fix - properly escape some input fields -* Fix - S&F incorrectly warning network activated plugins are not enabled -* Fix - refocus input fields after the form has been auto submitted -* Fix - an error with the range slider and decimals -* Fix - JS event "sf:ajaxfinish" now fired after all S&F process have completed (such as updating the search form) -* Fix - various pagination issues -* Fix - an issue with pagination and the new `custom` display method -* Fix - renamed a global function to prevent conflicts -* Fix - Display problems when using WooCommerce shop on the homepage with S&F -* Fix - Issues with the woocommerce orderby dropdown -* Fix - an issue with the action `search_filter_query_posts` not working correctly -* Fix - a bug sometimes causing tag and category fields to be detected as undefined causing search issues -* Fix - issues with detecting when attachments were updated and rebuilding the cache -* Fix - pressing enter in the search box reset the timer for autosubmit -* Fix - added EDD prep_query shortcode to shortcodes box -* Fix - fix some compatibility issues with WPML where WPML was converting taxonomy term IDs into the current language rather than post language -* Fix - use global function `get_queried_object` rather than `$wp_query->queried_object` for consistency -* Fix - issues with the author field and detecting defaults -* Notice - WP 4.6 tested & compatible + PHP 7 - -= 2.1.2 = -* New - Sort order can be displayed as radio buttons -* New - filters for all URLs used in S&F - this allows for dynamically changing the various URLs for example to force https or similar - https://searchandfilter.com/documentation/action-filter-reference/ -* Fix - an issue with `include_children` and allowing the AND operator to be used -* Fix - an issue with hierarchical lists not being display correctly - -= 2.1.1 = -* New - added `data-sf-count` attributes to inputs which have count variables -* Improvement - default cache speed is set to slow -* Fix - an issue with pagination filters -* Fix - issues with PolyLang - should now be working again with PolyLang v1.7.12 -* Fix - minify issues with CSS & JS files -* Fix - issues with depth in hierarchical fields -* Fix - an issue where S&F was hijacking pagination when it wasn't supposed to -* Fix - a couple of minor issues with the author field -* Fix - S&F `sf:init` was incorrectly firing after each ajax request, it is now fired only on page load & once initialised -* Fix - An issue where post date fields were not being set correctly in the front end -* Fix - a PHP/pass by reference overload issue -* Fix - an issue with `number_format` & PHP warnings in admin -* Fix - an issue with undefined taxonomy slugs in the S&F cache -* Fix - an issue with `wp_json_encode` - -= 2.1.0 = -* Notice - depth classes for hierarchical fields fields have renamed to avoid conflicts - from `.level-0` to `.sf-level-0` -* Notice - properly prefix range & min / max classes = from `.range-min`, `.range-max` and `.meta-range` to `.sf-range-min`, `.sf-range-max` and `.sf-meta-range` -* New - sync meta fields - when using "number" or "choice" type meta fields, the values can now be auto detected - values can also be sorted -* New - sync ACF fields - use above in choice fields with auto detection - S&F can now retreive built in ACF labels for values too -* New - added support for ordering by multiple fields (the default posts order) -* New - added support for ordering posts by Post Type -* New - lots of improvements to post meta fields (number) more UI options and input types -* New - added support for decimals and number formatting in post meta (number) fields -* New - new compare options for date range and number fields - great for date ranges and bookings/promotional systems -* New - added sort by relevance option for Relevanssi under the Advanced tab -* New - added options to control the display of sticky posts (under the Posts tab) -* New - Settings page -* New - Settings - control caching speed & background processes -* New - Settings - added settings to lazyload JS and an option to load jQuery language files for the datepicker -* New - accessibility - WCAG 2.0 compliant - some html restructuring (mostly adding in labels) and added screen reader text option to all text/number input fields and selects -* New - filter - allows users to filter any field in the search form and most of the options -* New - added counts to the active query class -* Improvement - authors now use slugs instead of IDs in the URL -* Improvement - updated Chosen & noUiSlider to their latest versions -* Improvement - show internal taxonomy names as well as labels throughout admin UI -* Improvement - support for WooCommerce shop when it is set to category display -* Improvement - speed updates/optimisations to the cache and auto count -* Improvement - better admin notices & warnings -* Fix - issues with WPML and loading the correct taxonomies etc -* Fix - issues with caching and the attachment post type -* Fix - an issue where getting counts for taxonomies was occuring twice -* Fix - URL Encoding issue with meta fields -* Fix - an issue when using multiple search forms on a single page & pagination not working correctly -* Fix - removed an error message which was showing whenever the cache was restarting - it was unnecessary -* Fix - whitespace being trimmed from textareas in certain field types -* Fix - some pagination issues when using post type archive -* Fix - do not enable auto count by default -* Fix - Post Type archive display method now properly uses the Posts Page (as defined under `settings` -> `reading`) where applicable when the post type is set to `post` -* Fix - a bug where html entities were matched when searching in chosen comboboxes such as `nbsp` -* Fix - an admin bug where selecting Post Type Archive as the results method would show the wrong options after saving -* Fix - a few admin UI bugs -* Fix - a bug with the ajax start/end events -* WP 4.4 compat - tested with 2016 theme - -= 2.0.3 = -* New - update search form (auto count) without submitting the form -* New - added variable `search_filter_id` to all queries to easily identify which S&F form your queries are being modified by - use `$query['search_filter_id'];` -* New - added RTL support for all JS plugins - chosen comboxbox, jQuery datepicker and noUiSlider -* New - added action to trigger the rebuild of the cache for a specific post (`do_action('search_filter_update_post_cache', 1984);` where 1984 is the post ID) -* Fix - issue with Firefox "rembering" disabled state on soft refresh - now a soft page refresh in FF also forces all inputs to be enabled to overcome this issue -* Fix - issue with comboboxes finding child terms (hierarchical enabled) -* Fix - issue with URI encoding in search field -* Fix - issues with multiple results shortcodes when meta data defaults are set -* Fix - issues with WP Types plugin and nested post meta values -* Fix - caching issues with post meta when there are multiple values -* Fix - issue with search term & stripslashes -* Fix - compatibility issue with Relevanssi -* Fix - correctly show count numbers when "detect defaults from current page" is selected -* Fix - re-implement `save_post` filter outside of `is_admin` for rebuilding the cache from the front end - -= 2.0.2 = -* New - use S&F with even more templates (Archive Mode) by adding a shortcode/action before your loop -* Fix - set priority of Ajax (with results shortcode) search to `200` on `init` hook - it was being fired sometimes before taxonomies had been declared -* Fix - `array_merge` errors when using hierarchical taxonomies and including children in parents -* Fix - JS errors with multiple search forms on the same page at the same time -* Fix - JS error error in Firefox where refreshing the page sometimes caused a disabled state on the search form -* Fix - an issue in Avada + woocommerce, when setting up the query, and only using 1 post type S&F now passes a string instead of an array -* Fix - a PHP error and delimiters in the Active Query class -* Fix - an issue with maintain search form state passing `page_id` when permalinks are disabled -* Fix - undefined variable notice in author walker -* Fix - undefined variable notice in edit search form screen - -= 2.0.1 = -* NOTICE - DO NOT UPDATE UNTIL YOU HAVE READ THE RELEASE NOTES: https://searchandfilter.com/documentation/2-0-upgrade-notes/ -* Version bump so all beta testers get the latest update via the dashboard - -= 2.0 = -* New - caching of results for fast speeds even on large databases -* New - direct support for the WooCommerce shop page -* New - direct support for WooCommerce product variations -* New - integration with Easy Digital Downloads (EDD) shortcodes - just add the S&F prep_query shortcode directly before the EDD shortcode ie - `[searchandfilter id="14" action="prep_query"]` -* New - use post type archives to display your results (single post type only) -* New - huge speed and accuracy improvements for meta queries - no more `%like%` queries for serialised meta -* New - auto count - dynamically display counts next to field options based on the current search & settings -* New - auto count - drill down fields - hide options which yield no results -* New - allow for multiple meta keys to be queried when doing ranges -* New - prepolutate search form based on current archive - works for post types, tags, categories, taxonomies and authors -* New - datepicker - supports jQuery UI i18n, dropdown for years & months option, placeholder text customisation -* New - methods for accessing what has been searched -* Improvement - moved all Ajax logic to front end for better compatibility with other plugins (esp shortcode based) -* Improvement - huge amount of refactoring - some parts completely rewritten and optimized, JS rewrite -* Improvement - show which meta keys are selected in widget title -* Improvement - change labels on checkbox and radio fields - don't wrap the inputs inside the labels -* Fix - some problems with pagination links sometimes pointing to the ajax URL -* Fix - Fix an issue with `include_children` now working -* New - relationships can now be defined across taxonomy and meta fields -* Fix - Issues with pagination -* fix - removed references to CSS images that were not being used -* Fix - localised some sloppy CSS rules for compatibility -* Fix - some issues with currencies and decimals when using number ranges -* Fix - an issue with exclude post IDs not working correctly -* Fix - UTF characters in taxonomy term names -* Fix - `orderby` getting added to the URL on non WooCommerce search forms -* Fix - IE8 JS error - Object.keys() compatibility -* Fix - IE10 JS error / reload error - the `input` event was triggering when it was not supposed to causing an ajax request to be performed -* Fix - Admin - function definition in wrong scope causing errors in strict mode on some browsers -* Removed - .postform classes that have crept back into build - but added classes and IDs on every input element -* Removed - the global $sf_form_data - changed to $searchandfilter -* Notice - you should no longer use `pre_get_posts` to modify queries, there is a new filter which takes an array of arguments `sf_edit_query_args` which must be used to also update count number and other non main queries -* In progress - support for PolyLang - testing so far seems good - -= 1.4.3.1 = -* Fix - add serialised tick box to post meta fields -* Fix - added a "data is serialised" checkbox to meta fields -* Dropped - built in pagination functions - `sf_pagination_numbers` and `sf_pagination_prev_next` are now redundant - -= 1.4.1 = -* New - Added IDs to search forms for easy css targeting - also renamed ID on results container to keep in line with naming conventions -* New - added reset button -* New - dropdown number range -* New - added options to use timestamps in post meta -* fix - a bug when sanitizing keys from post meta -* fix - a bug with autosuggest & encoding -* fix - issues with searching serialised post meta -* fix - throwing an error when trying to access the `all_items` label of a taxonomy when it does not exist -* fix - some dependencies with JS/CSS allowing them to be removed more easily -* fix - some tweaks to automatic updates -* fix - layout issues with search form UI and WP 4.1 -* fix - various fixes and improvements with compatibility and WPML - -= 1.4.0 = -* New - search media/attachments -* New - added post meta defaults - now you can add constraints for meta data such as searching only products in stock, excluding featured posts or restricting all searches to specific meta data values -* New - scroll to top of page when updating results with ajax -* New - use the shortcode to display results without ajax too (results shortcode only worked with ajax setups previously) -* New - allow regular pagination when using a shortcode for results - (use wp next_posts_link & previous_posts_link, plus added support for wp_pagenavi plugin) -* New - added AND / OR operator to define relationships between tag, category and taxonomy fields -* New - optionally include children in parent searches (categories, hierarchical taxonomies) -* New - improvded UI - add taxonomy browser to help find IDs easily -* New - improved ajax/template UI -* New - minify CSS & JS - finally integrated grunt ;) - non minified versions still available -* New - duplicate search form - a link has been added to the main S&F admin screen underneath each form for easy duplicating! -* New - added support for Relevanssi when using shortcodes to display results -* New - add "today" for date comparisons in meta queries in post meta defaults -* Updated - the default results template (shortcode) to include new pagination options -* Fixed - an error when users are not using permalinks, and submitting the search form -* Fixed - "OR" operator for checkboxes with taxonomies was broken -* Fixed - a JS error when no terms were being shown for a checkbox/radio field -* Fixed - an error when using `maintain state` and getting 404 on results -* Fixed - an error when detecting if a meta field was serialised or not -* Fixed - an error when saving a post meta field with a poorly formatted name -* Fixed - ajax pagination without shortcode -* Fixed - meta fields with the value `0` being ignored -* Fixed - some updates to the plugin auto updater - some users weren't seeing udpates in the dashboard even when activated - -= 1.3.0 = -* New - JavaScript rewrite - refactored - faster cleaner code -* New - add setting to allow the default sort order of results - check settings panel -> posts -* New - Speed improvements - searching usually caused 2 header requests (a POST and a redirect) - now uses only a single GET request -* New - play nice with other scripts - can now initialise the search form via JS if the form/html is loaded in dynamically -* New - mulitple search forms on the same page! -* New - add data to JS events for targeting individual forms on the same page -* New - maintain search state - keep user search settings while looking at results pages -* New - for Ajax w/ Shortcodes - Added results URL - this allows the widget to be placed anywhere in your site -* New - shortcode meta box - for easier access to shortcodes within the Search Form editor -* New - allow auto submit when ajax is not enabled -* New - shareable/bookmarkable URLs when using shortcodes (this was already available without) -* Fixed - an issue with auto submit -* Fixed - an issue with a significant delay to fetch initial results when using ajax (with shortcode) - initial results are now loaded server side on page load -* Fixed - bad html and "hide_empty" was not working as expected - it was disabling inputs rather than hiding them -* Fixed - i18n for "prev" and "next" in pagination -* Fixed - post date field was not working correctly when using ajax w/ shortcodes -* Improved - integration with WPML - better URLs and works fully with shortcodes -* Removed - *Beta* Auto Count - this feature is likely to be even more broken (it had plenty of bugs already) - it is recommended you disable this for now. The next major update will inlcude a revised & working version of this. - -= 1.2.7 = -* Fixed an issue with array_replace_recursive for older PHP version - -= 1.2.6 = -* Fixed an issue with headers in admin when publishing a post - -= 1.2.5 = -* Fixed a JS error in IE8 -* Added new settings panel - set defaults search parameters -* Settings Panel - include/exclude categories -* Settings Panel - exclude posts by ID -* Settings Panel - choose to search by Post Status -* Settings Panel - Added Results Per Page for controlling the number of results you see -* Settings Panel - UI refinements -* Settings Panel - more to come (meta)! -* Category, Tag & Taxonomy fields - new option (advanced) to sync included/excluded posts with new settings parameters - -= 1.2.4 = -* DO NOT UPGRADE IF YOU WERE HAVING ISSUES WITH AJAX FUNCTIONALITY AND WAITING FOR A PATCH, ONLY THE TWO UPDATES BELOW ARE INCLUDED IN THIS UPDATE: -* Fix - ajax shortcode functionality - search field is now working again! -* Fix - ajax shortcode functionality - fixed custom field/meta search -* Fix - ajax shortcode functionality - fixed a bug with categories - -= 1.2.3 = -* DO NOT UPGRADE IF YOU WERE HAVING ISSUES WITH AJAX FUNCTIONALITY AND WAITING FOR A PATCH, ONLY THE TWO UPDATES BELOW ARE INCLUDED IN THIS UPDATE: -* Fix - ajax shortcode functionality - only displays published posts (it was also fetching drafts) -* Fix - ajax shortcode functionality - auto submit now working - -= 1.2.2 = -* Fix - stopped using short syntax array in php (`[]`) which is only supported in php version 5.4+ - -= 1.2.1 = -* Fix - a JS error for older Ajax setups - -= 1.2.0 = -* NEW - completely reworked how to use Ajax - simply use a shortcode to place where you want the results to display and you're set to go! -* Fix - allow paths in template names - S&F was previously stripping out slashes so couldn't access templates in sub directories -* Fix - various small bug fixes - -= 1.1.8 = -* New - add new way to modify the main search query for individual forms -* New - added a new JS init event - -= 1.1.7 = -* New - *beta* - Auto count for taxonomies - when using tag, category and taxonomies only in a search form, you can now enable a live update of fields, which means as users make filter selections, unavailable combinations will be hidden (this is beta and would love feedback especially from users with high numbers of posts/taxonomies) -* New - date picker for custom fields / post meta - dates must be stored as YYYYMMDD or as timestamps in order to use this field -* New - added JS events to capture start / end of ajax loading so you can add in your own custom loaders -* Fix - prefixed taxonomy and meta field names properly - there were collisions on the set defaults function, for example if a tax and meta share the same key there would be a collision -* Fix - errors with number ranges & range slider -* Fix - an error with detecting if a meta value is serialized -* Fix - scope issue with date fields auto submitting correctly - - -= 1.1.6 = -* **Notice** - dropped - `.postform` css class this was redundant and left in by error - any users using this should update their CSS to use the new and improved options provided: -* New - class names added to all field list items for easy CSS styling + added classes to all options for form inputs for easy targeting of specific field values -* New - added a `` wrapper to all fields where a count was being shown for easy styling -* Fix - removed all reference to `__DIR__` for PHP versions < 5.3 -* Fix - Some general tweaks for WPML -* Fix - a bug when choosing all post types still adding "post_types" to the url - -= 1.1.5 = -* **Notice** - this update breaks previous Sort Order fields, so make sure if you have a Sort Order Field to rebuild it once you've updated! -* New - Sort Order - in addition to sorting by Meta Value, users can now sort their results by ID, author, title, name, date, date modified, parent ID, random, comment count and menu order, users can also choose whether they they want only ASC or DESC directions - both are optional. -* New - Autocomplete Comboboxes - user friendly select boxes powered by Chosen - text input with auto-complete for selects and multiple selects - just tick the box when choosing a select or multiselect input type -* Fix - add a lower priority to `init` hook when parsing taxonomies - this helps ensure S&F runs after your custom taxonomies have been created -* Fix - add a lower priority to `pre_get_posts` - helps with modifying the main query after other plugins/custom code have run -* Fix - a problem with meta values having spaces - -= 1.1.4 = -* New - Meta Suggestions - auto detect values for your custom fields / post meta -* Enhancement - improved Post Meta UI (admin) -* Fix - an error with displaying templates (there was a PHP error being thrown in some environments) -* Fix - an error where ajax enabled search forms were causing a refresh loop on some mobile browsers - -= 1.1.3 = -* New - display meta data as dropdowns, checkboxes, radio buttons and multi selects -* New - added date formats to date field -* fix - auto submit & date picker issues -* fix - widget titles not displaying -* fix - missed a history.pushstate check for AJAX enabled search forms -* fix - dashboard menu conflict with other plugins -* fix - submit label was not updating -* fix - post count for authors was showing only for posts - now works with all post types -* compat - add fallback for `array_replace` for <= PHP 5.3 users - -= 1.1.2 = -* New - customsise results URL - add a slug for your search results to display on (eg yousite.com/product-search) -* fix - js error when Ajax pagination links are undefined -* fix - date picker dom structure updated to match that of all other fields -* fix - scope issue when using auto submit on Ajax search forms - -= 1.1.1 = -* fix - fixed an error where JS would hide the submit button :/ -* fix - fixed an error where parent categories/taxonomies weren't showing their results - -= 1.1.0 = -* New - AJAX - searches can be performed using Ajax -* fix - removed redundant js/css calls - -= 1.0.0 = -* Initial release - - -== Upgrade Notice == - -= 2.5.7 = -PHP 8 users - if you are seeing errors on upgrading, please disable Search & Filter before proceeding with the update and it will complete successfully. This is related to the duplicate Search Form bug (now fixed in this version). diff --git a/wp/wp-content/plugins/search-filter-pro/admin/assets/css/admin.css b/wp/wp-content/plugins/search-filter-pro/admin/assets/css/admin.css deleted file mode 100644 index 7697bf8c..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/assets/css/admin.css +++ /dev/null @@ -1,1538 +0,0 @@ -/* This stylesheet is used to style the admin option form of the plugin. */ - -/* http://melchoyce.github.io/dashicons/ */ -.tet -{ - content: "\f117"; -} -.paintbrush-link:before { - font-family: "dashicons"; - content: "\f100"; -} - -/* admin styles made generic */ -body -{ - /*border:1px solid #f00;*/ -} -a -{ - text-decoration: none; -} -.postbox .subsubsub { - float: none; - border-top: 1px solid #eee; - margin-top: 0; - padding: 8px 12px 4px; -} - -.welcome-panel -{ - background: transparent; - color:#464646; - background: #fff; - border-color: #ddd; - padding: 24px; - -} -.welcome-panel .welcome-panel-column-container { - justify-content: flex-start; - background: #f6f6f6; -} -.welcome-panel a.welcome-panel-close { - color: #666666; -} -.welcome-panel h2 { - color: #333333; - font-size: 28px; -} -.welcome-panel::before { - content: none; -} -.welcome-panel-content { - background: transparent; - justify-content: flex-start; - min-height: auto; - -} -.welcome-panel-column { - display: block; -} -.welcome-panel .welcome-panel-column-container { - margin: 0; - margin-top: 0; -} -.welcome-panel .welcome-panel-column p -{ - padding-right:20px; -} - -.welcome-panel .welcome-panel-close { - position: absolute; - top: 12px; - right: 10px; - padding: 8px 15px 0 5px; - font-size: 13px; - text-decoration: none; - line-height: 1; -} - -.welcome-panel .welcome-panel-close::before{ - content: '\f153'; - display: block!important; - font: 400 16px/1 dashicons; - speak: none; - height: 20px; - margin: 2px 0; - text-align: center; - width: 20px; - -webkit-font-smoothing: antialiased!important; -} - -.welcome-panel .welcome-panel-close::before { - position: absolute; - left: -18px; - margin-top: -2px; - -webkit-transition: all .1s ease-in-out; - -moz-transition: all .1s ease-in-out; - transition: all .1s ease-in-out; -} -.welcome-panel .welcome-panel-close:hover:before -{ - color:#c00; -} - -.welcome-panel a:hover, .welcome-panel a:active -{ - color:#2ea2cc; -} -.welcome-panel .welcome-panel-close::before -{ - color:#bbb; -} - -.welcome-panel a -{ - color: #0074a2; -} - -#screen-options-link-wrap -{ - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - transition: all 0.3s ease; -} -#screen-options-link-wrap.highlight -{ - background-color: #def; - border-color: #ccc; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - transition: all 0.3s ease; -} - -.sidebar-name h3 -{ - -} - -.widgets-holder-wrap .description -{ - padding-top:7px; -} -.widgets-holder-wrap { - margin: 10px 0 0; -} - -#available-fields p.description, #search-form p.description -{ - font-style:normal; - padding-bottom:7px; - padding-top:7px; - display:block; -} -#titlediv -{ - margin-bottom:20px; -} -#search-form .widget-top, -#available-fields .widget-top { - padding: 0; -} -@media screen and (min-width:783px) -{ - - #search-form .widget input[type=text], - #available-fields .widget input[type=text] - { - height:28px; - } -} -#post-body-content -{ - margin-bottom:0; -} -div.sf-cache-notice { - - border-color: #ffba00; /*C86BE7*/ - border-color: #6B8EE7; - border-color: #3986ac; - border-color: #93CFEB; - border-color: #47a7d3; - border-color: #d54e21; - border-color: #E57A56; -} -#cache-info .toggle-cache.disabled -{ - cursor:pointer !important; -} -#cache-info .notice-rc-error -{ - display:none; -} -#cache-info .cache-metabox -{ - display:none; -} -#cache-info .cache-metabox .notice-stalled, -#cache-info .cache-metabox .notice-error -{ - background-color: #FFD6D6;padding:10px;border: 1px solid #F49595; - -} -#cache-info .cache-metabox .notice-stalled -{ - display:none; -} -#cache-info .cache-metabox .notice-alert, -#cache-info .notice-please-wait -{ - background-color:#FFFDD6; - padding:10px; - border:1px solid #F4E895; -} -#cache-info .rebuild-cache-spinner -{ - float:none;margin-top:-5px; -} -#cache-info .cache-metabox .media-progress-bar -{ - width:85%; - margin-left:0; -} - -#cache-info -{ - min-height:0; -} -#search-form .widget .widget-control-advanced, -#available-fields .widget .widget-control-advanced -{ - margin-top:5px; - margin-right:5px; - top:0; - right:0; - position:absolute; -} - -#search-form .widget .widget-control-advanced.active, -#available-fields .widget .widget-control-advanced.active -{ - color:#aaaaaa; -} - -#search-form .widget .item-container, .setup .widget-content .item-container, -#available-fields .widget .item-container, .setup .widget-content .item-container -{ - min-width:200px; - max-width:320px; - width: 48%; - padding-right:20px; - float:left; -} -#search-form .widget .item-container.slimx2 -{ - max-width:280px; - min-width:auto; - width:280px; - padding-left:10px; -} -#search-form .sort-options-advanced p.item-container -{ - padding-top:0; - margin-top:5px; -} -#search-form .widget .item-container.slim -{ - max-width:230px; -} - -#search-form .widget .item-container.slimmove -{ - max-width:15px; - min-width:15px; - width:15px; - padding-top:8px; - padding-left:10px; - padding-right:10px; - margin-left:-10px; - cursor:move; - opacity:0.5; -} -#search-form .widget .item-container.slimheadings1 -{ - max-width:225px; - padding-left:40px; - margin-bottom:0; -} -#search-form .widget .item-container.slimheadings1-sort -{ - min-width:100px; - max-width:130px; - padding-left:40px; - margin-bottom:0; -} -#search-form .widget .item-container.slimheadings2-sort -{ - min-width:100px; - max-width:130px; - padding-left:0px; - margin-bottom:0; -} -#search-form .widget .item-container.slimheadings2 -{ - max-width:135px; - min-width:100px; - padding-left:2px; - margin-bottom:0; -} -#search-form .widget .item-container.xslim -{ - min-width:100px; - max-width:130px; -} -#postbox-container-1 .widget .item-container, #postbox-container-1 .setup .widget-content .item-container -{ - padding-right:0; -} -#postbox-container-1 .setup .widget-content .item-container -{ - width:auto; -} - -.widget .item-container.child-columns-w p -{ - width: 150px; - float:left; - -} - -.widget .item-container.child-columns p -{ - width: 110px; - padding-right:10px; - float:left; -} -.widget .child-columns input[type="text"], .widget .child-columns select, -.widget .child-columns-w input[type="text"], .widget .child-columns-w select -{ - width: 81px; -} - -.widget .field-info -{ - display:inline-block; - padding:0px 8px; - margin-left:10px; - color:#999; - /*color:#2ea2cc;*/ - font-style:italic; - background-color:#def; - border-radius:10px; - font-weight:bold; - font-size:11px; - -} -.widget i.dashicons, .setup i.dashicons -{ - font-size:18px; - margin-left:5px; - color:#93CFEB; - - -} - -/* .widget .sf_meta_type label */ -.sf_post_types label .dashicons -{ - margin-top: 3px; -} - -.widget .sf_post_types label -{ - margin-right:20px; -} - -.setup .description-inline -{ - margin-bottom:0; -} - -.setup .sf_post_types, .widget .sf_post_types, .widget .sf_meta_type -{ - line-height: 24px; -} -.setup .sf_post_types label -{ - margin-right:18px; - display:inline-block; -} - - - -.widget label i.dashicons:hover, .setup label i.dashicons:hover -{ - color:#47A7D3; -} - -.setup .template_name_manual, .setup .ajax_target, .setup .ajax_links_selector -{ - margin-top:5px; - margin-bottom:5px; -} - -.widget .advanced-settings -{ - display:none; -} -.no_sort_label -{ - padding:5px 10px; - background-color:#ffeeee; - - background-color:#f7f7f7; - - padding:5px 10px; - width:auto; - position:relative; - border:1px solid #dddddd; -} -.meta-option-placeholder, .sort-option-placeholder -{ - background-color:transparent !important; - border:1px dashed #dddddd !important; - padding:0 10px; - width:auto; - min-height:56px; - width:400px; - display: block; -} - -ul.sort_options_list li fieldset.sitem, .sort_options_add_cont, ul.meta_options_list li, .meta_options_add_cont -{ - background-color:#f7f7f7; - padding:0 10px; - width:auto; - position:relative; - display:none; - border:1px solid #dddddd; -} -ul.sort_options_list li fieldset.sitem -{ - display:block; - float:none; -} - -ul.sort_options_list li.sort-option-template, ul.meta_options_list li.meta-option-template -{ - display:none; -} -.sort_options_add_cont, .meta_options_add_cont -{ - display:block; - margin-top:20px; - background-color:#F4FAFF; -} -.sort-options-advanced, .meta-options-advanced -{ - display:none; -} - -.sort-options-advanced -{ - border:1px solid #e9e9e9; - border-top:0; - background-color:#fcfcfc; - display:block; - - -} - - -.sort-option-controls, .meta-option-controls -{ - position:absolute; - top:25px; - right:15px; - -} -.meta-option-controls -{ - top:5px; -} -.sort-option-controls .widget-control-option-remove:hover, .meta-option-controls .widget-control-option-remove:hover, #settings-defaults .option-remove:hover -{ - color:red; -} -#postbox-container-1 .sort-option-controls, #postbox-container-1 .meta-option-controls -{ - position:relative; - right:auto; - top:auto; - clear:both; - margin-top:0; - padding-bottom:10px; -} - -.sf_input_type_meta, .sf_field_data -{ - display:none; -} -.sf_tab_content_taxonomies .td_taxonomy_name -{ - text-align:right; - -} -.sf_tab_content_taxonomies .label_taxonomy_name -{ - opacity:0.6; - display:inline-block; - padding-left:5px; - text-align:right; -} -/* .widgets-search-filter-sortables */ -.widgets-search-filter-draggables -{ - min-height: 76px; - margin-bottom:0; -} - -.sidebar-name .spinner { - margin: -5px 5px; - float: none; -} - -.widget-hover { - border-color: #777; - box-shadow: 0 1px 2px rgba(0,0,0,.3); -} - - -#search-form .widget .widget-top:hover, -#available-fields .widget .widget-top:hover { - border-color: #999; - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1); - box-shadow: 0 1px 2px rgba(0,0,0,.1); -} - -.widget-control-edit .add { - display: none; -} - - -.widget-control-edit { - - display: block; - color: #666; - background: #EEE; - padding: 0 15px; - line-height: 43px; - border-left: 1px solid #DDD; -} - -#search-form .widget .add-sort-button, -#available-fields .widget .add-sort-button -{ - - display:inline-block; -} - -.widget .add-option-button, .widget .detect-option-button -{ - display:inline-block; -} -.search-tax-button -{ - display:inline-block; - text-align:center !important; - height:26px !important; - line-height:23px !important; - padding: 0 4px 1px 7px !important; - margin-top:1px !important; -} -.search-tax-button.disabled -{ - opacity:0.7 !important; -} -#postbox-container-1 .add-sort-button -{ - margin-top:0; -} - - -.widget .add-sort-button:before, .widget .add-option-button:before, .widget .detect-option-button:before, .widget .clear-option-button:before, .search-tax-button:before, .add-option-button:before -{ - font-family: dashicons; - padding-right:5px; - display:inline-block; - margin-bottom:-10px; - vertical-align:sub; - -} - - -/* -.widget .add-sort-button:hover, .widget .add-sort-button:focus -{ - background-color:#D0E7FD; - border-color:#C3E6F3; - color:#333; - -webkit-box-shadow:inset 0 1px 0 rgba(218, 245, 255, 0.5),0 1px 0 rgba(0,0,0,.15); - box-shadow:inset 0 1px 0 rgba(206, 237, 248, 0.5),0 1px 0 rgba(0,0,0,.15); -} -*/ -.widget .widget-control-option-advanced.active -{ - color:#aaaaaa; -} - -.widget-control-edit:hover { - color: #fff; - background: #444; - border-left: 0; - outline: 1px solid #444; -} - -.sidebar-name, .sidebar-description { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} - - -.sidebar-name .sidebar-name-arrow:before { - right: 0 !important; - top: 4px !important; - -} - -#available-fields .widget -{ - width:170px; - display:inline-block; - margin-right:10px; -} -#postbox-container-1 #available-fields .widget -{ - width:auto; - display:block; - margin-right:0; -} - -#available-fields .widget-title-action -{ - -} - -#search-filter-available-fields .hndle -{ - background-color:#ffffff; -} - -#search-filter-available-fields -{ - background-color:#f5f5f5; -} - -#available-fields .widget-top -{ - border-color:#cccccc; -} -#available-fields .widget-top:hover -{ - border-color:#999999; -} - -.post-type-search-filter-widget .widget -{ - -} -#available-fields .widget-top, -#search-form .widget-top -{ - background: #fafafa; - background-image: initial; - background-position-x: initial; - background-position-y: initial; - background-size: initial; - background-repeat-x: initial; - background-repeat-y: initial; - background-attachment: initial; - background-origin: initial; - background-clip: initial; - background-color: rgb(250, 250, 250); - color: #23282d; - border: 1px solid #cccccc; - cursor: move; - /*display:block; - float:none;*/ - -} -#available-fields .widget-top .widget-title-action-move, -#available-fields .widget-top .widget-title-action -{ - cursor: move; -} -#search-form .widget-top .widget-title-action -{ - float: right; - position: relative; - display:block; - cursor: pointer; - padding:10px; - opacity:0.7; -} -#search-form .widget-top .widget-title-action:hover{ - opacity:1; -} -#search-form .widget-top .widget-title-action::before { - content: "\f142"; - content: "\f140"; - display: inline-block; - font: 400 20px/1 dashicons; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - text-decoration: none !important; - position: relative; -} - -#search-form .widget-top[data-sf-field-open="1"] .widget-title-action::before{ - content: "\f142"; -} - - -#search-form .widget-top -{ - border: 1px solid #fafafa; - border-color:rgb(229, 229, 229); -} - -.post-type-search-filter-widget .widget-top .widget-title -{ - display:block; - float:none; - -} -.widget-top .widget-title-action-move a.widget-action { - position:relative; - display:block; - display:none; -} -.widget-top .widget-title-action-move a.widget-action:after -{ - content: "\f132"; - font-family: dashicons; - font-size:20px; - color:#cccccc; - -} -.widget-top .widget-title-action-move a.widget-action:hover:after -{ - color:#666666; -} - -.widget-title-action-move -{ - float:right; - position:relative; -} - -#search-form .widget-title-action-move -{ - /* display:none; */ -} - -#available-fields .widget-title-action -{ - display:none; -} - -#available-fields .widget-placeholder -{ - width:200px; - display:inline-block; - margin-right:10px; - margin-bottom:0; - height:43px; -} -#search-form .widget-inside { - border-top: 0; - padding: 1px 15px 15px; - line-height: 16px; -} -#search-form -{ - min-height:85px; -} -#search-filter-search-form .inside, #search-filter-available-fields .inside -{ - padding-bottom:6px; -} - -#search-filter-woocommerce-fields -{ - background-color:#def; -} -#search-filter-woocommerce-fields .hndle -{ - background-color:#ffffff; -} -.post-box-hover -{ - border-color:#777777; -} -.widget.woocommerce-field .widget-top, .woocommerce-field .menu-item-handle -{ - background-color:#f2f8ff; -} - -.ui-sortable-helper, .ui-draggable-dragging -{ - z-index:9999; -} - -.widget .meta_key_manual_toggle -{ - -} -.widget .meta_key_manual -{ - -} - -#empty-placeholder -{ - border-color:#dddddd; -} -#post-body #normal-sortables { - min-height: 0; - /* display:none; */ -} - -.widget-top:hover -{ - -} - - -.sf-tootlip{ - border-color: #3986ac !important; - background-color: #3986ac !important; - color:#ffffff !important; - padding:2px 0 !important; - font-size:12px !important; - line-height:14px !important; - margin-right:10px !important; - box-shadow:4px 4px 8px rgba(0,0,0,.3) !important; - text-shadow:0 -1px 0 #000 !important; -} - -.set_slug -{ - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} - - - -/* custom thickbox */ -.sf-thickbox -{ - position: fixed; - background: #fff; - z-index: 100050; /* Above DFW. */ - visibility: hidden; - text-align: left; - top: 50%; - left: 50%; - -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); - box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); - - overflow:hidden; - - width: 500px; height: 400px; margin-left: -250px; top: 200px; margin-top: 0px; visibility: visible; -} - -.sf-thickbox-title { - background: #fcfcfc; - border-bottom: 1px solid #dfdfdf; - height: 35px; -} -.sf-ajax-window-title -{ - float: left; - font-weight: 600; - line-height: 29px; - overflow: hidden; - padding: 0 29px 0 10px; - text-overflow: ellipsis; - white-space: nowrap; - width: calc( 100% - 39px ); -} -.sf-close-icon:before { - content: '\f158'; - font: normal 20px/36px 'dashicons'; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.sf-close-icon:hover -{ - color:#2ea2cc; -} - - -.sf-close-icon { - color: #666; - text-align: center; - line-height: 35px; - width: 35px; - height: 35px; - position: absolute; - top: 0; - right: 0; -} -.sf-close-ajax-window -{ - float: right; - cursor: pointer; -} - -.sf-close-ajax-window a { - text-decoration: none; -} - -.TB_closeWindowButton -{ - -} -.sf-thickbox-action-right, .replace-meta-options-label, .clear-option-button -{ - float:right; -} -.sort-options-button.button-secondary -{ - margin-left:10px; - float:right; -} -.replace-meta-options-label -{ - padding-right:5px; - display:inline-block; - padding-top:7px; -} -.sf-ajax-content { - clear: both; - padding: 2px 15px 15px 15px; - overflow: auto; - text-align: left; - line-height: 1.4em; - width:auto; - height:290px; - overflow-y:scroll; -} - -.sf-ajax-content.TB_modal { - padding: 15px; -} - -.sf-ajax-content p { - padding: 5px 0px 5px 0px; -} -.sf-thickbox-overlay -{ - background: rgba(0,0,0,1); - - filter: alpha(opacity=70); - opacity: 0.7; - - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 100050; /* Above DFW. */ - -} -.sf-thickbox-toolbar -{ - position: absolute; - top: 0; - left: 0; - right: 0; - z-index: 100; - height: 55px; - padding: 0 16px; - border: 0 solid #dfdfdf; - overflow: hidden; - background-color:#FCFCFC; - - text-align:left; -} -.sf-thickbox-frame-toolbar -{ - position: absolute; - left: 0; - right: 0; - bottom: 0; - height: 55px; - border-top:1px solid #ddd; - -} -.sf-thickbox-title-inner -{ - color: #444; - font-size: 18px; - font-weight: 600; - line-height: 36px; - margin: 0; - padding: 0 36px 0 16px; -} -.sf-thickbox-content label -{ - background-color:#fafafa; - padding:7px 10px; - margin-right:10px; - margin-bottom:10px; - border: 1px solid #eeeeee; - display:inline-block; -} -.sf-thickbox-content label input[type=checkbox] -{ - margin-right:8px; -} -.button-secondary .dashicons -{ - padding-top:4px; -} - -/* meta tabx */ - - -.tab-header -{ - display:block; - padding-top:0; - margin:15px 10px 0 0px; -} - -.tab-header label -{ - margin:0; - padding:0; - display:block; - list-style-type:none; - list-style:none; - - padding:8px 15px; - float:left; - margin-right:5px; - height:19px; - overflow:hidden; - color:#21759b; - - -} - -.tab-header label.active -{ - border:1px solid #dddddd; - border-bottom:none; - background-color:#fdfdfd; - z-index:100; - position:relative; - margin-bottom:-1px; - color:#333333; -} - -.tab-header a -{ - text-decoration:none; - color: #666666; -} -.sf_field_data .child-columns, -.sf_field_data .child-columns-w -{ - max-width:300px; -} -.sf_field_data .child-columns input, .sf_field_data .child-columns select -.sf_field_data .child-columns-w input, .sf_field_data .child-columns-w select -{ - width:auto; -} -.tab-header label:hover -{ - color:#d54e21; -} - -.tab-header label input -{ - display:none; -} - -.sf_input_type_meta, .sf_field_data -{ - border:1px solid #ddd; - padding:10px 15px; - background-color:#fafafa; - background-color:#FDFDFD; -} - -.meta-option-item span, .sort-option-item span -{ - display:none; -} -#postbox-container-1 .meta-option-item span, #postbox-container-1 .sort-option-item span -{ - display:block; -} - - -/* settings box */ - -#search-filter-settings-box .sf_post_types -{ - padding:0; -} - -#search-filter-settings-box .sf_post_types > p > span -{ - display:inline-block; - padding: 0 0 2px 0; -} -#search-filter-settings-box table td -{ - padding:5px; - vertical-align:top; -} -#search-filter-settings-box .sf_tab_content_taxonomies table td -{ - vertical-align:middle; -} -#search-filter-settings-box table tr td:first-child -{ - padding-left:0; -} -#search-filter-settings-box table tr td:lsat-child -{ - padding-right:0; -} - -.sf_tab_content_post_meta .meta_key, .sf_tab_content_post_meta .meta_value, .sf_tab_content_post_meta .meta_compare, .sf_tab_content_post_meta .meta_date_value_date -{ - max-width:155px; -} - - -#search-filter-settings-box .sf_tab_content_post_meta ul.meta_list li.template -{ - display:none; -} -#search-filter-settings-box .sf_tab_content_post_meta .meta_list td -{ - vertical-align:middle; -} - -/* */ - -#search-filter-settings-box .sf_tab_content_template .tpl_shortcode_rows input[type=text] -{ - -} -#search-filter-settings-box .sf_tab_content_template .tpl_shortcode_rows -{ - display:none; -} - -#search-filter-settings-box .sf_tab_content_template .template_shortcode_options .tpl_shortcode_rows -{ - display:table-row; -} - - - - -/* */ - -/*#search-filter-settings-box .template_results_table tr:first-child td:first-child p:first-child -{ - margin-bottom:0; -}*/ - -#search-filter-settings-box .template_results_table tr td -{ - width:50%; -} -#search-filter-settings-box .display_result_txt -{ - /*line-height:25px;*/ -} -#search-filter-settings-box .display_result_txt p:first-child -{ - -} -#search-filter-settings-box .display_result_txt_cont -{ - - background-color: #f7f7f7; - border: 1px solid #dddddd; - /*border:1px solid #dddddd;*/ -} - -#search-filter-settings-box .notice-alert -{ - background-color:#FFFDD6; - padding:0 10px; - border:1px solid #F4E895; -} -#search-filter-settings-box .template_results_table td label -{ - display:block; - padding:10px; - - /*border:1px solid #dddddd;*/ -} -#search-filter-settings-box .template_results_table label:hover -{ -/* border:1px solid #cccccc;*/ -} -#search-filter-settings-box .template_results_table label.active, #search-filter-settings-box .template_results_table label.active:hover -{ - /*border:1px solid #bbbbbb;*/ -} -/* -#search-filter-settings-box .sf_tab_content_template .template_options_table input, #search-filter-settings-box .sf_tab_content_template .template_options_table select -{ - box-sizing: border-box !important; - -moz-box-sizing: border-box !important; - -webkit-box-sizing: border-box !important; -}*/ - -#search-filter-settings-box .sf_tab_content_template .template_ajax_table.template_hide_ajax_selectors .template_ajax_container{ - display:none; -} -#search-filter-settings-box .sf_tab_content_template .template_pagination_table.template_hide_ajax_selectors .template_pagination_selector -{ - display:none; -} - -#search-filter-settings-box .sf_tab_content_template .template_ajax_table .scroll_to_row td > span:first-child -{ - vertical-align: top; -} -#search-filter-settings-box .sf_tab_content_template .template_ajax_table .scroll_to_row td > span -{ - display:inline-block; - padding: 0 0 2px 0; - -} - -#search-filter-settings-box .sf_tab_content_template .template_ajax_table .custom_scroll_to -{ - display:none; -} -#search-filter-settings-box input[type=text] -{ - height:27px; -} -#search-filter-settings-box .sf_tab_content_template .template_options_table select, -#search-filter-settings-box .sf_tab_content_template .template_ajax_table select -{ - margin-top:-3px; -} - -#search-filter-settings-box .sf_tab_content_template .template_options_table tr td:first-child, -#search-filter-settings-box .sf_tab_content_template .template_pagination_table tr td:first-child, -#search-filter-settings-box .sf_tab_content_template .template_ajax_table tr td:first-child -{ - width: 275px; -} -#search-filter-settings-box .sf_tab_content_template .template_options_table, -#search-filter-settings-box .sf_tab_content_template .template_ajax_table -{ - display:table; -} - -/*#search-filter-settings-box .sf_tab_content_template .tpl_custom_woocommerce_rows, */ -#search-filter-settings-box .sf_tab_content_template .tpl_archive_rows, -#search-filter-settings-box .sf_tab_content_template .tpl_post_type_archive_rows -{ - display:none; -} - -#search-filter-settings-box .sf_tab_content_template .template_archive_options .tpl_archive_rows -{ - display:table-row; -} -#search-filter-settings-box .sf_tab_content_template .template_post_type_archive_options .tpl_archive_rows -{ - display:table-row; -} -/* -#search-filter-settings-box .template_post_type_archive_options .taxonomy_archive_woocommerce_label -{ - -} -#search-filter-settings-box .template_custom_woocommerce_option .taxonomy_archive_woocommerce_label -{ - display:none !important; -}*/ - -#search-filter-settings-box .sf_tab_content_post_meta .meta_list .settings_post_meta td .option-remove -{ - padding-top:5px; - display:inline-block; -} -#search-filter-settings-box .sf_tab_content_post_meta .meta_list .settings_post_meta td -{ - vertical-align:top; -} - -#search-filter-settings-box .sf_tab_content_post_meta .meta_list .settings_post_meta td .meta_value_date_c, -#search-filter-settings-box .sf_tab_content_post_meta .meta_list .settings_post_meta td .meta_value_timestamp_c -{ - display:none; -} - -#search-filter-settings-box .template_pagination_table[data-sf-pagination-type="normal"] .tpl_pagination_normal_rows -{ - display:table-row; -} -#search-filter-settings-box .template_pagination_table[data-sf-pagination-type="normal"] .tpl_pagination_scroll_rows -{ - display:none; -} - -#search-filter-settings-box .template_pagination_table[data-sf-pagination-type="infinite_scroll"] .tpl_pagination_normal_rows -{ - display:none; -} -#search-filter-settings-box .template_pagination_table[data-sf-pagination-type="infinite_scroll"] .tpl_pagination_scroll_rows -{ - display:table-row; -} - - - - -.wrap div.sf-notice -{ - /*background: #fff; - border-left: 4px solid #fff; - -webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 ); - box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 ); - margin: 5px 15px 2px; - padding: 1px 12px;*/ - - - margin: 5px 0 15px; - border-color: #ffba00; -} - -.wrap div .sf-error-langcode -{ - color:#888888; - font-weight:bold; - display:inline-block; - padding-left:10px; - text-transform:uppercase; -} - -.sf_number .sf_display_values_as -{ - display:none; -} -.sf_number .sf_number_formatting -{ - display:block; -} -.sf_number .sf_all_items_label_number -{ - display:none; -} -.sf_number .sf_display_input_as -{ - display:block; -} - -/* range slider */ -.sf_number[data-number-input-type='range-slider'] .sf_display_values_as -{ - display:block; -} -.sf_number[data-number-input-type='range-slider'] .sf_display_input_as -{ - display:none; -} - -/* range number */ -.sf_number[data-number-input-type='range-number'] .sf_display_values_as -{ - display:none; -} -.sf_number[data-number-input-type='range-number'] .sf_display_input_as -{ - display:none; -} -.sf_number[data-number-input-type='range-number'] .sf_number_formatting -{ - display:none; -} - -.sf_number[data-number-input-type='range-select'][data-display-input-as='singlefield'] .sf_all_items_label_number, -.sf_number[data-number-input-type='range-radio'][data-display-input-as='singlefield'] .sf_all_items_label_number -{ - display:block; -} - -.sf_number[data-number-input-type='range-radio'] .sf_accessibility_label -{ - display:none; -} - -/* choice */ -.choice_is_acf, .choice_order_options -{ - display:none; -} -.sf_manual_meta_options -{ - display:block; -} - -.sf_choice[data-choice-get-options='auto'] .choice_is_acf, -.sf_choice[data-choice-get-options='auto'] .choice_order_options -{ - display:block; -} -.sf_choice[data-choice-get-options='auto'] .sf_manual_meta_options -{ - display:none; -} - -.sf_choice[data-choice-get-options='manual'] .sf_manual_meta_options -{ - display:block; -} - -.sf_choice[data-choice-order-by='value'] -{ - -} - - -.search-filter_page_search-filter-system-status #wpcontent table -{ - margin-right:20px; - margin-top:20px; -} - -.search-filter_page_search-filter-system-status #wpcontent table td:first-child { - width: 33%; -} - -.search-filter_page_search-filter-system-status #wpcontent tablee td.help { - width: 1em; -} - -.search-filter_page_search-filter-system-status #wpcontent table td.help { - display:none !important; -} -.search-filter_page_search-filter-system-status #wpcontent table td { - padding: 9px; - font-size: 1.1em; -} - -.widefat th, .widefat td { - color: #555; -} - -.search-filter_page_search-filter-system-status #wpcontent table td mark { - background: 0 0; -} - -.search-filter_page_search-filter-system-status #wpcontent table td mark.yes { - color: #7ad03a; -} - -.search-filter_page_search-filter-system-status #wpcontent table td mark.error { - color: #a00; -} - -.search-filter_page_search-filter-system-status #wpcontent table tbody tr:nth-child(2n) { - /* background-color:#fcfcfc; */ - background-color:#fafafa; - -} -.search-filter_page_search-filter-system-status #wpcontent table th { - font-weight: 700; - padding: 9px; -} - - -.hint--info { - position: relative; -} - -.hint--info::after{ - content: attr(data-hint); - display: block; - visibility: hidden; - width: auto; - background-color: #555; - color: #fff; - text-align: center; - padding: 5px 0; - border-radius: 6px; - max-width: 400px; - width: 150px; - /* Position the tooltip text - see examples below! */ - position: absolute; - z-index: 1; - padding: 7px 10px; - /* bottom */ - bottom: 140%; - left: -72px; - font-size:12px; -} - -.hint--info:hover::after { - visibility: visible; -} -/*.hint--info:hover::after{ - content: attr(data-hint); - position: absolute; - top: 100%; - left: 50%; - margin-left: -5px; - border-width: 5px; - border-style: solid; - border-color: #555 transparent transparent transparent; -}*/ \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/assets/css/index.php b/wp/wp-content/plugins/search-filter-pro/admin/assets/css/index.php deleted file mode 100644 index e71af0ef..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/assets/css/index.php +++ /dev/null @@ -1 +0,0 @@ -c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkcWMJUv;%wmRXldeRXy|HeX=Lo;>f~%;;A&_=yk)X7nBro3xGDeq!wkCrKY$Q<>xAZy=;|<+bzyG&4cPq z!R;0ooO<5LW?*34<>}%WQgJKk z&;S4S%_-M&*>oIOJJg+T?sTYOk3IO=D3nc2N9t$e4)KolOdHun;#<2uF4j(SGUMgA z)bK-2K%CJ~dXkmd3JDKA-c@2e5)0!tuy0al*vRN{A;52f;`J%*2OZ{!u6c3j^nISm z{`H9#|6kbp+-FtLV~{ElNISqjdO@hE4UHa|J$N#!wlm-*Rpn{`12n(S3E z)At|XJn6wSX~Ma^2RuBkH&}36sy5v?b79FHrXx-~Hx61WtYdr>>F`I~*7z^$qn8eA zSh}h-L$k4#R%n+nHdw-kp1Qk%p=IQF^ Jvd$@?2>^P<&;tMf diff --git a/wp/wp-content/plugins/search-filter-pro/admin/assets/img/move-ico.svg b/wp/wp-content/plugins/search-filter-pro/admin/assets/img/move-ico.svg deleted file mode 100644 index 0938ac2f..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/assets/img/move-ico.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin-posts.js b/wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin-posts.js deleted file mode 100644 index 8ae53cc9..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin-posts.js +++ /dev/null @@ -1,2695 +0,0 @@ -(function ( $ ) { - "use strict"; - - $(function () { - /* metabox processing :) */ - - //thickbox mods - jQuery.fn.SfPopupMeta = function(options) - { - var defaults = { - startOpened: false - }; - var opts = jQuery.extend(defaults, options); - - //loop through each item matched - $(this).each(function() - { - var item = $(this); - - var $widget_ref = $(this).closest('.widget'); - var $meta_options_list = $widget_ref.find('.meta_options_list'); - - - function getMetaKeyValues(meta_key, $target) - { - - var meta_prefs_action_name = "get_meta_values"; - - $.post( ajaxurl, {meta_key: meta_key, action: meta_prefs_action_name}).done(function(data) - {//don't do anything - - if(data) - { - $target.html(data); - } - }); - - } - - function getMetaKey($this) - { - /* ***************** */ - var $the_field = $this.closest(".widget"); - var $meta_key_manual_toggle = $the_field.find(".meta_key_manual_toggle"); - var $meta_key_manual = $the_field.find(".meta_key_manual"); - var $meta_key = $the_field.find(".choice_meta_key"); - - var meta_key_value = $meta_key.val(); - - if(meta_key_value!="") - { - return meta_key_value; - } - else - { - return ""; - } - } - - item.on( 'click', function() - { - //add overlay - var $overlay = jQuery('
    ', { - id: 'foo', - 'class': 'sf-thickbox-overlay', - }).appendTo('body'); - - //add popup div - var $popup = jQuery('
    ', { - 'class': 'sf-thickbox', - }).appendTo('body'); - - var popup_hd_str = ""; - popup_hd_str += '
    '; - popup_hd_str += '
    '; - popup_hd_str += '
    Add Options
    '; - popup_hd_str += '
    '; - popup_hd_str += ''; - popup_hd_str += '
    '; - popup_hd_str += '
    '; - popup_hd_str += '
    '; - - /* init content */ - var meta_key = getMetaKey($(this)); - - var popup_content_str = ""; - popup_content_str += '
    '; - popup_content_str += '

    Found the following values in use for meta key `'+meta_key+'`

    '; - popup_content_str += '

    '; - popup_content_str += ''; - popup_content_str += '

    '; - popup_content_str += '
    '; - - var popup_ft_str = ""; - popup_ft_str += '
    '; - popup_ft_str += '
    '; - popup_ft_str += '

    Select None Select All Add Options

    '; - popup_ft_str += '
    '; - popup_ft_str += '
    '; - - var $popup_header = $(popup_hd_str); - var $popup_content = $(popup_content_str); - var $popup_footer = $(popup_ft_str); - - $popup.append($popup_header); - $popup.append($popup_content); - $popup.append($popup_footer); - - var $close_button = $popup_header.find(".sf-close-ajax-window"); - $close_button.on( 'click', function() - { - $('.sf-thickbox-overlay').remove(); - $popup.remove(); - - }); - - var $select_none_button = $popup_footer.find(".sf-meta-select-none"); - $select_none_button.on( 'click', function() - { - $popup_content.find('.sf-thickbox-content input[type="checkbox"]').each(function(){ - - this.checked = false; - }); - - return false; - - }); - - var $select_all_button = $popup_footer.find(".sf-meta-select-all"); - $select_all_button.on( 'click', function() - { - $popup_content.find('.sf-thickbox-content input[type="checkbox"]').each(function(){ - - this.checked = true; - }); - - return false; - - }); - - var $add_options_button = $popup_footer.find(".sf-meta-add-options"); - $add_options_button.on( 'click', function() - { - var $no_sort_label = $widget_ref.find(".no_sort_label"); - var $replace_options_checkbox = $popup_footer.find('.replace-options-checkbox'); - var $checked_options = $popup_content.find('.sf-thickbox-content input[type="checkbox"]:checked'); - - if($checked_options.length>0) - { - if($replace_options_checkbox.prop('checked')) - { - var $meta_options = $meta_options_list.find("li:not(.meta-option-template)"); - - $meta_options.each(function(){ - - var $meta_option = $(this); - - $meta_option.slideUp("fast",function(){ - $meta_option.remove(); - - if($meta_options_list.find("li:not(.meta-option-template)").length==0) - { - $no_sort_label.show(); - } - }); - }); - } - - - $checked_options.each(function(){ - - var optionsId = $meta_options_list.find("li:not(.meta-option-template)").length; - - var $meta_option = $meta_options_list.find("li.meta-option-template").clone(); - $meta_option.removeClass("meta-option-template"); - - setOptionVars($meta_option, $widget_ref.attr('data-widget-id'), optionsId); - $meta_options_list.append($meta_option); - $meta_option.slideDown("fast"); - - $meta_option.find('input[type="text"]').val($(this).val()); - - initMetaOptionControls($meta_option, $meta_options_list, $no_sort_label); - - $no_sort_label.hide(); - - - this.checked = true; - }); - } - - //hide popup - $('.sf-thickbox-overlay').remove(); - $popup.remove(); - - return false; - - }); - - getMetaKeyValues(meta_key, $popup_content.find(".sf-thickbox-content")); - - - return false; - - - }); - - }); - } - - jQuery.fn.SfPopupTax = function(options) - { - var defaults = { - startOpened: false - }; - var opts = jQuery.extend(defaults, options); - - //loop through each item matched - $(this).each(function() - { - function getTaxonomyTerms(taxonomy_name, taxonomy_ids, $target) - { - var action_name = "get_taxonomy_terms"; - - $.get( ajaxurl+"?action="+action_name+"&taxonomy_name="+taxonomy_name+"&taxonomy_ids="+taxonomy_ids ).done(function(data) - {//don't do anything - - if(data) - { - $target.html(data); - } - }); - } - - var item = $(this); - - if(item.attr("data-init-popup") != 1) - { - item.attr("data-init-popup", 1); - - item.on( 'click', function() - { - if(!item.hasClass("disabled")) - { - //add overlay - var $overlay = jQuery('
    ', { - id: 'foo', - 'class': 'sf-thickbox-overlay', - }).appendTo('body'); - - //add popup div - var $popup = jQuery('
    ', { - 'class': 'sf-thickbox', - }).appendTo('body'); - - var popup_hd_str = ""; - popup_hd_str += '
    '; - popup_hd_str += '
    '; - popup_hd_str += '
    Update Terms
    '; - popup_hd_str += '
    '; - popup_hd_str += ''; - popup_hd_str += '
    '; - popup_hd_str += '
    '; - popup_hd_str += '
    '; - - /* init content */ - var taxonomy_name = $(this).attr("data-taxonomy-name"); - var taxonomy_label = $(this).attr("data-taxonomy-label"); - var taxonomy_ids = $(this).parent().find(".settings_exclude_ids").val(); - var $this = $(this); - - var popup_content_str = ""; - popup_content_str += '
    '; - popup_content_str += '

    Choose the terms to include/exclude for `'+taxonomy_label+'`

    '; - popup_content_str += '

    '; - popup_content_str += ''; - popup_content_str += '

    '; - popup_content_str += '
    '; - - var popup_ft_str = ""; - popup_ft_str += '
    '; - popup_ft_str += '
    '; - popup_ft_str += '

    Select None Select All Update

    '; - popup_ft_str += '
    '; - popup_ft_str += '
    '; - - var $popup_header = $(popup_hd_str); - var $popup_content = $(popup_content_str); - var $popup_footer = $(popup_ft_str); - - $popup.append($popup_header); - $popup.append($popup_content); - $popup.append($popup_footer); - - var $close_button = $popup_header.find(".sf-close-ajax-window"); - $close_button.on( 'click', function() - { - $('.sf-thickbox-overlay').remove(); - $popup.remove(); - - }); - - var $select_none_button = $popup_footer.find(".sf-meta-select-none"); - $select_none_button.on( 'click', function() - { - $popup_content.find('.sf-thickbox-content input[type="checkbox"]').each(function(){ - - this.checked = false; - }); - - return false; - - }); - - var $select_all_button = $popup_footer.find(".sf-meta-select-all"); - $select_all_button.on( 'click', function() - { - $popup_content.find('.sf-thickbox-content input[type="checkbox"]').each(function(){ - - this.checked = true; - }); - - return false; - - }); - - var $update_button = $popup_footer.find(".sf-update-button"); - - $update_button.on( 'click', function() - { - var $replace_options_checkbox = $popup_footer.find('.replace-options-checkbox'); - var $checked_options = $popup_content.find('.sf-thickbox-content input[type="checkbox"]:checked'); - - var checkedIds = []; - - if($checked_options.length>0) - { - $checked_options.each(function(){ - - checkedIds.push($(this).val()); - }); - } - - var checkedStr = ""; - - if(checkedIds.length>0) - { - checkedStr = checkedIds.join(','); - } - - $this.parent().find(".settings_exclude_ids").val(checkedStr); - - //hide popup - $('.sf-thickbox-overlay').remove(); - $popup.remove(); - - return false; - - }); - - getTaxonomyTerms(taxonomy_name, taxonomy_ids, $popup_content.find(".sf-thickbox-content")); - - } - - return false; - - - }); - } - }); - } - - String.prototype.parseArray = function (arr) { - return this.replace(/\{([0-9]+)\}/g, function (_, index) { return arr[index]; }); - }; - - String.prototype.parse = function (a, b, c) { - return this.parseArray([a, b, c]); - }; - $.fn.hasAttr = function(name) { - return this.attr(name) !== undefined; - }; - - var $search_tax_button = $('#search-filter-settings-box .search-tax-button'); - $search_tax_button.SfPopupTax(); - - - $("#search-filter-search-form").addClass("widgets-search-filter-sortables").addClass("ui-search-filter-sortable"); - - //create all default handlers, open/close/delete/save - jQuery.fn.makeWidget = function(options) - { - var defaults = { - startOpened: false - }; - var opts = jQuery.extend(defaults, options); - - //loop through each item matched - this.each(function() - { - var item = $(this); - item.addClass("widget-enabled"); - var field_type = item.attr("data-field-type"); - - var itemInside = item.find('.widget-inside'); - - if(opts.startOpened==true) - { - itemInside.show(); - } - var container = item.parent(); - - item.find('.widget-top').on( 'click', function(e){ - - e.stopPropagation(); - e.preventDefault(); - - var allowExpand = container.attr("data-allow-expand"); - if(typeof(allowExpand)=="undefined") - {//init data-dragging if its not on already - container.attr("data-allow-expand", "1"); - allowExpand = "1"; - } - - if(allowExpand==1) - { - var dataDragging = item.attr("data-dragging"); - if(typeof(dataDragging)=="undefined") - {//init data-dragging if its not on already - item.attr("data-dragging", "0"); - dataDragging = "0"; - } - - if(dataDragging=="0") - { - var is_open = item.find('.widget-top').attr("data-sf-field-open"); - if(typeof(is_open) == "undefined") { - is_open = 0; - } - is_open = 1 - is_open; - item.find('.widget-top').attr("data-sf-field-open", is_open); - - itemInside.slideToggle("fast"); - } - } - - return false; - }); - - item.find('.widget-control-remove').on( 'click', function(e){ - - item.slideUp("fast", function(){ - - item.remove(); - if(item.length==1) - { - //$emptyPlaceholder.show(); - } - - }); - - return false; - }); - - item.find('.widget-control-advanced').on( 'click', function(e){ - - $(this).parent().find(".advanced-settings").slideToggle("fast"); - $(this).toggleClass("active"); - - return false; - }); - - item.find('.widget-control-close').on( 'click', function(e){ - - itemInside.slideUp("fast"); - - return false; - - }); - - //widget specific JS - //categories - if((field_type=="category")||(field_type=="tag")||(field_type=="taxonomy")||(field_type=="post_type")) - { - - var $input_type_field = item.find('.sf_input_type select'); - - // start off by showing/hiding correct fields - showHideFields($input_type_field.val()); - - //grab the input type - $input_type_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFields(input_type); - - }); - - var $combobox_container = item.find(".sf_make_combobox"); - var $combobox = item.find(".sf_make_combobox input:checkbox"); - - $combobox.on( 'change', function() - { - var tinput_type = item.find('.sf_input_type select').val(); - - if(tinput_type=="multiselect") - { - if($(this).prop("checked")) - { - item.find(".sf_all_items_label").show(); - } - else - { - item.find(".sf_all_items_label").hide(); - } - } - - if((tinput_type=="multiselect")||(tinput_type=="select")){ - if($(this).prop("checked")){ - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else { - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - } - - - }); - - var $tax_button = null; - - if(field_type!="post_type") - { - var $sync_include_exclude = item.find(".sync_include_exclude"); - - $sync_include_exclude.on("change", function(){ - - init_sync_checkbox($(this)); - - }); - - init_sync_checkbox($sync_include_exclude); - - $tax_button = item.find(".search-tax-button"); - - if(field_type!="post_tag") - { - //include children - var $operator_select = item.find(".sf_operator select"); - - } - } - - if(field_type=="taxonomy") - { - - var $tsel = item.find('.sf_taxonomy_name select'); - var current_tax_name = $tsel.find("option[value='"+$tsel.val()+"']").html(); - - - $tax_button.attr('data-taxonomy-name', $tsel.val()); - $tax_button.attr('data-taxonomy-label', current_tax_name); - } - - if(field_type!="post_type") - { - $tax_button.SfPopupTax(); - } - - } - - function init_sync_checkbox($this) - { - if($this.is(":checked")) - { - item.find(".exclude_ids").attr("disabled", "disabled"); - item.find(".exclude_ids_hidden").removeAttr("disabled"); - item.find(".exclude_ids_hidden").val(item.find(".exclude_ids").val()); - item.find(".search-tax-button").addClass("disabled"); - - } - else - { - item.find(".exclude_ids").removeAttr("disabled"); - item.find(".exclude_ids_hidden").attr("disabled", "disabled"); - item.find(".search-tax-button").removeClass("disabled"); - } - } - - if(field_type=="author") - { - - var $input_type_field = item.find('.sf_input_type select'); - - // start off by showing/hiding correct fields - showHideFieldsAuthor($input_type_field.val()); - - var $combobox = item.find(".sf_make_combobox input:checkbox"); - - $combobox.on( 'change', function() - { - var tinput_type = item.find('.sf_input_type select').val(); - - if(tinput_type=="multiselect") - { - if($(this).prop("checked")) - { - item.find(".sf_all_items_label").show(); - } - else - { - item.find(".sf_all_items_label").hide(); - } - } - - if((tinput_type=="multiselect")||(tinput_type=="select")){ - if($(this).prop("checked")){ - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else { - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - } - }); - - - //grab the input type - $input_type_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFieldsAuthor(input_type); - }); - } - - if(field_type=="taxonomy") - { - var $taxonomy_select = item.find('.sf_taxonomy_name select'); - - $taxonomy_select.on("change",function() - { - var current_tax_name = $taxonomy_select.find("option[value='"+$taxonomy_select.val()+"']").html(); - item.find('.in-widget-title').html(":  "+current_tax_name); - - var $tax_button = item.find(".search-tax-button"); - $tax_button.attr('data-taxonomy-name', $(this).val()); - $tax_button.attr('data-taxonomy-label', current_tax_name); - }); - - var current_tax_name = $taxonomy_select.find("option[value='"+$taxonomy_select.val()+"']").html(); - item.find('.in-widget-title').html(":  "+current_tax_name); - - } - - if(field_type=="sort_order") - { - setPostMetaManualFields(); - - var $meta_key_manual_toggle = item.find('.meta_key_manual_toggle'); - - var $input_type_field = item.find('.sf_input_type select'); - - // start off by showing/hiding correct fields - showHideFields($input_type_field.val()); - - $input_type_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFields(input_type); - }); - - - //grab the input type - $meta_key_manual_toggle.on( 'change', function(e) - { - setPostMetaManualFields(); - }); - } - - if(field_type=="post_meta") - { - /* */ - - var $use_same_toggle = item.find('.use_same_toggle'); - var $start_meta_key = item.find('.start_meta_key'); - - $use_same_toggle.each(function(){ - - setPostMetaUseSameFields($(this)); - }); - - $use_same_toggle.on( 'change', function(e) - { - setPostMetaUseSameFields($(this)); - }); - $start_meta_key.on( 'change', function(e) - { - setPostMetaStartKey($(this)); - }); - - - /* number */ - - // start off by showing/hiding correct fields - - //decimals toggle - var $number_is_decimal = item.find('.number_is_decimal'); - var $number_decimal_places = item.find('.number_decimal_places'); - checkboxToggleDeps($number_is_decimal, $number_decimal_places); - - $number_is_decimal.on("change",function(){ - checkboxToggleDeps($(this), $number_decimal_places); - }); - - //min range toggle - var $range_min_detect = item.find('.range_min_detect'); - var $range_min = item.find('.range_min'); - checkboxToggleDeps($range_min_detect, $range_min, true); - - $range_min_detect.on("change",function(){ - checkboxToggleDeps($(this), $range_min, true); - }); - - //max range toggle - var $range_max_detect = item.find('.range_max_detect'); - var $range_max = item.find('.range_max'); - checkboxToggleDeps($range_max_detect, $range_max, true); - - $range_max_detect.on("change",function(){ - checkboxToggleDeps($(this), $range_max, true); - }); - - //input type field - var $number_input_type_field = item.find('.sf_number_input_type select'); - - showHideFieldsMetaNumber($number_input_type_field.val()); - $number_input_type_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFieldsMetaNumber(input_type); - }); - - var $sf_display_input_as = item.find('.sf_display_input_as select'); - showHideFieldsMetaNumberDisplayInputAs($sf_display_input_as.val()); - $sf_display_input_as.on( 'change', function(e) - { - var display_input_as = $(this).val(); - showHideFieldsMetaNumberDisplayInputAs(display_input_as); - }); - - /* choice */ - - var $input_type_field = item.find('.sf_input_type select'); - - // start off by showing/hiding correct fields - - showHideFields($input_type_field.val()); - - $input_type_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFields(input_type); - }); - - var $input_type_field = item.find('.sf_input_type select'); - - - var $choice_get_options_field = item.find('.sf_choice_get_options select'); - var $choice_order_options_by_field = item.find('.sf_choice_order_options select.sf_choice_order_option_by'); - - // start off by showing/hiding correct fields - showHideFieldsMetaChoiceOptions($choice_get_options_field.val()); - $choice_get_options_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFieldsMetaChoiceOptions(input_type); - }); - // start off by showing/hiding correct fields - showHideFieldsMetaChoiceOrderBy($choice_order_options_by_field.val()); - $choice_order_options_by_field.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFieldsMetaChoiceOrderBy(input_type); - }); - - - var $combobox = item.find(".sf_make_combobox input:checkbox"); - - $combobox.on( 'change', function() - { - var tinput_type = item.find('.sf_input_type select').val(); - - if(tinput_type=="multiselect") - { - if($(this).prop("checked")) - { - item.find(".sf_all_items_label").show(); - } - else - { - item.find(".sf_all_items_label").hide(); - } - } - - if((tinput_type=="multiselect")||(tinput_type=="select")){ - if($(this).prop("checked")){ - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else { - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - } - - - }); - - /* date */ - var $date_input_type = item.find('.sf_date_input select'); - - // start off by showing/hiding correct fields - showHideFields($date_input_type.val()); - - $date_input_type.on( 'change', function(e) - { - var input_type = $(this).val(); - showHideFields(input_type); - }); - - - - - var $combobox = item.find(".sf_make_combobox input:checkbox"); - - $combobox.on( 'change', function() - { - var tinput_type = $(this).parent().parent().find('.sf_input_type select').val(); - - if(tinput_type=="multiselect") - { - if($(this).prop("checked")) - { - item.find(".sf_all_items_label").show(); - } - else - { - item.find(".sf_all_items_label").hide(); - } - } - }); - - - //grab the input type - - } - - if(field_type=="sort_order") - { - var $add_sort_button = item.find(".add-sort-button"); - var $clear_option_button = item.find(".clear-option-button"); - var $sort_options_list = item.find(".sort_options_list"); - var $no_sort_label = item.find(".no_sort_label"); - - var $current_sort_options = $sort_options_list.find("li:not(.sort-option-template)"); - $current_sort_options.show(); - - if($current_sort_options.length>0) - { - - $no_sort_label.hide(); - } - - $current_sort_options.each(function(){ - - initSortOptionControls($(this), $sort_options_list, $no_sort_label); - - }); - - $sort_options_list.sortable({ - opacity: 0.6, - //revert: 200, - revert: false, - cursor: 'move', - handle: '.slimmove', - //cancel: '.widget-title-action,h3,.sidebar-description', - items: 'li:not(.sort-option-template)', - placeholder: 'sort-option-placeholder', - 'start': function (event, ui) { - ui.placeholder.show(); - }, - stop: function(e,ui) { - - var optionsCount = 0; - var $sort_options_list = ui.item.find(".sort_options_list"); - var widgetCount = ui.item.attr("data-widget-id"); - - $sort_options_list.find("li:not(.sort-option-template)").each(function() - { - - setOptionVars($(this), widgetCount, optionsCount); - optionsCount++; - - }); - } - }); - - $clear_option_button.on( 'click', function(){ - - - var $sort_options = $sort_options_list.find("li:not(.sort-option-template)"); - - $sort_options.each(function(){ - - var $sort_option = $(this); - - $sort_option.slideUp("fast",function(){ - $sort_option.remove(); - - if($sort_options_list.find("li:not(.sort-option-template)").length==0) - { - $no_sort_label.show(); - } - }); - }); - - return false; - - }); - - $add_sort_button.on( 'click', function(){ - - - var $meta_key_manual_toggle = item.find(".meta_key_manual_toggle"); - var $meta_key_manual = item.find(".meta_key_manual"); - var $meta_key = item.find(".meta_key"); - - var meta_key_value = $meta_key.val(); - - if($meta_key_manual_toggle.is(":checked")) - { - meta_key_value = $meta_key_manual.val(); - } - - if(meta_key_value!="") - { - //reset meta fields - $meta_key.removeAttr("selected"); - $meta_key[0].selectedIndex = 0; - $meta_key_manual.val(""); - $meta_key_manual_toggle.prop("checked", false); - $meta_key.removeAttr("disabled"); - $meta_key_manual.attr("disabled", "disabled"); - - - var optionsId = $sort_options_list.find("li:not(.sort-option-template)").length; - - var option_html = ""; - - var $sort_option = $sort_options_list.find("li.sort-option-template").clone(); - $sort_option.removeClass("sort-option-template"); - $sort_option.hide(); - $sort_option.find(".meta_key_val, .meta_disabled, .name").val(meta_key_value); - - setOptionVars($sort_option, item.attr('data-widget-id'), optionsId); - - var $sort_by_option = $sort_option.find(".sort_by_option"); - - if($sort_by_option.val()=="meta_value") - { - $sort_option.find('.sort-options-advanced').show(); - } - else - { - $sort_option.find('.sort-options-advanced').hide(); - } - - $sort_options_list.append($sort_option); - $sort_option.slideDown("fast"); - - initSortOptionControls($sort_option, $sort_options_list, $no_sort_label); - - $no_sort_label.hide(); - - } - return false; - - }); - } - - if(field_type=="post_meta") - { - /* init meta type radios */ - /* set up meta type radios */ - var $meta_type_radio = item.find('.sf_meta_type input[type="radio"]'); - var $meta_type_labels = item.find('.sf_meta_type label'); - var $checked_radio = item.find('.sf_meta_type input[data-radio-checked="1"]'); - - $meta_type_radio.each(function(){ - this.checked = false; - $(this).attr("data-radio-checked", 0); - }); - - - if($checked_radio.length==0) - { - $checked_radio = item.find(".sf_meta_type label:first-child input"); - - } - - $checked_radio.attr("data-radio-checked", 1); - $checked_radio.prop('checked',true); - var meta_type_val = $checked_radio.val(); - - metaTypeChange($checked_radio); - - $meta_type_radio.on( 'change', function() - { - $meta_type_radio.attr("data-radio-checked", 0); - $(this).attr("data-radio-checked", 1); - metaTypeChange($(this)); - - }); - - - /* ****************************************************** */ - - - var $add_option_button = item.find(".add-option-button"); - var $detect_option_button = item.find(".detect-option-button"); - var $clear_option_button = item.find(".clear-option-button"); - var $meta_options_list = item.find(".meta_options_list"); - var $no_sort_label = item.find(".no_sort_label"); - - var $current_meta_options = $meta_options_list.find("li:not(.meta-option-template)"); - - $meta_options_list.sortable({ - opacity: 0.6, - //revert: 200, - revert: false, - cursor: 'move', - handle: '.slimmove', - //cancel: '.widget-title-action,h3,.sidebar-description', - items: 'li:not(.meta-option-template)', - placeholder: 'meta-option-placeholder', - 'start': function (event, ui) { - ui.placeholder.show(); - }, - stop: function(e,ui) { - - var optionsCount = 0; - var $meta_options_list = ui.item.find(".meta_options_list"); - var widgetCount = ui.item.attr("data-widget-id"); - - $meta_options_list.find("li:not(.meta-option-template)").each(function() - { - - setOptionVars($(this), widgetCount, optionsCount); - optionsCount++; - - }); - - } - }); - - $current_meta_options.show(); - - if($current_meta_options.length>0) - { - $no_sort_label.hide(); - } - - $current_meta_options.each(function(){ - - initMetaOptionControls($(this), $meta_options_list, $no_sort_label); - - }); - - $add_option_button.on( 'click', function(){ - - - var $meta_key_manual_toggle = item.find(".meta_key_manual_toggle"); - - var optionsId = $meta_options_list.find("li:not(.meta-option-template)").length; - - var option_html = ""; - - var $meta_option = $meta_options_list.find("li.meta-option-template").clone(); - $meta_option.removeClass("meta-option-template"); - - //$meta_option.find(".meta_key_val, .meta_disabled, .name").val(meta_key_value); - - setOptionVars($meta_option, item.attr('data-widget-id'), optionsId); - $meta_options_list.append($meta_option); - $meta_option.slideDown("fast"); - - initMetaOptionControls($meta_option, $meta_options_list, $no_sort_label); - - $no_sort_label.hide(); - - - return false; - - }); - - - $detect_option_button.SfPopupMeta(); - - $clear_option_button.on( 'click', function(){ - - - var $meta_options = $meta_options_list.find("li:not(.meta-option-template)"); - - $meta_options.each(function(){ - - var $meta_option = $(this); - - $meta_option.slideUp("fast",function(){ - $meta_option.remove(); - - if($meta_options_list.find("li:not(.meta-option-template)").length==0) - { - $no_sort_label.show(); - } - }); - }); - - return false; - - }); - - /* adding meta keys to widget header */ - - //item.find(".sf_field_data").hide(); - var $widget_title_triggers = item.find(".sf_meta_keys .start_meta_key, .sf_meta_keys .end_meta_key, .sf_meta_keys .choice_meta_key, .sf_meta_type input, .use_same_toggle, .sf_date_input select"); - $widget_title_triggers.on("change", function(){ - - set_meta_widget_title(item); - - }); - - set_meta_widget_title(item); - - - - } - - function set_meta_widget_title(item) - { - - var $radio = item.find('.sf_meta_type input[data-radio-checked="1"]'); - var radio_val = $radio.val(); - - var meta_string = ""; - var $meta_container = item.find(".sf_field_data.sf_"+radio_val); - - var $use_same_toggle = $meta_container.find('.use_same_toggle'); - - if(radio_val=="choice") - { - meta_string = $meta_container.find(".sf_meta_keys .choice_meta_key").val(); - } - else if(radio_val=="number") - {//then there is only 1 meta key - if($use_same_toggle.prop("checked")==true) - { - meta_string = $meta_container.find(".sf_meta_keys .start_meta_key").val(); - } - else - { - var start_meta_val = $meta_container.find(".sf_meta_keys .start_meta_key").val(); - var end_meta_val = $meta_container.find(".sf_meta_keys .end_meta_key").val(); - meta_string = start_meta_val + " - " + end_meta_val; - } - } - else if(radio_val=="date") - { - var dateInputType = $meta_container.find(".sf_date_input select"); - - if(($use_same_toggle.prop("checked")==true)||(dateInputType.val()=="date")) - { - meta_string = $meta_container.find(".sf_meta_keys .start_meta_key").val(); - } - else - { - var start_meta_val = $meta_container.find(".sf_meta_keys .start_meta_key").val(); - var end_meta_val = $meta_container.find(".sf_meta_keys .end_meta_key").val(); - meta_string = start_meta_val + " - " + end_meta_val; - } - } - - //meta_string = " "+meta_string+"   "+radio_val+""; - item.find('.in-widget-title').html(":  "+meta_string); - - } - function initSortOptionControls($sort_option, $sort_options_list, $no_sort_label) - { - var $sort_by_option = $sort_option.find(".sort_by_option"); - - if($sort_by_option.val()=="meta_value") - { - $sort_option.find('.sort-options-advanced').show(); - } - else - { - $sort_option.find('.sort-options-advanced').hide(); - } - - $sort_by_option.on( 'change', function() - { - if($(this).val()=="meta_value") - { - $sort_option.find('.sort-options-advanced').slideDown("fast"); - } - else - { - $sort_option.find('.sort-options-advanced').slideUp("fast"); - } - }); - - $sort_option.find(".widget-control-option-remove").on( 'click', function(){ - - $sort_option.slideUp("fast",function(){ - $sort_option.remove(); - - if($sort_options_list.find("li:not(.sort-option-template)").length==0) - { - $no_sort_label.show(); - } - }); - - return false; - - }); - - /*$advanced_button.on( 'click', function(){ - - $(this).toggleClass("active"); - $sort_option.find('.sort-options-advanced').slideToggle("fast"); - return false; - - });*/ - - } - - - function setPostMetaStartKey($this) - { - var $start_meta_key = $this; - var $use_same_parent = $this.closest(".sf_meta_keys"); - //var $end_key_select = $use_same_parent.find(".meta_key"); - var $end_key_select = $use_same_parent.next().find(".meta_key"); - var $use_same_toggle = $use_same_parent.next().find(".use_same_toggle"); - - //$end_key_select - - if($use_same_toggle.prop("checked")==true) - { - $end_key_select.val($start_meta_key.val()); - } - - } - - function setPostMetaUseSameFields($this) - { - var $use_same_toggle = $this; - var $use_same_parent = $this.closest(".sf_meta_keys"); - var $compare_mode = $use_same_parent.parent().find(".sf_compare_mode"); - var $end_key_select = $use_same_parent.find(".meta_key"); - var $start_key_select = $use_same_parent.prev().find(".start_meta_key"); - - - //$compare_mode.css("border", "1px solid #f00"); - //$end_key_select.css("border", "1px solid #0f0"); - //$use_same_parent.hide(); - - if($use_same_toggle.is(":checked")) - { - $end_key_select.val($start_key_select.val()); - $end_key_select.prop("disabled", true); - $compare_mode.hide(); - } - else - { - $end_key_select.prop("disabled", false); - $compare_mode.show(); - } - - /* - var $meta_key_manual = item.find(".meta_key_manual"); - var $meta_key_manual_hidden = item.find(".meta_key_manual_hidden"); - var $meta_key = item.find(".meta_key"); - var $meta_key_hidden = item.find(".meta_key_hidden"); - - - if($meta_key_manual_toggle.is(":checked")) - { - $meta_key_manual.removeAttr("disabled"); - $meta_key_manual_hidden.attr("disabled", "disabled"); - - $meta_key_hidden.removeAttr("disabled"); - $meta_key_hidden.val($meta_key.val()); - $meta_key.attr("disabled", "disabled"); - - $meta_key_manual.focus(); - } - else - { - $meta_key_manual_hidden.removeAttr("disabled"); - $meta_key_manual_hidden.val($meta_key_manual.val()); - $meta_key_manual.attr("disabled", "disabled"); - - $meta_key.removeAttr("disabled"); - $meta_key_hidden.attr("disabled", "disabled"); - }*/ - - } - - function setPostMetaManualFields() - { - var $meta_key_manual = item.find(".meta_key_manual"); - var $meta_key_manual_hidden = item.find(".meta_key_manual_hidden"); - var $meta_key = item.find(".meta_key"); - var $meta_key_hidden = item.find(".meta_key_hidden"); - var $meta_key_manual_toggle = item.find(".meta_key_manual_toggle"); - - if($meta_key_manual_toggle.is(":checked")) - { - $meta_key_manual.removeAttr("disabled"); - $meta_key_manual_hidden.attr("disabled", "disabled"); - - $meta_key_hidden.removeAttr("disabled"); - $meta_key_hidden.val($meta_key.val()); - $meta_key.attr("disabled", "disabled"); - - $meta_key_manual.focus(); - } - else - { - $meta_key_manual_hidden.removeAttr("disabled"); - $meta_key_manual_hidden.val($meta_key_manual.val()); - $meta_key_manual.attr("disabled", "disabled"); - - $meta_key.removeAttr("disabled"); - $meta_key_hidden.attr("disabled", "disabled"); - } - - } - - function checkboxToggleDeps($self, $deps, reverse) - { - var reverse_dir = false; - if(typeof(reverse)!="undefined") - { - reverse_dir = reverse; - } - - var $inputs = $deps; - - if($self.is(":checked")) - { - //enable all fields - $inputs.each(function(){ - - var $input = $(this); - - if(!reverse_dir) - { - enableInput($input); - } - else - { - disableInput($input); - } - - }); - } - else - { - //disable all fields - $inputs.each(function(){ - - var $input = $(this); - - if(!reverse_dir) - { - disableInput($input); - } - else - { - enableInput($input); - } - - }); - - } - - } - - function showHideFieldsMetaNumber(input_type) - { - var $number_container = item.find(".sf_number"); - $number_container.attr('data-number-input-type', input_type); - } - - function showHideFieldsMetaChoiceOptions(option_type) - { - var $choice_container = item.find(".sf_choice"); - $choice_container.attr('data-choice-get-options', option_type); - } - - function showHideFieldsMetaChoiceOrderBy(option_type) - { - var $choice_container = item.find(".sf_choice"); - - //var $sf_choice_order_option_dir = $choice_container.find(".sf_choice_order_option_dir"); - //var $sf_choice_order_option_type = $choice_container.find(".sf_choice_order_option_type"); - var $sf_choice_order_option_dependants = $choice_container.find(".sf_choice_order_option_type, .sf_choice_order_option_dir"); - - //$choice_container.attr('data-choice-order-by', option_type); - - if(option_type=="none") - { - $sf_choice_order_option_dependants.prop("disabled", true); - } - else - { - $sf_choice_order_option_dependants.prop("disabled", false); - } - - } - - function showHideFieldsMetaNumberDisplayInputAs(display_input_as) - { - var $number_container = item.find(".sf_number"); - $number_container.attr('data-display-input-as', display_input_as); - } - - function showHideFields(input_type) - { - if(input_type=="select") - { - item.find(".sf_operator").hide(); - item.find(".sf_drill_down").show(); - item.find(".sf_all_items_label").show(); - item.find(".sf_make_combobox").show(); - item.find(".sf_combobox_message").show(); - item.find(".sf_accessibility_label").show(); - - if(item.find(".sf_make_combobox input").prop("checked")) { - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else{ - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - } - else if(input_type=="checkbox") - { - item.find(".sf_operator").show(); - item.find(".sf_drill_down").hide(); - item.find(".sf_all_items_label").hide(); - item.find(".sf_make_combobox").hide(); - item.find(".sf_combobox_message").hide(); - item.find(".sf_accessibility_label").hide(); - } - else if(input_type=="radio") - { - item.find(".sf_operator").hide(); - item.find(".sf_drill_down").hide(); - item.find(".sf_make_combobox").hide(); - item.find(".sf_combobox_message").hide(); - item.find(".sf_all_items_label").show(); - item.find(".sf_accessibility_label").hide(); - } - else if(input_type=="multiselect") - { - item.find(".sf_operator").show(); - item.find(".sf_drill_down").hide(); - item.find(".sf_all_items_label").hide(); - item.find(".sf_make_combobox").show(); - item.find(".sf_combobox_message").show(); - item.find(".sf_accessibility_label").show(); - - if(item.find(".sf_make_combobox input").prop("checked")) - { - item.find(".sf_all_items_label").show(); - } - - if(item.find(".sf_make_combobox input").prop("checked")) { - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else{ - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - - } - else if(input_type=="date") - { - item.find(".sf_date_end_meta_key").hide(); - - } - else if(input_type=="daterange") - { - item.find(".sf_date_end_meta_key").show(); - } - - } - function showHideFieldsAuthor(input_type) - { - if(input_type=="select") - { - //item.find(".sf_operator").hide(); - item.find(".sf_all_items_label").show(); - item.find(".sf_make_combobox").show(); - item.find(".sf_combobox_message").show(); - item.find(".sf_accessibility_label").show(); - - if(item.find(".sf_make_combobox input").prop("checked")) { - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else{ - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - } - else if(input_type=="checkbox") - { - //item.find(".sf_operator").show(); - item.find(".sf_all_items_label").hide(); - item.find(".sf_make_combobox").hide(); - item.find(".sf_combobox_message").hide(); - item.find(".sf_accessibility_label").hide(); - } - else if(input_type=="radio") - { - //item.find(".sf_operator").hide(); - item.find(".sf_all_items_label").show(); - item.find(".sf_make_combobox").hide(); - item.find(".sf_combobox_message").hide(); - item.find(".sf_accessibility_label").hide(); - } - else if(input_type=="multiselect") - { - //item.find(".sf_operator").show(); - item.find(".sf_all_items_label").hide(); - item.find(".sf_make_combobox").show(); - item.find(".sf_combobox_message").show(); - item.find(".sf_accessibility_label").show(); - - if(item.find(".sf_make_combobox input").prop("checked")) - { - item.find(".sf_all_items_label").show(); - } - - if(item.find(".sf_make_combobox input").prop("checked")) { - item.find(".sf_combobox_message input").prop("disabled", false); - item.find(".sf_combobox_message").css("opacity", 1); - } - else{ - item.find(".sf_combobox_message input").prop("disabled", true); - item.find(".sf_combobox_message").css("opacity", 0.7); - } - } - - } - }) - - return this; - }; - - jQuery.fn.makeSortables = function(options) - { - /* - //initialise options - var opts = jQuery.extend(defaults, options); - */ - - setWidgetFormIds(); - - //loop through each item matched - this.each(function() - { - - var container = $(this); - var allowExpand = true; - - var allowExpand = container.attr("data-allow-expand"); - if(typeof(allowExpand)=="undefined") - {//init data-dragging if its not on already - container.attr("data-allow-expand", "1"); - allowExpand = "1"; - } - //var $emptyPlaceholder = $(this).find("#empty-placeholder"); - var received = false; - - container.sortable({ - opacity: 0.6, - //revert: container.hasClass("closed") ? false : 200, - revert: false, - cursor: 'move', - handle: '.widget-top', - cancel: '.widget-title-action,h3,.sidebar-description', - items: '.inside #search-form > .widget:not(.sidebar-name,.sidebar-disabled)', - placeholder: 'widget-placeholder', - connectWith: '.ui-search-filter-sortable', - stop: function(e,ui){ - - setWidgetFormIds(); - - ui.item.attr("data-dragging", "0"); - var field_type = ui.item.attr("data-field-type"); - - //check to see if the context (the source item) has the class "widget enabled", if it doesn't then it was from the available fields list, if it doesn't then we were moving the item already in the Search Form - if(!$(ui.item.context).hasClass("widget-enabled")) - { - //if we are moving the item from teh Available fields, automatically slide open - ui.item.find('.widget-inside').slideDown("fast"); - } - - - if(field_type=="post_meta") - { - /* set up meta type radios */ - var $meta_type_radio = ui.item.find('.sf_meta_type input[type="radio"]'); - var $meta_type_labels = ui.item.find('.sf_meta_type label'); - var $checked_radio = ui.item.find('.sf_meta_type input[data-radio-checked="1"]'); - - $meta_type_radio.each(function(){ - this.checked = false; - $(this).attr("data-radio-checked", 0); - }); - - - if($checked_radio.length==0) - { - $checked_radio = ui.item.find(".sf_meta_type label:first-child input"); - $checked_radio.prop('checked',true); - } - - $checked_radio.attr("data-radio-checked", 1); - $checked_radio.prop('checked',true); - var meta_type_val = $checked_radio.val(); - - metaTypeChange($checked_radio); - - $meta_type_radio.on( 'change', function() - { - $meta_type_radio.attr("data-radio-checked", 0); - $(this).attr("data-radio-checked", 1); - metaTypeChange($(this)); - - }); - - - } - - - - var $date_format_hidden = ui.item.find('.date_format_hidden'); - if($date_format_hidden.length==1) - { - var selected_radio = $date_format_hidden.val(); - //find any radios - var $date_radio_inputs = ui.item.find("input.date_format_radio"); - if($date_radio_inputs.length>0) - { - //make sure default is selected - if($($date_radio_inputs.get(selected_radio)).length>0) - { - $($date_radio_inputs.get(selected_radio)).prop('checked', true); - } - } - } - - - }, - over: function(){ - - //$emptyPlaceholder.hide(); - - }, - out: function(){ - if(!received) - { - //$emptyPlaceholder.show(); - } - }, - start: function(e,ui){ - ui.item.attr("data-dragging", "1"); - ui.item.find('.widget-inside').stop(true,true).hide(); - //if(!ui.placeholder.parent().hasClass("inside")) - //{//if it is getting appended to the wrong place, then force it in to the right container :) - ui.placeholder.appendTo(ui.placeholder.parent().find(".inside #search-form")); - - }, - receive: function(ev, ui) - { - received = true; - //$emptyPlaceholder.hide(); - - }, - change: function(e,ui){ - - } - - }); - - container.on( 'click', function() - {//prevent animation when the container is closed - no need to animate the helper to an invisible DIV..... - /*if(container.hasClass("closed")) - { - - container.sortable( "option", "revert", false ); - } - else - { - container.sortable( "option", "revert", 200 ); - }*/ - }); - - - var items = container.find(".widget"); - items.makeWidget(); - - }); - - return this; - }; - - $("#search-filter-search-form").makeSortables(); - - - $(".widgets-search-filter-draggables .widget").draggable({ - connectToSortable: ".ui-search-filter-sortable", - helper: 'clone', - start: startDrag, - stop: enableNewWidgets - }); - - function startDrag(event, ui) - { - //@TODO: add and remove hover effect class - $("#search-filter-search-form").addClass("post-box-hover"); - /*$("#search-filter-search-form").css("border", "1px solid #f00"); - $("#search-filter-search-form").css("width", "100%"); - $("#search-filter-search-form").css("height", "auto");*/ - } - - - function enableNewWidgets(event, ui) - { - //@TODO: add and remove hover effect class - $("#search-filter-search-form").removeClass("post-box-hover"); - - var $droppedWidget = $('.widgets-search-filter-sortables .widget:not(.widget-enabled)'); - $droppedWidget.makeWidget(); - $droppedWidget.css("width", ""); - $droppedWidget.css("height", ""); - - - } - - function setWidgetFormIds() - { - var widgetCount = 0; - - var $active_widgets = $("#search-filter-search-form").find(".widget"); - - /*var $widgets_radio = $active_widgets.find('input[type="radio"]'); - $widgets_radio.each(function(){ - - $(this).attr("data-radio-val", $(this).prop("checked")); - - });*/ - - $active_widgets.each(function() - { - - - setFormVars($(this), widgetCount); - - //if type is sort_order then loop through the option - if($(this).attr("data-field-type")=="sort_order") - { - - var optionsCount = 0; - var $sort_options_list = $(this).find(".sort_options_list"); - $sort_options_list.find("li:not(.sort-option-template)").each(function() - { - - setOptionVars($(this), widgetCount, optionsCount); - optionsCount++; - - }); - } - - if($(this).attr("data-field-type")=="post_meta") - { - - var optionsCount = 0; - var $meta_options_list = $(this).find(".meta_options_list"); - $meta_options_list.find("li:not(.meta-option-template)").each(function() - { - - setOptionVars($(this), widgetCount, optionsCount); - optionsCount++; - - }); - } - - widgetCount++; - }); - - var $widgets_radio = $active_widgets.find('input[type="radio"]'); - - $widgets_radio.each(function() - { - if($(this).attr("data-radio-checked")==1) - { - $(this).prop("checked", true); - - - - } - - }); - - } - - function setFormVars($droppedWidget, widgetId) - { - $droppedWidget.attr("data-widget-id", widgetId); - var $inputFields = $droppedWidget.find("input, select").not(".ignore-template-init input, .ignore-template-init select"); - var $inputLabels = $droppedWidget.find("label").not(".ignore-template-init label"); - - $inputFields.each(function() - { - //copy structure - if(!$(this).hasAttr("data-field-template-id")) - { - $(this).attr("data-field-template-id", $(this).attr("id")) - } - - if(!$(this).hasAttr("data-field-template-name")) - { - $(this).attr("data-field-template-name", $(this).attr("name")) - } - - //rename - if ( $(this).attr("data-field-template-id") ) { - $(this).attr("id",$(this).attr("data-field-template-id").parse("widget-field", widgetId)); - } - if ( $(this).attr("data-field-template-name") ) { - $(this).attr("name",$(this).attr("data-field-template-name").parse("widget-field", widgetId)); - } - - - }); - - $inputLabels.each(function() - { - //copy structure - if(!$(this).hasAttr("data-field-template-for")) - { - $(this).attr("data-field-template-for", $(this).attr("for")) - } - - $(this).attr("for",$(this).attr("data-field-template-for").parse("widget-field", widgetId)); - - }); - } - function setOptionVars($sortOption, widgetId, optionId) - { - var $inputFields = $sortOption.find("input, select"); - var $inputLabels = $sortOption.find("label"); - - $inputFields.each(function() - { - //copy structure - if(!$(this).hasAttr("data-field-template-id")) - { - $(this).attr("data-field-template-id", $(this).attr("id")) - } - - if(!$(this).hasAttr("data-field-template-name")) - { - $(this).attr("data-field-template-name", $(this).attr("name")) - } - - //rename - if ( $(this).attr("data-field-template-id") ) { - $(this).attr("id",$(this).attr("data-field-template-id").parse("widget-field", widgetId, optionId)); - } - if ( $(this).attr("data-field-template-name") ) { - $(this).attr("name",$(this).attr("data-field-template-name").parse("widget-field", widgetId, optionId)); - } - }); - - $inputLabels.each(function() - { - //copy structure - if(!$(this).hasAttr("data-field-template-for")) - { - $(this).attr("data-field-template-for", $(this).attr("for")) - } - - $(this).attr("for",$(this).attr("data-field-template-for").parse("widget-field", widgetId, optionId)); - - }); - } - - function initMetaOptionControls($meta_option, $meta_options_list, $no_sort_label) - { - $meta_option.find(".widget-control-option-remove").on( 'click', function(){ - - $meta_option.slideUp("fast",function(){ - $meta_option.remove(); - - if($meta_options_list.find("li:not(.meta-option-template)").length==0) - { - $no_sort_label.show(); - } - }); - - return false; - - }); - - $meta_option.find(".widget-control-option-advanced").on( 'click', function(){ - - $(this).toggleClass("active"); - $meta_option.find('.meta-options-advanced').slideToggle("fast"); - return false; - - }); - } - - function metaTypeChange($radio_field) - { - - var $meta_type_labels = $radio_field.parent().parent().find("label"); - var item = $radio_field.closest(".widget"); - - $meta_type_labels.removeClass("active"); - var $meta_type_label = $radio_field.closest("label"); - $meta_type_label.addClass("active"); - - var radio_val = $radio_field.val(); - - item.find('.sf_input_type_meta input[data-radio-checked="1"]').prop('checked',true); - - item.find(".sf_input_type_meta").hide(); - item.find(".sf_field_data").hide(); - - item.find(".sf_input_type_meta.sf_"+radio_val).show(); - item.find(".sf_field_data.sf_"+radio_val).show(); - } - - function initSetupField() - { - var $enable_auto_count = $(".setup .sf_tab_content_settings .enable_auto_count"); - - - /* display results - shortcode/archive */ - var $results_toggle = $(".setup .display_results_as"); - var $template_table = $('.setup .sf_tab_content_template .template_options_table'); - var $template_ajax_table = $('.setup .sf_tab_content_template .template_ajax_table'); - var $template_pagination_table = $('.setup .sf_tab_content_template .template_pagination_table'); - var $template_infinite_scroll_options = $('.setup .sf_tab_content_template .tpl_pagination_scroll_rows'); - var $template_sect = $('.setup .sf_tab_content_template .template_options_sect'); - var $display_result_txt_cont = $('.setup .sf_tab_content_template .display_result_txt_cont'); - var $tpl_archive_rows = $('.setup .sf_tab_content_template .tpl_archive_rows'); - var $tpl_post_type_archive_rows = $('.setup .sf_tab_content_template .tpl_post_type_archive_rows'); - var $tpl_woocommerce_rows = $('.setup .sf_tab_content_template .tpl_custom_woocommerce_rows'); - var $tpl_custom_rows = $('.setup .sf_tab_content_template .tpl_custom_rows'); - var $tpl_woo_tax_label = $('.setup .sf_tab_content_template .taxonomy_archive_woocommerce_label'); - - var $use_ajax_toggle = $('.setup .sf_tab_content_template .use_ajax_toggle'); - var $selectors_results_div = $('#shortcode-info .results-shortcode'); - var $selectors_edd_div = $('#shortcode-info .edd-shortcode'); - - var $active_results_display = $(".setup .display_results_as"); - - //var $alabels = $active_results_display.parent().parent().parent().find("label"); - //$alabels.removeClass("active"); - //$active_results_display.parent().addClass("active"); - - $display_result_txt_cont.find(".display_result_txt").hide(); - $display_result_txt_cont.find("#display_result_"+$active_results_display.attr("data-sf-base")+"_txt").show(); - - - - display_result_as_toggle($results_toggle); - /* ajax toggle */ - $results_toggle.on("change", function(){ - display_result_as_toggle($(this)); - }); - - function display_result_as_toggle($this){ - - var $self = $this; - var val = $self.find('option[value="'+$self.val()+'"]').attr("data-sf-base"); - var real_display_method = $active_results_display.val(); - - if ( ( real_display_method !== 'custom_dce_posts' ) && ( real_display_method !== 'custom_dce_google_maps' ) && ( real_display_method !== 'custom_dce_google_maps_posts' ) ) { - $template_pagination_table.show(); - - } else { - $template_pagination_table.hide(); - } - - - if ( real_display_method !== 'elementor_loop_widget' ) { - $template_infinite_scroll_options.show(); - - } else { - $template_infinite_scroll_options.hide(); - } - - - var $labels = $self.parent().parent().parent().find("label"); - $labels.removeClass("active"); - $self.parent().addClass("active"); - - $display_result_txt_cont.find(".display_result_txt").hide(); - $display_result_txt_cont.find("#display_result_"+$active_results_display.val()+"_txt").show(); - //$template_table.removeClass("tpl_custom_woocommerce_rows"); - $tpl_woo_tax_label.hide(); - - - if(val=="shortcode") - { - $template_table.removeClass("template_archive_options"); - $template_table.removeClass("template_post_type_archive_options"); - $template_table.removeClass("template_custom_woocommerce_options"); - $template_table.addClass("template_shortcode_options"); - - // $template_ajax_table.removeClass("template_hide_ajax_selectors"); - // $template_pagination_table.removeClass("template_hide_ajax_selectors"); - - $tpl_custom_rows.hide(); - - if($self.val()=="shortcode") { - $selectors_results_div.show(); - } - else { - $selectors_results_div.hide(); - } - - - $selectors_edd_div.hide(); - $template_sect.show(); - $tpl_archive_rows.hide(); - $tpl_post_type_archive_rows.hide(); - $tpl_woocommerce_rows.hide(); - } - else if(val=="archive") - { - $template_table.removeClass("template_shortcode_options"); - $template_table.removeClass("template_post_type_archive_options"); - $template_table.removeClass("template_custom_woocommerce_options"); - $template_table.addClass("template_archive_options"); - - //$template_ajax_table.removeClass("template_hide_ajax_selectors"); - //$template_pagination_table.removeClass("template_hide_ajax_selectors"); - - $tpl_custom_rows.hide(); - $selectors_results_div.hide(); - $selectors_edd_div.hide(); - $template_sect.show(); - - $tpl_post_type_archive_rows.hide(); - $tpl_woocommerce_rows.hide(); - - $tpl_archive_rows.show(); - } - else if((val=="post_type_archive")||(val=="custom_woocommerce_store")) - { - $template_table.removeClass("template_shortcode_options"); - $template_table.removeClass("template_custom_woocommerce_options"); - $template_table.removeClass("template_archive_options"); - $template_table.addClass("template_post_type_archive_options"); - - - //$template_ajax_table.removeClass("template_hide_ajax_selectors"); - //$template_pagination_table.removeClass("template_hide_ajax_selectors"); - - $tpl_custom_rows.hide(); - $selectors_results_div.hide(); - $selectors_edd_div.hide(); - $template_sect.show(); - - $tpl_archive_rows.hide(); - $tpl_woocommerce_rows.hide(); - $tpl_post_type_archive_rows.show(); - - if(val=="custom_woocommerce_store") - { - $tpl_woo_tax_label.show(); - $tpl_woocommerce_rows.show(); - /*$template_table.addClass("template_custom_woocommerce_options"); - .addClass("template_custom_woocommerce_options");*/ - } - } - else if(val=="custom") - { - $template_table.removeClass("template_archive_options"); - $template_table.removeClass("template_post_type_archive_options"); - $template_table.removeClass("template_custom_woocommerce_options");; - $template_table.addClass("template_shortcode_options"); - - - //$template_ajax_table.removeClass("template_hide_ajax_selectors"); - //$template_pagination_table.removeClass("template_hide_ajax_selectors"); - - $selectors_results_div.hide(); - $template_sect.show(); - $selectors_edd_div.hide(); - $tpl_archive_rows.hide(); - $tpl_woocommerce_rows.hide(); - $tpl_post_type_archive_rows.hide(); - $tpl_custom_rows.show(); - } - else - { - $template_table.removeClass("template_shortcode_options"); - $template_table.removeClass("template_post_type_archive_options"); - $template_table.removeClass("template_custom_woocommerce_options"); - $template_table.addClass("template_archive_options"); - - //$template_ajax_table.addClass("template_hide_ajax_selectors"); - //$template_pagination_table.addClass("template_hide_ajax_selectors"); - - $tpl_custom_rows.hide(); - $selectors_results_div.hide(); - $selectors_edd_div.hide(); - $template_sect.hide(); - $tpl_archive_rows.show(); - $tpl_post_type_archive_rows.hide(); - - if(val=="custom_edd_store") - { - $template_table.removeClass("template_archive_options"); - $template_table.addClass("template_shortcode_options"); - $tpl_archive_rows.hide(); - $tpl_custom_rows.show(); - $selectors_edd_div.show(); - $template_sect.show(); - } - } - - var built_in_display_methods = ['archive', 'post_type_archive', 'shotrcode', 'custom_woocommerce_store', 'custom_edd_store', 'custom' ]; - - - - if(built_in_display_methods.indexOf(real_display_method) == -1) - {//then its another display method, a third party integration, which means we set ajax selectors - $template_ajax_table.addClass("template_hide_ajax_selectors"); - $template_pagination_table.addClass("template_hide_ajax_selectors"); - } - else{ - $template_ajax_table.removeClass("template_hide_ajax_selectors"); - $template_pagination_table.removeClass("template_hide_ajax_selectors"); - - } - - - - } - - var $scroll_to_pos = $(".setup .scroll_to_pos"); - - ajaxToggle($use_ajax_toggle); - $use_ajax_toggle.on("change",function(){ - ajaxToggle($(this)); - updateScrollToPos($scroll_to_pos); - }); - - autoCountToggle($enable_auto_count); - $enable_auto_count.on("change",function(){ - autoCountToggle($(this)); - updateScrollToPos($scroll_to_pos); - }); - - /* scroll to pos */ - - updateScrollToPos($scroll_to_pos); - $scroll_to_pos.on("change", function(e){ - updateScrollToPos($(this)); - - }); - //end scroll_to_pos - - - /* pagination type */ - var $pagination_type = $(".setup .pagination_type"); - updatePaginationType($pagination_type); - $pagination_type.on("change", function(e){ - updatePaginationType($(this)); - - }); - //end scroll_to_pos - - /* sort by */ - var $default_sort_by = $('.setup .default_sort_by'); - var $sort_by_meta_container_default = $('.setup .sort_by_meta_container_default'); - $default_sort_by.on( 'change', function(e) - { - handleDefaultSortBy($(this), $sort_by_meta_container_default); - }); - - handleDefaultSortBy($default_sort_by, $sort_by_meta_container_default); - - - var $secondary_sort_by = $('.setup .secondary_sort_by'); - var $sort_by_meta_container_secondary = $('.setup .sort_by_meta_container_secondary'); - $secondary_sort_by.on( 'change', function(e) - { - handleDefaultSortBy($(this), $sort_by_meta_container_secondary); - }); - - handleDefaultSortBy($secondary_sort_by, $sort_by_meta_container_secondary); - - - } - function updatePaginationType($paginationType) - { - if($paginationType.prop("disabled")==false) - { - var pagination_type = $paginationType.val(); - var $pagination_table = $('#search-filter-settings-box .template_pagination_table'); - - $pagination_table.attr("data-sf-pagination-type", pagination_type); - } - - - } - - function updateScrollToPos($scrollToObject) - { - if($scrollToObject.prop("disabled")==false) - { - var $custom_scroll_to = $(".setup .custom_scroll_to"); - var $scroll_on_action = $(".setup .scroll_on_action"); - - if($scrollToObject.val()=="custom") - { - $custom_scroll_to.show(); - } - else - { - $custom_scroll_to.hide(); - } - - - if($scrollToObject.val()=="0") - { - disableInput($scroll_on_action); - } - else - { - enableInput($scroll_on_action); - } - } - - - } - function autoCountToggle($self) - { - var $inputs = $self.closest("tr").find(".auto_count_refresh_mode"); - - if($self.is(":checked")) - { - //enable all fields - $inputs.each(function(){ - - var $input = $(this); - enableInput($input); - - }); - } - else - { - //disable all fields - $inputs.each(function(){ - - var $input = $(this); - disableInput($input); - }); - - } - - } - function ajaxToggle($self) - { - var $inputs = $(".tpl_use_ajax_rows input, .tpl_use_ajax_rows select"); - - if($self.is(":checked")) - { - //enable all fields - $inputs.each(function(){ - - var $input = $(this); - enableInput($input); - - }); - } - else - { - //disable all fields - $inputs.each(function(){ - - var $input = $(this); - disableInput($input); - }); - - } - - } - function disableInput($input) - { - //create a hidden version of the field, that is not disabled - so we can retain even disabled values in the DB - var $inputClone = $('', { - 'type' : 'hidden', - 'name' : $input.attr("name"), - 'class' : 'clone', - 'data-field-template-id' : $input.attr("data-field-template-id"), - 'data-field-template-name' : $input.attr("data-field-template-name"), - 'value' : '' - }); - - if($input.get(0).tagName=="INPUT") - { - if(($input.attr("type")=="checkbox")||($input.attr("type")=="radio")) - { - $inputClone.val($input.prop("checked") ? 1 : ""); - } - else if($input.attr("type")=="text") - { - $inputClone.val($input.val()); - } - else - { - $inputClone.val($input.val()); - } - } - else if($input.get(0).tagName=="SELECT") - { - $inputClone.val($input.val()); - } - else - { - $inputClone.val($input.val()); - } - - $input.after($inputClone); - $input.prop("disabled",true); - } - - function enableInput($input) - { - $input.prop("disabled", false); - - var $inputClone = $input.parent().find(".clone"); - - if($inputClone.length>0) - { - if($input.get(0).tagName=="INPUT") - { - if(($input.attr("type")=="checkbox")||($input.attr("type")=="radio")) - { - if($inputClone.val()==1) - { - $input.prop("checked", true); - } - else - { - $input.prop("checked", false); - } - } - else if($input.attr("type")=="text") - { - $input.val($inputClone.val()); - } - else - { - $input.val($inputClone.val()); - } - } - else if($input.get(0).tagName=="SELECT") - { - $input.val($inputClone.val()); - } - - $inputClone.remove(); - } - } - - function handleDefaultSortBy($this, $sort_by_meta_container) - { - if($this.val()=="meta_value") - { - $sort_by_meta_container.show(); - } - else - { - $sort_by_meta_container.hide(); - } - - - } - - - initSetupField(); - - - - function setMetaSettingsFields($list) - { - var itemId = 0; - $list.each(function(){ - - if($(this).attr("data-remove")!=1) - { - - var $self = $(this); - var $inputFields = $self.find("input, select"); - var $inputLabels = $self.find("label"); - - - $inputFields.each(function() - { - //copy structure - if(!$(this).hasAttr("data-field-template-id")) - { - $(this).attr("data-field-template-id", $(this).attr("id")) - } - - if(!$(this).hasAttr("data-field-template-name")) - { - $(this).attr("data-field-template-name", $(this).attr("name")) - } - - //rename - if ( $(this).attr("data-field-template-id") ) { - $(this).attr("id",$(this).attr("data-field-template-id").parse(itemId)); - } - if ( $(this).attr("data-field-template-name") ) { - $(this).attr("name",$(this).attr("data-field-template-name").parse(itemId)); - } - }); - - $inputLabels.each(function() - { - //copy structure - if(!$(this).hasAttr("data-field-template-for")) - { - $(this).attr("data-field-template-for", $(this).attr("for")) - } - - $(this).attr("for",$(this).attr("data-field-template-for").parse(itemId)); - - - }); - - itemId++; - } - }); - } - function removeMetaOption(e){ - - e.preventDefault(); - - $(this).closest("li").attr("data-remove","1"); - $(this).closest("li").slideUp("fast", function(){ - $(this).remove(); - }); - - setMetaSettingsFields($("#search-filter-settings-box .sf_tab_content_post_meta ul.meta_list li:not(.template)")); - - return false; - } - function initSettingsMetabox() - { - /* init meta type radios */ - /* set up meta type radios */ - var $settings_tab_radio = $('#search-filter-settings-box .sf_settings_tabs input[type="radio"]'); - var $settings_tab_label = $('#search-filter-settings-box .sf_settings_tabs label'); - var $checked_radio = $('#search-filter-settings-box .sf_settings_tabs input[data-radio-checked="1"]'); - - $settings_tab_radio.each(function(){ - this.checked = false; - $(this).attr("data-radio-checked", 0); - }); - - - $settings_tab_radio.on( 'change', function() - { - $settings_tab_radio.attr("data-radio-checked", 0); - $(this).attr("data-radio-checked", 1); - tabChange($(this)); - - }); - - - var $meta_list = $("#search-filter-settings-box .sf_tab_content_post_meta ul.meta_list"); - var $meta_list_template = $meta_list.find(".template"); - var $add_condition_button = $("#search-filter-settings-box .sf_tab_content_post_meta .add-option-button"); - - $meta_list.find(".option-remove").on( 'click', removeMetaOption); - - $meta_list.find(".meta_date_value_current_date").each(function(){ - metaSettingsCurrentDateChange($(this)); - }); - $meta_list.find(".meta_date_value_current_date").on("change", function(){ - metaSettingsCurrentDateChange($(this)); - }); - - $meta_list.find(".meta_date_value_current_timestamp").each(function(){ - metaSettingsCurrentTimestampChange($(this)); - }); - $meta_list.find(".meta_date_value_current_timestamp").on("change", function(){ - metaSettingsCurrentTimestampChange($(this)); - }); - - $meta_list.find(".meta_type").on("change", function(){ - metaSettingsFieldTypeChange($(this)); - }); - $meta_list.find(".meta_type").each(function(){ - metaSettingsFieldTypeChange($(this)); - }); - - setMetaSettingsFields($("#search-filter-settings-box .sf_tab_content_post_meta ul.meta_list li:not(.template)")); - - $add_condition_button.on( 'click', function(){ - - - var $meta_option = $meta_list_template.clone(); - $meta_option.hide(); - $meta_option.removeClass("template"); - - $meta_list.append($meta_option); - - $meta_option.find(".option-remove").on( 'click', removeMetaOption); - - $meta_option.find(".meta_type").on("change", function(){ - metaSettingsFieldTypeChange($(this)); - }); - - $meta_option.find(".meta_date_value_current_date").on("change", function(){ - metaSettingsCurrentDateChange($(this)); - }); - - $meta_option.find(".meta_date_value_current_timestamp").on("change", function(){ - metaSettingsCurrentTimestampChange($(this)); - }); - - setMetaSettingsFields($("#search-filter-settings-box .sf_tab_content_post_meta ul.meta_list li:not(.template)")); - - $meta_option.slideDown("fast"); - - return false; - - }); - } - function metaSettingsCurrentDateChange($field){ - - var $datefields = $field.parent().parent().find('input[type="text"]'); - - if($field.is(":checked")) - { - $datefields.each(function(){ - - var $input = $(this); - disableInput($input); - }); - } - else - { - $datefields.each(function(){ - - var $input = $(this); - enableInput($input); - }); - - } - - } - function metaSettingsCurrentTimestampChange($field){ - - var $datefields = $field.parent().parent().find('input[type="text"]'); - - if($field.is(":checked")) - { - $datefields.each(function(){ - - var $input = $(this); - disableInput($input); - }); - } - else - { - $datefields.each(function(){ - - var $input = $(this); - enableInput($input); - }); - - } - - } - function metaSettingsFieldTypeChange($field) - { - var val = $field.val(); - var $meta_value_c = $field.parent().parent().parent().find(".meta_value_c"); - var $meta_value_date_c = $field.parent().parent().parent().find(".meta_value_date_c"); - var $meta_value_timestamp_c = $field.parent().parent().parent().find(".meta_value_timestamp_c"); - var $meta_compare_field = $field.parent().parent().parent().find(".meta_compare"); - - - if(val=="DATE") - { - $meta_value_c.hide(); - $meta_value_timestamp_c.hide(); - $meta_value_date_c.show(); - $meta_compare_field.find("option:not(.date-format-supported)").hide(); - - var meta_compare_val = $meta_compare_field.val(); - var $meta_compare_option = $meta_compare_field.find(":selected"); - if(!$meta_compare_option.hasClass('date-format-supported')) - { - $meta_compare_field.val("e"); - } - } - else if(val=="TIMESTAMP") - { - $meta_value_c.hide(); - $meta_value_date_c.hide(); - $meta_value_timestamp_c.show(); - $meta_compare_field.find("option:not(.date-format-supported)").hide(); - - var meta_compare_val = $meta_compare_field.val(); - var $meta_compare_option = $meta_compare_field.find(":selected"); - if(!$meta_compare_option.hasClass('date-format-supported')) - { - $meta_compare_field.val("e"); - } - } - else - { - if(($meta_value_date_c.is(":visible"))||($meta_value_timestamp_c.is(":visible"))) - { - $meta_value_c.show(); - //$meta_compare_field.val("e"); - $meta_value_date_c.hide(); - $meta_value_timestamp_c.hide(); - $meta_compare_field.find("option").show(); - } - } - } - - - function tabChange($radio_field) - { - - var $tab_labels = $radio_field.parent().parent().find("label"); - var item = $radio_field.closest(".tabs-container"); - - $tab_labels.removeClass("active"); - var $meta_type_label = $radio_field.closest("label"); - $meta_type_label.addClass("active"); - - var radio_val = $radio_field.val(); - - item.find(".sf_field_data").hide(); - - item.find(".sf_field_data.sf_tab_content_"+radio_val).show(); - } - initSettingsMetabox(); - - - - }); - - - -}(jQuery)); \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin.js b/wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin.js deleted file mode 100644 index 868254ba..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/assets/js/admin.js +++ /dev/null @@ -1,366 +0,0 @@ -(function ( $ ) { - "use strict"; - - $(function () { - - /* - * UTIL - */ - function log_info(container, text) - { - var $output = {}; - - if(container=="cache") { - $output = $continue_cache_manual_output; - } - $output.append(text + "\n"); - - $output.scrollTop($output.prop('scrollHeight')); - } - - function clear_log(container) - { - var $output = {}; - - if(container=="cache") { - $output = $continue_cache_manual_output; - } - - $output.empty(); - - - } - - var meta_prefs_action_name = "meta_prefs_set"; - - // Place your administration-specific JavaScript here - var $metabox_prefs = $('#screen-meta #screen-options-wrap .metabox-prefs.view-mode'); - var $screen_options_link = $('#screen-options-link-wrap'); - var $screen_options_wrap = $('#screen-options-wrap'); - - //then metabox not found - if($metabox_prefs.length==0) - { - $metabox_prefs = $('#screen-meta #screen-options-wrap h5').after('

    '); - } - - $metabox_prefs.find("legend").after(''); - - //initialise checked state by seeing if the target has hidden class - $metabox_prefs.find('.handle-custom-prefs input[type="checkbox"]').each(function() - { - var $this = $(this); - var hide_element = $(this).attr('data-target'); - - if(!$(hide_element).hasClass("hidden")) - { - $this.prop("checked", true); - } - - }); - - // - $metabox_prefs.find('.handle-custom-prefs input[type="checkbox"]').off("change"); //remove existing handlers - $metabox_prefs.find('.handle-custom-prefs input[type="checkbox"]').on( 'change', function() - { - var hide_element = $(this).attr('data-target'); - var show_option_value = 0; - - if(this.checked) { - $(hide_element).removeClass("hidden"); - show_option_value = 1; - } - else - { - $(hide_element).addClass("hidden"); - } - - //run ajax to set option - $.post( ajaxurl, {show: show_option_value, action: meta_prefs_action_name});/*.done(function(data) - {//don't do anything - - if(data) - { - - } - });*/ - - }); - - $(".handle-dismiss-button").on( 'click', function() - { - var hide_element = $(this).attr('data-target'); - var show_option_value = 0; - - //hide element - $(hide_element).addClass("hidden"); - - //uncheck checkbox - $metabox_prefs.find('.handle-custom-prefs input[type="checkbox"][data-target="'+hide_element+'"]').prop("checked", false); - - //add user feedback that the element has been hidden and can be shown again by adding flicker effect to the screen options button - //$screen_options_link.css('background-color', '#f00'); - /*if($screen_options_wrap.css("display")=="none") - {//don't run if the screen options are open - - $screen_options_link.delay(200).queue(function(next){ - $(this).addClass('highlight'); - next(); - }).delay(600).queue(function(next){ - $(this).removeClass('highlight'); - next(); - }); - }*/ - - //run ajax to set option - $.post( ajaxurl, {show: "0", action: meta_prefs_action_name}); - }); - - - var $cache_view = {}; - - var $cache_views = $('#search-filter-cache .cache-metabox'); - $cache_view['disabled'] = $('#search-filter-cache .status-disabled'); - $cache_view['inprogress'] = $('#search-filter-cache .status-inprogress'); - $cache_view['error'] = $('#search-filter-cache .status-error'); - $cache_view['ready'] = $('#search-filter-cache .status-ready'); - $cache_view['finished'] = $('#search-filter-cache .status-finished') - $cache_view['restart'] = $('#search-filter-cache .status-restart') - $cache_view['termcache'] = $('#search-filter-cache .status-termcache') - - var last_cache_update_request = null; - var has_restart_submit = false; - var $rc_spinner = $("#search-filter-cache .rebuild-cache-spinner"); - var $rc_button = $("#search-filter-cache .button.rebuild-cache"); - var has_rc_error = false; - - /* check progress of caching */ - setInterval( function() { - - get_cache_progress(); - - }, 15000); - - function get_cache_progress() - { - if(has_restart_submit==false) - { - var sfid = $(this).data("sfid"); - var cache_action = "cache_progress"; - - if(last_cache_update_request) - { - last_cache_update_request.abort(); - } - - last_cache_update_request = $.post( ajaxurl, {action: cache_action}, function(){}, 'json').done(function(data) - {//don't do anything - - handleAjaxUpdate(data); - }); - } - } - get_cache_progress(); - - function handleAjaxUpdate(data) - { - last_cache_update_request = null; - - $rc_spinner.css("visibility", "hidden"); - $rc_button.removeClass("disabled"); - if(data) - { - if(data.status!="") - { - $cache_views.hide(); - - $('#cache-info .notice-rc-error').hide(); - $('#cache-info .cache-metabox .notice-please-wait').hide(); - - if((data.restart==true)&&(data.status!="ready")) - { - $cache_view["restart"].show(); - $('#cache-info .notice-rc-error').hide(); - $('#cache-info .cache-metabox .notice-please-wait').show(); - } - else - { - $cache_view[data.status].show(); - - if(data.status == "inprogress") - { - if(typeof(data.progress_percent)!="undefined") - { - - $('#cache-info .cache-metabox .progress-percent').html(data.progress_percent); - $('#cache-info .cache-metabox .progress-current').html(data.current_post_index); - $('#cache-info .cache-metabox .progress-total').html(data.total_post_index); - - $('#cache-info .cache-metabox .media-progress-bar div').css("width", data.progress_percent+"%"); - } - else - { - - } - } - if(data.error_count==0) - { - $('#cache-info .cache-metabox .notice-stalled').hide(); - $('#cache-info .cache-metabox .notice-building').show(); - } - else - { - $('#cache-info .cache-metabox .notice-stalled').show(); - $('#cache-info .cache-metabox .notice-building').hide(); - } - } - - if(data.rc_status!="connect_success") - {//then this install can't initiate a remote connection - has_rc_error = true; - - if(((data.status == "inprogress")||(data.status == "termcache"))&& (!data.restart)) - { - $('#cache-info .notice-rc-error').show(); - } - else if((data.restart==true)&&(data.status!="ready")) - { - $('#cache-info .cache-metabox .notice-please-wait').show(); - } - } - else - { - has_rc_error = false; - } - } - - } - } - - function initCacheButton() - { - - $rc_button.on("click", function(){ - - if($(this).hasClass("disabled")) - { - return false; - } - - var sfid = $(this).data("sfid"); - var cache_action = "cache_restart"; - - - if(last_cache_update_request) - { - last_cache_update_request.abort(); - } - - has_restart_submit = true; - - $rc_spinner.css("visibility", "visible"); - $(this).addClass("disabled"); - - last_cache_update_request = $.post( ajaxurl, {action: cache_action}, function(){}, 'json').done(function(data) - {//don't do anything - has_restart_submit = false; - handleAjaxUpdate(data); - - }); - }); - } - initCacheButton(); - - - /* - S&F Admin Cache Page - */ - - var $cache_page = $('body.search-filter_page_search-filter-cache'); - if($cache_page.length>0) - { - var $method_value = $cache_page.find('#search-filter-cache-method-value'); - var method_value = $method_value.text(); - var $switch_method_button = $cache_page.find('#search-filter-cache-method-switch'); - var $continue_cache_button = $cache_page.find('#search-filter-cache-manual-continue'); - var $restart_cache_button = $cache_page.find('#search-filter-cache-manual-restart'); - var $continue_cache_manual_output = $cache_page.find('#search-filter-cache-manual-output'); - $switch_method_button.on("click",function(){ - - var method_value = $method_value.text(); - var set_method = ""; - if(method_value=="automatic") - { - set_method = "manual"; - } - else - { - set_method = "automatic"; - } - - $.get(ajaxurl, {action: 'search_filter_cache_set_method', method: set_method}, function(data){ - - if(data=="1") - { - $method_value.text(set_method); - } - - }); - - }); - - $continue_cache_button.on("click",function(){ - - log_info("cache", "SF: Continuing Cache..."); - - $.get(ajaxurl, {action: 'cache_progress_manual'}, function(data){ - - log_info("cache", "SF: Data received.."); - - var locked_str = ""; - if(data.restart==true) - { - locked_str += " [restart]"; - } - if(data.locked==true) - { - locked_str += " [locked] [EC: "+data.error_count+"]"; - } - log_info("cache", "SF: Batch: "+data.current_post_index + "/" + data.total_post_index + " (" + data.progress_percent + "%) | PID: "+data.process_id+locked_str); - - }, 'json'); - - }); - - $restart_cache_button.on("click",function(){ - - log_info("cache", "SF: Restarting..."); - - $.get(ajaxurl, {action: 'cache_restart_manual'}, function(data){ - - log_info("cache", "SF: Data received.."); - - var locked_str = ""; - if(data.restart==true) - { - locked_str += " [restart]"; - } - if(data.locked==true) - { - locked_str += " [locked] [EC: "+data.error_count+"]"; - } - log_info("cache", "SF: Batch: "+data.current_post_index + "/" + data.total_post_index + " (" + data.progress_percent + "%) | PID: "+data.process_id+locked_str); - - }, 'json'); - - }); - - - - - } - - - }); - -}(jQuery)); \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/assets/js/index.php b/wp/wp-content/plugins/search-filter-pro/admin/assets/js/index.php deleted file mode 100644 index e71af0ef..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/assets/js/index.php +++ /dev/null @@ -1 +0,0 @@ - SEARCH_FILTER_VERSION, // current version number - 'license' => $license_key, // license key (used get_option above to retrieve from DB) - 'item_name' => SEARCH_FILTER_ITEM_NAME, // name of this plugin - 'author' => 'Ross Morsali', // author of this plugin - 'url' => home_url(), - 'beta' => false, - ) - ); -} -add_action( 'init', 'search_filter_plugin_updater' ); - -class Search_Filter_Admin { - - /** - * Instance of this class. - * - * @since 1.0.0 - * - * @var object - */ - protected static $instance = null; - const VERSION = SEARCH_FILTER_VERSION; - - /** - * Slug of the plugins various screen (Array) - * - * @since 1.0.0 - * - * @var string - */ - protected $plugin_screen_hook_suffix = null; - - /** - * Instance of the widgets screen admin class - * - * @since 1.0.0 - * - * @var string - */ - protected $widget_screen_admin = null; - protected $plugin_slug = null; - - private $cache_table_name = ''; - private $term_results_table_name = ''; - - private $post_cache; - private $third_party; - private $admin_notices; - - /** - * Initialize the plugin by loading admin scripts & styles and adding a - * settings page and menu. - * - * @since 1.0.0 - */ - private function __construct() { - - $this->plugin_slug = 'search-filter'; - - global $search_filter_shared; - $shared = $search_filter_shared; // this sets up shared (between frontend and admin) attributes (like post types & taxonomies) - - // Load admin style sheet and JavaScript. - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) ); - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) ); - - // Add the options page and menu item. - add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) ); - - // plugin activation - add_action( 'admin_init', array( $this, 'search_filter_register_option' ) ); - add_action( 'admin_init', array( $this, 'search_filter_activate_license' ) ); - add_action( 'admin_init', array( $this, 'search_filter_deactivate_license' ) ); - - // new blog created - add_action( 'wp_initialize_site', array( $this, 'init_new_site_dbs' ) ); - - // adds all the filters for the post cache and admin hooks, probably should be singleton - global $search_filter_post_cache; - $this->post_cache = $search_filter_post_cache; - - global $search_filter_third_party; - $this->third_party = $search_filter_third_party; - - // Add an action link pointing to the options page. - $plugin_basename = plugin_basename( plugin_dir_path( dirname( __FILE__ ) ) . $this->plugin_slug . '.php' ); - add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) ); - - add_action( 'admin_notices', array( $this, 'action_display_welcome_header' ) ); - $this->admin_notices = new Search_Filter_Admin_Notices( $this->plugin_slug ); - - add_action( 'admin_head', array( $this, 'action_setup_screens' ) ); - - add_action( 'admin_action_sf_duplicate_form', array( $this, 'action_duplicate_post_as_draft' ) ); - - add_filter( 'page_row_actions', array( $this, 'action_duplicate_post_link' ), 10, 2 ); - - /* AJAX */ - add_action( 'wp_ajax_meta_prefs_set', array( $this, 'meta_prefs_set' ) ); // if logged in - add_action( 'wp_ajax_get_meta_values', array( $this, 'get_meta_values' ) ); // if logged in - add_action( 'wp_ajax_get_taxonomy_terms', array( $this, 'get_taxonomy_terms' ) ); // if logged in - add_action( 'wp_ajax_search_filter_cache_set_method', array( $this, 'ajax_cache_set_method' ) ); // if logged in - - add_action( 'wp_ajax_search_filter_build_cache_table', array( $this, 'search_filter_build_cache_tables' ) ); // if logged in - - add_filter( 'manage_edit-' . $this->plugin_slug . '-widget_columns', array( $this, 'set_custom_sf_columns' ) ); - add_action( 'manage_' . $this->plugin_slug . '-widget_posts_custom_column', array( $this, 'custom_sf_column' ), 10, 2 ); - - add_filter( 'post_updated_messages', array( $this, 'sf_updated_messages' ) ); - - // add_action('init', array($this, 'admin_init')); - } - - /* - function admin_init() - { - register_sidebar( array( - 'name' => __( 'Search & Filter', $this->plugin_slug ), - 'id' => 'search-filter-widget', - 'description' => __( 'Add a Search Form to your sidebar', $this->plugin_slug ), - 'before_title' => '

    ', - 'after_title' => '

    ', - ) ); - }*/ - - - function set_custom_sf_columns( $columns ) { - - unset( $columns['date'] ); - $columns['shortcode'] = __( 'Shortcode', $this->plugin_slug ); - $columns['fields'] = __( 'Fields List', $this->plugin_slug ); - $columns['displaymethod'] = __( 'Results Method', $this->plugin_slug ); - $columns['date'] = __( 'Date', $this->plugin_slug ); - - return $columns; - } - - function custom_sf_column( $column, $post_id ) { - - $settings = Search_Filter_Helper::get_settings_meta( $post_id ); - - switch ( $column ) { - - case 'shortcode': - echo '[searchandfilter id="' . $post_id . '"]'; - - if ( is_array( $settings ) ) { - $display_results_as = ''; - - if ( isset( $settings['display_results_as'] ) ) { - $display_results_as = $settings['display_results_as']; - } else { - - /* legacy */ - $display_results_as = 'archive'; - - if ( isset( $settings['use_ajax_toggle'] ) ) { - if ( $settings['use_ajax_toggle'] == 1 ) { - if ( isset( $settings['use_results_shortcode'] ) ) { - if ( $settings['use_results_shortcode'] == 1 ) { - $display_results_as = 'shortcode'; - } - } - } - } - /* end legacy */ - } - - if ( $display_results_as == 'shortcode' ) { - echo '
    [searchandfilter id="' . $post_id . '" show="results"]'; - } - } else { - // error - } - - break; - - case 'fields': - $fields = get_post_meta( $post_id, '_search-filter-fields', true ); - $fields_arr = array(); - if ( isset( $fields ) ) { - if ( is_array( $fields ) ) { - foreach ( $fields as $field ) { - $fields_arr[] = $field['type']; - } - - $fields_text = implode( ', ', $fields_arr ); - echo $fields_text; - } - } - break; - case 'displaymethod': - if ( is_array( $settings ) ) { - $display_results_as = ''; - $results_label = ''; - - if ( isset( $settings['display_results_as'] ) ) { - $display_results_as = $settings['display_results_as']; - } - - if ( $display_results_as == 'archive' ) { - $results_label = __( 'As an Archive', $this->plugin_slug ); - } elseif ( $display_results_as == 'post_type_archive' ) { - $post_type = ''; - if ( isset( $settings['post_types'] ) ) { - if ( count( $settings['post_types'] ) == 1 ) { - $post_types = array_keys( $settings['post_types'] ); - - $post_type_object = get_post_type_object( $post_types[0] ); - - if ( isset( $post_type_object->label ) ) { - $post_type = $post_type_object->label; - } - } - } - $results_label = sprintf( __( 'Post Type Archive: %s', $this->plugin_slug ), $post_type ); - } elseif ( $display_results_as == 'shortcode' ) { - $results_label = __( 'Using a Shortcode', $this->plugin_slug ); - } elseif ( $display_results_as == 'custom' ) { - $results_label = __( 'Custom', $this->plugin_slug ); - } elseif ( $display_results_as == 'custom_woocommerce_store' ) { - $results_label = __( 'WooCommerce Shop', $this->plugin_slug ); - } elseif ( $display_results_as == 'custom_edd_store' ) { - $results_label = __( 'EDD Downloads Shortcode', $this->plugin_slug ); - } else { - $results_label = $display_results_as; - } - - echo $results_label; - } - - break; - - } - } - /** - * Return an instance of this class. - * - * @since 1.0.0 - * - * @return object A single instance of this class. - */ - public static function get_instance() { - - // If the single instance hasn't been set, set it now. - if ( null == self::$instance ) { - self::$instance = new self(); - } - - return self::$instance; - } - - /** - * Register and enqueue admin-specific style sheet. - * - * @since 1.0.0 - * - * @return null Return early if no settings page is registered. - */ - public function enqueue_admin_styles() { - - if ( ! isset( $this->plugin_screen_hook_suffix ) ) { - return; - } - - $screen = get_current_screen(); - if ( in_array( $screen->id, $this->plugin_screen_hook_suffix ) ) { - - wp_enqueue_style( $this->plugin_slug . '-admin-styles', plugins_url( 'assets/css/admin.css', __FILE__ ), array(), self::VERSION ); - - wp_enqueue_style( 'thickbox' ); - - } - - } - - /** - * Register and enqueue admin-specific JavaScript. - * - * @since 1.0.0 - * - * @return null Return early if no settings page is registered. - */ - public function enqueue_admin_scripts() { - - if ( ! isset( $this->plugin_screen_hook_suffix ) ) { - return; - } - - $screen = get_current_screen(); - if ( in_array( $screen->id, $this->plugin_screen_hook_suffix ) ) { - wp_enqueue_script( $this->plugin_slug . '-admin-script', plugins_url( 'assets/js/admin.js', __FILE__ ), array( 'jquery' ), self::VERSION ); - } - - wp_enqueue_script( 'thickbox' ); - - } - - /** - * Register the administration menu for this plugin into the WordPress Dashboard menu. - * - * @since 1.0.0 - */ - public function add_plugin_admin_menu() { - - /* - * Add a settings page for this plugin to the Settings menu. - */ - - $iconurl = plugins_url( 'assets/img/icon.png', __FILE__ ); - $iconurl = 'dashicons-search'; - - $parent_slug = 'edit.php?post_type=' . $this->plugin_slug . '-widget'; - $main_menu_page_slug = add_menu_page( - __( 'Search & Filter Pro', $this->plugin_slug ), - __( 'Search & Filter', $this->plugin_slug ), - 'manage_options', - $parent_slug, - false, - $iconurl, - '100.23243' - ); - - $this->plugin_screen_hook_suffix['main_menu_page'] = 'edit-search-filter-widget'; // this is hte list of search filter forms - $this->plugin_screen_hook_suffix['add_new_page'] = 'search-filter-widget'; // this is the "add new" or "editing" S&F page - - $this->plugin_screen_hook_suffix['new_post'] = add_submenu_page( - $parent_slug, - __( 'New Search Form', $this->plugin_slug ), - __( 'New Search Form', $this->plugin_slug ), - 'manage_options', - 'post-new.php?post_type=search-filter-widget' - ); - - $this->plugin_screen_hook_suffix[] = add_submenu_page( - $parent_slug, - __( 'Search & Filter Settings', $this->plugin_slug ), - __( 'Settings', $this->plugin_slug ), - 'manage_options', - $this->plugin_slug . '-settings', - array( $this, 'display_plugin_settings_admin_page' ) - ); - - $this->plugin_screen_hook_suffix[] = add_submenu_page( - $parent_slug, - __( 'Search & Filter License', $this->plugin_slug ), - __( 'License', $this->plugin_slug ), - 'manage_options', - $this->plugin_slug . '-licence-settings', - array( $this, 'display_plugin_license_settings_admin_page' ) - ); - - $this->plugin_screen_hook_suffix[] = add_submenu_page( - $parent_slug, - __( 'Search & Filter System Status', $this->plugin_slug ), - __( 'System Status', $this->plugin_slug ), - 'manage_options', - $this->plugin_slug . '-system-status', - array( $this, 'display_plugin_system_status_page' ) - ); - - if ( isset( $_GET['letme'] ) ) { - if ( $_GET['letme'] == 'in' ) { - $this->plugin_screen_hook_suffix[] = add_submenu_page( - $parent_slug, - __( 'Search & Filter Cache', $this->plugin_slug ), - __( 'Cache', $this->plugin_slug ), - 'manage_options', - $this->plugin_slug . '-cache', - array( $this, 'display_plugin_cache_page' ) - ); - } - } - - /* - $this->plugin_screen_hook_suffix[] = add_submenu_page( - $parent_slug, - __( 'Help', $this->plugin_slug ), - __( 'Help', $this->plugin_slug ), - 'manage_options', - $this->plugin_slug."-help", - array( $this, 'display_plugin_help_admin_page' ) - );*/ - - // load page specific classes - add_action( 'load-post-new.php', array( $this, 'posts_screen_header' ) ); - add_action( 'load-post.php', array( $this, 'posts_screen_header' ) ); - - } - private function sf_let_to_num( $size ) { - $l = substr( $size, -1 ); - $ret = substr( $size, 0, -1 ); - switch ( strtoupper( $l ) ) { - case 'P': - $ret *= 1024; - case 'T': - $ret *= 1024; - case 'G': - $ret *= 1024; - case 'M': - $ret *= 1024; - case 'K': - $ret *= 1024; - } - return $ret; - } - function widgets_screen_header() { - /* Page Specific Stuff - call classes etc for seperate pages*/ - $widget_screen_admin = new Search_Filter_Widgets_Admin(); - } - function posts_screen_header() { - /* Page Specific Stuff - call classes etc for seperate pages*/ - - $screen = get_current_screen(); - $post_type = $screen->post_type; - if ( $post_type == $this->plugin_slug . '-widget' ) { - // add this if you did not add support for the post type when you called register_post_type() - $widget_screen_admin = new Search_Filter_Posts_Admin(); - } - - } - - /** - * Render the settings page for this plugin. - * - * @since 1.0.0 - */ - public function display_plugin_admin_page() { - include_once 'views/admin.php'; - } - - public function display_plugin_settings_admin_page() { - $cache_speed = Search_Filter_Helper::get_option( 'cache_speed' ); - $cache_use_manual = Search_Filter_Helper::get_option( 'cache_use_manual' ); - $cache_use_background_processes = Search_Filter_Helper::get_option( 'cache_use_background_processes' ); - $cache_use_transients = Search_Filter_Helper::get_option( 'cache_use_transients' ); - - $load_jquery_i18n = Search_Filter_Helper::get_option( 'load_jquery_i18n' ); - $lazy_load_js = Search_Filter_Helper::get_option( 'lazy_load_js' ); - $load_js_css = Search_Filter_Helper::get_option( 'load_js_css' ); - - $combobox_script = Search_Filter_Helper::get_option( 'combobox_script' ); - $remove_all_data = Search_Filter_Helper::get_option( 'remove_all_data' ); - $meta_key_text_input = Search_Filter_Helper::get_option( 'meta_key_text_input' ); - - include_once 'views/admin-settings.php'; - } - - public function display_plugin_license_settings_admin_page() { - $license = get_option( 'search_filter_license_key' ); - $status = get_option( 'search_filter_license_status' ); - $expires = get_option( 'search_filter_license_expires' ); - $error = get_option( 'search_filter_license_error' ); - - include_once 'views/admin-license-settings.php'; - } - - - - - function search_filter_register_option() { - // creates our settings in the options table - register_setting( 'search_filter_license', 'search_filter_license_key', array( $this, 'edd_sanitize_license' ) ); - - register_setting( 'search_filter_settings', 'search_filter_cache_speed', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_cache_use_manual', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_cache_use_background_processes', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_cache_use_transients', array( $this, 'sf_cache_sanitize_use_transients_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_load_js_css', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_lazy_load_js', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_load_jquery_i18n', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_combobox_script', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_remove_all_data', array( $this, 'sf_sanitize_options' ) ); - register_setting( 'search_filter_settings', 'search_filter_meta_key_text_input', array( $this, 'sf_sanitize_options' ) ); - } - - function sf_sanitize_options( $new ) { - // $old = get_option( 'search_filter_license_key' ); - /* - if( $old && $old != $new ) { - delete_option( 'search_filter_license_status' ); // new license has been entered, so must reactivate - }*/ - - return sanitize_text_field( $new ); - } - - function sf_cache_sanitize_use_transients_options( $new ) { - // $old = get_option( 'search_filter_license_key' ); - /* - if( $old && $old != $new ) { - delete_option( 'search_filter_license_status' ); // new license has been entered, so must reactivate - }*/ - // if($new!==1) { - // clear transients when updating updating this setting - Search_Filter_Wp_Cache::purge_all_transients(); - // } - return sanitize_text_field( $new ); - } - - function edd_sanitize_license( $new ) { - $old = get_option( 'search_filter_license_key' ); - if ( $old && $old != $new ) { - delete_option( 'search_filter_license_status' ); // new license has been entered, so must reactivate - delete_option( 'search_filter_license_expires' ); - delete_option( 'search_filter_license_error' ); - } - return $new; - } - - - - function search_filter_activate_license() { - // listen for our activate button to be clicked - if ( isset( $_POST['search_filter_license_activate'] ) ) { - // run a quick security check - if ( ! check_admin_referer( 'search_filter_nonce', 'search_filter_nonce' ) ) { - return; // get out if we didn't click the Activate button - } - - // retrieve the license from the database - $license = trim( get_option( 'search_filter_license_key' ) ); - - // data to send in our API request - $api_params = array( - 'edd_action' => 'activate_license', - 'license' => $license, - 'item_name' => urlencode( SEARCH_FILTER_ITEM_NAME ), // the name of our product in EDD - 'url' => home_url(), - ); - - // Call the custom API. - $response = wp_remote_get( - add_query_arg( $api_params, SEARCH_FILTER_STORE_URL ), - array( - 'timeout' => 15, - 'sslverify' => false, - ) - ); - - // make sure the response came back okay - if ( is_wp_error( $response ) ) { - return false; - } - - // decode the license data - $license_data = json_decode( wp_remote_retrieve_body( $response ) ); - - // $license_data->license will be either "valid" or "invalid" - $license_status = 'invalid'; - if ( property_exists( $license_data, 'license' ) ) { - $license_status = $license_data->license; - update_option( 'search_filter_license_status', $license_status ); - if ( $license_status === 'invalid' ) { - update_option( 'search_filter_license_error', $license_data->error ); - } else { - delete_option( 'search_filter_license_error', '' ); - } - } else { - update_option( 'search_filter_license_status', $license_status ); - update_option( 'search_filter_license_error', __( 'Could not retreive license information.', 'search-filter-pro' ) ); - } - - if ( property_exists( $license_data, 'expires' ) ) { - update_option( 'search_filter_license_expires', $license_data->expires ); - } else { - update_option( 'search_filter_license_expires', 0 ); - update_option( 'search_filter_license_error', __( 'Could not retreive expiry information.', 'search-filter-pro' ) ); - } - } - } - - - /*********************************************** - * Illustrates how to deactivate a license key. - * This will descrease the site count - ***********************************************/ - - function search_filter_deactivate_license() { - - // listen for our activate button to be clicked - if ( isset( $_POST['edd_license_deactivate'] ) ) { - - // run a quick security check - if ( ! check_admin_referer( 'search_filter_nonce', 'search_filter_nonce' ) ) { - return; // get out if we didn't click the Activate button - } - - // retrieve the license from the database - $license = trim( get_option( 'search_filter_license_key' ) ); - - // data to send in our API request - $api_params = array( - 'edd_action' => 'deactivate_license', - 'license' => $license, - 'item_name' => urlencode( SEARCH_FILTER_ITEM_NAME ), // the name of our product in EDD - 'url' => home_url(), - ); - - // Call the custom API. - $response = wp_remote_get( - add_query_arg( $api_params, SEARCH_FILTER_STORE_URL ), - array( - 'timeout' => 15, - 'sslverify' => false, - ) - ); - - // make sure the response came back okay - if ( is_wp_error( $response ) ) { - return false; - } - - // decode the license data - $license_data = json_decode( wp_remote_retrieve_body( $response ) ); - - // $license_data->license will be either "deactivated" or "failed" - if ( $license_data->license == 'deactivated' ) { - delete_option( 'search_filter_license_status' ); - } - delete_option( 'search_filter_license_error' ); - delete_option( 'search_filter_license_expires' ); - - } - } - - public function display_plugin_help_admin_page() { - include_once 'views/admin-help.php'; - } - - public function display_plugin_system_status_page() { - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - include_once 'views/admin-system-status.php'; - } - - - public function display_plugin_cache_page() { - - $cache_options = get_option( 'search-filter-cache' ); - - include_once 'views/admin-cache.php'; - } - - public function ajax_cache_set_method() { - - if ( ! isset( $_GET['method'] ) ) { - echo '0'; - exit; - } - - $run_method = esc_attr( $_GET['method'] ); - - $cache_options = get_option( 'search-filter-cache' ); - $cache_options['run_method'] = $run_method; - update_option( 'search-filter-cache', $cache_options, false ); - echo '1'; - exit; - - } - - - - /** - * Add settings action link to the plugins page. - * - * @since 1.0.0 - */ - public function add_action_links( $links ) { - - return array_merge( - array( - 'settings' => '' . __( 'Settings', $this->plugin_slug ) . '', - ), - $links - ); - - } - - public function action_setup_screens() { - global $post_ID; - $screen = get_current_screen(); - - if ( isset( $_GET['post_type'] ) ) { - $post_type = $_GET['post_type']; - } else { - $post_type = get_post_type( $post_ID ); - } - - // addd a help tab - if ( $post_type == 'search-filter-widget' ) { - /* - $screen->add_help_tab( array( - 'id' => 'you_custom_id', //unique id for the tab - 'title' => 'Search & Filter Pro', //unique visible title for the tab - 'content' => '

    Search & Filter Pro Help

    We will be integrating help here throughout all Search & Filter pages in the near future, for now access help online:

    -

    Getting Started Documentation | Support Forums | Frequently Asked Questions

    - ', - ));*/ - - // add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) ); - } - } - - /** - * Ajax Control of visibility of widgets & other visual elements, stored in user options to remember settings - * - * @since 1.0.0 - */ - function meta_prefs_set() { - // global $woocommerce; - global $current_user; - - $show = intval( $_POST['show'] ); - - $user_id = $current_user->ID; - - if ( $show == 0 ) { - update_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice', '0' ); - } elseif ( $show == 1 ) { - update_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice', '1' ); - } - exit; - } - - function get_meta_values() { - // global $woocommerce; - global $current_user; - - $meta_key = sanitize_text_field( $_POST['meta_key'] ); - // $meta_key = sanitize_text_field($_GET['meta_key']); - - global $wpdb; - $data = array(); - - $wpdb->query( - $wpdb->prepare( - " - SELECT `meta_key`, `meta_value` - FROM $wpdb->postmeta - WHERE BINARY `meta_key` = '%s' - ", - $meta_key - ) - ); - - foreach ( $wpdb->last_result as $k => $v ) { - $data[] = $v->meta_value; - }; - $data = array_unique( $data ); - - $return_data = array(); - - foreach ( $data as $value ) { - if ( $value != '' ) { - if ( is_serialized( $value ) ) { - $serial_values = unserialize( $value ); - foreach ( $serial_values as $serial_val ) { - if ( ! is_array( $serial_val ) ) { - $return_data[] = $serial_val; - } else { - if ( is_array( $serial_val ) ) { - foreach ( $serial_val as $arr_val ) { - $return_data[] = $arr_val; - } - } - // $return_data[] = serialize($serial_val); - } - } - } else { - $return_data[] = $value; - } - } - } - - $return_data = array_unique( $return_data ); - $no_values_found = count( $return_data ); - if ( $no_values_found > 0 ) { - foreach ( $return_data as $return_item ) { - echo ''; - } - } else { - echo "

    No values found! It looks like you haven't used this meta key in any of your posts yet so we couldn't find any values.

    "; - } - - echo '
    '; - - exit; - } - - function get_taxonomy_terms() { - // global $woocommerce; - global $current_user; - - // $meta_key = sanitize_key($_GET['meta_key']); - - $tax_name = sanitize_key( $_GET['taxonomy_name'] ); - $tax_ids = esc_attr( $_GET['taxonomy_ids'] ); - - $tax_ids = explode( ',', $tax_ids ); - $tax_ids = array_map( 'intval', $tax_ids ); - - // no default values. using these as examples - $taxonomies = array( - $tax_name, - ); - - $args = array( - 'orderby' => 'name', - 'order' => 'ASC', - 'hide_empty' => false, - 'exclude' => array(), - 'exclude_tree' => array(), - 'include' => array(), - 'number' => '', - 'fields' => 'all', - 'slug' => '', - 'parent' => '', - 'hierarchical' => false, - // 'child_of' => 0, - 'get' => '', - // 'name__like' => '', - // 'description__like' => '', - 'pad_counts' => false, - // 'offset' => '', - // 'search' => '', - // 'cache_domain' => 'core' - ); - - $terms = get_terms( $taxonomies, $args ); - - if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { - foreach ( $terms as $term ) { - $checked = ''; - - if ( in_array( $term->term_id, $tax_ids ) ) { - $checked = ' checked="checked"'; - } - echo ''; - } - } else { - echo "

    No terms found! It looks like you haven't created any terms.

    "; - } - - echo '
    '; - - exit; - } - - /** - * NOTE: Actions are points in the execution of a page or process - * lifecycle that WordPress fires. - * - * Actions: http://codex.wordpress.org/Plugin_API#Actions - * Reference: http://codex.wordpress.org/Plugin_API/Action_Reference - * - * @since 1.0.0 - */ - - function action_display_welcome_header() { - - global $current_screen; - global $current_user; - - $user_id = $current_user->ID; - - // set default user meta - if ( ! get_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice' ) ) { - add_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice', '1', true ); - } - - if ( $current_screen->id == 'edit-search-filter-widget' ) { - // for dev - // delete_user_meta( $user_id, $this->plugin_slug.'-welcome-notice-ignore' ); - $hidden_class = ''; - if ( get_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice', true ) == '0' ) { - $hidden_class = ' hidden'; - } - ?> -
    -
    -
    - - plugin_slug ) ); ?> - -
    -

    plugin_slug ); ?>

    -

    plugin_slug ); ?>

    -
    -
    -

    plugin_slug ); ?>

    -

    plugin_slug ); ?>

    - plugin_slug ); ?>

    -
    -
    -

    plugin_slug ); ?>

    - -
    -
    -

    plugin_slug ); ?>

    - -
    - -
    -
    -
    -
    - id == $this->plugin_slug . '-widget' ) { - if ( get_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice', true ) == '1' ) { /* - ?> -
    -
    -
    - Dismiss', $this->plugin_slug), '?post_type=search-filter-widget&'.$this->plugin_slug.'-welcome-notice=0'); ?> -
    -

    plugin_slug ); ?>

    -

    plugin_slug ); ?>

    -
    -
    -
    -
    - plugin_slug . '-widget', - 'edit-search-filter-widget', - 'dashboard', - ); - - if ( in_array( $current_screen->id, $allowed_screens ) ) { - - global $wpdb; - $table_error = false; - - $sf_table_name = $wpdb->prefix . 'search_filter_cache'; - $sf_term_table_name = $wpdb->prefix . 'search_filter_term_results'; - - if ( $wpdb->get_var( "SHOW TABLES LIKE '$sf_table_name'" ) != $sf_table_name ) { - // table is not created. you may create the table here. - $table_error = true; - } - if ( $wpdb->get_var( "SHOW TABLES LIKE '$sf_term_table_name'" ) != $sf_term_table_name ) { - // table is not created. you may create the table here. - $table_error = true; - } - - if ( $table_error ) { - ?> -
    -

    - Search & Filter Error: The caching tables are missing - ', $this->plugin_slug ); ?> - plugin_slug ); ?> -

    -
    - db_install(); - } - - exit; - } - public function init_new_site_dbs( $new_site ) { - if ( is_a( $new_site, 'WP_Site' ) ) { - if ( is_plugin_active_for_network( 'search-filter-pro/search-filter-pro.php' ) ) { - switch_to_blog( $new_site->blog_id ); - $this->db_install(); - restore_current_blog(); - } - } - } - - public function db_install() { - global $wpdb; - - $table_name = $wpdb->prefix . 'search_filter_cache'; - - $charset_collate = ''; - - if ( $wpdb->has_cap( 'collation' ) ) { - $charset_collate = $wpdb->get_charset_collate(); - } - - $sql = "CREATE TABLE $table_name ( - id bigint(20) NOT NULL AUTO_INCREMENT, - post_id bigint(20) NOT NULL, - post_parent_id bigint(20) NOT NULL, - field_name varchar(255) NOT NULL, - field_value varchar(255) NOT NULL, - field_value_num bigint(20) NULL, - field_parent_num bigint(20) NULL, - term_parent_id bigint(20) NULL, - PRIMARY KEY (id), - KEY sf_c_field_name_index (field_name(32)), - KEY sf_c_field_value_index (field_value(32)), - KEY sf_c_field_value_num_index (field_value_num) - ) $charset_collate;"; - - require_once ABSPATH . 'wp-admin/includes/upgrade.php'; - dbDelta( $sql ); - - $table_name = $wpdb->prefix . 'search_filter_term_results'; - - $sql = "CREATE TABLE $table_name ( - id bigint(20) NOT NULL AUTO_INCREMENT, - field_name varchar(255) NOT NULL, - field_value varchar(255) NOT NULL, - field_value_num bigint(20) NULL, - result_ids mediumtext NOT NULL, - PRIMARY KEY (id), - KEY sf_tr_field_name_index (field_name(32)), - KEY sf_tr_field_value_index (field_value(32)), - KEY sf_tr_field_value_num_index (field_value_num) - ) $charset_collate;"; - - dbDelta( $sql ); - } - /* - * Function creates post duplicate as a draft and redirects then to the edit post screen - */ - public function action_duplicate_post_as_draft() { - global $wpdb; - if ( ! ( isset( $_GET['post'] ) || isset( $_POST['post'] ) || ( isset( $_REQUEST['action'] ) && 'sf_duplicate_form' == $_REQUEST['action'] ) ) ) { - wp_die( 'Source post not provided.' ); - } - - /* - * Nonce verification - */ - if ( ! isset( $_GET['duplicate_nonce'] ) || ! wp_verify_nonce( $_GET['duplicate_nonce'], basename( __FILE__ ) ) ) { - return; - } - - /* - * get the original post id - */ - $post_id = isset( $_GET['post'] ) ? absint( $_GET['post'] ) : 0; - /* - * 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' => $post->post_content, - 'post_excerpt' => $post->post_excerpt, - // 'post_name' => $post->post_name, - 'post_parent' => $post->post_parent, - 'post_password' => $post->post_password, - 'post_status' => 'draft', - 'post_title' => $post->post_title, - '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 ); - - /* - * get all current post terms and set them to the new post draft - */ - $taxonomies = get_object_taxonomies( $post->post_type ); // returns array of taxonomy names for post type, ex array("category", "post_tag"); - 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 ); - } - - /* - * duplicate all post meta - */ - $post_meta = get_post_meta( $post_id ); - if ( $post_meta ) { - if ( is_array( $post_meta ) ) { - foreach ( $post_meta as $meta_key => $meta_value ) { - // doing it this way handles the serialisation / deserialisation - $real_meta_value = get_post_meta( $post_id, $meta_key, true ); - if ( $real_meta_value ) { - update_post_meta( $new_post_id, $meta_key, $real_meta_value ); - } - } - } - } - wp_redirect( esc_url( admin_url( 'edit.php?post_type=' . $post->post_type ) ) ); - - } else { - wp_die( esc_html( 'Post creation failed, could not find original post: ' . $post_id ) ); - } - } - - /* - * Add the duplicate link to action list for post_row_actions - */ - public function action_duplicate_post_link( $actions, $post ) { - - if ( $post->post_type == 'search-filter-widget' ) { - if ( current_user_can( 'edit_posts' ) ) { - - $actions['duplicate'] = 'Duplicate'; - - } - unset( $actions['inline hide-if-no-js'] ); - } - - return $actions; - } - - - - public function sf_updated_messages( $messages ) { - - global $post, $post_ID; - - if ( 'search-filter-widget' == $post->post_type ) { - $messages[ $post->post_type ][1] = 'Search Form updated.'; - } - - return $messages; - } - - public function set_selected( $desired_value, $current_value, $echo = true ) { - if ( $desired_value == $current_value ) { - if ( $echo == true ) { - echo ' selected="selected"'; - } else { - return ' selected="selected"'; - } - } - } - - public function set_radio( $desired_value, $current_value, $echo = true ) { - if ( $desired_value == $current_value ) { - if ( $echo == true ) { - echo ' checked="checked"'; - } else { - return ' checked="checked"'; - } - } - } - - public function set_checked( $current_value ) { - if ( 1 === absint( $current_value ) ) { - echo ' checked="checked"'; - } - } - -} - -if ( ! class_exists( 'Search_Filter_Admin_Notices' ) ) { - require_once plugin_dir_path( __FILE__ ) . 'includes/class-search-filter-admin-notices.php'; -} - -if ( ! class_exists( 'Search_Filter_Widgets_Admin' ) ) { - require_once plugin_dir_path( __FILE__ ) . 'includes/class-search-filter-widgets-admin.php'; -} - -if ( ! class_exists( 'Search_Filter_Posts_Admin' ) ) { - require_once plugin_dir_path( __FILE__ ) . 'includes/class-search-filter-posts-admin.php'; -} diff --git a/wp/wp-content/plugins/search-filter-pro/admin/includes/EDD_SL_Plugin_Updater.php b/wp/wp-content/plugins/search-filter-pro/admin/includes/EDD_SL_Plugin_Updater.php deleted file mode 100644 index 4fd2e858..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/includes/EDD_SL_Plugin_Updater.php +++ /dev/null @@ -1,618 +0,0 @@ -api_url = trailingslashit( $_api_url ); - $this->api_data = $_api_data; - $this->plugin_file = $_plugin_file; - $this->name = plugin_basename( $_plugin_file ); - $this->slug = basename( $_plugin_file, '.php' ); - $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; - - $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 ) { - - global $pagenow; - - 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_repo_api_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; - - $this->set_version_info_cache( $version_info ); - } - - return $version_info; - } - - /** - * 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; - } - - if ( ! current_user_can( 'update_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.', 'easy-digital-downloads' ), - esc_html( $plugin['Name'] ) - ); - - if ( empty( $update_cache->response[ $this->name ]->package ) && ! empty( $changelog_link ) ) { - 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.', 'easy-digital-downloads' ), - '', - esc_html( $update_cache->response[ $this->name ]->new_version ), - '' - ); - } elseif ( ! empty( $changelog_link ) ) { - printf( - __( ' %1$sView version %2$s details%3$s or %4$supdate now%5$s.', 'easy-digital-downloads' ), - '', - esc_html( $update_cache->response[ $this->name ]->new_version ), - '', - '', - '' - ); - } else { - printf( - ' %1$s%2$s%3$s', - '', - esc_html__( 'Update now.', 'easy-digital-downloads' ), - '' - ); - } - - 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 ); - - // Expires in 3 hours - $this->set_version_info_cache( $api_response ); - - if ( false !== $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; - } - - 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 - */ - private function api_request( $_action, $_data ) { - - global $edd_plugin_url_available; - - // Do a quick status check on this domain if we haven't already checked it. - $store_hash = md5( $this->api_url ); - if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) { - $test_url_parts = wp_parse_url( $this->api_url ); - - $scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http'; - $host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : ''; - $port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : ''; - - if ( empty( $host ) ) { - $edd_plugin_url_available[ $store_hash ] = false; - } else { - $test_url = $scheme . '://' . $host . $port; - $response = wp_remote_get( - $test_url, - array( - 'timeout' => $this->health_check_timeout, - 'sslverify' => $this->verify_ssl(), - ) - ); - $edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true; - } - } - - if ( false === $edd_plugin_url_available[ $store_hash ] ) { - return false; - } - - $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; - } - - return $this->get_version_from_remote(); - } - - /** - * 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', 'easy-digital-downloads' ), esc_html__( 'Error', 'easy-digital-downloads' ), 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 ) ) { - 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/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-admin-notices.php b/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-admin-notices.php deleted file mode 100644 index f2469399..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-admin-notices.php +++ /dev/null @@ -1,586 +0,0 @@ -plugin_slug = $plugin_slug; - - add_action( 'admin_notices', array( $this, 'admin_notices' ) ); - - } - - // notices shown when viewing all posts - public function set_all_post_notices() { - // $this->get_all_search_forms_wlang(); - - if ( ( Search_Filter_Helper::has_wpml() ) && ( defined( 'ICL_LANGUAGE_CODE' ) ) ) { - if ( ICL_LANGUAGE_CODE == 'all' ) {// this means a user has selected "all languages" - so loop loop through each language and check for errors - appending lang code - - $langs = icl_get_languages( 'skip_missing=0&orderby=KEY&order=DIR&link_empty_to=str' ); - - foreach ( $langs as $lang ) { - if ( isset( $lang['code'] ) ) { - $search_form_ids = $this->get_all_search_forms_wlang( $lang['code'] ); - $this->set_all_post_notices_wlang( $search_form_ids, $lang['code'] ); - } - } - - // reset current language - should be "all" - global $sitepress; - if ( ! empty( $sitepress ) ) { - $sitepress->switch_lang( ICL_LANGUAGE_CODE ); - } - } else { - // user must be on a specifc language, let wpml filter the rest - $search_form_ids = $this->get_all_search_forms_wlang(); - $this->set_all_post_notices_wlang( $search_form_ids ); - } - } else { - $search_form_ids = $this->get_all_search_forms_wlang(); - $this->set_all_post_notices_wlang( $search_form_ids ); - } - - } - - public function get_all_search_forms_wlang( $lang = '' ) { - if ( $lang != '' ) { - if ( Search_Filter_Helper::has_wpml() ) { - global $sitepress; - if ( ! empty( $sitepress ) ) { - $sitepress->switch_lang( $lang ); - } - } - } - - $search_form_query = new WP_Query( 'post_type=search-filter-widget&fields=ids&post_status=publish&posts_per_page=-1' ); - $all_search_form_ids = $search_form_query->get_posts(); - - return $all_search_form_ids; - - } - - // pass search form IDs to test for potential problems - public function set_all_post_notices_wlang( $search_form_ids, $lang = '' ) { - $lang_text = ''; - if ( $lang != '' ) { - $lang_text = '[' . $lang . ']'; - } - - $woocommerce_error_count = 0; - $woocommerce_form_count = 0; - $post_type_archive_count = array(); - - foreach ( $search_form_ids as $search_form_id ) { - // $search_form_id - // echo $search_form_id; - - $settings = Search_Filter_Helper::get_settings_meta( $search_form_id ); - $fields = Search_Filter_Helper::get_fields_meta( $search_form_id ); - - if ( isset( $settings['display_results_as'] ) ) { - $display_results_as = $settings['display_results_as']; - - if ( $display_results_as == 'archive' ) {// warning - check to see if custom template is selected - - } elseif ( $display_results_as == 'post_type_archive' ) {// warning - check to see if custom template is selected - - if ( isset( $settings['post_types'] ) ) { - $post_types = array_keys( $settings['post_types'] ); - } - - if ( count( $post_types ) == 1 ) { - $post_type = $post_types[0]; - - if ( ! isset( $post_type_archive_count[ $post_type ] ) ) { - $post_type_archive_count[ $post_type ] = 0; - } - - $post_type_archive_count[ $post_type ]++; - } - } elseif ( $display_results_as == 'custom_woocommerce_store' ) { - // count number of forms using WooCommerce shop - can only be one - $woocommerce_form_count++; - - } - } - } - - if ( $woocommerce_form_count > 0 ) {// the there is a form with WooCommerce - - // check to make sure woocommerce is enabled - if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'WooCommerce is not enabled and is in use in your search forms. Choose a different display method or enable WooCommerce plugin.%s', $this->plugin_slug ), $lang_text ), - ); - - array_push( $this->all_post_message_log, $message ); - } - - // display error if more than 1 set - if ( $woocommerce_form_count > 1 ) { - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'There are %1$d Search Forms using display mode WooCommerce Shop - you may only have 1%2$s', $this->plugin_slug ), $woocommerce_form_count, $lang_text ), - ); - - array_push( $this->all_post_message_log, $message ); - } - } - - // post type archive - foreach ( $post_type_archive_count as $post_type => $post_count ) { - if ( $post_count > 1 ) { - // then there is an error - there are multiple search forms using post type archive, with the same post type - must be unique (==1) - $post_type_object = get_post_type_object( $post_type ); - $label_name = ''; - - if ( isset( $post_type_object->label ) ) { - $label_name = $post_type_object->label; - } - - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'There are %1$d Search Forms set to use Post Type Archive display mode for the post type %2$s - you may only have 1%3$s', $this->plugin_slug ), $post_count, $label_name, $lang_text ), - ); - - array_push( $this->all_post_message_log, $message ); - } - } - } - - public function display_all_post_notices() { - foreach ( $this->all_post_message_log as $post_message ) { - ?> -
    -

    - Search & Filter Error: ', $this->plugin_slug ); - _e( 'Error: ', $this->plugin_slug ); - echo $post_message['message']; - ?> -

    -
    - ID; - } - $this->post_message_log = array(); - // setup errors - - $settings = Search_Filter_Helper::get_settings_meta( $post_id ); - $fields = Search_Filter_Helper::get_fields_meta( $post_id ); - - if ( isset( $settings['display_results_as'] ) ) { - $display_results_as = $settings['display_results_as']; - - if ( $display_results_as == 'archive' ) {// warning - check to see if custom template is selected - // error - check if template exists - - if ( isset( $settings['use_template_manual_toggle'] ) ) { - $use_template_manual = (bool) $settings['use_template_manual_toggle']; - - if ( $use_template_manual ) { - // check to see if we have a valid template specified - $template_error = false; - - $template_name_manual = trim( $settings['template_name_manual'] ); - $located = locate_template( $template_name_manual ); - - if ( ! empty( $located ) ) { - $template_error = false; - } else { - $template_error = true; - } - - if ( $template_error ) { - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'The custom template file `%s` cannot be found - go to Display Results tab to fix', $this->plugin_slug ), $template_name_manual ), - ); - - array_push( $this->post_message_log, $message ); - } - } else { - $message = array( - 'type' => 'sf-notice', - 'message' => __( 'You have not specified a custom template file for your results - this may lead to unexpected behaviour when displaying your results', $this->plugin_slug ), - ); - - array_push( $this->post_message_log, $message ); - } - } - } elseif ( $display_results_as == 'post_type_archive' ) { - // check to see if there is only 1 post type set - - if ( isset( $settings['post_types'] ) ) { - $post_types = array_keys( $settings['post_types'] ); - } else { - $settings['post_types'] = array(); - } - - $this->set_max_post_types_error( $post_types, 1 ); - $this->set_post_type_archive_attributes_error( $post_types ); - - // check for duplicates - can't have 2 search forms set to post type archive, with the same post type - $args = array( - 'property_key' => 'display_results_as', - 'property_value' => 'post_type_archive', - 'secondary_key' => 'post_types', - 'secondary_value' => $post_types, - ); - - $total_forms_with_properties = $this->count_forms_with_properties( $args ); - - if ( $total_forms_with_properties > 1 ) { - if ( count( $post_types ) == 1 ) { - $post_type_object = get_post_type_object( $post_types[0] ); - $label_name = ''; - - if ( isset( $post_type_object->label ) ) { - $label_name = $post_type_object->label; - } - - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'There are %1$d Search Forms set to use Post Type Archive display mode for the post type %2$s - you may only have 1', $this->plugin_slug ), $total_forms_with_properties, $label_name ), - ); - - array_push( $this->post_message_log, $message ); - } - } - } elseif ( $display_results_as == 'shortcode' ) { - // check to make sure the results url is filled in - if ( isset( $settings['results_url'] ) ) { - $results_url = trim( $settings['results_url'] ); - - $this->set_results_url_error( $results_url ); - - if ( $results_url != '' ) {// ensure there is a results URL before doing this check - - // this is just a warning, if the user is using SSL, try to warn in case they are not using https in their URL - // is_ssl() - } - } - } elseif ( $display_results_as == 'custom_woocommerce_store' ) { - // check to make sure woocommerce is enabled - if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - - $message = array( - 'type' => 'error', - 'message' => __( 'WooCommerce is not enabled. Choose a different display method or enable WooCommerce plugin.', $this->plugin_slug ), - ); - - array_push( $this->post_message_log, $message ); - } else { - // check to make only product / variation post type is selected - if ( ! isset( $settings['post_types'] ) ) { - $settings['post_types'] = array(); - } - $this->set_post_types_error( array_keys( $settings['post_types'] ), array( 'product', 'product_variation' ) ); - } - - // check for duplicates - can't have 2 search forms set to WooCommerce store - $args = array( - 'property_key' => 'display_results_as', - 'property_value' => 'custom_woocommerce_store', - - ); - - $total_forms_with_properties = $this->count_forms_with_properties( $args ); - - if ( $total_forms_with_properties > 1 ) { - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'There are %d Search Forms using display mode WooCommerce Shop - you may only have 1', $this->plugin_slug ), $total_forms_with_properties ), - ); - - array_push( $this->post_message_log, $message ); - - } - } elseif ( $display_results_as == 'custom_edd_store' ) { - // check to make sure edd is enabled - if ( ! is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) ) { - - $message = array( - 'type' => 'error', - 'message' => __( 'Easy Digital Downloads is not enabled. Choose a different display method or enable Easy Digital Downloads plugin.', $this->plugin_slug ), - ); - - array_push( $this->post_message_log, $message ); - } else { - if ( isset( $settings['post_types'] ) ) { - // check to make only download post type is selected - $this->set_post_types_error( array_keys( $settings['post_types'] ), array( 'download' ) ); - } - } - - // check to make sure results url is filled in - if ( isset( $settings['results_url'] ) ) { - $results_url = trim( $settings['results_url'] ); - $this->set_results_url_error( $results_url ); - } - } - } - - // fields - - // meta fields - // if choice, check to make sure some options have been added - - // cache - - // check / display progress - warn if not yet complete - } - - public function has_property_value( $settings, $property_key, $property_value ) { - if ( isset( $settings[ $property_key ] ) ) { - if ( $property_key == 'post_types' ) {// special case - - $post_types = array_keys( $settings[ $property_key ] ); - - if ( $post_types == $property_value ) { - return true; - } - } else { - if ( $settings[ $property_key ] == $property_value ) { - return true; - } - } - } - - return false; - } - - function array_equal( $a1, $a2 ) { - return ! array_diff( $a1, $a2 ) && ! array_diff( $a2, $a1 ); - } - public function count_forms_with_properties( $args ) { - $form_count = 0; - - $this->get_all_search_forms(); - - foreach ( $this->all_search_form_ids as $search_form_id ) { - // as we only want to update "enabled", then load all settings and update only this key - $search_form_settings = Search_Filter_Helper::get_settings_meta( $search_form_id ); - - $first_match = false; - $second_match = false; - - if ( $this->has_property_value( $search_form_settings, $args['property_key'], $args['property_value'] ) ) { - $first_match = true; - } - - if ( ! isset( $args['secondary_key'] ) ) { - $second_match = true; // its not a match but we ignore it - } elseif ( ( isset( $args['secondary_key'] ) ) && ( isset( $args['secondary_value'] ) ) ) { - if ( $this->has_property_value( $search_form_settings, $args['secondary_key'], $args['secondary_value'] ) ) { - $second_match = true; - } - } - - if ( ( $first_match == true ) && ( $second_match == true ) ) { - $form_count++; - } - } - - return $form_count; - } - - - public function get_all_search_forms() { - $search_form_query = new WP_Query( 'post_type=search-filter-widget&fields=ids&post_status=publish&posts_per_page=-1' ); - $this->all_search_form_ids = $search_form_query->get_posts(); - - } - // fg - public function set_post_type_archive_attributes_error( $post_types ) { - if ( count( $post_types ) == 1 ) { - // check to see if the post type is public - otherwise the archive URL simply will not work - - if ( $post_types[0] == 'post' ) {// ignore for posts - we treat the blog page as its archive - return; - } - - $post_type_object = get_post_type_object( $post_types[0] ); - - $archive_error = false; - if ( isset( $post_type_object->has_archive ) ) { - if ( $post_type_object->has_archive == false ) { - // has_archive - $archive_error = true; - } - } else { - $archive_error = true; - } - - if ( $archive_error == true ) { - $label_name = ''; - - if ( isset( $post_type_object->label ) ) { - $label_name = $post_type_object->label; - } - - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'The `has_archive` attribute is set to false for the post type %s - this must be enabled in order to use the Post Type Archive in WP', $this->plugin_slug ), $label_name ), - ); - - array_push( $this->post_message_log, $message ); - } - } - } - // check to ensure the post types selected are only in the required list - public function set_max_post_types_error( $post_types, $max_post_types ) { - if ( count( $post_types ) > $max_post_types ) { - $message = array( - 'type' => 'error', - 'message' => sprintf( __( 'You can only select %d post type(s) - or change your display method', $this->plugin_slug ), $max_post_types ), - ); - - array_push( $this->post_message_log, $message ); - } - } - - // check to ensure the post types selected are only in the required list - public function set_post_types_error( $post_types, $req_post_types ) { - $error = false; - foreach ( $post_types as $post_type ) { - if ( ! in_array( $post_type, $req_post_types ) ) { - $error = true; - } - } - - $post_types_labels = array(); - - foreach ( $req_post_types as $post_type ) { - - $post_type_object = get_post_type_object( $post_type ); - - $label_name = ''; - if ( isset( $post_type_object->label ) ) { - $label_name = $post_type_object->label; - } - - array_push( $post_types_labels, $label_name ); - } - - if ( $error == true ) { - $message = array( - 'type' => 'error', - 'message' => __( 'You can only select the following post types: ', $this->plugin_slug ) . '' . implode( ', ', $post_types_labels ) . '' . __( ' (or change your display method)', $this->plugin_slug ), - ); - - array_push( $this->post_message_log, $message ); - } - } - - public function set_results_url_error( $results_url ) { - if ( $results_url == '' ) { - $message = array( - 'type' => 'error', - 'message' => __( 'Your Results URL is empty - go to Display Results tab to fix', $this->plugin_slug ), - ); - - array_push( $this->post_message_log, $message ); - } - - } - - public function display_post_notices() { - foreach ( $this->post_message_log as $post_message ) { - ?> -
    -

    - plugin_slug ); - if ( $post_message['type'] == 'sf-notice' ) { - $message_level = __( 'Notice:', $this->plugin_slug ); - } - // _e( 'Search & Filter Error: ', $this->plugin_slug ); - echo '' . $message_level . ' '; - echo $post_message['message']; - ?> -

    -
    - post_message_log; - } - - public function clear_post_notices() { - $this->post_message_log = array(); - } - - public function admin_notices() { - - global $current_screen; - global $current_user; - - $user_id = $current_user->ID; - - // set default user meta - if ( $current_screen->id == 'edit-search-filter-widget' ) { - if ( ! get_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice' ) ) { - add_user_meta( $user_id, $this->plugin_slug . '-show-welcome-notice', '1', true ); - } - - $this->set_all_post_notices(); - $this->display_all_post_notices(); - } elseif ( $current_screen->id == $this->plugin_slug . '-widget' ) { - $this->set_post_notices(); - $this->display_post_notices(); - } - - global $wpdb; - $table_error = false; - /* - ?> -
    -

    - Search & Filter Error: The caching tables are missing - ', $this->plugin_slug ); ?> - plugin_slug ); ?> -

    -
    - plugin_slug = 'search-filter'; - - } - - public function get_clean_widget_data( $widget_data ) { - $clean_widget = array(); - - if ( $widget_data['type'] == 'search' ) { - $clean_widget = $this->clean_search_widget( $widget_data ); - } elseif ( ( $widget_data['type'] == 'tag' ) || ( $widget_data['type'] == 'category' ) || ( $widget_data['type'] == 'taxonomy' ) ) { - $clean_widget = $this->clean_taxonomy_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'post_type' ) { - $clean_widget = $this->clean_post_type_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'post_date' ) { - $clean_widget = $this->clean_post_date_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'author' ) { - $clean_widget = $this->clean_author_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'post_meta' ) { - $clean_widget = $this->clean_post_meta_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'sort_order' ) { - $clean_widget = $this->clean_sort_order_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'posts_per_page' ) { - $clean_widget = $this->clean_posts_per_page_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'submit' ) { - $clean_widget = $this->clean_submit_widget( $widget_data ); - } elseif ( $widget_data['type'] == 'reset' ) { - $clean_widget = $this->clean_reset_widget( $widget_data ); - } - - return $clean_widget; - - } - - private function clean_search_widget( $widget_data ) { - $clean_widget = array(); - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['placeholder'] = sanitize_text_field( $widget_data['placeholder'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - - return $clean_widget; - } - private function clean_taxonomy_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'taxonomy_name' => '', - 'input_type' => '', - 'heading' => '', - 'all_items_label' => '', - 'operator' => '', - 'show_count' => '', - 'hide_empty' => '', - 'hierarchical' => '', - 'include_children' => '', - 'accessibility_label' => '', - 'drill_down' => '', - 'order_by' => '', - 'order_dir' => '', - 'exclude_ids' => '', - 'sync_include_exclude' => '', - 'combo_box' => '', - 'no_results_message' => '', - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - $clean_widget['all_items_label'] = sanitize_text_field( $widget_data['all_items_label'] ); - - $clean_widget['show_count'] = $this->sanitize_checkbox( $widget_data['show_count'] ); - $clean_widget['hide_empty'] = $this->sanitize_checkbox( $widget_data['hide_empty'] ); - $clean_widget['hierarchical'] = $this->sanitize_checkbox( $widget_data['hierarchical'] ); - $clean_widget['include_children'] = $this->sanitize_checkbox( $widget_data['include_children'] ); - $clean_widget['drill_down'] = $this->sanitize_checkbox( $widget_data['drill_down'] ); - $clean_widget['sync_include_exclude'] = $this->sanitize_checkbox( $widget_data['sync_include_exclude'] ); - - $clean_widget['combo_box'] = $this->sanitize_checkbox( $widget_data['combo_box'] ); - $clean_widget['no_results_message'] = sanitize_text_field( $widget_data['no_results_message'] ); - - $clean_widget['operator'] = sanitize_key( $widget_data['operator'] ); - $clean_widget['order_by'] = sanitize_key( $widget_data['order_by'] ); - $clean_widget['order_dir'] = sanitize_key( $widget_data['order_dir'] ); - - $clean_widget['exclude_ids'] = $this->clean_exclude_ids( $widget_data['exclude_ids'] ); - - // if($widget_data['type']=="taxonomy") - // { - - $clean_widget['taxonomy_name'] = sanitize_text_field( $widget_data['taxonomy_name'] ); - - // } - - return $clean_widget; - } - - private function clean_post_type_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'post_types' => array(), - 'input_type' => '', - 'heading' => '', - 'all_items_label' => '', - 'show_count' => '', - 'hide_empty' => '', - 'accessibility_label' => '', - - 'order_by' => '', - 'order_dir' => '', - 'combo_box' => '', - 'no_results_message' => '', - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - foreach ( $widget_data['post_types'] as $key => $val ) { - $clean_widget['post_types'][ $key ] = $this->sanitize_checkbox( $val ); - } - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['all_items_label'] = sanitize_text_field( $widget_data['all_items_label'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - - $clean_widget['combo_box'] = $this->sanitize_checkbox( $widget_data['combo_box'] ); - $clean_widget['no_results_message'] = sanitize_text_field( $widget_data['no_results_message'] ); - - // $clean_widget['show_count'] = $this->sanitize_checkbox($widget_data['show_count']); - // $clean_widget['hide_empty'] = $this->sanitize_checkbox($widget_data['hide_empty']); - - // $clean_widget['order_by'] = sanitize_key($widget_data['order_by']); - // $clean_widget['order_dir'] = sanitize_key($widget_data['order_dir']); - - return $clean_widget; - } - - private function clean_post_date_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'input_type' => '', - 'heading' => '', - 'date_format' => '', - 'accessibility_label' => '', - - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - - $clean_widget['date_format'] = sanitize_text_field( $widget_data['date_format'] ); - - $clean_widget['date_from_prefix'] = sanitize_text_field( $widget_data['date_from_prefix'] ); - $clean_widget['date_from_postfix'] = sanitize_text_field( $widget_data['date_from_postfix'] ); - $clean_widget['date_from_placeholder'] = sanitize_text_field( $widget_data['date_from_placeholder'] ); - $clean_widget['date_to_prefix'] = sanitize_text_field( $widget_data['date_to_prefix'] ); - $clean_widget['date_to_postfix'] = sanitize_text_field( $widget_data['date_to_postfix'] ); - $clean_widget['date_to_placeholder'] = sanitize_text_field( $widget_data['date_to_placeholder'] ); - - $clean_widget['date_use_dropdown_month'] = $this->sanitize_checkbox( $widget_data['date_use_dropdown_month'] ); - $clean_widget['date_use_dropdown_year'] = $this->sanitize_checkbox( $widget_data['date_use_dropdown_year'] ); - - return $clean_widget; - } - - private function clean_author_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'input_type' => '', - 'heading' => '', - 'optioncount' => '', - 'exclude_admin' => '', - 'show_fullname' => '', - 'order_by' => '', - 'order_dir' => '', - 'hide_empty' => '', - 'operator' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'exclude' => '', - 'combo_box' => '', - 'no_results_message' => '', - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['all_items_label'] = sanitize_text_field( $widget_data['all_items_label'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - - $clean_widget['optioncount'] = $this->sanitize_checkbox( $widget_data['optioncount'] ); - $clean_widget['exclude_admin'] = $this->sanitize_checkbox( $widget_data['exclude_admin'] ); - $clean_widget['show_fullname'] = $this->sanitize_checkbox( $widget_data['show_fullname'] ); - $clean_widget['hide_empty'] = $this->sanitize_checkbox( $widget_data['hide_empty'] ); - $clean_widget['combo_box'] = $this->sanitize_checkbox( $widget_data['combo_box'] ); - $clean_widget['no_results_message'] = sanitize_text_field( $widget_data['no_results_message'] ); - - $clean_widget['operator'] = sanitize_key( $widget_data['operator'] ); - $clean_widget['order_by'] = sanitize_key( $widget_data['order_by'] ); - $clean_widget['order_dir'] = sanitize_key( $widget_data['order_dir'] ); - - $clean_widget['exclude'] = $this->clean_exclude_ids( $widget_data['exclude'] ); - - return $clean_widget; - } - - private function clean_post_meta_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - - 'heading' => '', - 'input_type' => '', - - 'meta_type' => '', - 'meta_key' => '', - 'meta_key_manual' => '', - 'meta_key_manual_toggle' => '', - - 'choice_heading' => '', - 'choice_meta_key' => '', - - 'choice_get_option_mode' => 'auto', - 'choice_order_option_by' => 'value', - 'choice_order_option_dir' => 'asc', - 'choice_order_option_type' => 'alphabetic', - 'choice_is_acf' => '', - 'choice_accessibility_label' => '', - - 'number_heading' => '', - 'number_start_meta_key' => '', - 'number_end_meta_key' => '', - 'number_use_same_toggle' => '', - 'number_accessibility_label' => '', - - 'date_heading' => '', - 'date_start_meta_key' => '', - 'date_end_meta_key' => '', - 'date_meta_key' => '', - 'date_use_same_toggle' => '', - 'date_from_prefix' => '', - 'date_from_postfix' => '', - 'date_from_placeholder' => '', - 'date_to_prefix' => '', - 'date_to_postfix' => '', - 'date_to_placeholder' => '', - 'date_use_dropdown_year' => '', - 'date_use_dropdown_month' => '', - 'date_accessibility_label' => '', - - 'number_input_type' => '', - 'number_is_decimal' => '', - 'choice_input_type' => '', - 'combo_box' => '', - 'no_results_message' => '', - 'show_count' => '', - 'hide_empty' => '', - 'date_input_type' => '', - - 'range_min_detect' => '', - 'range_max_detect' => '', - 'range_min' => '0', - 'range_max' => '1000', - 'range_step' => '10', - - 'thousand_seperator' => '', - 'decimal_seperator' => '', - 'decimal_places' => '0', - 'number_decimal_places' => '2', - 'number_values_seperator' => ' - ', - 'number_display_values_as' => 'textinput', - 'number_display_input_as' => 'singlefield', - - 'range_value_prefix' => '', - 'range_value_postfix' => '', - - 'date_output_format' => 'd/m/Y', - 'date_input_format' => 'timestamp', - 'date_compare_mode' => 'userrange', - 'number_compare_mode' => 'userrange', - - 'operator' => '', - 'all_items_label' => '', - 'all_items_label_number' => '', - - 'meta_options' => array(), - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - $clean_widget['meta_type'] = sanitize_key( $widget_data['meta_type'] ); - - $clean_widget['number_input_type'] = sanitize_key( $widget_data['number_input_type'] ); - $clean_widget['number_is_decimal'] = $this->sanitize_checkbox( $widget_data['number_is_decimal'] ); - $clean_widget['choice_input_type'] = sanitize_key( $widget_data['choice_input_type'] ); - $clean_widget['date_input_type'] = sanitize_key( $widget_data['date_input_type'] ); - - // $clean_widget['meta_key_manual'] = sanitize_text_field($widget_data['meta_key_manual']); - - $clean_widget['meta_key_manual_toggle'] = $this->sanitize_checkbox( $widget_data['meta_key_manual_toggle'] ); - $clean_widget['combo_box'] = $this->sanitize_checkbox( $widget_data['combo_box'] ); - $clean_widget['no_results_message'] = sanitize_text_field( $widget_data['no_results_message'] ); - $clean_widget['show_count'] = $this->sanitize_checkbox( $widget_data['show_count'] ); - $clean_widget['hide_empty'] = $this->sanitize_checkbox( $widget_data['hide_empty'] ); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - - $clean_widget['choice_meta_key'] = sanitize_text_field( $widget_data['choice_meta_key'] ); - - $clean_widget['choice_accessibility_label'] = sanitize_text_field( $widget_data['choice_accessibility_label'] ); - $clean_widget['choice_get_option_mode'] = sanitize_key( $widget_data['choice_get_option_mode'] ); - $clean_widget['choice_order_option_by'] = sanitize_key( $widget_data['choice_order_option_by'] ); - $clean_widget['choice_order_option_dir'] = sanitize_key( $widget_data['choice_order_option_dir'] ); - $clean_widget['choice_order_option_type'] = sanitize_key( $widget_data['choice_order_option_type'] ); - $clean_widget['choice_is_acf'] = $this->sanitize_checkbox( $widget_data['choice_is_acf'] ); - - $clean_widget['date_accessibility_label'] = sanitize_text_field( $widget_data['date_accessibility_label'] ); - $clean_widget['date_meta_key'] = sanitize_text_field( $widget_data['date_meta_key'] ); - $clean_widget['date_start_meta_key'] = sanitize_text_field( $widget_data['date_start_meta_key'] ); - $clean_widget['date_end_meta_key'] = sanitize_text_field( $widget_data['date_end_meta_key'] ); - $clean_widget['date_use_same_toggle'] = $this->sanitize_checkbox( $widget_data['date_use_same_toggle'] ); - - $clean_widget['number_accessibility_label'] = sanitize_text_field( $widget_data['number_accessibility_label'] ); - $clean_widget['number_start_meta_key'] = sanitize_text_field( $widget_data['number_start_meta_key'] ); - $clean_widget['number_end_meta_key'] = sanitize_text_field( $widget_data['number_end_meta_key'] ); - $clean_widget['number_use_same_toggle'] = $this->sanitize_checkbox( $widget_data['number_use_same_toggle'] ); - - if ( $clean_widget['meta_type'] == 'number' ) { - $clean_widget['heading'] = sanitize_text_field( $widget_data['number_heading'] ); - $clean_widget['meta_key'] = sanitize_text_field( $widget_data['number_start_meta_key'] ); - } elseif ( $clean_widget['meta_type'] == 'choice' ) { - $clean_widget['heading'] = sanitize_text_field( $widget_data['choice_heading'] ); - $clean_widget['meta_key'] = sanitize_text_field( $widget_data['choice_meta_key'] ); - } elseif ( $clean_widget['meta_type'] == 'date' ) { - $clean_widget['heading'] = sanitize_text_field( $widget_data['date_heading'] ); - $clean_widget['meta_key'] = sanitize_text_field( $widget_data['date_start_meta_key'] ); - } - - $clean_widget['date_from_prefix'] = $this->sanitize_text_field_kws( $widget_data['date_from_prefix'] ); - $clean_widget['date_from_postfix'] = $this->sanitize_text_field_kws( $widget_data['date_from_postfix'] ); - $clean_widget['date_from_placeholder'] = sanitize_text_field( $widget_data['date_from_placeholder'] ); - $clean_widget['date_to_prefix'] = $this->sanitize_text_field_kws( $widget_data['date_to_prefix'] ); - $clean_widget['date_to_postfix'] = $this->sanitize_text_field_kws( $widget_data['date_to_postfix'] ); - $clean_widget['date_to_placeholder'] = sanitize_text_field( $widget_data['date_to_placeholder'] ); - - $clean_widget['date_use_dropdown_month'] = $this->sanitize_checkbox( $widget_data['date_use_dropdown_month'] ); - $clean_widget['date_use_dropdown_year'] = $this->sanitize_checkbox( $widget_data['date_use_dropdown_year'] ); - - $clean_widget['decimal_places'] = (int) $widget_data['decimal_places']; - if ( $clean_widget['decimal_places'] > 5 ) { - $clean_widget['decimal_places'] = 5; - } elseif ( $clean_widget['decimal_places'] < 0 ) { - $clean_widget['decimal_places'] = 0; - } - - $clean_widget['number_decimal_places'] = (int) $widget_data['number_decimal_places']; - if ( $clean_widget['number_decimal_places'] > 5 ) { - $clean_widget['number_decimal_places'] = 5; - } elseif ( $clean_widget['number_decimal_places'] < 0 ) { - $clean_widget['number_decimal_places'] = 0; - } - $clean_widget['thousand_seperator'] = $this->sanitize_text_field_kws( $widget_data['thousand_seperator'] ); - $clean_widget['decimal_seperator'] = $this->sanitize_text_field_kws( $widget_data['decimal_seperator'] ); - $clean_widget['number_values_seperator'] = $this->sanitize_text_field_kws( $widget_data['number_values_seperator'] ); - $clean_widget['number_display_values_as'] = sanitize_text_field( $widget_data['number_display_values_as'] ); - $clean_widget['number_display_input_as'] = sanitize_text_field( $widget_data['number_display_input_as'] ); - - $clean_widget['range_min_detect'] = $this->sanitize_checkbox( $widget_data['range_min_detect'] ); - $clean_widget['range_max_detect'] = $this->sanitize_checkbox( $widget_data['range_max_detect'] ); - - // convert all numeric data to correct format based on decimal places and `is_decimal` - $range_min = $widget_data['range_min']; - $range_max = $widget_data['range_max']; - $range_step = $widget_data['range_step']; - $decimal_point = '.'; - - if ( $clean_widget['number_is_decimal'] == 0 ) {// if data is not actually decimal, its really only cosmetic to display the the decimal places - so remove all decimals to reset them to 0 on the next `number_format` call - $range_min = number_format( (float) $range_min, 0, $decimal_point, '' ); - $range_max = number_format( (float) $range_max, 0, $decimal_point, '' ); - $range_step = number_format( (float) $range_step, 0, $decimal_point, '' ); - - } else { // also remove any data in extra decimal places - $range_min = number_format( (float) $range_min, $clean_widget['number_decimal_places'], $decimal_point, '' ); - $range_max = number_format( (float) $range_max, $clean_widget['number_decimal_places'], $decimal_point, '' ); - $range_step = number_format( (float) $range_step, $clean_widget['number_decimal_places'], $decimal_point, '' ); - } - - $decimal_places = $clean_widget['decimal_places']; - if ( $clean_widget['number_input_type'] == 'range-number' ) { - $decimal_places = 0; - } - $clean_widget['range_min'] = number_format( (float) $range_min, $decimal_places, $decimal_point, '' ); - $clean_widget['range_max'] = number_format( (float) $range_max, $decimal_places, $decimal_point, '' ); - $clean_widget['range_step'] = number_format( (float) $range_step, $decimal_places, $decimal_point, '' ); - - $clean_widget['range_value_prefix'] = $this->sanitize_text_field_kws( $widget_data['range_value_prefix'] ); - $clean_widget['range_value_postfix'] = $this->sanitize_text_field_kws( $widget_data['range_value_postfix'] ); - - $clean_widget['date_input_format'] = sanitize_text_field( $widget_data['date_input_format'] ); - $clean_widget['date_compare_mode'] = sanitize_text_field( $widget_data['date_compare_mode'] ); - $clean_widget['number_compare_mode'] = sanitize_text_field( $widget_data['number_compare_mode'] ); - - $clean_widget['date_output_format'] = sanitize_text_field( $widget_data['date_output_format'] ); - - $clean_widget['all_items_label'] = sanitize_text_field( $widget_data['all_items_label'] ); - $clean_widget['all_items_label_number'] = sanitize_text_field( $widget_data['all_items_label_number'] ); - $clean_widget['operator'] = sanitize_key( $widget_data['operator'] ); - - $clean_widget['meta_options'] = array(); - $so_count = 0; - - if ( $clean_widget['choice_get_option_mode'] == 'manual' ) { - if ( isset( $widget_data['meta_options'] ) ) { - foreach ( $widget_data['meta_options'] as $meta_option ) { - - $clean_widget['meta_options'][ $so_count ] = array(); - - foreach ( $meta_option as $key => $val ) { - - if ( $key == 'option_value' ) { - $clean_widget['meta_options'][ $so_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'option_label' ) { - $clean_widget['meta_options'][ $so_count ][ $key ] = sanitize_text_field( $val ); - } - } - - $so_count++; - } - } - } - return $clean_widget; - } - function sanitize_text_field_kws( $str ) { - $filtered = wp_check_invalid_utf8( $str ); - - if ( strpos( $filtered, '<' ) !== false ) { - $filtered = wp_pre_kses_less_than( $filtered ); - // This will strip extra whitespace for us. - $filtered = wp_strip_all_tags( $filtered, true ); - } else { - $filtered = ( preg_replace( '/[\r\n\t ]+/', ' ', $filtered ) ); - } - - $found = false; - while ( preg_match( '/%[a-f0-9]{2}/i', $filtered, $match ) ) { - $filtered = str_replace( $match[0], '', $filtered ); - $found = true; - } - - if ( $found ) { - // Strip out the whitespace that may now exist after removing the octets. - $filtered = trim( preg_replace( '/ +/', ' ', $filtered ) ); - } - - /** - * Filter a sanitized text field string. - * - * @since 2.9.0 - * - * @param string $filtered The sanitized string. - * @param string $str The string prior to being sanitized. - */ - return apply_filters( 'sanitize_text_field', $filtered, $str ); - } - - private function clean_sort_order_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - /* - 'meta_key' => '', - 'meta_key_manual' => '', - 'meta_key_manual_toggle' => '',*/ - /* - 'sort_by' => '', - 'sort_dir' => '', - 'sort_label' => '',*/ - 'input_type' => '', - 'accessibility_label' => '', - 'heading' => '', - 'all_items_label' => '', - 'sort_options' => array(), - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - // $clean_widget['meta_key'] = sanitize_key($widget_data['meta_key']); - // $clean_widget['meta_key_manual'] = sanitize_key($widget_data['meta_key_manual']); - // $clean_widget['meta_key_manual_toggle'] = $this->sanitize_checkbox($widget_data['meta_key_manual_toggle']); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['all_items_label'] = sanitize_text_field( $widget_data['all_items_label'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - - $clean_widget['sort_options'] = array(); - $so_count = 0; - - if ( isset( $widget_data['sort_options'] ) ) { - foreach ( $widget_data['sort_options'] as $sort_option ) { - $clean_widget['sort_options'][ $so_count ] = array(); - - foreach ( $sort_option as $key => $val ) { - - if ( $key == 'meta_key' ) { - $clean_widget['sort_options'][ $so_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'name' ) { - $clean_widget['sort_options'][ $so_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'sort_type' ) { - $clean_widget['sort_options'][ $so_count ][ $key ] = sanitize_key( $val ); - } elseif ( $key == 'sort_by' ) { - $clean_widget['sort_options'][ $so_count ][ $key ] = sanitize_key( $val ); - } elseif ( $key == 'sort_dir' ) { - $clean_widget['sort_options'][ $so_count ][ $key ] = sanitize_key( $val ); - } elseif ( $key == 'sort_label' ) { - $clean_widget['sort_options'][ $so_count ][ $key ] = sanitize_text_field( $val ); - } - } - - $so_count++; - } - } - - return $clean_widget; - } - private function clean_posts_per_page_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'input_type' => '', - 'accessibility_label' => '', - 'heading' => '', - 'all_items_label' => '', - 'ppp_min' => '25', - 'ppp_max' => '100', - 'ppp_step' => '25', - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['all_items_label'] = sanitize_text_field( $widget_data['all_items_label'] ); - $clean_widget['accessibility_label'] = sanitize_text_field( $widget_data['accessibility_label'] ); - - $clean_widget['ppp_min'] = (int) $widget_data['ppp_min']; - $clean_widget['ppp_max'] = (int) $widget_data['ppp_max']; - $clean_widget['ppp_step'] = (int) $widget_data['ppp_step']; - - return $clean_widget; - } - - private function clean_submit_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'heading' => '', - 'label' => 'Submit', - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - - $clean_widget['label'] = sanitize_text_field( $widget_data['label'] ); - - return $clean_widget; - } - - private function clean_reset_widget( $widget_data ) { - $clean_widget = array(); - - $defaults = array( - 'heading' => '', - 'label' => 'Reset', - 'submit_form' => 'always', - 'input_type' => 'link', - ); - - $widget_data = array_replace( $defaults, $widget_data ); - - $clean_widget['type'] = sanitize_text_field( $widget_data['type'] ); - $clean_widget['heading'] = sanitize_text_field( $widget_data['heading'] ); - $clean_widget['input_type'] = sanitize_key( $widget_data['input_type'] ); - $clean_widget['submit_form'] = sanitize_key( $widget_data['submit_form'] ); - $clean_widget['label'] = sanitize_text_field( $widget_data['label'] ); - - return $clean_widget; - } - - - // utility functions - - public function sanitize_checkbox( $value ) { - if ( $value != '' ) { - return 1; - } else { - return 0; - } - } - - public function clean_exclude_ids( $exclude_ids ) { - return implode( ',', $this->arrayToInt( array_map( 'trim', explode( ',', $exclude_ids ) ) ) ); - } - - - private function arrayToInt( array $arr ) { - foreach ( $arr as &$a ) { - - $a = trim( $a ); - if ( $a != '' ) { - $a = (int) $a; - } - } - - return array_filter( $arr ); - } - -} - diff --git a/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-posts-admin.php b/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-posts-admin.php deleted file mode 100644 index e587ea32..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-posts-admin.php +++ /dev/null @@ -1,1308 +0,0 @@ -plugin_slug = 'search-filter'; - - // Load widgets admin style she et and JavaScript. - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) ); - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) ); - - add_action( 'add_meta_boxes', array( $this, 'add_posts_meta_boxes' ) ); - add_action( 'admin_notices', array( $this, 'sf_posts_admin_notice' ) ); - - /* Save post meta on the 'save_post' hook. */ - add_action( 'save_post', array( $this, 'save_search_form_meta' ), 10, 2 ); - - /* - AJAX */ - /* - add_action( 'wp_ajax_meta_prefs_set', array($this, 'meta_prefs_set') ); //if logged in - add_action( 'wp_ajax_nopriv_meta_prefs_set', array($this, 'meta_prefs_set') ); //if not logged in - */ - - } - - public function enqueue_admin_styles() { - // wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/admin.css' ), array(), Search_Filter_Admin::VERSION ); - } - public function enqueue_admin_scripts() { - wp_enqueue_script( $this->plugin_slug . '-admin-posts-script', plugins_url( '/assets/js/admin-posts.js', dirname( __FILE__ ) ), array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery' ), Search_Filter_Admin::VERSION ); - } - - function save_search_form_meta( $post_id, $post ) { - // init post data validatin class - $this->post_data_validation = new Search_Filter_Post_Data_Validation(); - - /* Verify the nonce before proceeding. */ - if ( ! isset( $_POST[ $this->plugin_slug . '_nonce' ] ) || ! wp_verify_nonce( $_POST[ $this->plugin_slug . '_nonce' ], 'search_form_nonce' ) ) { - return $post_id; - } - - /* Get the post type object. */ - $post_type = get_post_type_object( $post->post_type ); - - /* Check if the current user has permission to edit the post. */ - if ( ! current_user_can( $post_type->cap->edit_post, $post_id ) ) { - return $post_id; - } - - $this->process_search_form_post( $post_id ); - $this->process_settings_post( $post_id ); - $this->process_results_results_url_post( $post_id ); - $this->process_cache_post( $post_id ); - - } - public function sf_posts_admin_notice() { - ?> - - - post_data_validation->get_clean_widget_data( $widget ); - } - - $wc++; - - } - } - - $new_meta_value = $clean_widgets; - } - - /* Get the meta key. */ - $meta_key = '_search-filter-fields'; - - /* Get the meta value of the custom field key. */ - $meta_value = get_post_meta( $post_id, $meta_key, true ); - - /* If a new meta value was added and there was no previous value, add it. */ - if ( $new_meta_value && '' == $meta_value ) { - delete_post_meta( $post_id, $meta_key, $meta_value ); // delete first before adding again - overcomes some issues - add_post_meta( $post_id, $meta_key, $new_meta_value, true ); - - } /* If the new meta value does not match the old value, update it. */ - elseif ( $new_meta_value && $new_meta_value != $meta_value ) { - update_post_meta( $post_id, $meta_key, $new_meta_value ); - - } /* If there is no new meta value but an old value exists, delete it. */ - elseif ( '' == $new_meta_value && $meta_value ) { - delete_post_meta( $post_id, $meta_key, $meta_value ); - } - } - - private function process_results_results_url_post( $post_id ) { - $results_url = ''; - - if ( isset( $_POST['results_url'] ) ) { - $results_url = sanitize_text_field( $_POST['results_url'] ); - } - - /* Get the meta key. */ - $meta_key = '_search-filter-results-url'; - - /* Get the meta value of the custom field key. */ - $meta_value = get_post_meta( $post_id, $meta_key, true ); - - /* If a new meta value was added and there was no previous value, add it. */ - if ( $results_url && '' == $meta_value ) { - delete_post_meta( $post_id, $meta_key, $meta_value ); // delete first before adding again - overcomes some issues - add_post_meta( $post_id, $meta_key, $results_url, true ); - - } else { - update_post_meta( $post_id, $meta_key, $results_url ); - } - - /* - If the new meta value does not match the old value, update it. */ - /* - elseif ( $results_url && $results_url != $meta_value ) - { - update_post_meta( $post_id, $meta_key, $results_url ); - - }*/ - - /* - If there is no new meta value but an old value exists, delete it. */ - /* - elseif ( '' == $results_url && $meta_value ) - { - delete_post_meta( $post_id, $meta_key, $meta_value ); - - }*/ - } - - private function process_settings_post( $post_id ) { - $settings = array(); - $settings['post_types'] = array(); - $settings['post_status'] = array(); - $settings['use_template_manual_toggle'] = ''; - $settings['enable_taxonomy_archives'] = ''; - $settings['enable_auto_count'] = ''; - $settings['auto_count_refresh_mode'] = ''; - $settings['auto_count_deselect_emtpy'] = ''; - $settings['template_name_manual'] = ''; - $settings['page_slug'] = ''; - $settings['use_ajax_toggle'] = ''; - $settings['pagination_type'] = ''; - // $settings['infinite_scroll_additional_selector_type'] = ""; - $settings['maintain_state'] = ''; - $settings['inherit_current_post_type_archive'] = ''; - $settings['inherit_current_taxonomy_archive'] = ''; - $settings['inherit_current_single_post'] = ''; - $settings['inherit_current_author_archive'] = ''; - $settings['inherit_current_date_archive'] = ''; - $settings['use_relevanssi'] = ''; - $settings['use_relevanssi_sort'] = ''; - // $settings['treat_child_posts_as_parent'] = ""; - $settings['use_woocommerce'] = ''; - $settings['force_is_search'] = ''; - $settings['force_is_archive'] = ''; - // $settings['results_url'] = ""; - - $settings['ajax_target'] = ''; - $settings['ajax_links_selector'] = ''; - $settings['infinite_scroll_container'] = ''; - $settings['infinite_scroll_trigger'] = ''; - $settings['infinite_scroll_result_class'] = ''; - $settings['infinite_scroll_result_class'] = ''; - $settings['show_infinite_scroll_loader'] = ''; - - $settings['auto_submit'] = ''; - // $settings['use_results_shortcode'] = ""; - $settings['display_results_as'] = ''; - $settings['update_ajax_url'] = ''; - $settings['only_results_ajax'] = ''; - $settings['posts_per_page'] = ''; - $settings['exclude_post_ids'] = ''; - $settings['field_relation'] = 'and'; - $settings['meta_relation'] = ''; /* todo */ - $settings['default_sort_by'] = ''; - $settings['sticky_posts'] = ''; - $settings['default_sort_dir'] = ''; - $settings['settings_post_meta'] = ''; - - $settings = array(); - - if ( isset( $_POST['use_template_manual_toggle'] ) ) { - $settings['use_template_manual_toggle'] = $this->post_data_validation->sanitize_checkbox( $_POST['use_template_manual_toggle'] ); - } else { - $settings['use_template_manual_toggle'] = 0; - } - if ( isset( $_POST['enable_taxonomy_archives'] ) ) { - $settings['enable_taxonomy_archives'] = $this->post_data_validation->sanitize_checkbox( $_POST['enable_taxonomy_archives'] ); - } else { - $settings['enable_taxonomy_archives'] = 0; - } - if ( isset( $_POST['enable_auto_count'] ) ) { - $settings['enable_auto_count'] = $this->post_data_validation->sanitize_checkbox( $_POST['enable_auto_count'] ); - } else { - $settings['enable_auto_count'] = 0; - } - - if ( isset( $_POST['auto_count_refresh_mode'] ) ) { - $settings['auto_count_refresh_mode'] = $this->post_data_validation->sanitize_checkbox( $_POST['auto_count_refresh_mode'] ); - } else { - $settings['auto_count_refresh_mode'] = 0; - } - - if ( isset( $_POST['auto_count_deselect_emtpy'] ) ) { - $settings['auto_count_deselect_emtpy'] = $this->post_data_validation->sanitize_checkbox( $_POST['auto_count_deselect_emtpy'] ); - } else { - $settings['auto_count_deselect_emtpy'] = 0; - } - - if ( isset( $_POST['template_name_manual'] ) ) { - // $settings['template_name_manual'] = $this->sanitize_template_path($_POST['template_name_manual']); //this leaves the field blank - // $settings['template_name_manual'] = sanitize_file_name($_POST['template_name_manual']); //this removes slashes - $settings['template_name_manual'] = esc_attr( $_POST['template_name_manual'] ); // this works but might not be as safe - } - - if ( isset( $_POST['page_slug'] ) ) { - $settings['page_slug'] = sanitize_key( $_POST['page_slug'] ); - } - - if ( isset( $_POST['settings_post_types'] ) ) { - if ( is_array( $_POST['settings_post_types'] ) ) { - foreach ( $_POST['settings_post_types'] as $key => $val ) { - $settings['post_types'][ $key ] = $this->post_data_validation->sanitize_checkbox( $val ); - } - } - } - - if ( isset( $_POST['settings_post_status'] ) ) { - if ( is_array( $_POST['settings_post_status'] ) ) { - foreach ( $_POST['settings_post_status'] as $key => $val ) { - $settings['post_status'][ $key ] = $this->post_data_validation->sanitize_checkbox( $val ); - } - } - } - - if ( isset( $_POST['settings_post_meta'] ) ) { - - if ( is_array( $_POST['settings_post_meta'] ) ) { - $meta_count = 0; - - if ( isset( $_POST['settings_post_meta']['{0}'] ) ) { - unset( $_POST['settings_post_meta']['{0}'] ); - } - - foreach ( $_POST['settings_post_meta'] as $post_meta_setting ) { - - foreach ( $post_meta_setting as $key => $val ) { - - if ( $key == 'meta_key' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_compare' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_value' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_type' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_date_value_day' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_date_value_month' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_date_value_year' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_date_value_date' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_date_value_timestamp' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = sanitize_text_field( $val ); - } elseif ( $key == 'meta_date_value_current_date' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = $this->post_data_validation->sanitize_checkbox( $val ); - } elseif ( $key == 'meta_date_value_current_timestamp' ) { - $settings['settings_post_meta'][ $meta_count ][ $key ] = $this->post_data_validation->sanitize_checkbox( $val ); - } - } - $meta_count++; - } - } - } - - if ( isset( $_POST['use_ajax_toggle'] ) ) { - $settings['use_ajax_toggle'] = $this->post_data_validation->sanitize_checkbox( $_POST['use_ajax_toggle'] ); - } - - if ( isset( $_POST['scroll_to_pos'] ) ) { - $settings['scroll_to_pos'] = sanitize_key( $_POST['scroll_to_pos'] ); - } - - if ( isset( $_POST['pagination_type'] ) ) { - $settings['pagination_type'] = sanitize_key( $_POST['pagination_type'] ); - } - /* - if(isset($_POST['infinite_scroll_additional_selector_type'])) - { - $settings['infinite_scroll_additional_selector_type'] = sanitize_key($_POST['infinite_scroll_additional_selector_type']); - }*/ - - if ( isset( $_POST['custom_scroll_to'] ) ) { - $settings['custom_scroll_to'] = sanitize_text_field( $_POST['custom_scroll_to'] ); - } - if ( isset( $_POST['scroll_on_action'] ) ) { - $settings['scroll_on_action'] = sanitize_text_field( $_POST['scroll_on_action'] ); - } - - if ( isset( $_POST['maintain_state'] ) ) { - $settings['maintain_state'] = $this->post_data_validation->sanitize_checkbox( $_POST['maintain_state'] ); - } - - if ( isset( $_POST['inherit_current_post_type_archive'] ) ) { - $settings['inherit_current_post_type_archive'] = $this->post_data_validation->sanitize_checkbox( $_POST['inherit_current_post_type_archive'] ); - } - - if ( isset( $_POST['inherit_current_taxonomy_archive'] ) ) { - $settings['inherit_current_taxonomy_archive'] = $this->post_data_validation->sanitize_checkbox( $_POST['inherit_current_taxonomy_archive'] ); - } - - if ( isset( $_POST['inherit_current_single_post'] ) ) { - $settings['inherit_current_single_post'] = $this->post_data_validation->sanitize_checkbox( $_POST['inherit_current_single_post'] ); - } - - if ( isset( $_POST['inherit_current_author_archive'] ) ) { - $settings['inherit_current_author_archive'] = $this->post_data_validation->sanitize_checkbox( $_POST['inherit_current_author_archive'] ); - } - - if ( isset( $_POST['inherit_current_date_archive'] ) ) { - $settings['inherit_current_date_archive'] = $this->post_data_validation->sanitize_checkbox( $_POST['inherit_current_date_archive'] ); - } - - if ( isset( $_POST['use_relevanssi'] ) ) { - $settings['use_relevanssi'] = $this->post_data_validation->sanitize_checkbox( $_POST['use_relevanssi'] ); - } - if ( isset( $_POST['use_relevanssi_sort'] ) ) { - $settings['use_relevanssi_sort'] = $this->post_data_validation->sanitize_checkbox( $_POST['use_relevanssi_sort'] ); - } - - /* - if(isset($_POST['treat_child_posts_as_parent'])) - { - $settings['treat_child_posts_as_parent'] = $this->post_data_validation->sanitize_checkbox($_POST['treat_child_posts_as_parent']); - }*/ - - /* - if(isset($_POST['is_woocommerce'])) - { - $settings['is_woocommerce'] = $this->post_data_validation->sanitize_checkbox($_POST['is_woocommerce']); - }*/ - - if ( isset( $_POST['force_is_search'] ) ) { - $settings['force_is_search'] = $this->post_data_validation->sanitize_checkbox( $_POST['force_is_search'] ); - } - - if ( isset( $_POST['force_is_archive'] ) ) { - $settings['force_is_archive'] = $this->post_data_validation->sanitize_checkbox( $_POST['force_is_archive'] ); - } - - if ( isset( $_POST['auto_submit'] ) ) { - - $settings['auto_submit'] = $this->post_data_validation->sanitize_checkbox( $_POST['auto_submit'] ); - } - /* - if(isset($_POST['use_results_shortcode'])) - { - $settings['use_results_shortcode'] = $this->post_data_validation->sanitize_checkbox($_POST['use_results_shortcode']); - } - else - { - $settings['use_results_shortcode'] = ""; - }*/ - if ( isset( $_POST['display_results_as'] ) ) { - $settings['display_results_as'] = sanitize_key( $_POST['display_results_as'] ); - } else { - $settings['display_results_as'] = ''; - } - - if ( isset( $_POST['update_ajax_url'] ) ) { - $settings['update_ajax_url'] = $this->post_data_validation->sanitize_checkbox( $_POST['update_ajax_url'] ); - } else { - $settings['update_ajax_url'] = ''; - } - - if ( isset( $_POST['only_results_ajax'] ) ) { - $settings['only_results_ajax'] = $this->post_data_validation->sanitize_checkbox( $_POST['only_results_ajax'] ); - } else { - $settings['only_results_ajax'] = ''; - } - - if ( isset( $_POST['ajax_target'] ) ) { - $settings['ajax_target'] = sanitize_text_field( $_POST['ajax_target'] ); - } - - if ( isset( $_POST['ajax_links_selector'] ) ) { - $settings['ajax_links_selector'] = sanitize_text_field( $_POST['ajax_links_selector'] ); - } - - if ( isset( $_POST['infinite_scroll_container'] ) ) { - $settings['infinite_scroll_container'] = sanitize_text_field( $_POST['infinite_scroll_container'] ); - } - if ( isset( $_POST['infinite_scroll_trigger'] ) ) { - $settings['infinite_scroll_trigger'] = sanitize_text_field( $_POST['infinite_scroll_trigger'] ); - } - - if ( isset( $_POST['infinite_scroll_result_class'] ) ) { - $settings['infinite_scroll_result_class'] = sanitize_text_field( $_POST['infinite_scroll_result_class'] ); - } - - if ( isset( $_POST['show_infinite_scroll_loader'] ) ) { - $settings['show_infinite_scroll_loader'] = $this->post_data_validation->sanitize_checkbox( $_POST['show_infinite_scroll_loader'] ); - } else { - $settings['show_infinite_scroll_loader'] = ''; - } - - if ( isset( $_POST['posts_per_page'] ) ) { - $settings['results_per_page'] = (int) $_POST['posts_per_page']; - } - - if ( isset( $_POST['exclude_post_ids'] ) ) { - $settings['exclude_post_ids'] = $this->post_data_validation->clean_exclude_ids( $_POST['exclude_post_ids'] ); - } - - if ( isset( $_POST['field_relation'] ) ) { - $settings['field_relation'] = sanitize_key( $_POST['field_relation'] ); - } - - /* ORDER PARAMETERS */ - if ( isset( $_POST['default_sort_by'] ) ) { - $settings['default_sort_by'] = sanitize_text_field( $_POST['default_sort_by'] ); - } - if ( isset( $_POST['sticky_posts'] ) ) { - $settings['sticky_posts'] = sanitize_text_field( $_POST['sticky_posts'] ); - } - - if ( isset( $_POST['default_sort_dir'] ) ) { - $settings['default_sort_dir'] = sanitize_text_field( $_POST['default_sort_dir'] ); - } - if ( isset( $_POST['default_meta_key'] ) ) { - $settings['default_meta_key'] = sanitize_text_field( $_POST['default_meta_key'] ); - } - - if ( isset( $_POST['default_sort_type'] ) ) { - $settings['default_sort_type'] = sanitize_text_field( $_POST['default_sort_type'] ); - } - - if ( isset( $_POST['secondary_sort_by'] ) ) { - $settings['secondary_sort_by'] = sanitize_text_field( $_POST['secondary_sort_by'] ); - } - - if ( isset( $_POST['secondary_sort_dir'] ) ) { - $settings['secondary_sort_dir'] = sanitize_text_field( $_POST['secondary_sort_dir'] ); - } - if ( isset( $_POST['secondary_meta_key'] ) ) { - $settings['secondary_meta_key'] = sanitize_text_field( $_POST['secondary_meta_key'] ); - } - - if ( isset( $_POST['secondary_sort_type'] ) ) { - $settings['secondary_sort_type'] = sanitize_text_field( $_POST['secondary_sort_type'] ); - } - - if ( isset( $_POST['settings_taxonomies'] ) ) { - if ( is_array( $_POST['settings_taxonomies'] ) ) { - $settings_taxonomies = array(); - - foreach ( $_POST['settings_taxonomies'] as $key => $val ) { - $nval = array(); - $nval['include_exclude'] = sanitize_key( $val['include_exclude'] ); - $nval['ids'] = $this->post_data_validation->clean_exclude_ids( $val['ids'] ); - - $settings_taxonomies[ $key ] = $nval; - } - - $settings['taxonomies_settings'] = $settings_taxonomies; - } - } - - if ( has_filter( 'sf_admin_filter_settings_save' ) ) { - $settings = apply_filters( 'sf_admin_filter_settings_save', $settings, $post_id ); - } - - /* Get the meta key. */ - $meta_key = '_search-filter-settings'; - - /* Get the meta value of the custom field key. */ - $meta_value = get_post_meta( $post_id, $meta_key, true ); - - if ( isset( $meta_value['page_slug'] ) ) { - $old_page_slug = $meta_value['page_slug']; - } - - /* If a new meta value was added and there was no previous value, add it. */ - if ( $settings && '' == $meta_value ) { - add_post_meta( $post_id, $meta_key, $settings, true ); - } - - /* If the new meta value does not match the old value, update it. */ - elseif ( $settings && $settings != $meta_value ) { - update_post_meta( $post_id, $meta_key, $settings ); - } - - /* If there is no new meta value but an old value exists, delete it. */ - elseif ( '' == $settings && $meta_value ) { - delete_post_meta( $post_id, $meta_key, $meta_value ); - } - - /* check to see if the slug has been updated, if so flush the rewrite rules */ - if ( isset( $meta_value['page_slug'] ) ) { - if ( $meta_value['page_slug'] != $settings['page_slug'] ) { - flush_rewrite_rules(); - } - } - /* check to see if anything url related has been updated, if so flush the rewrite rules */ - if ( isset( $meta_value['display_results_as'] ) ) { - if ( $meta_value['display_results_as'] != $settings['display_results_as'] ) { - flush_rewrite_rules(); - } - } - - } - private function process_cache_post( $post_id ) { - /* Get the meta key. */ - $meta_key = '_search-filter-cache'; - - /* Get the meta value of the custom field key. */ - $meta_value = get_post_meta( $post_id, $meta_key, true ); - - $settings = array(); - - if ( isset( $_POST['cache_enabled'] ) ) { - // $settings['enabled'] = (int)$_POST['cache_enabled']; - // $this->post_data_validation->sanitize_checkbox($_POST['enable_auto_count']); - } - - if ( is_array( $meta_value ) ) { - $settings = array_replace( $meta_value, $settings ); - } - - /* If a new meta value was added and there was no previous value, add it. */ - if ( $settings && '' == $meta_value ) { - add_post_meta( $post_id, $meta_key, $settings, true ); - } - - /* If the new meta value does not match the old value, update it. */ - elseif ( $settings && $settings != $meta_value ) { - update_post_meta( $post_id, $meta_key, $settings ); - } - - /* If there is no new meta value but an old value exists, delete it. */ - elseif ( '' == $settings && $meta_value ) { - delete_post_meta( $post_id, $meta_key, $meta_value ); - } - - /* check to see if the slug has been updated, if so flush the rewrite rules */ - if ( isset( $meta_value['page_slug'] ) ) { - if ( $meta_value['page_slug'] != $settings['page_slug'] ) { - flush_rewrite_rules(); - } - } - - } - - function sanitize_template_path( $template_path ) { - $located = locate_template( $template_path ); - if ( ! empty( $located ) ) { - return $template_path; - } else { - return ''; - } - } - - function add_posts_meta_boxes() { - $screens = array( 'search-filter-widget' ); - - foreach ( $screens as $screen ) { - add_meta_box( - 'search-filter-cache', - __( 'Cache', $this->plugin_slug ), - array( $this, 'load_search_form_cache' ), - $screen, - 'side', - 'high' - ); - add_meta_box( - 'search-filter-shortcodes', - __( 'Shortcodes', $this->plugin_slug ), - array( $this, 'load_search_form_shortcode_metabox' ), - $screen, - 'side' - ); - - /* - add_meta_box( - 'search-filter-settings', - __( 'Beta Testing', $this->plugin_slug ), - array($this,'load_search_form_setup_metabox'), - $screen, - 'side', - 'low' - );*/ - - add_meta_box( - 'search-filter-settings-box', - __( 'Settings & Defaults', $this->plugin_slug ), - array( $this, 'load_search_form_settings_metabox' ), - $screen, - 'advanced', - 'high' - ); - - add_meta_box( - 'search-filter-available-fields', - __( 'Available Fields', $this->plugin_slug ), - array( $this, 'load_post_available_fields_metabox' ), - $screen, - 'advanced', - 'high' - ); - - add_meta_box( - 'search-filter-search-form', - __( 'Search Form UI', $this->plugin_slug ), - array( $this, 'load_post_search_form_metabox' ), - $screen, - 'advanced', - 'low' - ); - - } - } - - function load_search_form_setup_metabox( $object, $box ) { - /* - $settings = (get_post_meta( $object->ID, '_search-filter-settings', true )); - - $defaults = array( - 'post_types' => '', - 'use_template_manual_toggle' => '1', - 'enable_auto_count' => '', - 'auto_count_deselect_emtpy' => '', - 'template_name_manual' => 'search.php', - 'page_slug' => '' - ); - - if(is_array($settings)) - { - $values = array_replace($defaults, $settings); - } - else - { - $values = $defaults; - } - - include_once( ( plugin_dir_path( dirname( __FILE__ ) ) ) . 'views/admin-search-form-beta-metabox.php' );*/ - } - function load_search_form_shortcode_metabox( $object, $box ) { - $settings = Search_Filter_Helper::get_settings_meta( $object->ID ); - - $defaults = array(); - - if ( is_array( $settings ) ) { - $values = array_replace( $defaults, $settings ); - } else { - $values = $defaults; - } - - include_once plugin_dir_path( dirname( __FILE__ ) ) . 'views/admin-search-form-shortcode-metabox.php'; - } - - function load_search_form_cache( $object, $box ) { - $defaults = array(); - - $values = $defaults; - include_once plugin_dir_path( dirname( __FILE__ ) ) . 'views/admin-search-form-cache-metabox.php'; - } - - function load_search_form_settings_metabox( $object, $box ) { - $settings = Search_Filter_Helper::get_settings_meta( $object->ID ); - - $defaults = array( - 'category_ids' => '', - 'post_tag_ids' => '', - - 'use_ajax_toggle' => '', - 'pagination_type' => 'normal', - // 'infinite_scroll_additional_selector_type' => '', - 'display_results_as' => 'shortcode', - 'scroll_to_pos' => '', - 'custom_scroll_to' => '', - 'scroll_on_action' => '', - 'maintain_state' => '', - - 'inherit_current_post_type_archive' => '', - 'inherit_current_taxonomy_archive' => '', - 'inherit_current_single_post' => '', - 'inherit_current_author_archive' => '', - 'inherit_current_date_archive' => '', - - 'use_relevanssi' => '', - 'use_relevanssi_sort' => '', - // 'treat_child_posts_as_parent' => '', - // 'is_woocommerce' => '', - 'force_is_search' => '', - 'force_is_archive' => '', - 'ajax_target' => '#main', - 'results_url' => '', - 'ajax_links_selector' => '.pagination a', - 'show_infinite_scroll_loader' => '1', - 'infinite_scroll_container' => '', - 'infinite_scroll_trigger' => '-100', - 'infinite_scroll_result_class' => '', - 'auto_submit' => '', - // 'use_results_shortcode' => '', - 'update_ajax_url' => '', - 'only_results_ajax' => '1', - - 'post_types' => '', - 'use_template_manual_toggle' => '1', - 'enable_taxonomy_archives' => 0, - 'enable_auto_count' => '', - 'auto_count_refresh_mode' => '1', - 'template_name_manual' => 'search.php', - 'page_slug' => '', - - 'results_per_page' => get_option( 'posts_per_page' ), - 'exclude_post_ids' => '', - 'field_relation' => 'and', - - 'sticky_posts' => '', - - 'default_sort_by' => '', - 'default_sort_dir' => '', - 'default_meta_key' => '', - 'default_sort_type' => '', - - 'secondary_sort_by' => '', - 'secondary_sort_dir' => '', - 'secondary_meta_key' => '', - 'secondary_sort_type' => '', - - 'post_status' => array( - 'publish' => '', - 'pending' => '', - 'draft' => '', - 'future' => '', - 'private' => '', - ), - 'settings_post_meta' => array(), - - ); - - $post_stati_public = get_post_stati( array( '_builtin' => true ), 'objects' ); - - $post_stati_private = get_post_stati( array( '_builtin' => false ), 'objects' ); - $post_stati = get_post_stati( array(), 'objects' ); - if ( isset( $post_stati['auto-draft'] ) ) { - unset( $post_stati['auto-draft'] ); - } - - if ( isset( $post_stati['inherit'] ) ) { - unset( $post_stati['inherit'] ); - } - - foreach ( $post_stati as $post_status ) { - $defaults['post_status'][ $post_status->name ] = ''; - } - - // set default for this based on other user selections - shortcode users will be used to this being disabled so do not force it - // non shortcode users will be used to this feature, so enable by default - if ( ! isset( $settings['update_ajax_url'] ) ) { - $defaults['update_ajax_url'] = 1; - } - - if ( ( isset( $settings['use_ajax_toggle'] ) ) && ( isset( $settings['use_results_shortcode'] ) ) ) { - if ( ( $settings['use_ajax_toggle'] == 1 ) && ( $settings['use_results_shortcode'] == 1 ) ) { - $defaults['display_results_as'] = 'shortcode'; - } else { - $defaults['display_results_as'] = 'archive'; - } - } else { - $defaults['display_results_as'] = 'archive'; - } - - if ( get_post_status( $object->ID ) == 'auto-draft' ) { - $defaults['use_ajax_toggle'] = 1; - // $defaults['use_results_shortcode'] = 1; - $defaults['update_ajax_url'] = 1; - $defaults['auto_submit'] = 1; - - } - - // now add a default for published if the form has not been saved before - if ( ! isset( $settings['post_status'] ) ) { - $defaults['post_status']['publish'] = '1'; - } - - if ( is_array( $settings ) ) { - - $values = array_replace_recursive( $defaults, $settings ); - } else { - $values = $defaults; - } - - include_once plugin_dir_path( dirname( __FILE__ ) ) . 'views/admin-search-form-settings-metabox.php'; - } - - - function load_post_search_form_metabox( $object, $box ) { - include_once plugin_dir_path( dirname( __FILE__ ) ) . 'views/admin-search-form-metabox.php'; - } - - function load_post_available_fields_metabox( $object, $box ) { - include_once plugin_dir_path( dirname( __FILE__ ) ) . 'views/admin-available-fields-metabox.php'; - - } - - function set_selected( $desired_value, $current_value, $echo = true ) { - if ( $desired_value == $current_value ) { - if ( $echo == true ) { - echo ' selected="selected"'; - } else { - return ' selected="selected"'; - } - } - } - - function set_radio( $desired_value, $current_value, $echo = true ) { - if ( $desired_value == $current_value ) { - if ( $echo == true ) { - echo ' checked="checked"'; - } else { - return ' checked="checked"'; - } - } - } - - function set_checked( $current_value ) { - if ( 1 === absint( $current_value ) ) { - echo ' checked="checked"'; - } - } - - function get_post_meta_all( $post_id ) { - global $wpdb; - $data = array(); - $wpdb->query( - $wpdb->prepare( - " - SELECT `meta_key`, `meta_value` - FROM $wpdb->postmeta - WHERE `post_id` = '%d' - ", - $post_id - ) - ); - - foreach ( $wpdb->last_result as $k => $v ) { - $data[ $v->meta_key ] = $v->meta_value; - }; - return $data; - } - - function get_all_post_meta_keys() { - if ( is_array( $this->post_meta_keys ) ) { - $num_meta_keys = count( $this->post_meta_keys ); - if ( $num_meta_keys == 0 ) { - $ignore_list = array( - '_wp_page_template', - '_edit_lock', - '_edit_last', - '_menu_item_type', - '_menu_item_menu_item_parent', - '_menu_item_object_id', - '_menu_item_object', - '_menu_item_target', - '_menu_item_classes', - '_menu_item_xfn', - '_menu_item_url', - '_search-filter-fields', - ); - global $wpdb; - $data = array(); - - $case_sensitive = true; - if ( defined( 'SEARCH_FILTER_CASE_SENSITIVE_META_KEYS' ) ) { - if ( SEARCH_FILTER_CASE_SENSITIVE_META_KEYS === false ) { - $case_sensitive = false; - } - } - if ( $case_sensitive ) { - $wpdb->query( - " - SELECT DISTINCT(BINARY `meta_key`) as meta_key_binary, `meta_key` - FROM $wpdb->postmeta ORDER BY `meta_key` ASC - " - ); - } else { - $wpdb->query( - " - SELECT DISTINCT(`meta_key`) - FROM $wpdb->postmeta ORDER BY `meta_key` ASC - " - ); - } - - foreach ( $wpdb->last_result as $k => $v ) { - // $data[$v->meta_key] = $v->meta_value; - $data[] = $v->meta_key; - } - - $this->post_meta_keys = $data; - - } - } - - return $this->post_meta_keys; - } - - function display_meta_box_field( $type, $widget_data = array(), $object = array() ) { - if ( $type == 'search' ) { - $defaults = array( - 'heading' => '', - 'placeholder' => __( 'Search …', $this->plugin_slug ), - 'accessibility_label' => '', - - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/search.php'; - } elseif ( $type == 'tag' ) { - $defaults = array( - 'taxonomy_name' => '', - 'input_type' => '', - 'heading' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'operator' => '', - 'show_count' => '1', - 'hide_empty' => '', - 'hierarchical' => '', - 'include_children' => '', - 'drill_down' => '', - 'order_by' => '', - 'order_dir' => '', - 'exclude_ids' => '', - 'sync_include_exclude' => '1', - 'combo_box' => '', - 'no_results_message' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/tag.php'; - } elseif ( $type == 'category' ) { - $defaults = array( - 'taxonomy_name' => '', - 'input_type' => '', - 'heading' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'operator' => '', - 'show_count' => '1', - 'hide_empty' => '', - 'hierarchical' => '', - 'include_children' => '', - 'drill_down' => '', - 'order_by' => '', - 'order_dir' => '', - 'exclude_ids' => '', - 'sync_include_exclude' => '1', - 'combo_box' => '', - 'no_results_message' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/category.php'; - } elseif ( $type == 'taxonomy' ) { - $defaults = array( - 'taxonomy_name' => '', - 'input_type' => '', - 'heading' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'operator' => '', - 'show_count' => '1', - 'hide_empty' => '', - 'hierarchical' => '', - 'include_children' => '', - 'drill_down' => '', - 'order_by' => '', - 'order_dir' => '', - 'exclude_ids' => '', - 'sync_include_exclude' => '1', - 'combo_box' => '', - 'no_results_message' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/taxonomy.php'; - } elseif ( $type == 'post_type' ) { - $defaults = array( - 'post_types' => '', - 'input_type' => '', - 'heading' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'show_count' => '', - 'hide_empty' => '', - 'order_by' => '', - 'order_dir' => '', - 'combo_box' => '', - 'no_results_message' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/post-type.php'; - } elseif ( $type == 'post_date' ) { - $defaults = array( - 'input_type' => '', - 'heading' => '', - 'accessibility_label' => '', - 'date_format' => 'd/m/Y', - 'type' => $type, - - 'date_from_prefix' => '', - 'date_from_postfix' => '', - 'date_from_placeholder' => '', - 'date_to_prefix' => '', - 'date_to_postfix' => '', - 'date_to_placeholder' => '', - - 'date_use_dropdown_month' => '', - 'date_use_dropdown_year' => '', - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/post-date.php'; - } elseif ( $type == 'post_meta' ) { - $defaults = array( - 'heading' => '', - - 'meta_type' => '', - 'meta_key' => '', - 'meta_key_manual' => '', - 'meta_key_manual_toggle' => '', - - 'number_input_type' => '', - 'number_is_decimal' => '1', - - 'choice_input_type' => '', - 'combo_box' => '', - 'no_results_message' => '', - 'show_count' => '1', - 'hide_empty' => '', - 'date_input_type' => '', - - 'choice_heading' => '', - 'choice_meta_key' => '', - 'choice_get_option_mode' => 'auto', - 'choice_order_option_by' => 'value', - 'choice_order_option_dir' => 'asc', - 'choice_order_option_type' => 'alphabetic', - 'choice_is_acf' => '', - - 'number_heading' => '', - 'number_start_meta_key' => '', - 'number_end_meta_key' => '', - 'number_use_same_toggle' => '1', - - 'date_heading' => '', - 'date_start_meta_key' => '', - 'date_end_meta_key' => '', - 'date_meta_key' => '', - 'date_use_same_toggle' => '1', - 'date_from_prefix' => '', - 'date_from_postfix' => '', - 'date_from_placeholder' => '', - 'date_to_prefix' => '', - 'date_to_postfix' => '', - 'date_to_placeholder' => '', - - 'date_use_dropdown_month' => '', - 'date_use_dropdown_year' => '', - - 'range_min_detect' => '', - 'range_max_detect' => '', - 'range_min' => '0', - 'range_max' => '1000', - 'range_step' => '10', - - 'thousand_seperator' => '', - 'decimal_seperator' => '.', - 'decimal_places' => '0', - 'number_decimal_places' => '2', - 'number_values_seperator' => ' - ', - 'number_display_values_as' => 'textinput', - 'number_display_input_as' => 'singlefield', - - 'range_value_prefix' => '', - 'range_value_postfix' => '', - - 'date_output_format' => 'd/m/Y', - 'date_input_format' => 'timestamp', - 'date_compare_mode' => 'userrange', - 'number_compare_mode' => 'userrange', - - 'all_items_label' => '', - 'date_accessibility_label' => '', - 'number_accessibility_label' => '', - 'choice_accessibility_label' => '', - 'all_items_label_number' => '', - 'operator' => '', - - 'meta_options' => array(), - - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - // legacy - any search forms without the get option mode set, must be set to manual (because the are from previous versions) - if ( ! empty( $object ) ) { - if ( ( get_post_status( $object->ID ) != 'auto-draft' ) && ( ! isset( $widget_data['choice_get_option_mode'] ) ) ) { - $values['choice_get_option_mode'] = 'manual'; - - } - } - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/post-meta.php'; - } elseif ( $type == 'author' ) { - $defaults = array( - 'input_type' => '', - 'heading' => '', - 'accessibility_label' => '', - 'optioncount' => '', - 'exclude_admin' => '', - 'show_fullname' => '', - 'order_by' => '', - 'order_dir' => '', - 'hide_empty' => '', - 'operator' => '', - 'all_items_label' => '', - 'exclude' => '', - 'combo_box' => '', - 'no_results_message' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/author.php'; - } elseif ( $type == 'submit' ) { - $defaults = array( - 'label' => 'Submit', - 'heading' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/submit.php'; - } elseif ( $type == 'reset' ) { - $defaults = array( - 'label' => 'Reset', - 'input_type' => 'link', - 'submit_form' => 'always', - 'heading' => '', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/reset.php'; - } elseif ( $type == 'sort_order' ) { - $defaults = array( - /* - 'meta_key' => '', - 'meta_key_manual' => '', - 'meta_key_manual_toggle' => '',*/ - 'input_type' => 'select', - 'heading' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'sort_options' => array(), - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/sort-order.php'; - } elseif ( $type == 'posts_per_page' ) { - $defaults = array( - 'input_type' => 'select', - 'heading' => '', - 'all_items_label' => '', - 'accessibility_label' => '', - 'ppp_min' => '25', - 'ppp_max' => '100', - 'ppp_step' => '25', - 'type' => $type, - ); - - $values = array_replace( $defaults, $widget_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/posts-per-page.php'; - } - - } - - function display_settings_meta_option( $option_data = array(), $class = '' ) { - $defaults = array( - 'meta_key' => '', - 'meta_compare' => '', - 'meta_value' => '', - 'meta_type' => '', - 'meta_date_value_day' => '', - 'meta_date_value_month' => '', - 'meta_date_value_year' => '', - 'meta_date_value_date' => '', - 'meta_date_value_timestamp' => '', - 'meta_date_value_current_date' => '', - 'meta_date_value_current_timestamp' => '', - - ); - - $values = array_replace( $defaults, $option_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/settings-metabox/meta-option.php'; - } - function display_sort_option( $option_data = array(), $class = '' ) { - $defaults = array( - 'meta_key' => '', - 'sort_by' => '', - 'sort_label' => '', - 'sort_dir' => '', - 'sort_type' => 'numeric', - ); - - $values = array_replace( $defaults, $option_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/sort-order-option.php'; - } - function display_meta_option( $option_data = array(), $class = '' ) { - $defaults = array( - 'option_value' => '', - 'option_label' => '', - ); - - $values = array_replace( $defaults, $option_data ); - - include plugin_dir_path( dirname( __FILE__ ) ) . 'views/fields/meta-option.php'; - } - -} - - -if ( ! class_exists( 'Search_Filter_Post_Data_Validation' ) ) { - require_once plugin_dir_path( __FILE__ ) . 'class-search-filter-post-data-validation.php'; -} diff --git a/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-widgets-admin.php b/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-widgets-admin.php deleted file mode 100644 index 9fd02cd9..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/includes/class-search-filter-widgets-admin.php +++ /dev/null @@ -1,48 +0,0 @@ -plugin_slug = 'search-filter'; - - // Load widgets admin style she et and JavaScript. - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) ); - add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) ); - - /* - AJAX */ - /* - add_action( 'wp_ajax_meta_prefs_set', array($this, 'meta_prefs_set') ); //if logged in - add_action( 'wp_ajax_nopriv_meta_prefs_set', array($this, 'meta_prefs_set') ); //if not logged in - */ - - } - - public function enqueue_admin_styles() { - // wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/admin.css' ), array(), Search_Filter_Admin::VERSION ); - } - public function enqueue_admin_scripts() { - wp_enqueue_script( $this->plugin_slug . '-admin-widgets-script', plugins_url( '/assets/js/admin-widgets.js', dirname( __FILE__ ) ), array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery' ), Search_Filter_Admin::VERSION ); - - // wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/admin.css', __FILE__ ), array(), Search_Filter_Admin::VERSION ); - } -} - diff --git a/wp/wp-content/plugins/search-filter-pro/admin/includes/index.php b/wp/wp-content/plugins/search-filter-pro/admin/includes/index.php deleted file mode 100644 index 8142269b..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/includes/index.php +++ /dev/null @@ -1 +0,0 @@ - - -
    - -

    Search Form UI to start building your Search Form.", $this->plugin_slug ); ?>

    - - display_meta_box_field("search"); - $this->display_meta_box_field("tag"); - $this->display_meta_box_field("category"); - $this->display_meta_box_field("taxonomy"); - $this->display_meta_box_field("post_type"); - $this->display_meta_box_field("post_date"); - $this->display_meta_box_field("post_meta"); - $this->display_meta_box_field("author"); - $this->display_meta_box_field("sort_order"); - $this->display_meta_box_field("posts_per_page"); - $this->display_meta_box_field("submit"); - $this->display_meta_box_field("reset"); - - ?> -
    - - diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-cache.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-cache.php deleted file mode 100644 index 1a93204c..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-cache.php +++ /dev/null @@ -1,200 +0,0 @@ - -
    - -

    - - plugin_slug); - } - else - { - ?> - -

    - - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug); ?> - - - ".__('Restarting ', $this->plugin_slug).""; - - } - ?> -
    - plugin_slug); ?> - - / (%)
    - plugin_slug), date(DATE_RFC2822, $last_update)); ?> -
    - plugin_slug); ?> - - (plugin_slug); ?>) - -
    -
    - - - -
    - -
    
    -                        
    -                
    - plugin_slug); ?> - - -
    - plugin_slug); ?> - - -
    - plugin_slug); ?> - - -
    - plugin_slug); ?> - - '.__("Notice: Duplicates Found: ", $this->plugin_slug).''; - ?> -
    - -
    -
    - plugin_slug); ?> - -
    -
    - -

    - - -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-help.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-help.php deleted file mode 100644 index 8c91fdfe..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-help.php +++ /dev/null @@ -1,24 +0,0 @@ - - -
    - -

    - - - -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-layout.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-layout.php deleted file mode 100644 index 2d6bade7..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-layout.php +++ /dev/null @@ -1,123 +0,0 @@ - - -
    - -

    Add New

    - -
    - -
    -
    - - -

    Messages

    -

    Message updated.

    -

    Message error.

    -
    - - -

    Layout

    -
    -
    -
    -
    -

    Post Body

    -
    - Desc - -
    - -
    - -
    -
    -
    - -
    -

    Postbox Container 1

    -
    - Desc -
    -
    -
    -
    -
    -

    Postbox Container 2

    -
    - Desc -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -

    Postbox Container 1

    -
    - Desc -
    -
    -
    - -
    -
    -

    Postbox Container 2

    -
    - Desc -
    -
    -
    - -
    -
    -

    Postbox Container 2

    -
    - Desc -
    -
    -
    -
    -
    -
    -
    - -

    Buttons

    -

    - - -

    -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-license-settings.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-license-settings.php deleted file mode 100644 index e1642391..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-license-settings.php +++ /dev/null @@ -1,121 +0,0 @@ - - -
    - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - - ';//'; - } - else { - ?> - -
    - - - License Inactive -
    - - - '.date('jS F Y', strtotime($expires)).''; - - ?> -
    - - - - - - - - -
    - -
    -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-cache-metabox.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-cache-metabox.php deleted file mode 100644 index b6316d82..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-cache-metabox.php +++ /dev/null @@ -1,157 +0,0 @@ - - -
    -

    - Notice: Running background processes is either disabled or has failed in this environment.

    Therefore you must leave this page open to complete caching.", $this->plugin_slug); ?> -

    - - array('style'=>''), - "ready" => array('style'=>''), - "finished" => array('style'=>''), - "inprogress" => array('style'=>''), - "error" => array('style'=>'') - ); - $values['status'] = "inprogress"; - $values['enabled'] = 1; - ?> -
    -

    - Fetching cache information...", $this->plugin_slug); ?> -

    -
    -
    -

    - Notice: Cache is not enabled, this is required for advanced features.", $this->plugin_slug); ?> -

    - - -

    - plugin_slug); ?> -

    -
    - -
    > -

    - - plugin_slug); ?> - -

    -

    - 0 / 0 posts - 0%", $this->plugin_slug); ?> - -

    -
    -

    - plugin_slug); ?> -

    -

    - Caching paused: attempting to resume...", $this->plugin_slug); ?> -

    -

    - plugin_slug); ?> -

    - -
    - -
    -

    - - plugin_slug); ?> - -

    -

    - plugin_slug); ?> - -

    -
    -

    - plugin_slug); ?> -

    -

    - Caching paused: attempting to resume...", $this->plugin_slug); ?> -

    - -

    - plugin_slug); ?> -

    -
    - -
    > - - -

    - Error: Unable to cache posts.", $this->plugin_slug); ?> -

    -

    - Rebuild Cache.
    More info", $this->plugin_slug); ?> -

    - -
    - - - -
    > -

    - plugin_slug); ?> -

    - -
    - -
    > -

    - - plugin_slug); ?> - -

    -

    - plugin_slug); ?> - -

    - -
    - -
    > -

    - - plugin_slug); ?> - -

    -

    - plugin_slug); ?> - -

    -
    - -

    - - - - plugin_slug); ?> - -

    - -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-metabox.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-metabox.php deleted file mode 100644 index 1b690f2c..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-metabox.php +++ /dev/null @@ -1,40 +0,0 @@ - -plugin_slug.'_nonce', true, true ); ?> - -
    - -

    plugin_slug ); ?>

    - - ID, '_search-filter-fields', true )); - - if(isset($widgets)) - { - if($widgets!="") - { - foreach ($widgets as $widget) - { - if(isset($widget['type'])) - { - $this->display_meta_box_field($widget['type'], $widget, $object); - } - } - } - } - ?> -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-settings-metabox.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-settings-metabox.php deleted file mode 100644 index e84af992..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-settings-metabox.php +++ /dev/null @@ -1,1063 +0,0 @@ - - -
    - - -

    plugin_slug ); ?>

    - -
    -
    - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    plugin_slug ); ?>

    -
    -

    - true, - //'publicly_queryable ' => true - ); - - $post_types = get_post_types( $args, 'objects' ); - - $is_default = false; - if(isset($values['post_types'])) - { - if(!is_array($values['post_types'])) - { - $is_default = true; - $values['post_types'] = array(); - } - } - else - { - $is_default = true; - $values['post_types'] = array(); - } - - $exclude_post_types = array("search-filter-widget","revision","nav_menu_item","shop_webhook"); - - foreach ( $post_types as $post_type ) - { - - if(!in_array($post_type->name, $exclude_post_types)) - { - if($is_default) - { - if(($post_type->name=="post")||($post_type->name=="page")) - { - $values['post_types'][$post_type->name] = "1"; - } - else - { - $values['post_types'][$post_type->name] = ""; - } - } - else if(!isset($values['post_types'][$post_type->name])) - { - $values['post_types'][$post_type->name] = ""; - } - - ?> - - - - -

    -
    - - - -
    - - - set_checked($values['auto_submit']); ?>> -
    - - - -

    plugin_slug ); ?>

    -
    - - -

    - -

    -

    plugin_slug); ?>

    - -

    - -

    -

    plugin_slug); ?>

    - -
    -

    plugin_slug ); ?>

    -

    plugin_slug ); ?>

    - -
    - plugin_slug ); ?> - - set_checked($values['inherit_current_post_type_archive']); ?>>
    - set_checked($values['inherit_current_taxonomy_archive']); ?>>
    - - set_checked($values['inherit_current_author_archive']); ?>>
    - - - - - -
    - -
    - - - __('As an Archive'), - 'description' => - '

    '.__("Use a regular template from your theme to output your results.", $this->plugin_slug ).'

    '. - '

    '.__("* Templates must use the The Loop and not a custom query", $this->plugin_slug ).'

    '. - '

    '.__("View the Archive setup instructions", $this->plugin_slug ).'

    ', - 'base' => 'archive' - ); - - $display_results_methods['post_type_archive'] = array( - 'label' => __('Post Type Archive'), - 'description' => - '

    '.__("Filter results on your Post Type Archives - only one post type must be selected.", $this->plugin_slug ).'

    '. - '

    '.__("* Templates must use the The Loop and not a custom query", $this->plugin_slug ).'

    '. - '

    '.__("View the Post Type Archive setup instructions", $this->plugin_slug ).'

    ', - 'base' => 'post_type_archive' - ); - $display_results_methods['shortcode'] = array( - 'label' => __('Using a Shortcode'), - 'description' => - '

    '.__("Place a results shortcode in any post or theme file to position where the results are displayed.", $this->plugin_slug ).'

    '. - '

    '.__("* You can find your results shortcode in the Shortcodes box on this page", $this->plugin_slug ).'

    '. - '

    '.__("View the Shortcode setup instructions", $this->plugin_slug ).'

    ', - - 'base' => 'shortcode' - ); - - if(Search_Filter_Helper::has_woocommerce()) { - $display_results_methods['custom_woocommerce_store'] = array( - 'label' => __( 'WooCommerce - Shop' ), - 'description' => - '

    ' . __( "Let WooCommerce handle the display of results and direct all searches to the shop page.", $this->plugin_slug ) . '

    ' . - '

    ' . __( "View the WooCommerce setup instructions", $this->plugin_slug ) . '

    ', - 'base' => 'custom_woocommerce_store' - ); - } - /*$display_results_methods['custom_woocommerce_products_shortcode'] = array( - 'label' => __('WooCommerce - Products Shortcode'), - 'description' => - '

    '.__("Use a WooCommerce Products Shortcode to display results - [products]", $this->plugin_slug ).'

    '. - '

    '.__("Search & Filter will override any query settings you may have passed to the shortcode.", $this->plugin_slug ).'

    '. - '

    '.__("View the WooCommerce setup instructions", $this->plugin_slug ).'

    ', - 'base' => 'custom_woocommerce_store' - );*/ - $display_results_methods['custom_edd_store'] = array( - 'label' => __('EDD - Downloads Page'), - 'description' => - '

    '.__("Let Easy Digital Downloads handle the display of results - simply supply the full URL of a page containing your downloads shortcode.", $this->plugin_slug ).'

    '. - '

    '.__("View the Easy Digital Downloads setup instructions", $this->plugin_slug ).'

    ', - - 'base' => 'shortcode' - ); - - if ( Search_Filter_Helper::has_custom_layouts() ) { - $display_results_methods['custom_layouts'] = array( - 'label' => __('Custom Layouts'), - 'description' => - '

    '.__("Use a powerful drag and drop editor to design your results.", $this->plugin_slug ).'

    ', - // '

    '.__("View the Easy Digital Downloads setup instructions", $this->plugin_slug ).'

    ', - - 'base' => 'shortcode' - ); - } - - $display_results_methods['custom'] = array( - 'label' => __('Custom'), - 'description' => '

    '.__("Manually add S&F to an existing query and then simply supply the URL where this can be located.", $this->plugin_slug ).'

    '. - '

    '.__("View the Custom setup instructions", $this->plugin_slug ).'

    ', - 'base' => 'custom' - ); - - - if(has_filter("search_filter_admin_option_display_results")) - { - $display_results_methods = apply_filters('search_filter_admin_option_display_results', $display_results_methods); - } - - ?> - - -
    - - - - - - - -
    -

    - plugin_slug); ?> -

    -

    - -

    - -
    - - $display_result_method) { - - if($display_result_method['description']!="") { - ?> -
    - -
    - -
    -
    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug ); ?> -
    -
    -
    plugin_slug); ?> -

    - -

    - -
    -
    - - - set_checked($values['use_template_manual_toggle']); ?>> - - -
    - - - set_checked($values['enable_taxonomy_archives']); ?>> - - plugin_slug); ?> -
    - - - - -
    plugin_slug); ?> - -
    - - - - - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug ); ?> -
    - - - set_checked($values['use_ajax_toggle']); ?>> -
    - - - set_checked($values['update_ajax_url']); ?>> - plugin_slug); ?> -
    - - - set_checked($values['only_results_ajax']); ?>> - plugin_slug); ?>

    -
    - - - - -
    - plugin_slug); ?>" /> -
    -
    - - - plugin_slug); ?> - - - -
    - - - plugin_slug); ?>"> - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug ); ?> -
    - - - - - -
    - - - plugin_slug); ?>"> - -
    -
    -
    -

    - read the guide here.", $this->plugin_slug ); ?> -

    -
    -
    -
    - - - set_checked($values['show_infinite_scroll_loader']); ?>> -
    - - - plugin_slug); ?>"> -
    plugin_slug); ?> - -
    - - - plugin_slug); ?>"> -
    plugin_slug); ?> - - -
    - - - plugin_slug); ?>"> px -
    Choose an offset in pixels from this point to activate infinite scroll.", $this->plugin_slug); ?> - - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug ); ?> - -
    - - - - -
    -
    - - - -
    - - -
    - - - -
    -
    - - -
    - - - - - -
    -
    - - -
    - - - get_all_post_meta_keys(); - echo ' '; - } - - ?> - - -
    -
    - - -
    - - - - - -
    -
    - - -
    - - - get_all_post_meta_keys(); - echo ' '; - } - - ?> - - -
    -
    -
    -
    - -

    plugin_slug ); ?>

    - - - - - - - - - true - ); - - $output = 'object'; - $taxonomies = get_taxonomies( $args, $output ); - - if(isset($taxonomies['nav_menu'])) - { - unset($taxonomies['nav_menu']); - } - if(isset($taxonomies['link_category'])) - { - unset($taxonomies['link_category']); - } - - if(count($taxonomies)>0) - { - $i = 0; - foreach ($taxonomies as $taxonomy) - { - echo ''; - echo ""; - - echo " - '; - - $i++; - } - - } - ?> -
    -   - -   - - plugin_slug ); ?> -
    "; - echo ''; - echo ""; - - - $tval = ""; - $sval = ""; - if(isset($values['taxonomies_settings'][$taxonomy->name])) - { - if(isset($values['taxonomies_settings'][$taxonomy->name]['ids'])) - { - $tval = $values['taxonomies_settings'][$taxonomy->name]['ids']; - } - - if(isset($values['taxonomies_settings'][$taxonomy->name]['include_exclude'])) - { - $sval = $values['taxonomies_settings'][$taxonomy->name]['include_exclude']; - } - } - - echo ''; - - $ids_string = ""; - if($tval!="") - { - $ids_array = array_map("intval" , explode(",", $tval)); - - if(Search_Filter_Helper::has_wpml()) { - - $res = array(); - foreach ($ids_array as $id) { - - $xlat = Search_Filter_Helper::wpml_object_id($id, $taxonomy->name, true); - if(!is_null($xlat)) $res[] = $xlat; - } - - $ids_array = $res; - - } - $ids_string = implode("," , $ids_array); - } - - ?> - - - - "; - - echo '
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -

    plugin_slug ); ?>

    -
    - - -

    - -

    - -
    - - -

    - -

    -

    plugin_slug ); ?>

    - -
    - - - set_checked($values['is_woocommerce']); ?>> - -
    - - - set_checked($values['force_is_search']); ?>> -
    - - - set_checked($values['force_is_archive']); ?>> -
    -
    -
    - -
    - - diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-shortcode-metabox.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-shortcode-metabox.php deleted file mode 100644 index 6e8cdfbb..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-search-form-shortcode-metabox.php +++ /dev/null @@ -1,50 +0,0 @@ - - -
    - - -
    plugin_slug ); ?>
    plugin_slug); ?> -

    - -

    - - -
    plugin_slug ); ?>
    plugin_slug); ?> -

    - -

    -
    -
    - - diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-settings.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-settings.php deleted file mode 100644 index 8bdaf2d4..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-settings.php +++ /dev/null @@ -1,223 +0,0 @@ - - -
    - -

    - plugin_slug); ?> - -

    plugin_slug); ?>

    - -
    - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug); ?>
    -
    - - -
    - plugin_slug); ?>
    -
    - - -
    - plugin_slug); ?>
    -
    - - -
    - -
    - -

    plugin_slug); ?>

    - - - - - - - - - - - - - - - - - - - - - -
    - plugin_slug); ?>
    -
    - - -
    - plugin_slug); ?> - - -
    - plugin_slug); ?> - - -
    - plugin_slug); ?>
    -
    - - -
    - -
    -
    -

    plugin_slug); ?>

    - - - - - - - - - - - -
    - plugin_slug); ?>
    -
    - - -
    - plugin_slug); ?>
    -
    - - -
    - -
    -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-system-status.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-system-status.php deleted file mode 100644 index f1efe79a..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-system-status.php +++ /dev/null @@ -1,719 +0,0 @@ - - -
    -

    - - - -

    -

    -

    -
    - -

    - -
    -
    */ ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> */ ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    :
    :' . WC_LOG_DIR . ' '; - } else { - printf( '✕ ' . __( 'To allow logging, make %s writable or define a custom WC_LOG_DIR.', 'search-filter-pro' ) . '', WC_LOG_DIR ); - } - ?>
    :
    :
    :sf_let_to_num( WP_MEMORY_LIMIT ); - - if ( function_exists( 'memory_get_usage' ) ) { - $system_memory = $this->sf_let_to_num( @ini_get( 'memory_limit' ) ); - $memory = max( $memory, $system_memory ); - } - - if ( $memory < 67108864 ) { - //echo '' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: %s', 'search-filter-pro' ), size_format( $memory ), '' . __( 'Increasing memory allocated to PHP', 'search-filter-pro' ) . '' ) . ''; - echo '' . sprintf( __( '%s - We recommend setting memory to at least 64MB.', 'search-filter-pro' ), size_format( $memory ) ) . ''; - } else { - echo '' . size_format( $memory ) . ''; - } - ?>
    :✔'; else echo ''; ?>
    :
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ ?> - SoapClient' ); - }*/ - - // DOMDocument. - /*$posting['dom_document']['name'] = 'DOMDocument'; - $posting['dom_document']['help'] = ( __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'search-filter-pro' ) ); - - if ( class_exists( 'DOMDocument' ) ) { - $posting['dom_document']['success'] = true; - } else { - $posting['dom_document']['success'] = false; - $posting['dom_document']['note'] = sprintf( __( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'search-filter-pro' ), 'DOMDocument' ); - }*/ - - // GZIP. - /*$posting['gzip']['name'] = 'GZip'; - $posting['gzip']['help'] = ( __( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'search-filter-pro' ) ); - - if ( is_callable( 'gzopen' ) ) { - $posting['gzip']['success'] = true; - } else { - $posting['gzip']['success'] = false; - $posting['gzip']['note'] = sprintf( __( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind. The API fallback will be used instead for geolocation.', 'search-filter-pro' ), 'gzopen' ); - }*/ - - // Multibyte String. - $posting['mbstring']['name'] = 'Multibyte String'; - $posting['mbstring']['help'] = ( __( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'search-filter-pro' ) ); - - if ( extension_loaded( 'mbstring' ) ) { - $posting['mbstring']['success'] = true; - } else { - $posting['mbstring']['success'] = false; - $posting['mbstring']['note'] = sprintf( __( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'search-filter-pro' ), 'mbstring' ); - } - - // WP Remote Post Check. - /*$posting['wp_remote_post']['name'] = __( 'Remote Post', 'search-filter-pro'); - $posting['wp_remote_post']['help'] = ( __( 'PayPal uses this method of communicating when sending back transaction information.', 'search-filter-pro' ) ); - - $response = wp_safe_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array( - 'timeout' => 60, - 'user-agent' => 'Search_Filter/' . Search_Filter_Admin::VERSION, - 'body' => array( - 'cmd' => '_notify-validate' - ) - ) ); - - if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) { - $posting['wp_remote_post']['success'] = true; - } else { - $posting['wp_remote_post']['note'] = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'search-filter-pro' ); - if ( is_wp_error( $response ) ) { - $posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Error: %s', 'search-filter-pro' ), wc_clean( $response->get_error_message() ) ); - } else { - $posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'search-filter-pro' ), wc_clean( $response['response']['code'] ) ); - } - $posting['wp_remote_post']['success'] = false; - } - - // WP Remote Get Check. - $posting['wp_remote_get']['name'] = __( 'Remote Get', 'search-filter-pro'); - $posting['wp_remote_get']['help'] = ( __( 'Search & Filter uses this method for building the cache in the background.', 'search-filter-pro' ) ); - - $response = wp_safe_remote_get( 'searchandfilterurl' . ( is_multisite() ? '1' : '0' ) ); - - if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) { - $posting['wp_remote_get']['success'] = true; - } else { - $posting['wp_remote_get']['note'] = __( 'wp_remote_get() failed. The Search & Filter plugin updater won\'t work with your server. Contact your hosting provider.', 'search-filter-pro' ); - if ( is_wp_error( $response ) ) { - $posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Error: %s', 'search-filter-pro' ), wc_clean( $response->get_error_message() ) ); - } else { - $posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'search-filter-pro' ), wc_clean( $response['response']['code'] ) ); - } - $posting['wp_remote_get']['success'] = false; - } - - $posting = apply_filters( 'woocommerce_debug_posting', $posting ); - */ - foreach ( $posting as $post ) { - $mark = ! empty( $post['success'] ) ? 'yes' : 'error'; - ?> - - - - - - - -
    :
    :' . sprintf( __( '%s - We recommend a minimum PHP version of 5.4. See: %s', 'search-filter-pro' ), esc_html( $php_version ), '' . __( 'How to update your PHP version', 'search-filter-pro' ) . '' ) . ''; - //} else { - //echo '' . esc_html( $php_version ) . ''; - echo '' . esc_html( $php_version ) . ''; - //} - } else { - _e( "Couldn't determine PHP version because phpversion() doesn't exist.", 'search-filter-pro' ); - } - ?>
    :sf_let_to_num( ini_get( 'post_max_size' ) ) ); ?>
    :
    :
    :
    : - db_version(); - ?> -
    :
    :✕ ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'search-filter-pro' ), $default_timezone ) . ''; - } else { - echo ''; - } ?> -
    : - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    cache_table_name); ?>:get_var("SHOW TABLES LIKE '$this->cache_table_name'") != $this->cache_table_name) { - //table is not created. you may create the table here. - $table_error = true; - echo '' . __('Table Not Found', 'search-filter-pro') . ''; - } - else - {//table exists, grab number of rows - - $row_count = $wpdb->get_results( - " - SELECT COUNT(*) FROM $this->cache_table_name - " - ); - - $number_of_rows = $row_count[0]->{"COUNT(*)"}; - - echo '✔ ' . $number_of_rows . " " . __('Rows Found', 'search-filter-pro') . ''; - } - - ?>
    term_results_table_name); ?>:get_var("SHOW TABLES LIKE '$this->term_results_table_name'") != $this->term_results_table_name) { - //table is not created. you may create the table here. - $table_error = true; - echo '' . __('Table Not Found', 'search-filter-pro') . ''; - } - else - {//table exists, grab number of rows - - $row_count = $wpdb->get_results( - " - SELECT COUNT(*) FROM $this->term_results_table_name - " - ); - - $number_of_rows = $row_count[0]->{"COUNT(*)"}; - - echo '✔ ' . esc_attr( $number_of_rows ) . " " . __('Rows Found', 'search-filter-pro') . ''; - } - - - ?>
    : - get_results( - " - SELECT field_name, field_value, result_ids - FROM $this->term_results_table_name - GROUP BY field_name - " - ); - - $number_of_fields = count($field_results); - - if($number_of_fields==0) - { - echo '' . esc_html( $number_of_fields ) . ''; - } - else - { - echo '' . esc_html( $number_of_fields ) . ''; - } - ?> -
    : - field_name); - } - echo implode(", " , $fields_in_cache); - ?> -
    - - - - - - - - - - ' . $plugin_name . ''; - } - - - - ?> - - - - - - - -
    ()
     
    - - - - - - - Version; - //$update_theme_version = WC_Admin_Status::get_latest_theme_version( $active_theme ); - ?> - - - - - - - - - - - - - - - - - - - - - - Template ); - //$update_theme_version = WC_Admin_Status::get_latest_theme_version( $parent_theme ); - ?> - - - - - - - - - - - - - - - - - - -
    :Name ); ?>
    :' . sprintf( __( '%s is available', 'search-filter-pro' ), esc_html( $update_theme_version ) ) . ''; - }*/ - ?>
    :{'Author URI'}; ?>
    :✔' : '✕ – ' . sprintf( __( 'If you\'re modifying Search & Filter on a parent theme you didn\'t build personally, then we recommend using a child theme. See: How to create a child theme', 'search-filter-pro' ), 'http://codex.wordpress.org/Child_Themes' ); - echo is_child_theme() ? '' : '✕'; - ?>
    :Name ); ?>
    :Version ); - - /*if ( version_compare( $parent_theme->Version, $update_theme_version, '<' ) ) { - echo ' – ' . sprintf( __( '%s is available', 'search-filter-pro' ), esc_html( $update_theme_version ) ) . ''; - }*/ - ?>
    :{'Author URI'}; ?>
    - -get_posts(); - - foreach($search_forms as $search_form) - { - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
    post_title; ?> - ID; ?>
    : - ID); - - if ( is_array( $search_form_fields ) ) { - $filters = array(); - foreach($search_form_fields as $key => $field) - { - $valid_filter_types = array("tag", "category", "taxonomy", "post_meta"); - - if(in_array($field['type'], $valid_filter_types)) - { - if(($field['type']=="tag")||($field['type']=="category")||($field['type']=="taxonomy")) - { - array_push($filters, "_sft_".$field['taxonomy_name']); - } - else if($field['type']=="post_meta") - { - if($field['meta_type']=="choice") - { - array_push($filters, "_sfm_".$field['meta_key']); - } - } - } - else - { - array_push($filters, $field['type']); - } - - } - - echo implode(", " , $filters); - } - ?> -
    : - ID); - - if(is_array($search_form_settings)) - { - $display_results_as = ""; - $results_label = ""; - - if(isset($search_form_settings['display_results_as'])) - { - $display_results_as = $search_form_settings['display_results_as']; - } - - if($display_results_as=="archive") - { - $results_label = __("As an Archive", $this->plugin_slug); - } - else if($display_results_as=="post_type_archive") - { - $post_type = ""; - if(isset($search_form_settings['post_types'])) - { - if(count($search_form_settings['post_types'])==1) - { - $post_types = array_keys($search_form_settings['post_types']); - - $post_type_object = get_post_type_object( $post_types[0] ); - - if(isset($post_type_object->label)) - { - $post_type = $post_type_object->label; - } - } - } - $results_label = sprintf(__("Post Type Archive: %s", $this->plugin_slug), $post_type); - } - else if($display_results_as=="shortcode") - { - $results_label = __("Using a Shortcode", $this->plugin_slug); - } - else if($display_results_as=="custom") - { - $results_label = __("Custom", $this->plugin_slug); - } - else if($display_results_as=="custom_woocommerce_store") - { - $results_label = __("WooCommerce Shop", $this->plugin_slug); - } - else if($display_results_as=="custom_edd_store") - { - $results_label = __("EDD Downloads Shortcode", $this->plugin_slug); - } - - echo $results_label; - } - ?> -
    :admin_notices->set_post_notices($search_form->ID); - $post_notice_log = $this->admin_notices->get_post_notices(); - $this->admin_notices->clear_post_notices(); - - $error_count = count($post_notice_log); - $error_messages = array(); - - if($error_count>0) - { - foreach($post_notice_log as $post_message) - { - $message_level = __("Error: ", $this->plugin_slug); - if($post_message['type']=="sf-notice") - { - $message_level = __("Notice:", $this->plugin_slug); - } - - array_push($error_messages, ''.$message_level.$post_message['message'].''); - } - - //echo '✔ ' . __('None Reported', 'search-filter-pro') . ''; - echo implode("
    ", $error_messages); - } - else - { - echo '✔ ' . __('None Reported', 'search-filter-pro') . ''; - } - ?>
    - - -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-widgets.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-widgets.php deleted file mode 100644 index 57e68fcc..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-widgets.php +++ /dev/null @@ -1,190 +0,0 @@ - -
    - -

    -
    -
    - - - - -
    -
    - -

    Search

    -
    - -
    -
    -
    -

    -

    -

    - -

    -

    -
    - - - - - - - - - -
    -
    - Delete | - Close -
    -
    - -
    -
    -
    -
    -
    -
    - A search form for your site. -
    -
    - -
    -
    - -

    Taxonomy

    -
    - -
    -
    -
    -

    -

    -

    - -

    -

    -
    - - - - - - - - - -
    -
    - Delete | - Close -
    -
    - -
    -
    -
    -
    -
    -
    - A search form for your site. -
    -
    -
    -
    - -

    Meta

    -
    - -
    -
    -
    -

    -

    -

    - -

    -

    -
    - - - - - - - - - -
    -
    - Delete | - Close -
    -
    - -
    -
    -
    -
    -
    -
    - A search form for your site. -
    -
    -
    -
    -
    - -
    - -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-woocommerce-fields-metabox.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin-woocommerce-fields-metabox.php deleted file mode 100644 index 8da8fd3c..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin-woocommerce-fields-metabox.php +++ /dev/null @@ -1,71 +0,0 @@ - - -
    - -

    Drag any of these Available Fields in to the Search Form UI to start building your Search Form.

    - -
    -
    -
    - -
    -
    - -
    -

    Product Attribute

    -
    - -
    -
    -
    -

    -

    -

    - -

    -

    -
    - - - - - - - - - -
    -
    - Delete | - Close -
    -
    - -
    -
    -
    -
    -
    -
    - A search form for your site. -
    -
    - - -
    - \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/admin.php b/wp/wp-content/plugins/search-filter-pro/admin/views/admin.php deleted file mode 100644 index ab63c284..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/admin.php +++ /dev/null @@ -1,24 +0,0 @@ - - -
    - -

    - - - -
    diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/author.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/author.php deleted file mode 100644 index d7747f13..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/author.php +++ /dev/null @@ -1,149 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    - - plugin_slug); ?> - -
    -

    - -

    -

    - -

    -

    - -

    -

    - -

    - - -
    - - -
    -
    - -

    - set_checked($values['optioncount']); ?>> - -

    -

    - set_checked($values['hide_empty']); ?>> - -

    -

    - set_checked($values['exclude_admin']); ?>> - -

    -

    - set_checked($values['show_fullname']); ?>> - -

    -

    - set_checked($values['combo_box']); ?> style="vertical-align: top;margin-top:2px;"> - -

    -
    - -
    - -
    -
    - -

    - -

    - -

    - -

    - -
    - -
    - -
    -
    - - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/category.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/category.php deleted file mode 100644 index b2749530..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/category.php +++ /dev/null @@ -1,162 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    - - plugin_slug); ?> - -
    - -

    - -

    -

    - -

    -

    - -

    -

    - -

    -

    - -

    -
    - -
    -
    -

    - set_checked($values['show_count']); ?>> - -

    -

    - set_checked($values['hide_empty']); ?>> - -

    -

    - set_checked($values['hierarchical']); ?>> - -

    -

    - set_checked($values['include_children']); ?>> - -

    -

    - set_checked($values['combo_box']); ?> style="vertical-align: top;margin-top:2px;"> - -

    - -
    - -
    - -
    -
    - -

    - -

    - -

    - - - - -
    - set_checked($values['sync_include_exclude']); ?>> - - -

    - -
    - -
    - -
    -
    - - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/meta-option.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/meta-option.php deleted file mode 100644 index 274f0f6e..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/meta-option.php +++ /dev/null @@ -1,33 +0,0 @@ - -
  • -
    -

    - -

    -

    - -

    -

    - -

    - -
    -
    -
    -

    - plugin_slug); ?> -

    - -
    -
  • \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-date.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-date.php deleted file mode 100644 index 37036cdf..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-date.php +++ /dev/null @@ -1,150 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    -
    - -
    -

    - -

    -

    - -

    -

    - -

    -
    -
    -

    - plugin_slug); ?> -

    -

    - '; - } - - $formati++; - } - - ?> - - -
    -
    -
    - -

    -
    -
    -
    -

    plugin_slug); ?> plugin_slug); ?>">

    - - -
    - -

    - -

    -

    - -

    -

    - -

    -
    - -
    -

    - -

    -

    - -

    -

    - -

    -
    -
    -

    - - - set_checked($values['date_use_dropdown_year']); ?>> -
    - - set_checked($values['date_use_dropdown_month']); ?>> - -

    - - -
    - -
    -
    - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta.php deleted file mode 100644 index 2f6a0a49..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta.php +++ /dev/null @@ -1,72 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    - -

    plugin_slug); ?>

    - -
    - - - -
    -
    - -
    - - -
    - -
    - - - -
    - -
    - - - - -
    -
    - -
    -
    - - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/choice.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/choice.php deleted file mode 100644 index 248bc88d..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/choice.php +++ /dev/null @@ -1,179 +0,0 @@ - -

    - -

    -

    - - -

    -
    - -

    - -

    -

    - -

    -

    - -

    - - -

    - - - set_checked($values['combo_box']); ?>> -
    -
    - set_checked($values['show_count']); ?>> -
    - - set_checked($values['hide_empty']); ?>> - -

    -

    - - - -

    -
    -
    -

    plugin_slug); ?> plugin_slug); ?>">

    - -

    - -

    -
    -
    -

    plugin_slug); ?>

    - - - -

    - -

    -

    - - - - - - -

    -

    - set_checked($values['choice_is_acf']); ?>> - -

    -
    - -
    -

    - plugin_slug); ?> -

    - -

    - plugin_slug); ?> plugin_slug); ?>"> -

    -

    - plugin_slug); ?> plugin_slug); ?>"> -

    - - -
    - -

    There are no options.", $this->plugin_slug); ?>

    - -
      - display_meta_option( array(), ' meta-option-template ignore-template-init'); - - if(isset($values['meta_options'])) - { - foreach ($values['meta_options'] as $sort_option) - { - $this->display_meta_option($sort_option); - - $i++; - } - } - - ?> -
    - -

    - plugin_slug); ?> - plugin_slug); ?> - plugin_slug); ?> -

    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/date.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/date.php deleted file mode 100644 index b2d33585..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/date.php +++ /dev/null @@ -1,210 +0,0 @@ - -

    - -

    -

    - - -

    -

    - -

    - -
    - -
    - -
    -

    plugin_slug); ?>

    -

    - plugin_slug); ?> -

    -

    - - -

    - -

    - - -

    -

    - -

    -
    - -
    -
    -

    - -

    - - - - -
    - -
    -

    - plugin_slug); ?> -

    -

    - -
    -
    -
    - -

    -
    -
    -
    -

    plugin_slug); ?> - - -

    - -

    - -

    -

    - -

    -

    - -

    -
    - -
    -

    - -

    -

    - -

    -

    - -

    -
    -
    -

    - - - set_checked($values['date_use_dropdown_year']); ?>> -
    - - set_checked($values['date_use_dropdown_month']); ?>> - -

    - - - -
    - - -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/number.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/number.php deleted file mode 100644 index 55c5f0b1..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-meta/number.php +++ /dev/null @@ -1,254 +0,0 @@ - - -

    - -

    -

    - -

    - -
    - -
    -

    - -

    - -

    - -

    -
    - -

    - -

    - -

    - -

    - -
    -
    -

    plugin_slug); ?>

    -

    - plugin_slug); ?> -

    -

    - -

    - -

    - - -

    -

    - -

    - - - -

    - set_checked($values['number_is_decimal']); ?>> - -
    - - -

    -
    -
    - -
    -

    plugin_slug); ?> - -

    - -

    - -
    - set_checked($values['range_min_detect']); ?>> - -

    -

    - -
    - set_checked($values['range_max_detect']); ?>> - -

    - -
    -
    -

    - -

    -
    -
    - - -
    -

    - -

    - -

    - -

    -
    -
    - -

    - -

    -
    - -
    -
    -

    - -

    -

    - -

    -

    - -

    -
    -
    - -

    - -

    -
    - - - - -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-type.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-type.php deleted file mode 100644 index d1d6b09e..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/post-type.php +++ /dev/null @@ -1,136 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    - - - -
    -

    - plugin_slug); ?>plugin_slug); ?>">
    - Settings before a user will see them as options.", $this->plugin_slug); ?> -

    - true - ); - - $post_types = get_post_types( $args, 'objects' ); - - $is_default = false; - if(!is_array($values['post_types'])) - { - $is_default = true; - $values['post_types'] = array(); - } - - - foreach ( $post_types as $post_type ) - { - //if($post_type->name!="attachment") - //{ - if($is_default) - { - $values['post_types'][$post_type->name] = "1"; - } - else if(!isset($values['post_types'][$post_type->name])) - { - $values['post_types'][$post_type->name] = ""; - } - - ?> - - set_checked($values['post_types'][$post_type->name]); ?>> - - - - -

    -
    -
    -
    -
    -

    - -

    - -

    - -

    -

    - -

    -

    - -

    -
    -
    -

    -

    - set_checked($values['combo_box']); ?> style="vertical-align: top;margin-top:2px;"> - -

    -
    - -
    -
    -
    - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/posts-per-page.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/posts-per-page.php deleted file mode 100644 index 2294dfa3..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/posts-per-page.php +++ /dev/null @@ -1,102 +0,0 @@ - -
    - -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    -

    - plugin_slug); ?> -

    -
    - -

    - -

    -

    - -

    -
    - -
    - -

    - -

    - -

    - -

    -
    -
    -
    - -
    - -

    - -

    - -

    - -

    - -
    -
    -

    - -

    -
    -
    -
    -
    - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/reset.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/reset.php deleted file mode 100644 index 8feee8d5..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/reset.php +++ /dev/null @@ -1,65 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    -
    - -

    - -

    -

    - -

    -

    - -

    -

    - -

    -
    -
    - - - -
    - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/search.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/search.php deleted file mode 100644 index a421f086..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/search.php +++ /dev/null @@ -1,53 +0,0 @@ - -
    -
    - - -
    -

    plugin_slug); ?>

    -
    -
    - -
    -
    - -

    - -

    -

    - -

    -

    - -

    -
    -
    - - - -
    - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order-option.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order-option.php deleted file mode 100644 index 0f04ca47..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order-option.php +++ /dev/null @@ -1,105 +0,0 @@ - -
  • - -
    -

    - -

    -

    - -

    -

    - -

    -

    - -

    - -
    - -

    - plugin_slug); ?> -

    -
    - - - -
    - - -
    -

    - -

    -

    - - -

    -

    - - -

    - -
    - -
  • \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order.php deleted file mode 100644 index e6e62531..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/sort-order.php +++ /dev/null @@ -1,117 +0,0 @@ - -
    - -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    -

    - plugin_slug); ?> -

    -

    - -

    -

    - -

    -

    - -

    - -

    - -

    -
    -
    - -

    plugin_slug); ?>

    -

    - plugin_slug); ?> -

    - -

    - plugin_slug); ?> plugin_slug); ?>"> -

    -

    - plugin_slug); ?> plugin_slug); ?>"> -

    -

    - plugin_slug); ?> plugin_slug); ?>"> -

    - -
    - -

    There are no sort options.", $this->plugin_slug); ?>

    - -
      - display_sort_option( array(), ' sort-option-template ignore-template-init'); - - if(isset($values['sort_options'])) - { - foreach ($values['sort_options'] as $sort_option) - { - - $this->display_sort_option($sort_option); - - $i++; - } - } - - ?> -
    - -

    - plugin_slug); ?> - plugin_slug); ?> -

    - -
    - -
    -
    - - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/submit.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/submit.php deleted file mode 100644 index 132f86e9..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/submit.php +++ /dev/null @@ -1,48 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    -
    - -

    - -

    -

    - -

    -
    -
    - - - -
    - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/tag.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/tag.php deleted file mode 100644 index b3841b0f..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/tag.php +++ /dev/null @@ -1,160 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    - - plugin_slug); ?> - -
    - -

    - -

    - -

    - -

    -

    - -

    -

    - -

    - -

    - -

    - -
    - - -
    -
    -

    - set_checked($values['show_count']); ?>> - -

    -

    - set_checked($values['hide_empty']); ?>> - -

    -

    - set_checked($values['combo_box']); ?> style="vertical-align: top;margin-top:2px;"> - -

    - - -
    - -
    - -
    -
    - -

    - -

    - -

    - - - -
    - set_checked($values['sync_include_exclude']); ?>> - - -

    - -
    - -
    - -
    -
    - - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/taxonomy.php b/wp/wp-content/plugins/search-filter-pro/admin/views/fields/taxonomy.php deleted file mode 100644 index f00e73cb..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/fields/taxonomy.php +++ /dev/null @@ -1,224 +0,0 @@ - -
    -
    - -
    -

    plugin_slug); ?>

    -
    -
    - -
    - -
    - - plugin_slug); ?> - -
    -

    - -

    -

    - -

    - -

    - -

    -

    - -

    - -

    - -

    - -

    - -

    -
    - - -
    -
    -

    - set_checked($values['show_count']); ?>> - -

    -

    - set_checked($values['hide_empty']); ?>> - -

    -

    - set_checked($values['hierarchical']); ?>> - -

    -

    - set_checked($values['include_children']); ?>> - -

    -

    - set_checked($values['combo_box']); ?> style="vertical-align: top;margin-top:2px;"> - -

    - - - - - - -
    - -
    - -
    -
    - -

    - -

    - -

    - - -
    - set_checked($values['sync_include_exclude']); ?>> - - -

    - -
    - -
    - -
    -
    - - - - - - -
    -
    - plugin_slug); ?> -
    -
    \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/admin/views/index.php b/wp/wp-content/plugins/search-filter-pro/admin/views/index.php deleted file mode 100644 index e71af0ef..00000000 --- a/wp/wp-content/plugins/search-filter-pro/admin/views/index.php +++ /dev/null @@ -1 +0,0 @@ - -
  • - - - - - - - - - -
  • \ No newline at end of file diff --git a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-activator.php b/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-activator.php deleted file mode 100644 index 25d108b8..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-activator.php +++ /dev/null @@ -1,108 +0,0 @@ -blog_id ); - $this->db_install(); - restore_current_blog(); - } - } - } - public function activate( $network_wide ) { - - global $wpdb; - - if ( is_multisite() && $network_wide ) { - // store the current blog id - $current_blog = $wpdb->blogid; - - // Get all blogs in the network and activate plugin on each one - $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); - foreach ( $blog_ids as $blog_id ) { - switch_to_blog( $blog_id ); - $this->db_install(); - restore_current_blog(); - } - } else { - - // check for existence of caching database, if not install it - $this->db_install(); - } - } - - function db_install() { - global $wpdb; - - $table_name = $wpdb->prefix . 'search_filter_cache'; - - $charset_collate = ''; - - if ( $wpdb->has_cap( 'collation' ) ) { - $charset_collate = $wpdb->get_charset_collate(); - } - - $sql = "CREATE TABLE $table_name ( - id bigint(20) NOT NULL AUTO_INCREMENT, - post_id bigint(20) NOT NULL, - post_parent_id bigint(20) NOT NULL, - field_name varchar(255) NOT NULL, - field_value varchar(255) NOT NULL, - field_value_num bigint(20) NULL, - field_parent_num bigint(20) NULL, - term_parent_id bigint(20) NULL, - PRIMARY KEY (id), - KEY sf_c_field_name_index (field_name(32)), - KEY sf_c_field_value_index (field_value(32)), - KEY sf_c_field_value_num_index (field_value_num) - ) $charset_collate;"; - - require_once ABSPATH . 'wp-admin/includes/upgrade.php'; - dbDelta( $sql ); - - $table_name = $wpdb->prefix . 'search_filter_term_results'; - - $sql = "CREATE TABLE $table_name ( - id bigint(20) NOT NULL AUTO_INCREMENT, - field_name varchar(255) NOT NULL, - field_value varchar(255) NOT NULL, - field_value_num bigint(20) NULL, - result_ids mediumtext NOT NULL, - PRIMARY KEY (id), - KEY sf_tr_field_name_index (field_name(32)), - KEY sf_tr_field_value_index (field_value(32)), - KEY sf_tr_field_value_num_index (field_value_num) - - ) $charset_collate;"; - - dbDelta( $sql ); - } -} diff --git a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-deactivator.php b/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-deactivator.php deleted file mode 100644 index e1a87533..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-deactivator.php +++ /dev/null @@ -1,31 +0,0 @@ -"; - echo $str; - echo "

    manage_options', 'relevanssi_options_capability' ); ?>

    "; - echo "
    ";*/ - //
    ********************************
    "; - } - - public static function finish_log( $name = '', $display = true, $important = false ) { - self::$log_time_finish[ $name ] = microtime( true ); - self::$log_time_total[ $name ] = self::$log_time_finish[ $name ] - self::$log_time_start[ $name ]; - - if ( $display ) { - self::print_log( $name, false, $important ); - } else { - return self::$log_time_total[ $name ]; - } - } - public static function add_time_running( $name = '', $name_to_add = '', $display = false ) { - if ( ! isset( self::$log_time_running[ $name ] ) ) { - self::$log_time_running[ $name ] = 0; - } - - self::$log_time_running[ $name ] += self::$log_time_total[ $name_to_add ]; - - if ( $display ) { - self::print_log( $name, true, $important ); - } - } - public static function get_time_running( $name = '', $display = true, $important = false ) { - if ( ! isset( self::$log_time_running[ $name ] ) ) { - self::$log_time_running[ $name ] = 0; - } - - if ( $display ) { - self::print_log( $name, true, $important ); - } - } - public static function print_log( $name = '', $running = false, $important = false ) { - if ( $important ) { - echo ''; - } - - if ( ! $running ) { - $time_var = self::$log_time_total[ $name ]; - } else { - $time_var = self::$log_time_running[ $name ]; - } - - echo "SFLOG | $name: " . round( $time_var, 3 ) . ' seconds -
    ********************************
    '; - if ( $important ) { - echo '
    '; - } - } - - // Search_Filter_Helper::json_encode() - public static function json_encode( $obj ) { - if ( function_exists( 'wp_json_encode' ) ) {// introduced WP 4.1 - return wp_json_encode( $obj ); - } else { - return json_encode( $obj ); - } - /* - else - { - return false; - }*/ - - } - - public static function has_wpml() { - // filter is for WPML v 3.5 and over - // keep icl_object as a check for older WPML and also other plugins which declare the same functions for compatibility - - if ( ! self::$has_wpml_checked ) { - self::$has_wpml_checked = true; - - /* - if(self::has_polylang()) - { - self::$has_wpml = true; - } - else {*/ - if ( ( has_filter( 'wpml_object_id' ) || ( function_exists( 'icl_object_id' ) ) ) ) { - self::$has_wpml = true; - } - // } - } - - return self::$has_wpml; - } - - public static function wpml_current_language() { - if ( ! self::has_wpml() ) { - return false; - } - - $current_language_code = apply_filters( 'wpml_current_language', null ); - - return $current_language_code; - } - public static function has_polylang() { - // global $polylang; - if ( defined( 'POLYLANG_VERSION' ) ) { - // if(isset($polylang)) { - - return true; - } - - return false; - } - public static function has_woocommerce() { - if ( class_exists( 'woocommerce' ) ) { - return true; - } else { - return false; - } - - } - public static function has_custom_layouts() { - if ( class_exists( 'Custom_Layouts' ) ) { - return true; - } else { - return false; - } - } - public static function has_dynamic_ooo() { - - if ( defined( 'DCE_VERSION' ) ) { - if ( version_compare( DCE_VERSION, '1.9.6.7.2', '>=' ) ) { - return true; - } - } - return false; - } - public static function wc_get_page_id( $page_name = '' ) { - if ( function_exists( 'wc_get_page_id' ) ) { - return wc_get_page_id( $page_name ); - } elseif ( function_exists( 'woocommerce_get_page_id' ) ) { - return woocommerce_get_page_id( $page_name ); - } - - return false; - - } - public static function wpml_object_id( $id = 0, $type = '', $return_original = '', $lang_code = '' ) { - $lang_id = 0; - - if ( has_filter( 'wpml_object_id' ) ) { - if ( $lang_code != '' ) { - $lang_id = apply_filters( 'wpml_object_id', $id, $type, $return_original, $lang_code ); - } else { - $lang_id = apply_filters( 'wpml_object_id', $id, $type, $return_original ); - } - } elseif ( function_exists( 'icl_object_id' ) ) { - if ( $lang_code != '' ) { - $lang_id = icl_object_id( $id, $type, $return_original, $lang_code ); - } else { - $lang_id = icl_object_id( $id, $type, $return_original ); - } - } - - return $lang_id; - } - public static function wpml_post_language_details( $post_id = 0 ) { - $lang_details = array(); - - if ( has_filter( 'wpml_post_language_details' ) ) { - $lang_details = apply_filters( 'wpml_post_language_details', '', $post_id ); - } elseif ( function_exists( 'wpml_get_language_information' ) ) { - - $lang_details = wpml_get_language_information( $post_id ); - } - - return $lang_details; - } - - public static function wpml_post_language_code( $post_id ) { - // if its actually polylang use their function instead - if ( ( self::has_polylang() ) && ( function_exists( 'pll_get_post_language' ) ) ) { - return pll_get_post_language( $post_id ); - } - - $lang_details = self::wpml_post_language_details( $post_id ); - if ( $lang_details ) { - return $lang_details['language_code']; - } else { - return ''; - } - } - - public static function get_settings_meta( $sfid ) { - $settings = get_post_meta( $sfid, '_search-filter-settings', true ); - - if ( ! is_array( $settings ) ) { - $settings = array(); - } - - if ( ! isset( $settings['results_url'] ) ) { - $settings['results_url'] = ''; - $results_url = get_post_meta( $sfid, '_search-filter-results-url', true ); - - if ( ! empty( $results_url ) ) { - $settings['results_url'] = $results_url; - } - } - - if ( ! isset( $settings['enable_taxonomy_archives'] ) ) { - $settings['enable_taxonomy_archives'] = 0; - } - - return $settings; - } - - public static function get_fields_meta( $sfid ) { - $fields = get_post_meta( $sfid, '_search-filter-fields', true ); - - return $fields; - } - - public static function get_option( $option_name ) { - $option = get_option( 'search_filter_' . $option_name ); - - if ( $option === false ) { - // this means its not been set yet - // then init with a default - $option = ''; - - $defaults = array( - - 'cache_speed' => 'slow', - 'cache_use_manual' => 0, - 'cache_use_background_processes' => 1, - 'cache_use_transients ' => 0, - 'load_jquery_i18n' => 0, - 'lazy_load_js' => 0, - 'load_js_css' => 1, - 'combobox_script' => 'chosen', - 'remove_all_data' => 0, - 'meta_key_text_input' => 0, - - ); - - if ( isset( $defaults[ $option_name ] ) ) { - $option = $defaults[ $option_name ]; - } - } - - return $option; - } - - public static function get_table_name( $table_name = '' ) { - - global $wpdb; - return $wpdb->prefix . $table_name; - } -} diff --git a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php b/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php deleted file mode 100644 index a726c044..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php +++ /dev/null @@ -1,1956 +0,0 @@ -cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - $this->option_name = 'search-filter-cache'; - $this->process_exec_time = 60 * 3; - $cache_speed = Search_Filter_Helper::get_option( 'cache_speed' ); - - if ( empty( $cache_speed ) ) { - $cache_speed = 'slow'; - } - - $cycle_error_minutes = 1; - if ( $cache_speed == 'slow' ) { - $this->batch_size = 10; - $cycle_error_minutes = 2; - } elseif ( $cache_speed == 'medium' ) { - $this->batch_size = 20; - $cycle_error_minutes = 3; - } elseif ( $cache_speed == 'fast' ) { - $this->batch_size = 40; - $cycle_error_minutes = 4; - } - $this->cycle_error_amount = $cycle_error_minutes * 60; // 3 minutes - $this->process_exec_time = $this->cycle_error_amount; - - /* ajax */ - add_action( 'wp_ajax_cache_progress', array( $this, 'cache_progress' ) ); - add_action( 'wp_ajax_cache_restart', array( $this, 'cache_restart' ) ); - add_action( 'wp_ajax_cache_progress_manual', array( $this, 'cache_progress_manual' ) ); - add_action( 'wp_ajax_cache_restart_manual', array( $this, 'cache_restart_manual' ) ); - add_action( 'wp_ajax_refresh_cache', array( $this, 'refresh_cache' ) ); - add_action( 'wp_ajax_nopriv_refresh_cache', array( $this, 'refresh_cache' ) ); - add_action( 'wp_ajax_process_cache', array( $this, 'process_cache' ) ); - add_action( 'wp_ajax_nopriv_process_cache', array( $this, 'process_cache' ) ); - add_action( 'wp_ajax_nopriv_test_remote_connection', array( $this, 'test_remote_connection' ) ); - add_action( 'wp_ajax_test_remote_connection', array( $this, 'test_remote_connection' ) ); - - add_action( 'search_filter_delete_post_cache', array( $this, 'delete_post_cache' ), 10 ); - - /* save post / re indexing hooks */ - add_action( 'save_post', array( $this, 'post_updated_action' ), 800, 3 ); // priority of 80 so it runs after the regular S&F form save - add_action( 'shutdown', array( $this, 'wp_shutdown' ), 800 ); - add_filter( 'add_attachment', array( $this, 'attachment_added' ), 20, 1 ); - add_filter( 'attachment_updated', array( $this, 'attachment_updated' ), 80, 3 ); - add_action( 'set_object_terms', array( $this, 'object_terms_updated' ), 80, 4 ); - add_filter( 'updated_postmeta', array( $this, 'post_meta_updated' ), 80, 4 ); - add_action( 'search_filter_insert_post_data', array( $this, 'insert_post_custom_post_data' ), 10, 3 ); - add_action( 'edited_terms', array( $this, 'taxonomy_edited_terms' ), 10, 4 ); - add_action( 'search_filter_update_post_cache', array( $this, 'update_cache_action' ), 10 ); - } - - public function update_cache_action( $post_id ) { - if ( ! $this->cache_enabled() ) { - return; - } - $this->init_cache_options(); - $this->setup_cached_search_forms(); - $this->update_post_cache( $post_id ); - } - private function is_cache_init( $cache_options ) { - if ( ! $cache_options ) { - return false; - } - - if ( ! is_array( $cache_options ) ) { - return false; - } - - $keys_wanted = array( 'status', 'restart', 'cache_list', 'rc_status' ); - foreach( $keys_wanted as $key ) { - if ( ! isset( $cache_options[ $key ] ) ) { - return false; - } - } - - return true; - } - private function get_cache_options_no_list( $cache_options ) { - $cache_options['cache_list'] = array(); - return $cache_options; - } - public function init_cache_options() { - // check to see if there is a S&F options in the caching table - if ( empty( $this->cache_options ) ) { - $cache_options = get_option( $this->option_name ); - if ( ! $this->is_cache_init( $cache_options ) ) {// then lets init - do_action( 'search_filter_init_cache_not_init', $cache_options, $this->option_name ); - $cache_options = array(); - $cache_options['status'] = 'ready'; - $cache_options['last_update'] = ''; - $cache_options['restart'] = true; - $cache_options['cache_list'] = array(); // ids of posts to cache - $cache_options['current_post_index'] = 0; - $cache_options['progress_percent'] = 0; - $cache_options['locked'] = false; - $cache_options['error_count'] = 0; // the error here is from non-completed processing - $cache_options['rc_status'] = ''; // this is a different error (remote connect) - and will try anotehr method of caching if the server cannot do a wp_remote_---, curl, etc etc - $cache_options['process_id'] = 0; - $cache_options['run_method'] = 'automatic'; - $this->setup_cached_search_forms(); - - // all the fields and options we need to cache - // then grab the post types and the meta keys we need to index - $cache_options['caching_data'] = $this->cache_data; - - // the fields and options from the last cache - compare this with new caching data to see if we need to trigger a reset - // $cache_options['last_caching_data'] = $cache_options['caching_data']; - $this->update_cache_options( $cache_options, true ); - } - if ( ! isset( $cache_options['run_method'] ) ) { - $cache_options['run_method'] = 'automatic'; - } - $this->cache_options = $cache_options; - } - } - - public function get_real_option( $option_name = '' ) { - global $wpdb; - - $results = $wpdb->get_results( - $wpdb->prepare( - " - SELECT option_value - FROM {$wpdb->options} - WHERE option_name = '%s' LIMIT 0, 1 - ", - $option_name - ) - ); - - if ( count( $results ) == 0 ) { - return false; - } - - $result = unserialize( $results[0]->option_value ); - - return $result; - } - public function cache_enabled() { - $cache_enabled = apply_filters( 'search_filter_cache_enabled', true ); - return $cache_enabled; - } - public function cache_restart() { - if ( ! current_user_can( 'manage_options' ) ) { - return; - exit; - } - if ( ! $this->cache_enabled() ) { - return; - } - - $this->init_cache_options(); - $this->check_cache_list_changed( true ); - $this->cache_options['restart'] = true; - $this->cache_options['rc_status'] = ''; - $this->update_cache_options( $this->cache_options, true ); - - $this->cache_progress(); - } - - public function cache_progress() { - - if ( ! $this->cache_enabled() ) { - return; - } - - $this->init_cache_options(); - $cache_json = $this->cache_options; - - unset( $cache_json['cache_list'] ); - echo Search_Filter_Helper::json_encode( $cache_json ); - - // if($this->cache_options['run_method'] != "manual") { - if ( ( $this->cache_options['rc_status'] == '' ) || ( ( $this->cache_options['rc_status'] == 'user_bypass' ) ) ) {// then we need to test for a remote connection - $this->can_wp_remote_post(); - } - // } - - if ( $this->cache_options['run_method'] == 'manual' ) { - // manual, then do nothing, wait for initiated response - - } elseif ( $this->cache_options['rc_status'] == 'connect_success' ) {// there is a remote connection error, so don't try remote call - $query_args = array( 'action' => 'refresh_cache' ); - $url = add_query_arg( $query_args, admin_url( 'admin-ajax.php' ) ); - $this->wp_remote_post_with_cookie( $url ); // run in the background - calls refresh_cache() - } else { - $this->refresh_cache(); - } - exit; - } - - public function cache_restart_manual() { - if ( ! $this->cache_enabled() ) { - return; - } - - $this->init_cache_options(); - $this->check_cache_list_changed( true ); - if ( $this->cache_options['run_method'] == 'manual' ) { - - $this->cache_options['restart'] = true; - $this->cache_options['rc_status'] = ''; - - $this->update_cache_options( $this->cache_options, true ); - - $this->cache_progress_manual(); - } - exit; - } - - public function cache_progress_manual() { - if ( ! $this->cache_enabled() ) { - return; - } - - $this->init_cache_options(); - - if ( $this->cache_options['run_method'] == 'manual' ) { - $this->cache_options['status'] = 'inprogress'; - $this->cache_options['rc_status'] = ''; - // $this->cache_options['locked'] = false; - $this->update_cache_options( $this->cache_options, true ); - - $this->refresh_cache(); - } - - $cache_json = $this->cache_options; - unset( $cache_json['cache_list'] ); - echo Search_Filter_Helper::json_encode( $cache_json ); - - exit; - } - - public function clean_query( $query ) { - $query->set( 'tax_query', array() ); - - } - - public function refresh_cache() { - if ( ! $this->cache_enabled() ) { - return; - } - - // spawned from a wp_remote_get - so a background process - $this->init_cache_options(); - - ignore_user_abort( true ); // allow script to carry on running - // Some hosts disable (remove) this function. - if ( function_exists( 'set_time_limit' ) ) { - @set_time_limit( $this->process_exec_time ); - } - ini_set( 'max_execution_time', $this->process_exec_time ); - - if ( $this->cache_options['run_method'] !== 'manual' ) { - if ( ( $this->cache_options['status'] == 'error' ) && ( $this->cache_options['restart'] == false ) ) {// if status = error, then caching can only resume based on user initiated response - exit; - } - } - - if ( ( ( $this->cache_options['status'] == 'ready' ) || ( $this->cache_options['restart'] == true ) ) ) { - // then begin processing all the posts - $this->cache_options['status'] = 'inprogress'; - $this->cache_options['last_update'] = time(); - $this->cache_options['restart'] = false; - $this->cache_options['current_post_index'] = 0; - $this->cache_options['total_post_index'] = 0; - $this->cache_options['progress_percent'] = 0; - $this->cache_options['process_id'] = time(); - $this->cache_options['locked'] = false; - $this->cache_options['error_count'] = 0; - - $this->setup_cached_search_forms(); - - if ( empty( $this->cache_data['post_types'] ) ) { - - $this->cache_options['status'] = 'ready'; - $this->cache_options['restart'] = true; - - $this->update_cache_options( $this->cache_options, true ); - - exit; - } - - Search_Filter_Wp_Cache::purge_all_transients(); - - $query_args = array( - 'post_type' => $this->cache_data['post_types'], - 'posts_per_page' => -1, - 'paged' => 1, - 'fields' => 'ids', - - 'orderby' => 'ID', - 'order' => 'ASC', - - 'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private' ), - - 'suppress_filters' => true, - - /* speed improvements */ - 'no_found_rows' => true, - 'update_post_meta_cache' => false, - ); - - if ( in_array( 'attachment', $this->cache_data['post_types'] ) ) { - array_push( $query_args['post_status'], 'inherit' ); - } - - if ( isset( $this->cache_data['post_stati'] ) ) { - - $query_args['post_status'] = array_unique( array_merge( $query_args['post_status'], $this->cache_data['post_stati'] ) ); - } - - if ( has_filter( 'sf_edit_cache_query_args' ) ) { - $query_args = apply_filters( 'sf_edit_cache_query_args', $query_args, $this->sfid ); - } - - $this->hard_remove_filters(); - - add_action( 'pre_get_posts', array( $this, 'clean_query' ), 100 ); - - if ( has_filter( 'search_filter_post_cache_data_query_args' ) ) { - $query_args = apply_filters( 'search_filter_post_cache_data_query_args', $query_args, $this->sfid ); - - } - $query = new WP_Query( $query_args ); - remove_action( 'pre_get_posts', array( $this, 'clean_query' ), 100 ); - - $this->hard_restore_filters(); - - if ( $query->have_posts() ) { - - $this->cache_options['cache_list'] = $query->posts; - $this->cache_options['total_post_index'] = count( $this->cache_options['cache_list'] ); - - } else { // there were no posts to cache so set as complete or error - - } - - // clear cache - $this->empty_cache(); - - // update cache options in DB - $this->update_cache_options( $this->cache_options, true ); - - if ( $this->cache_options['run_method'] == 'manual' ) { - $this->process_cache( $this->cache_options['process_id'] ); - } elseif ( $this->cache_options['rc_status'] == 'connect_success' ) { - // $this->process_cache($this->cache_options['process_id']); - $this->wp_remote_process_cache( array( 'process_id' => $this->cache_options['process_id'] ) ); - } else { - $this->process_cache( $this->cache_options['process_id'] ); - } - } - - if ( $this->cache_options['status'] == 'inprogress' ) {// if its in progress, check when the last cycle started to see if there was a problem - - // if its been more than 5 minutes since the last cycle then start it again - $current_time = time(); - $retry_limit = 2; - - $cycle_error_amount = $this->cycle_error_amount; - $error_time = $this->cache_options['last_update'] + $cycle_error_amount; - - if ( $current_time >= $error_time ) {// there was an error - so try to resume - - $this->cache_options['last_update'] = time(); - $this->cache_options['error_count']++; - $this->cache_options['locked'] = false; - - if ( $this->cache_options['error_count'] > $retry_limit ) {// then there seems to be a serious issue, stop and show error message - allow user to restart - - $this->cache_options['status'] = 'error'; - $this->cache_options['error_count'] = 0; - $this->update_cache_options( $this->cache_options ); - } else { - // try to continue the processing - $this->cache_options['process_id'] = time(); - $this->update_cache_options( $this->cache_options ); - - if ( $this->cache_options['run_method'] == 'manual' ) { - $this->process_cache( $this->cache_options['process_id'] ); - } elseif ( $this->cache_options['rc_status'] == 'connect_success' ) { - $this->wp_remote_process_cache( array( 'process_id' => $this->cache_options['process_id'] ) ); - } else { - $this->process_cache( $this->cache_options['process_id'] ); - } - } - - // $this->process_cache(); - } else { // then just leave the scripts to carry on - we assume they are working - - // unless there is a remote connection error, which means we should try to manually resume - - if ( $this->cache_options['run_method'] == 'manual' ) { - $this->process_cache( $this->cache_options['process_id'] ); - } elseif ( $this->cache_options['rc_status'] != 'connect_success' ) { - $this->process_cache( $this->cache_options['process_id'] ); - } - } - } elseif ( $this->cache_options['status'] == 'termcache' ) { - if ( $this->cache_options['rc_status'] != 'connect_success' ) { - $this->process_cache( $this->cache_options['process_id'] ); - } - } else { - if ( $this->cache_options['run_method'] == 'manual' ) { - $cache_json = $this->cache_options; - unset( $cache_json['cache_list'] ); - echo Search_Filter_Helper::json_encode( $cache_json ); - } - } - - exit; - } - - public function hard_remove_filters() { - $remove_posts_clauses = false; - $remove_posts_where = false; - - if ( isset( $GLOBALS['wp_filter']['posts_clauses'] ) ) { - $remove_posts_clauses = true; - } - - if ( isset( $GLOBALS['wp_filter']['posts_where'] ) ) { - $remove_posts_where = true; - } - - if ( ( $remove_posts_clauses ) || ( $remove_posts_where ) ) { - $this->WP_FILTER = $GLOBALS['wp_filter']; - } - - if ( $remove_posts_clauses ) { - - unset( $GLOBALS['wp_filter']['posts_clauses'] ); - } - - if ( $remove_posts_where ) { - - unset( $GLOBALS['wp_filter']['posts_where'] ); - } - } - - - public function hard_restore_filters() { - $remove_posts_clauses = false; - $remove_posts_where = false; - - if ( isset( $this->WP_FILTER['posts_clauses'] ) ) { - $remove_posts_clauses = true; - } - - if ( isset( $this->WP_FILTER['posts_where'] ) ) { - $remove_posts_where = true; - } - - if ( ( $remove_posts_clauses ) || ( $remove_posts_where ) ) { - $GLOBALS['wp_filter'] = $this->WP_FILTER; - unset( $this->WP_FILTER ); - } - - } - - public function process_cache( $process_id = 0 ) { - - if ( ! $this->cache_enabled() ) { - return; - } - - $this->init_cache_options(); - - ignore_user_abort( true ); // allow script to carry on running - @set_time_limit( $this->process_exec_time ); - ini_set( 'max_execution_time', $this->process_exec_time ); - - // make sure we only run the same, valid process - if ( $process_id === 0 || $process_id === '' ) { - if ( isset( $_GET['process_id'] ) ) { - $process_id = (int) $_GET['process_id']; - } - } - - $live_options = $this->get_real_option( $this->option_name ); - - if ( ( ! $this->valid_process( $process_id, $this->cache_options['current_post_index'] ) ) || ( $live_options['locked'] == true ) ) { - if ( $this->cache_options['run_method'] == 'manual' ) { - $cache_json = $this->cache_options; - unset( $cache_json['cache_list'] ); - echo Search_Filter_Helper::json_encode( $cache_json ); - } - exit; - } - - if ( $this->cache_options['status'] == 'inprogress' ) { - $this->cache_options['locked'] = true; - $this->update_cache_options( $this->cache_options, false, false ); - - $this->setup_cached_search_forms(); - - $cache_index = $this->cache_options['current_post_index']; - $cache_list = $this->cache_options['cache_list']; - $cache_length = count( $cache_list ); - - if ( ( $cache_index + $this->batch_size ) > $cache_length - 1 ) { - $batch_end = $cache_length - 1; - } else { - $batch_end = $cache_index + $this->batch_size - 1; - } - $this->context = 'cache'; - $cached_count = 0; - for ( $i = $cache_index; $i <= $batch_end; $i++ ) { - $cached_count++; - // fetch a fresh copy of this value every time, in case another process in the bg has updated it since - if ( ! $this->valid_process( $process_id, $this->cache_options['current_post_index'] ) ) { - exit; - } - $post_id = $cache_list[ $i ]; - - $this->update_post_cache( $post_id ); - $this->cache_options['current_post_index'] = $i + 1; - } - $this->context = 'none'; - - if ( ! $this->valid_process( $process_id, $this->cache_options['current_post_index'] ) ) { - exit; - } - - $this->cache_options['last_update'] = time(); - $this->cache_options['progress_percent'] = round( ( 100 / $cache_length ) * $this->cache_options['current_post_index'] ); - $this->cache_options['locked'] = false; - $this->cache_options['error_count'] = 0; - - if ( ( $this->cache_options['current_post_index'] == $cache_length ) || ( $cache_length == 0 ) ) {// complete - - $this->cache_options['process_id'] = 0; - $this->cache_options['status'] = 'finished'; - $this->cache_options['locked'] = false; - $this->cache_options['cache_list'] = array(); - - $this->update_cache_options( $this->cache_options, false, false ); - - Search_Filter_Wp_Cache::purge_all_transients(); - - if ( $this->cache_options['run_method'] == 'manual' ) { - $cache_json = $this->cache_options; - unset( $cache_json['cache_list'] ); - echo Search_Filter_Helper::json_encode( $cache_json ); - } - } else { // continue - - if ( $this->cache_options['run_method'] == 'manual' ) { - $this->cache_options['locked'] = false; - $this->update_cache_options( $this->cache_options, false, false ); - - $cache_json = $this->cache_options; - unset( $cache_json['cache_list'] ); - echo Search_Filter_Helper::json_encode( $cache_json ); - } else { - - $this->update_cache_options( $this->cache_options, false, false ); - - if ( $this->cache_options['rc_status'] == 'connect_success' ) { - sleep( 2 ); // may not be essential, but might help on slower servers, give some delay between batches - $this->wp_remote_process_cache( array( 'process_id' => $this->cache_options['process_id'] ) ); // make new async request - } else { - // don't do anything, wait for ajax initiated resum - } - } - } - } elseif ( $this->cache_options['status'] == 'termcache' ) { - // $this->build_term_results($this->cache_options['process_id']); - - } elseif ( $this->cache_options['status'] != 'finished' ) { - $this->refresh_cache(); // check for any problems or restart/initialise - } - exit; - } - - public function valid_process( $process_id, $post_index ) { - $live_options = $this->get_real_option( $this->option_name ); - // before making any more changes check to see if there has been a restart anywhere, or a new process spawned - if ( ( ( $process_id != $live_options['process_id'] ) || ( $process_id == 0 ) || $live_options['restart'] == true ) || ( $post_index < $live_options['current_post_index'] ) ) {// don't allow running of non active processes (should only be one anyway) - return false; - } - - return true; - } - - public function valid_term_process( $process_id ) { - $live_options = $this->get_real_option( $this->option_name ); - - // before making any more changes check to see if there has been a restart anywhere, or a new process spawned - if ( ( ( $process_id != $live_options['process_id'] ) || ( $process_id == 0 ) || $live_options['restart'] == true ) ) {// don't allow running of non active processes (should only be one anyway) - $live_options['locked'] = false; - $this->update_cache_options( $live_options ); - - return false; - } - - return true; - - } - - public function wp_remote_process_cache( $args = array() ) { - $query_args = array( 'action' => 'process_cache' ); - $query_args = array_merge( $query_args, $args ); - $url = add_query_arg( $query_args, admin_url( 'admin-ajax.php' ) ); - $this->wp_remote_post_with_cookie( $url );// run in the background - calls refresh cache below - - } - - public function wp_remote_build_term_results( $args = array() ) { - $query_args = array( 'action' => 'build_term_results' ); - $query_args = array_merge( $query_args, $args ); - $url = add_query_arg( $query_args, admin_url( 'admin-ajax.php' ) ); - $remote_call = $this->wp_remote_post_with_cookie( $url );// run in the background - calls refresh cache below - } - - public function can_wp_remote_post() { - // check first to see if a user has bypassed this - $cache_use_background_processes = Search_Filter_Helper::get_option( 'cache_use_background_processes' ); - - if ( $cache_use_background_processes != 1 ) { - $this->cache_options['rc_status'] = 'user_bypass'; - } else { - $args = array(); - $args['timeout'] = 5; - - $query_args = array( 'action' => 'test_remote_connection' ); - $url = add_query_arg( $query_args, admin_url( 'admin-ajax.php' ) ); - - $remote_call = wp_remote_post( $url, $args ); - // $this->cache_options['rc_status'] = "routing_error"; - - if ( is_wp_error( $remote_call ) ) { - $error_message = $remote_call->get_error_message(); - $this->cache_options['rc_status'] = 'connect_error'; - - } else { - $success = false; - - if ( isset( $remote_call['body'] ) ) { - $body = trim( $remote_call['body'] ); - if ( $body == 'test_success' ) { - $success = true; - } - } - - if ( $success ) { - $this->cache_options['rc_status'] = 'connect_success'; - } else { // a response was received but not the one we wanted - $this->cache_options['rc_status'] = 'routing_error'; - } - } - } - - $this->update_cache_option( 'rc_status', $this->cache_options['rc_status'] ); - // $this->update_cache_options( $this->cache_options ); - } - - public function test_remote_connection() { - echo 'test_success'; - exit; - - } - - public function wp_remote_post_with_cookie( $url, $args = array() ) { - $remote_call = wp_remote_post( $url, $args ); - if ( is_wp_error( $remote_call ) ) { - - $error_message = $remote_call->get_error_message(); - } - - } - - public function update_cache_options( $cache_options, $bypass_real = false, $log = true ) { - if ( ! $bypass_real ) { - $live_options = $this->get_real_option( $this->option_name ); - if ( isset( $live_options['restart'] ) ) { - $cache_options['restart'] = $live_options['restart']; - } - } - - // TODO - remove. - // if ( $cache_options['restart'] == true ) { - // $live_options = $this->get_real_option( $this->option_name ); - // do_action( 'search_filter_update_cache_options_with_restart', $live_options, $cache_options ); - // } - - if( $cache_options['restart'] ) { - $cache_options['locked'] = false; - } - $update_result = update_option( $this->option_name, $cache_options, false ); - - $live_options = $this->get_real_option( $this->option_name ); - $maybe_real_option = get_option( $this->option_name ); - if ( $log === true ) { - do_action( 'search_filter_update_cache_options', $cache_options, $this->option_name, $live_options, $maybe_real_option, $update_result ); - } - - } - - public function update_cache_option( $cache_option, $cache_value, $bypass_real = false ) { - $cache_options = $this->get_real_option( $this->option_name, ); - $cache_options[ $cache_option ] = $cache_value; - $update_result = update_option( $this->option_name, $cache_options, false ); - - $live_options = $this->get_real_option( $this->option_name ); - $maybe_real_option = get_option( $this->option_name ); - do_action( 'search_filter_update_cache_option', $cache_options, $this->option_name, $live_options, $maybe_real_option, $update_result ); - - } - - public function empty_cache() { - global $wpdb; - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - $wpdb->query( 'TRUNCATE TABLE `' . $this->cache_table_name . '`' ); - $wpdb->query( 'TRUNCATE TABLE `' . $this->term_results_table_name . '`' ); - } - - public function build_term_results( $process_id = 0 ) { - $this->init_cache_options(); - - ignore_user_abort( true ); // allow script to carry on running - @set_time_limit( 0 ); - ini_set( 'max_execution_time', 0 ); - - // make sure we only run the same, valid process - if ( $process_id == 0 ) { - if ( isset( $_GET['process_id'] ) ) { - $process_id = (int) $_GET['process_id']; - } - } - - if ( ( ! $this->valid_term_process( $process_id ) ) || ( $this->cache_options['locked'] == true ) ) { - exit; - } - - $this->cache_options['locked'] = true; - $this->update_cache_options( $this->cache_options ); - - if ( $this->cache_options['status'] == 'termcache' ) { - // empty terms first - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - global $wpdb; - $wpdb->query( 'TRUNCATE TABLE `' . $this->term_results_table_name . '`' ); - $this->get_all_filters(); - $this->cache_options['process_id'] = 0; - $this->cache_options['status'] = 'finished'; - $this->cache_options['locked'] = false; - - $this->cache_options['cache_list'] = array(); - $this->update_cache_options( $this->cache_options ); - } else { - // $this->refresh_cache(); //check for any problems or restart/initialise - } - exit; - } - - public function get_all_filters() { - $filters = array(); - - $search_form_query = new WP_Query( 'post_type=search-filter-widget&post_status=publish,draft&posts_per_page=-1&suppress_filters=1' ); - $search_forms = $search_form_query->get_posts(); - - foreach ( $search_forms as $search_form ) { - $search_form_fields = $this->get_fields_meta( $search_form->ID ); - - foreach ( $search_form_fields as $key => $field ) { - $valid_filter_types = array( 'tag', 'category', 'taxonomy', 'post_meta' ); - - if ( in_array( $field['type'], $valid_filter_types ) ) { - if ( ( $field['type'] == 'tag' ) || ( $field['type'] == 'category' ) || ( $field['type'] == 'taxonomy' ) ) { - array_push( $filters, '_sft_' . $field['taxonomy_name'] ); - } elseif ( $field['type'] == 'post_meta' ) { - if ( $field['meta_type'] == 'choice' ) { - array_push( $filters, '_sfm_' . $field['meta_key'] ); - } - } - } - } - } - $filters = array_unique( $filters ); - - // now we have all the filters, get the filter terms/options - foreach ( $filters as $filter ) { - if ( $this->is_taxonomy_key( $filter ) ) { - $source = 'taxonomy'; - } elseif ( $this->is_meta_value( $filter ) ) { - $source = 'post_meta'; - } - - $terms = $this->get_filter_terms( $filter, $source ); - - $filter_o = array( 'source' => $source ); - - foreach ( $terms as $term ) { - - $term_ids = $this->get_cache_term_ids( $filter, $term->field_value, $filter_o ); - - $this->insert_term_results( $filter, $term->field_value, $term_ids ); - } - } - - return $filters; - } - - public function insert_term_results( $filter_name, $filter_value, $result_ids ) { - global $wpdb; - - $insert_data = array( - 'field_name' => $filter_name, - 'field_value' => $filter_value, - 'result_ids' => implode( ',', $result_ids ), - ); - - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - $wpdb->insert( - $this->term_results_table_name, - $insert_data - ); - - } - - public function get_cache_term_ids( $filter_name, $filter_value, $filter ) { - global $wpdb; - - // test for speed - - $field_term_ids = array(); - - $value_col = 'field_value'; - if ( $filter['source'] == 'taxonomy' ) { - $value_col = 'field_value_num'; - } - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - $field_terms_results = $wpdb->get_results( - $wpdb->prepare( - " - SELECT post_id - FROM $this->cache_table_name - WHERE field_name = '%s' - AND $value_col = '%s' - ", - $filter_name, - $filter_value - ) - ); - - foreach ( $field_terms_results as $field_terms_result ) { - $field_term_ids[ $field_terms_result->post_id ] = 1; - // array_push($field_term_ids, $field_terms_result->post_id); - - } - - return array_keys( $field_term_ids ); - // return array_unique($field_term_ids); - } - - - public function get_filter_terms( $field_name, $source ) { - global $wpdb; - - $field_col_select = 'field_value'; - if ( $source == 'taxonomy' ) { - $field_col_select = 'field_value_num as field_value'; - } - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - $field_terms_result = $wpdb->get_results( - $wpdb->prepare( - " - SELECT DISTINCT $field_col_select - FROM $this->cache_table_name - WHERE field_name = '%s' - ", - $field_name - ) - ); - - return $field_terms_result; - } - - public function setup_cached_search_forms() { - $query_args = array( - 'post_type' => 'search-filter-widget', - 'posts_per_page' => -1, - 'paged' => 1, - 'post_status' => array( 'publish' ), - 'suppress_filters' => true, - - /* speed improvements */ - 'no_found_rows' => true, - 'update_post_meta_cache' => false, - 'lang' => '', - ); - - if ( has_filter( 'sf_edit_search_forms_query_args' ) ) { - $query_args = apply_filters( 'sf_edit_search_forms_query_args', $query_args, $this->sfid ); - } - - $search_form_query = new WP_Query( $query_args ); - $search_forms = $search_form_query->get_posts(); - - $this->cached_search_form_settings = array(); - $this->cached_search_form_fields = array(); - - foreach ( $search_forms as $search_form ) { - $search_form_cache = $this->get_cache_meta( $search_form->ID ); - - // if(isset($search_form_cache['enabled'])) - // { - // if($search_form_cache['enabled']==1) - // { - - $search_form_settings = $this->get_settings_meta( $search_form->ID ); - $search_form_fields = $this->get_fields_meta( $search_form->ID ); - // then we have a search form with caching enabled - - array_push( $this->cached_search_form_settings, $search_form_settings ); - array_push( $this->cached_search_form_fields, $search_form_fields ); - // } - - // } - } - - $this->calc_cache_data( $this->cached_search_form_settings, $this->cached_search_form_fields ); - } - - public function calc_cache_data( $search_form_settings, $search_form_fields ) { - $incl_post_types = array(); - $incl_post_stati = array(); - $incl_meta_keys = array(); - $it = 0; - - // loop through each form, and get vars so we know what needs to be cached - foreach ( $search_form_settings as $settings ) { - - if ( $settings != '' ) { - if ( isset( $settings['post_types'] ) ) { - - // post types - if ( isset( $settings['post_types'] ) && is_array( $settings['post_types'] ) ) { - $incl_post_types = array_merge( array_keys( $settings['post_types'] ), $incl_post_types ); - } - if ( isset( $settings['post_status'] ) && is_array( $settings['post_status'] ) ) { - $incl_post_stati = array_merge( array_keys( $settings['post_status'] ), $incl_post_stati ); - } - - if ( isset( $search_form_fields[ $it ] ) ) { - if ( ( $search_form_fields[ $it ] ) ) { - - foreach ( $search_form_fields[ $it ] as $search_form_field ) { - if ( $search_form_field['type'] == 'post_meta' ) { - $is_single = true; - - if ( $search_form_field['meta_type'] == 'number' ) { - if ( isset( $search_form_field['number_use_same_toggle'] ) ) { - if ( $search_form_field['number_use_same_toggle'] != 1 ) { - array_push( $incl_meta_keys, $search_form_field['number_end_meta_key'] ); - } - } - } elseif ( $search_form_field['meta_type'] == 'date' ) { - if ( isset( $search_form_field['date_use_same_toggle'] ) ) { - if ( $search_form_field['date_use_same_toggle'] != 1 ) { - array_push( $incl_meta_keys, $search_form_field['date_end_meta_key'] ); - } - } - } - - array_push( $incl_meta_keys, $search_form_field['meta_key'] ); - - } - } - } - } - } - } - $it++; - } - - $this->cache_data['post_types'] = array_unique( $incl_post_types ); - $this->cache_data['meta_keys'] = array_unique( $incl_meta_keys ); - $this->cache_data['post_stati'] = array_unique( $incl_post_stati ); - - if ( has_filter( 'search_filter_post_cache_data' ) ) { - $this->cache_data = apply_filters( 'search_filter_post_cache_data', $this->cache_data, $this->sfid ); - } - - } - - - private function get_cache_meta( $sfid ) { - $meta_key = '_search-filter-cache'; - $cache_settings = ( get_post_meta( $sfid, $meta_key, true ) ); - - return $cache_settings; - } - - private function get_settings_meta( $sfid ) { - // as we only want to update "enabled", then load all settings and update only this key - $search_form_settings = Search_Filter_Helper::get_settings_meta( $sfid ); - - return $search_form_settings; - } - - private function get_fields_meta( $sfid ) { - $meta_key = '_search-filter-fields'; - $search_form_fields = ( get_post_meta( $sfid, $meta_key, true ) ); - - return $search_form_fields; - } - - // fires when a term has been edited (ie, label or slug)... we don't save this in our caching table, but we do save some slug info in transients - // so clear transient only when slug is changed - // hard to detect slug change, so just detect if a term was updated in a taxonomy that was being used in S&F, do this by matching S&F post types - public function taxonomy_edited_terms( $term_id, $taxonomy_name ) { - if ( ! $this->cache_enabled() ) { - return; - } - $this->init_cache_options(); - - $taxonomy = get_taxonomy( $taxonomy_name ); - - $taxonomy_post_types = array(); - if ( $taxonomy ) { - if ( isset( $taxonomy->object_type ) ) { - $taxonomy_post_types = $taxonomy->object_type; - } - } - - if ( empty( $taxonomy_post_types ) ) { - return; - } - if ( ! isset( $this->cache_options['caching_data'] ) ) { - return; - } - if ( ! isset( $this->cache_options['caching_data']['post_types'] ) ) { - return; - } - if ( empty( $this->cache_options['caching_data']['post_types'] ) ) { - return; - } - - $cached_post_types = $this->cache_options['caching_data']['post_types']; - $matching_types = array_intersect( $cached_post_types, $taxonomy_post_types ); - - if ( count( $matching_types ) ) {// then a term changed in a post type that is used in S&F, so delete the transient - $cache_name = Search_Filter_Wp_Data::$wp_tax_terms_cache_key . $taxonomy_name; - Search_Filter_Wp_Cache::delete_transient( $cache_name ); - } - } - - public function post_meta_updated( $meta_id, $object_id, $meta_key, $meta_value ) { - if ( ! $this->cache_enabled() ) { - return; - } - if ( $meta_key == '_edit_lock' ) { - return; - } - - $post = get_post( $object_id ); - $this->schedule_post_updated( $post->ID ); - } - - - public function object_terms_updated( $post_id, $terms, $tt_ids, $taxonomy ) { - if ( ! $this->cache_enabled() ) { - return; - } - $post = get_post( $post_id ); - if ( ! $post ) { - return; - } - $this->schedule_post_updated( $post_id ); - } - - public function updated_post_meta_updated( $meta_id, $object_id, $meta_key, $meta_value ) { - if ( $meta_key == '_edit_lock' ) { - return; - } - - $post = get_post( $object_id ); - $this->schedule_post_updated( $post->ID ); - } - - public function attachment_updated( $form_fields, $post_before, $post_after ) { - if ( ! $this->cache_enabled() ) { - return; - } - $this->post_updated( $post_after->ID, $post_after, false ); - return $form_fields; - } - public function attachment_added( $post_id ) { - if ( ! $this->cache_enabled() ) { - return; - } - $post = get_post( $post_id ); - $this->post_updated( $post->ID, $post, false ); - } - - public function post_updated_action( $post_id, $post, $update ) { - if ( ! $this->cache_enabled() ) { - return; - } - $this->schedule_post_updated( $post_id ); - } - public function wp_shutdown() { - if ( ! $this->cache_enabled() ) { - return; - } - if ( ! empty( $this->posts_updated ) ) { - // if the user uses our action to update the post, we don't want to do it twice - // so pop the ID off hte array on the action `search_filter_update_post` (unless we use the action somewhere) - $this->setup_cached_search_forms(); - $this->posts_updated = array_unique( $this->posts_updated ); - foreach ( $this->posts_updated as $post_id ) { - // $this->update_post_cache($post_id); - $post = get_post( $post_id ); - $this->post_updated( $post_id, $post, false ); - } - } - - } - public function schedule_post_updated( $post_id ) { - array_push( $this->posts_updated, $post_id ); - } - - public function post_updated( $post_id, $post, $update ) { - $this->post_updated_count++; - - if ( ( ! isset( $post ) ) || ( empty( $post ) ) ) { - return; - } - - if ( ! ( wp_is_post_revision( $post_id ) && wp_is_post_autosave( $post_id ) ) ) { - $this->init_cache_options(); - - if ( $post->post_type != 'search-filter-widget' ) { - // then do some checks to see if we need to update the cache for this - $this->setup_cached_search_forms(); - - if ( in_array( $post->post_type, $this->cache_data['post_types'] ) ) { - $this->update_post_cache( $post_id ); - Search_Filter_Wp_Cache::purge_all_transients(); - } - } else { // a Search & Filter form was updated... - $this->check_cache_list_changed(); - Search_Filter_Wp_Cache::purge_all_transients(); - } - } - } - - private function check_cache_list_changed( $is_restart = false ) { - $restart_flag = false; - - $this->setup_cached_search_forms(); - - $new_cache_data = $this->cache_data; - - // add proper support for post status, and prevent restarts for exising users - // by removing the built in post status we always include and init the arrays on both old - // and new data - - // first, setup post_stati on old and new, so it doesn't trigger a restart automatically - if ( ! isset( $this->cache_options['caching_data']['post_stati'] ) ) { - - $this->cache_options['caching_data']['post_stati'] = array(); - } - - if ( ! isset( $new_cache_data['post_stati'] ) ) { - - $new_cache_data['post_stati'] = array(); - } - - // now if they exist, remove the built in post status (that we force include) before do allow a compare - $built_in_post_stati = array( 'publish', 'pending', 'draft', 'future', 'private' ); - - $this->cache_options['caching_data']['post_stati'] = array_values( array_diff( $this->cache_options['caching_data']['post_stati'], $built_in_post_stati ) ); - $new_cache_data['post_stati'] = array_values( array_diff( $new_cache_data['post_stati'], $built_in_post_stati ) ); - - $current_cache_data = $this->cache_options['caching_data']; - // compare the new settings with the saved settings - foreach ( $new_cache_data as $key => $value ) { - - if ( ( count( $new_cache_data[ $key ] ) ) == ( count( $current_cache_data[ $key ] ) ) ) { - if ( is_array( $value ) ) { - foreach ( $value as $cache_key ) { - if ( ! in_array( $cache_key, $current_cache_data[ $key ] ) ) { - $restart_flag = true; - } else { - } - } - } - } else { - $restart_flag = true; - } - } - - if ( $restart_flag == true ) { - if ( $is_restart == true ) { - // if this is a check in the restart procedure, then we want to update the settings - // but not do a full restart - $restart_flag = false; - } - - do_action( 'search_filter_check_restart_cache', $current_cache_data, $new_cache_data, $restart_flag ); - $this->cache_options['caching_data'] = $new_cache_data; - - $this->cache_options['restart'] = $restart_flag; - $this->update_cache_options( $this->cache_options, true ); - } else { // just trigger a rebuild of the terms - this should be done anytime someone changes a field which has terms (tag, cat, tax, meta) - - // need to improve to be "smarter" - - /* - if($this->cache_options['status']!="inprogress") - {// don't do anything if there it is already running, because the terms will be updated anyway when it finishes - - $this->cache_options['process_id'] = time(); - $this->cache_options['restart'] = false; - $this->cache_options['status'] = "termcache"; - update_option( $this->option_name, $this->cache_options, false ); - $this->wp_remote_build_term_results(array("process_id" => $this->cache_options['process_id'])); //make new async request - }*/ - - } - } - - public function set_cache_current_values( $post_id, $post = '' ) { - if ( $post == '' ) { - - $post = get_post( $post_id ); - } - - $fields_data = array(); - - // set up taxonomies - $tax_insert_data = $this->set_post_cache_taxonomy_terms( $post_id, $post ); - - if ( has_filter( 'search_filter_post_cache_insert_data' ) ) { - $tax_insert_data = apply_filters( 'search_filter_post_cache_insert_data', $tax_insert_data, $post_id, 'taxonomy' ); - } - - $tax_insert_sql = $this->insert_post_cache_taxonomy_terms( $tax_insert_data, $post_id, $post ); - - // setup meta - $meta_insert_data = $this->set_post_cache_meta_terms( $post_id, $post ); - - if ( has_filter( 'search_filter_post_cache_insert_data' ) ) { - $meta_insert_data = apply_filters( 'search_filter_post_cache_insert_data', $meta_insert_data, $post_id, 'meta' ); - } - - $meta_insert_sql = $this->insert_post_cache_post_meta_terms( $meta_insert_data, $post_id, $post ); - - $fields_added = array_merge( $tax_insert_data, $meta_insert_data ); - $fields_sql_added = array_merge( $tax_insert_sql, $meta_insert_sql ); - - $fields_data[0] = $fields_added; - $fields_data[1] = $fields_sql_added; - - // return $tax_ins_count; - // $fields_data[1] = $sql; - - return $fields_data; - - } - - public function delete_post_cache( $post_id ) { - if ( ! $this->cache_enabled() ) { - return; - } - $this->post_delete_cache( $post_id, true ); // remove existing records from cache - - } - public function update_post_cache( $post_id, $args = array() ) { - $defaults = array( - 'callback' => '', - 'fields_data' => '', - 'update_term_cache' => true, - ); - $args = array_replace_recursive( $defaults, $args ); - - global $wpdb; - $this->init_cache_options(); - - $post = get_post( $post_id ); - - if ( ! $post ) { - $this->post_delete_cache( $post_id ); // remove existing records from cache - return; - } - - $should_index_post = apply_filters( 'search_filter_cache_should_index_post', true, $post_id, $post ); - if ( ! $should_index_post ) { - return; - } - - do_action( 'search_filter_cache_update_post', $post_id, $post, $this->context ); - - $fields_previous = array(); - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - $post_terms = $wpdb->get_results( - $wpdb->prepare( - " - SELECT field_name, field_value, field_value_num - FROM $this->cache_table_name - WHERE post_id = '%d' - ", - $post_id - ) - ); - - if ( $args['update_term_cache'] == false ) { - return; - } - - $prevent_actions_callback = false; - - if ( empty( $args['fields_data'] ) ) { - // either use the callback passed (if array) - if ( gettype( $args['callback'] ) == 'array' ) { - - $fields_data = call_user_func( $args['callback'], array( $post_id ) ); - $prevent_actions_callback = true; - } else { - // else if string, call the function that gets existing data - $fields_data = $this->set_cache_current_values( $post_id, $post ); - } - } else { - $prevent_actions_callback = true; - $fields_data = $args['fields_data']; - } - - if ( ! $prevent_actions_callback ) { - // assumes when supplying your own data you dont want to run the usual funcitons - do_action( 'search_filter_pre_update_post_cache', $post ); // this needs to run after `set_cache_current_values` - } - - $fields_added = $fields_data[0]; - $fields_sql = $fields_data[1]; - - // now get a list of all the fields in the DB - if ( count( $post_terms ) > 0 ) { - - foreach ( $post_terms as $post_term ) { - if ( ! isset( $fields_previous[ $post_term->field_name ] ) ) { - $fields_previous[ $post_term->field_name ] = array(); - } - - $field_value = $post_term->field_value; - if ( $this->is_taxonomy_key( $post_term->field_name ) ) { - $field_value = $post_term->field_value_num; - } - - array_push( $fields_previous[ $post_term->field_name ], (string) $field_value ); - } - } - - // now we have 2 arrays $fields_added and $fields_previous - // get a unique set of keys from the two of them - $unique_keys = array_unique( array_merge( array_keys( $fields_previous ), array_keys( $fields_added ) ) ); - - $field_differences = array(); - $combined_terms = array(); - - foreach ( $unique_keys as $unique_key ) { - // if the keys are set in both, then merge them - if ( ( isset( $fields_previous[ $unique_key ] ) ) && ( isset( $fields_added[ $unique_key ] ) ) ) { // we shoudl really check for differences in values and only update those - $diff1 = array_diff( $fields_previous[ $unique_key ], $fields_added[ $unique_key ] ); - $diff2 = array_diff( $fields_added[ $unique_key ], $fields_previous[ $unique_key ] ); - $combined_terms = array_merge( $diff1, $diff2 ); - } elseif ( isset( $fields_previous[ $unique_key ] ) ) { - $combined_terms = $fields_previous[ $unique_key ]; - } elseif ( isset( $fields_added[ $unique_key ] ) ) { - $combined_terms = $fields_added[ $unique_key ]; - } - - // push on to new array - if ( ! empty( $combined_terms ) ) { - $field_differences[ $unique_key ] = $combined_terms; - } - } - - // these are the differences in fields cached Vs new - $all_delete_rows = array(); - $get_cache_terms = array(); - - if ( empty( $field_differences ) ) { - - $row_data = array( - 'post_id' => $post_id, - 'post_parent_id' => $post->parent_id, - ); - - $insert_data = array( - 'field_name' => '', - 'field_value' => '', - ); - - $insert_data = array_merge( $row_data, $insert_data ); - - $wpdb->insert( - $this->cache_table_name, - $insert_data - ); - - return; - } - - $this->post_delete_cache( $post_id ); // remove existing records from cache - $post_insert_data_count = $this->post_insert_data( $fields_sql, $post_id, $post ); // add post_meta to the cache - - if ( $post_insert_data_count == 0 ) {// then this post has no fields but should be able to still appear in unfiltered results - so add it to the index anyway - - $row_data = array( - 'post_id' => $post_id, - 'post_parent_id' => $post->parent_id, - ); - - $insert_data = array( - 'field_name' => '', - 'field_value' => '', - ); - - $insert_data = array_merge( $row_data, $insert_data ); - - $wpdb->insert( - $this->cache_table_name, - $insert_data - ); - } - - foreach ( $field_differences as $filter => $terms ) { - - $source = ''; - if ( $this->is_taxonomy_key( $filter ) ) { - $source = 'taxonomy'; - } elseif ( $this->is_meta_value( $filter ) ) { - $source = 'post_meta'; - } - - if ( $source != '' ) { - $cc = 0; - - foreach ( $terms as $term_value ) { - $cc++; - - // delete existing value - $delete_args = array( - - 'field_name' => $filter, - 'field_value' => $term_value, - - ); - - array_push( $all_delete_rows, $delete_args ); - - if ( ! isset( $get_cache_terms[ $filter ] ) ) { - $get_cache_terms[ $filter ] = array(); - - } - $get_cache_terms[ $filter ][ $term_value ] = 1; - } - } - } - $this->term_results_delete_rows( $all_delete_rows ); - - $all_cache_term_ids = $this->get_all_cache_term_ids( $get_cache_terms ); - - $this->insert_all_term_results( $all_cache_term_ids ); - - return; - } - - - private function term_results_delete_rows( $delete_rows ) { - global $wpdb; - - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - if ( count( $delete_rows ) > 0 ) { - - // delete all rows in one query - $sql_where_parts = array(); - foreach ( $delete_rows as $del_row ) { - - $sql_part = $wpdb->prepare( "(field_name='%s' AND field_value='%s')", $del_row['field_name'], $del_row['field_value'] ); - array_push( $sql_where_parts, $sql_part ); - } - - $no_conditions = count( $sql_where_parts ); - - if ( $no_conditions > 0 ) { - - $sql_where_in = implode( ' OR ', $sql_where_parts ); - $sql = 'DELETE FROM ' . $this->term_results_table_name . ' WHERE ' . $sql_where_in; - $results = $wpdb->get_results( $sql ); - } - } - } - - - public function insert_all_term_results( $filter_term_ids ) { - global $wpdb; - - $sql_where_parts = array(); - - $this->term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - if ( count( $filter_term_ids ) > 0 ) { - foreach ( $filter_term_ids as $filter_name => $filter_term_ids ) { - - foreach ( $filter_term_ids as $term_id => $term_result_ids ) { - $results_ids = implode( ',', array_keys( $term_result_ids ) ); - $sql_part = $wpdb->prepare( "('%s', '%s', '%s')", $filter_name, $term_id, $results_ids ); - array_push( $sql_where_parts, $sql_part ); - } - } - - $sql_where_in = implode( ', ', $sql_where_parts ); - $sql = 'INSERT INTO `' . $this->term_results_table_name . '` (`field_name`, `field_value`, `result_ids`) VALUES ' . $sql_where_in; - $insert_result = $wpdb->get_results( $sql ); - - } - - } - - private function get_all_cache_term_ids( $cache_terms ) { - global $wpdb; - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - $field_term_ids = array(); - - if ( count( $cache_terms ) > 0 ) { - - $sql_where_parts = array(); - foreach ( $cache_terms as $filter_name => $terms ) { - $value_col = 'field_value'; - $value_type = '%s'; - - if ( $this->is_taxonomy_key( $filter_name ) ) { - $value_col = 'field_value_num'; - $value_type = '%d'; - } - /* - else if($this->is_meta_value($filter_name)) - { - $value_col = "field_value"; - }*/ - - foreach ( $terms as $term_id => $term ) { - $sql_part = $wpdb->prepare( "(field_name = '%s' AND $value_col = '$value_type')", $filter_name, $term_id ); - array_push( $sql_where_parts, $sql_part ); - } - } - - $no_conditions = count( $sql_where_parts ); - - if ( $no_conditions == 0 ) { - return $field_term_ids; - } - - $sql_where_in = implode( ' OR ', $sql_where_parts ); - - $sql = 'SELECT post_id, field_name, field_value, field_value_num FROM ' . $this->cache_table_name . ' WHERE ' . $sql_where_in; - - $term_results = $wpdb->get_results( $sql ); - - foreach ( $term_results as $term_result ) { - if ( ! isset( $field_term_ids[ $term_result->field_name ] ) ) { - $field_term_ids[ $term_result->field_name ] = array(); - } - - $field_value_col = 'field_value'; - if ( $this->is_taxonomy_key( $term_result->field_name ) ) { - $field_value_col = 'field_value_num'; - } - - if ( ! isset( $field_term_ids[ $term_result->field_name ][ $term_result->{$field_value_col} ] ) ) { - $field_term_ids[ $term_result->field_name ][ $term_result->{$field_value_col} ] = array(); - } - - $field_term_ids[ $term_result->field_name ][ $term_result->{$field_value_col} ][ $term_result->post_id ] = 1; - - } - } - - return $field_term_ids; - } - private function post_delete_cache( $post_id, $update_term_cache = false ) { - global $wpdb; - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - if ( $update_term_cache ) { - $results = $wpdb->get_results( - $wpdb->prepare( - " - SELECT post_id, field_name, field_value_num, field_value - FROM $this->cache_table_name - WHERE post_id = '%d' - ", - $post_id - ) - ); - } - - // now data for thsi post id from cache table - we've collected the data in $results for use after - $wpdb->delete( $this->cache_table_name, array( 'post_id' => $post_id ) ); - - if ( ! $update_term_cache ) { - return; - } - - // now we use the data collected in results, to loop through and update teh term cache table too - $term_cache_delete_rows = array(); - $get_cache_terms = array(); - - foreach ( $results as $result ) { - - $field_value_col = 'field_value'; - if ( $this->is_taxonomy_key( $result->field_name ) ) { - $field_value_col = 'field_value_num'; - } - - $term_value = $result->{$field_value_col}; - $term_name = $result->field_name; - - $delete_args = array( - - 'field_name' => $term_name, - 'field_value' => $term_value, - - ); - - array_push( $term_cache_delete_rows, $delete_args ); - - if ( ! isset( $get_cache_terms[ $term_name ] ) ) { - $get_cache_terms[ $term_name ] = array(); - - } - $get_cache_terms[ $term_name ][ $term_value ] = 1; - } - - // we need to update the term cache too so trigger a rebuild of term cahce - $this->term_results_delete_rows( $term_cache_delete_rows ); - // get the new values for the rows - $all_cache_term_ids = $this->get_all_cache_term_ids( $get_cache_terms ); - // insert the new values for the rows - $this->insert_all_term_results( $all_cache_term_ids ); - } - - - - private function post_insert_data( $fields_sql, $post_id, $post ) { - global $wpdb; - - if ( ! empty( $fields_sql ) ) { - - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - $sql_where_in = implode( ', ', $fields_sql ); - $sql = 'INSERT INTO `' . $this->cache_table_name . '` (`post_id`, `post_parent_id`, `field_name`, `field_value_num`, `field_value`, `term_parent_id`) VALUES ' . $sql_where_in; - $insert_result = $wpdb->get_results( $sql ); - } - - $insert_count = count( $fields_sql ); - - return $insert_count; - } - - private function set_post_cache_taxonomy_terms( $post_id, $post ) { - $insert_arr = array(); - - $post_type = $post->post_type; - $taxonomies = get_object_taxonomies( $post_type, 'objects' ); - $current_language = false; - if ( Search_Filter_Helper::has_wpml() ) { - $current_language = Search_Filter_Helper::wpml_current_language(); - if ( $current_language ) { - $post_language_details = apply_filters( 'wpml_post_language_details', null, $post_id ); - - if ( ! empty( $post_language_details ) ) { - $language_code = $post_language_details['language_code']; - if ( ( $language_code !== '' ) && ( ! empty( $language_code ) ) ) { - do_action( 'wpml_switch_language', $language_code ); - } - } - } - } - - foreach ( $taxonomies as $taxonomy_slug => $taxonomy ) { - - // get the terms related to post - $terms = get_the_terms( $post_id, $taxonomy_slug ); - - $insert_arr[ '_sft_' . $taxonomy_slug ] = array(); - - if ( ! empty( $terms ) ) { - foreach ( $terms as $term ) { - - $term_id = $term->term_id; - - if ( Search_Filter_Helper::has_wpml() ) { - // we need to find the language of the post - $post_lang_code = Search_Filter_Helper::wpml_post_language_code( $post_id ); - - // then send this with object ID to ensure that WPML is not converting this back - $term_id = Search_Filter_Helper::wpml_object_id( $term->term_id, $term->taxonomy, true, $post_lang_code ); - } - - array_push( $insert_arr[ '_sft_' . $taxonomy_slug ], (string) $term_id ); - } - } - } - - if ( Search_Filter_Helper::has_wpml() ) { - do_action( 'wpml_switch_language', $current_language ); - } - - return $insert_arr; - - } - - public function insert_post_cache_taxonomy_terms( $taxonomy_insert_array, $post_id, $post ) { - global $wpdb; - - $parent_id = 0; - $wp_parent_id = wp_get_post_parent_id( $post_id ); - - if ( $wp_parent_id ) { - $parent_id = $wp_parent_id; - } - - $sql_where_parts = array(); - - foreach ( $taxonomy_insert_array as $field_name => $field_terms ) { - // find depth & parent of taxonomy term - $taxonomy_name = ''; - if ( strpos( $field_name, SF_TAX_PRE ) === 0 ) { - $taxonomy_name = substr( $field_name, strlen( SF_TAX_PRE ) ); - } - - foreach ( $field_terms as $term_id ) { - - $term = get_term( $term_id, $taxonomy_name ); - $term_parent_id = 0; - // If there was an error, continue to the next term. - if ( ! is_wp_error( $term ) ) { - $term_parent_id = $term->parent; - } - - $sql_part = $wpdb->prepare( "('%d', '%d', '%s', '%d', '%s', '%d')", $post_id, $parent_id, $field_name, $term_id, '', $term_parent_id ); - array_push( $sql_where_parts, $sql_part ); - } - } - - return $sql_where_parts; - } - - public function get_cache_data() { - return $this->cache_data; - } - - private function set_post_cache_meta_terms( $post_id, $post ) { - // so we need to find out which meta keys are in use - $insert_arr = array(); - - if ( is_array( $this->cache_data['meta_keys'] ) ) { - foreach ( $this->cache_data['meta_keys'] as $meta_key ) { - - $post_custom_values = get_post_custom_values( $meta_key, $post_id ); - - if ( is_array( $post_custom_values ) ) { - $insert_arr[ '_sfm_' . $meta_key ] = array(); - - foreach ( $post_custom_values as $post_custom_data ) { - - if ( has_filter( 'search_filter_post_cache_build_meta_data' ) ) { - $post_custom_data = apply_filters( 'search_filter_post_cache_build_meta_data', $post_custom_data, $post_id, $meta_key ); - } - - if ( is_serialized( $post_custom_data ) ) { - $post_custom_data = unserialize( $post_custom_data ); - - } - - if ( is_array( $post_custom_data ) ) { - foreach ( $post_custom_data as $post_custom_value_a ) { - if ( is_serialized( $post_custom_value_a ) ) { - $post_custom_value_a = unserialize( $post_custom_value_a ); - } - - if ( is_array( $post_custom_value_a ) ) { - foreach ( $post_custom_value_a as $post_custom_value_b ) { - array_push( $insert_arr[ '_sfm_' . $meta_key ], (string) $post_custom_value_b ); - } - } else { - array_push( $insert_arr[ '_sfm_' . $meta_key ], (string) $post_custom_value_a ); - } - } - } else { - array_push( $insert_arr[ '_sfm_' . $meta_key ], (string) $post_custom_data ); - } - } - } - } - } - - return $insert_arr; - } - - - public function insert_post_custom_post_data( $post_id, $insert_array, $data_type = 'number' ) { - if ( ! $this->cache_enabled() ) { - return; - } - $fields_data = $this->insert_post_cache_custom_terms( $post_id, $insert_array, $data_type ); - - $args = array( - 'fields_data' => $fields_data, - ); - $this->update_post_cache( $post_id, $args ); - - } - - - public function insert_post_cache_custom_terms( $post_id, $insert_array, $data_type = 'number' ) { - // now insert - global $wpdb; - - $parent_id = 0; - $wp_parent_id = wp_get_post_parent_id( $post_id ); - - if ( $wp_parent_id ) { - $parent_id = $wp_parent_id; - } - - $fields_values = array(); - - $sql_where_parts = array(); - foreach ( $insert_array as $field_name => $field_terms ) { - $fields_values[ $field_name ] = $field_terms['values']; - - /* - if(!is_array($field_terms)) { - $field_terms = array($field_terms); - }*/ - $data_type = $field_terms['type']; - - foreach ( $field_terms['values'] as $term_value ) { - - $term_value_str = ''; - $term_value_num = 0; - - if ( $data_type == 'number' ) { - $term_value_num = $term_value; - } else { - $term_value_str = $term_value; - } - - $sql_part = $wpdb->prepare( "('%d', '%d', '%s', '%d', '%s', '%d')", $post_id, $parent_id, $field_name, $term_value_num, $term_value_str, 0 ); - array_push( $sql_where_parts, $sql_part ); - } - } - - $field_data = array(); - $field_data[0] = $fields_values; - $field_data[1] = $sql_where_parts; - - return $field_data; - } - - private function insert_post_cache_post_meta_terms( $meta_insert_array, $post_id, $post ) { - // now insert - global $wpdb; - - $parent_id = 0; - $wp_parent_id = wp_get_post_parent_id( $post_id ); - - if ( $wp_parent_id ) { - $parent_id = $wp_parent_id; - } - - $sql_where_parts = array(); - foreach ( $meta_insert_array as $field_name => $field_terms ) { - foreach ( $field_terms as $term_value ) { - - $sql_part = $wpdb->prepare( "('%d', '%d', '%s', '%d', '%s', '%d')", $post_id, $parent_id, $field_name, 0, $term_value, 0 ); - array_push( $sql_where_parts, $sql_part ); - } - } - - return $sql_where_parts; - } - - public function is_meta_value( $key ) { - if ( substr( $key, 0, 5 ) === SF_META_PRE ) { - return true; - } - return false; - } - - public function is_taxonomy_key( $key ) { - if ( substr( $key, 0, 5 ) === SF_TAX_PRE ) { - return true; - } - return false; - } -} diff --git a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-register-widget.php b/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-register-widget.php deleted file mode 100644 index 2b7e2269..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-register-widget.php +++ /dev/null @@ -1,125 +0,0 @@ -plugin_slug = $plugin->get_plugin_slug(); - - //register_widget('search_filter_widget'); - }*/ - - public function __construct() { - // Instantiate the parent object - parent::__construct( false, 'Search & Filter Form' ); - - // $plugin = Search_Filter::get_instance(); - $this->plugin_slug = 'search-filter'; - } - function widget( $args, $instance ) { - extract( $args ); - - $title = apply_filters( 'widget_title', $instance['title'] ); - - echo $before_widget; // Widget starts to print information - - // Check if title is set - if ( $title ) { - echo $before_title . $title . $after_title; - } - - $formid = apply_filters( 'widget_title', $instance['formid'] ); - - echo do_shortcode( '[searchandfilter id="' . $formid . '"]' ); - - echo $after_widget; // Widget ends printing information - // do_shortcode('[searchandfilter id="11"]'); - } - - function update( $new_instance, $old_instance ) { - // Save widget options - $instance = $old_instance; - - $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; - $instance['formid'] = ( ! empty( $new_instance['formid'] ) ) ? strip_tags( $new_instance['formid'] ) : ''; - - return $instance; - - } - - function form( $instance ) { - - if ( ( isset( $instance['title'] ) ) && ( isset( $instance['formid'] ) ) ) { - $title = __( esc_attr( $instance['title'] ), $this->plugin_slug ); - $formid = esc_attr( $instance['formid'] ); - } else { - $title = __( '', $this->plugin_slug ); - $formid = __( '', $this->plugin_slug ); - } - - ?> -
    -

    -

    - -

    - -
    - __( 'Search & Filter', $this->plugin_slug ), - 'singular_name' => __( 'Search Form', $this->plugin_slug ), - 'add_new' => __( 'Add New Search Form', $this->plugin_slug ), - 'add_new_item' => __( 'Add New Search Form', $this->plugin_slug ), - 'edit_item' => __( 'Edit Search Form', $this->plugin_slug ), - 'new_item' => __( 'New Search Form', $this->plugin_slug ), - 'view_item' => __( 'View Search Form', $this->plugin_slug ), - 'search_items' => __( 'Search \'Search Forms\'', $this->plugin_slug ), - 'not_found' => __( 'No Search Forms found', $this->plugin_slug ), - 'not_found_in_trash' => __( 'No Search Forms found in Trash', $this->plugin_slug ), - ); - - register_post_type( - $this->plugin_slug . '-widget', - array( - 'labels' => $labels, - 'public' => false, - 'show_ui' => true, - '_builtin' => false, - 'capability_type' => 'page', - 'hierarchical' => true, - 'rewrite' => false, - 'supports' => array( 'title' ), - 'show_in_menu' => false, - /*'has_archive' => true,*/ - ) - ); - } - - - public function init_widget() { - register_widget( 'Search_Filter_Register_Widget' ); - } - - - - function sf_rewrite_rules( $rules ) { - global $searchandfilter; - $newrules = array(); - - $args = array( - 'posts_per_page' => -1, - 'post_type' => $this->plugin_slug . '-widget', - 'post_status' => 'publish', - ); - - if ( has_filter( 'sf_rewrite_query_args' ) ) { - $args = apply_filters( 'sf_rewrite_query_args', $args ); - } - - $all_search_forms = get_posts( $args ); - - foreach ( $all_search_forms as $search_form ) { - $settings = Search_Filter_Helper::get_settings_meta( $search_form->ID ); - - if ( isset( $settings['page_slug'] ) ) { - if ( $settings['page_slug'] != '' ) { - $base_id = $search_form->ID; - - // $newrules[$settings['page_slug'].'/page/([0-9]+)/([0-9]+)$'] = 'index.php?&sfid='.$base_id.'&paged=$matches[2]&lang=$matches[1]'; //pagination & lang rule - // $newrules[$settings['page_slug'].'/page/([0-9]+)$'] = 'index.php?&sfid='.$base_id.'&paged=$matches[1]'; //pagination rule - // $newrules[$settings['page_slug'].'/page/([0-9]+)$'] = 'index.php?&sfid='.$base_id.'&paged=$matches[1]'; //pagination rule - - $use_rewrite = true; - if ( isset( $settings['display_results_as'] ) ) { - if ( $settings['display_results_as'] != 'archive' ) { - $use_rewrite = false; - } - } - - if ( $use_rewrite == true ) { - $newrules[ $settings['page_slug'] . '$' ] = 'index.php?&sfid=' . $base_id; // regular plain slug - - if ( has_filter( 'sf_archive_slug_rewrite' ) ) { - - $newrules = apply_filters( 'sf_archive_slug_rewrite', $newrules, $base_id, $settings['page_slug'] ); - } - } - } - } - } - - return $newrules + $rules; - } - /** - * Load the plugin text domain for translation. - * - * @since 1.0.0 - */ - public function load_plugin_textdomain() { - - $domain = $this->plugin_slug; - $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); - - load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' ); - load_plugin_textdomain( $domain, false, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' ); - - } - - - - /** - * - * @since 1.0.0 - * - * @param int $blog_id ID of the new blog. - */ - /* - public function activate_new_site( $blog_id ) { - - if ( 1 !== did_action( 'wpmu_new_blog' ) ) { - return; - } - - switch_to_blog( $blog_id ); - self::single_activate(); - restore_current_blog(); - - }*/ - -} diff --git a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-third-party.php b/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-third-party.php deleted file mode 100644 index 8e8f18be..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-third-party.php +++ /dev/null @@ -1,746 +0,0 @@ -cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - $this->woocommerce = new Search_Filter_Third_Party_Woocommerce(); - // frontend only, or ajax - if ( ( ! is_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { - - // beaverbuilder themer plugin - // removes paged = 1 from pagination when its the first page, otherwise themer kicks in a scroll on page load - add_filter( 'sf_main_query_pre_get_posts', array( $this, 'sf_beaver_themer_pre_get_posts' ), 11, 2 ); - // -- relevanssi - add_filter( 'sf_edit_query_args_after_custom_filter', array( $this, 'relevanssi_filter_query_args' ), 12, 2 ); - add_filter( 'sf_apply_custom_filter', array( $this, 'relevanssi_add_custom_filter' ), 10, 3 ); - - // -- polylang - add_filter( 'sf_archive_results_url', array( $this, 'pll_sf_archive_results_url' ), 10, 3 ); - add_filter( 'sf_ajax_results_url', array( $this, 'pll_sf_ajax_results_url' ), 10, 2 ); - add_filter( 'sf_ajax_form_url', array( $this, 'pll_sf_form_url' ), 10, 3 ); - - // -- ACF + WPML - looks like WPML fixed this - // add_filter('sf_input_object_acf_field', array($this, 'acf_translate_field'), 10, 3); - - if ( class_exists( 'Easy_Digital_Downloads' ) ) { - add_filter( 'shortcode_atts_downloads', array( $this, 'edd_filter_downloads_shortcode' ), 1000, 3 ); - add_filter( 'do_shortcode_tag', array( $this, 'edd_filter_downloads_shortcode_output' ), 1000, 3 ); - add_filter( 'search_filter_form_attributes', array( $this, 'edd_search_filter_form_attributes' ), 10, 2 ); - } - if ( class_exists( 'Easy_Digital_Downloads' ) ) { - add_filter( 'shortcode_atts_downloads', array( $this, 'edd_filter_downloads_shortcode' ), 1000, 3 ); - add_filter( 'do_shortcode_tag', array( $this, 'edd_filter_downloads_shortcode_output' ), 1000, 3 ); - add_filter( 'search_filter_form_attributes', array( $this, 'edd_search_filter_form_attributes' ), 10, 2 ); - } - - // -- custom layouts - add_filter( 'shortcode_atts_custom-layout', array( $this, 'custom_layouts_shortcode_attributes' ), 1000, 3 ); - add_filter( 'search_filter_form_attributes', array( $this, 'custom_layouts_search_filter_form_attributes' ), 10, 2 ); - } - - // -- polylang - add_filter( 'sf_edit_query_args', array( $this, 'sf_poly_query_args' ), 11, 2 ); - add_filter( 'pll_get_post_types', array( $this, 'pll_sf_add_translations' ), 10, 2 ); - add_filter( 'pll_get_post_types', array( $this, 'pll_sf_get_translations' ), 100000, 2 ); // try to set this as late as possible - add_filter( 'sf_edit_cache_query_args', array( $this, 'poly_lang_sf_edit_cache_query_args' ), 10, 2 ); - add_filter( 'sf_edit_search_forms_query_args', array( $this, 'poly_lang_sf_edit_cache_query_args' ), 10, 2 ); // set the language when fetching our built in search forms (suppress filters no longer works) - add_filter( 'sf_archive_slug_rewrite', array( $this, 'pll_sf_archive_slug_rewrite' ), 10, 3 ); - add_filter( 'sf_rewrite_query_args', array( $this, 'pll_sf_rewrite_args' ), 10, 3 ); - add_filter( 'sf_pre_get_posts_admin_cache', array( $this, 'sf_pre_get_posts_admin_cache' ), 10, 3 ); - add_action( 'search_filter_pre_update_post_cache', array( $this, 'sf_wpml_update_post_cache' ), 10, 2 ); - if ( Search_Filter_Helper::has_dynamic_ooo() ) { - add_filter( 'search_filter_admin_option_display_results', array( $this, 'dce_filter_display_results_options' ), 10, 2 ); - add_filter( 'search_filter_form_attributes', array( $this, 'dce_search_filter_form_attributes' ), 10, 2 ); - } - - $this->init(); - } - - public function acf_translate_field( $field, $field_name, $sfid ) { - if ( ! Search_Filter_Helper::has_wpml() ) { - return $field; - } - if ( ! function_exists( 'acf_get_field' ) ) { - return $field; - } - - if ( $field ) { - $field_key = $field['key']; - $field_ID = $field['ID']; - - // now try to find the translated versino - $field_group_id = wp_get_post_parent_id( $field_ID ); - if ( $field_group_id ) { - $translated_group_id = Search_Filter_Helper::wpml_object_id( $field_group_id, 'acf-field-group', true ); - if ( $translated_group_id ) { - global $wpdb; - $result = $wpdb->get_row( - $wpdb->prepare( "SELECT ID FROM {$wpdb->prefix}posts WHERE post_excerpt='%s' AND post_parent='%d'", $field_name, $translated_group_id ) - ); - if ( $result ) { - $translated_field = acf_get_field( $result->ID ); - if ( $translated_field ) { - $field = $translated_field; - } - } - } - } - } - return $field; - } - - public function custom_layouts_shortcode_attributes( $out, $pairs, $atts ) { - if ( ! isset( $atts['search_filter_id'] ) ) { - return $out; - } - - $this->custom_layouts_query_id = absint( $atts['search_filter_id'] ); - add_filter( 'custom-layouts\layout\query_args', array( $this, 'custom_layouts_add_sf_query' ) ); - remove_filter( 'shortcode_atts_custom-layouts', array( $this, 'custom_layouts_shortcode_attributes' ), 1000, 3 ); - $out['cache'] = 'no'; // disable query caching and handle within S&F - return $out; - } - public function custom_layouts_add_sf_query( $query_args ) { - if ( $this->custom_layouts_query_id !== 0 ) { - $query_args['search_filter_id'] = $this->custom_layouts_query_id; - $this->custom_layouts_query_id = 0; - } - - remove_filter( 'custom-layouts\layout\query_args', array( $this, 'custom_layouts_add_sf_query' ) ); - return $query_args; - } - - public function init() { - } - - /* EDD integration */ - public function edd_filter_downloads_shortcode( $out, $pairs, $atts ) { - if ( ! isset( $atts['search_filter_id'] ) ) { - return $out; - } - - $search_filter_id = intval( $atts['search_filter_id'] ); - do_shortcode( "[searchandfilter id='$search_filter_id' action='filter_next_query']" ); - // do_action("search_filter_setup_pagination", $search_filter_id); - global $searchandfilter; - $sf_inst = $searchandfilter->get( $search_filter_id ); - $sf_inst->query->prep_query(); - - return $out; - } - - public function edd_filter_downloads_shortcode_output( $output, $tag, $atts ) { - if ( ! isset( $atts['search_filter_id'] ) ) { - return $output; - } - - if ( $tag !== 'downloads' ) { - return $output; - } - - global $searchandfilter; - $search_filter_id = intval( $atts['search_filter_id'] ); - - $sf_inst = $searchandfilter->get( $search_filter_id ); - - // make sure this search form is tyring to use EDD - if ( $sf_inst->settings( 'display_results_as' ) == 'custom_edd_store' ) { - - // wrap both pagination + results in 1 container for ajax - $output = '
    ' . $output . '
    '; - } - - return $output; - } - public function edd_search_filter_form_attributes( $attributes, $sfid ) { - if ( isset( $attributes['data-display-result-method'] ) ) { - if ( $attributes['data-display-result-method'] == 'custom_edd_store' ) { - $attributes['data-ajax-target'] = '.search-filter-results-' . $sfid; - - // for fixing pagination issue when there are multiple instance of the S&F. - $attributes['data-ajax-links-selector'] = '.search-filter-results-' . $sfid . ' .edd_pagination a'; - } - } - - return $attributes; - } - public function custom_layouts_search_filter_form_attributes( $attributes, $sfid ) { - if ( isset( $attributes['data-display-result-method'] ) ) { - if ( $attributes['data-display-result-method'] == 'custom_layouts' ) { - $attributes['data-ajax-target'] = '.search-filter-results-' . $sfid; - if ( defined( 'CUSTOM_LAYOUTS_VERSION' ) && version_compare( CUSTOM_LAYOUTS_VERSION, '1.3.2-beta', '<' ) ) { - $attributes['data-ajax-target'] = '.cl-layout-container'; - } - - // for fixing pagination issue when there are multiple instance of the S&F. - $attributes['data-ajax-links-selector'] = '.search-filter-results-' . $sfid . ' .cl-pagination a'; - } - } - return $attributes; - } - - public function dce_search_filter_form_attributes( $attributes, $sfid ) { - if ( isset( $attributes['data-display-result-method'] ) ) { - $search_filter_results_class = '.search-filter-results-' . absint( $sfid ); - if ( $attributes['data-display-result-method'] == 'custom_dce_posts' ) { - $attributes['data-ajax-target'] = '.elementor-widget-dce-dynamicposts-v2' . $search_filter_results_class; - if ( defined( 'DCE_VERSION' ) && version_compare( DCE_VERSION, '1.13.0', '<' ) ) { - $attributes['data-ajax-target'] = '.dce-posts-container'; - } - - // for fixing pagination issue when there are multiple instance of the S&F. - $attributes['data-ajax-links-selector'] = '.elementor-widget-dce-dynamicposts-v2' . $search_filter_results_class . ' .dce-pagination a'; - - if ( isset( $attributes['data-infinite-scroll-result-class'] ) ) { - unset( $attributes['data-infinite-scroll-result-class'] ); - } - - if ( isset( $attributes['data-ajax-pagination-type'] ) ) { - unset( $attributes['data-ajax-pagination-type'] ); - } - - if ( isset( $attributes['data-infinite-scroll-container'] ) ) { - unset( $attributes['data-infinite-scroll-container'] ); - } - } elseif ( $attributes['data-display-result-method'] == 'custom_dce_google_maps' ) { - $attributes['data-ajax-target'] = '.elementor-widget-dyncontel-acf-google-maps' . $search_filter_results_class; - - // for fixing pagination issue when there are multiple instance of the S&F. - $attributes['data-ajax-links-selector'] = '.elementor-widget-dyncontel-acf-google-maps' . $search_filter_results_class . ' .dce-pagination a'; - - if ( isset( $attributes['data-infinite-scroll-result-class'] ) ) { - unset( $attributes['data-infinite-scroll-result-class'] ); - } - - if ( isset( $attributes['data-ajax-pagination-type'] ) ) { - unset( $attributes['data-ajax-pagination-type'] ); - } - - if ( isset( $attributes['data-infinite-scroll-container'] ) ) { - unset( $attributes['data-infinite-scroll-container'] ); - } - } elseif ( $attributes['data-display-result-method'] == 'custom_dce_google_maps_posts' ) { - $attributes['data-ajax-target'] = '.elementor-widget-dyncontel-acf-google-maps' . $search_filter_results_class; - - // for fixing pagination issue when there are multiple instance of the S&F. - $attributes['data-ajax-links-selector'] = '.elementor-widget-dyncontel-acf-google-maps' . $search_filter_results_class . ' .dce-pagination a'; - - // we want additional areas to be udpated with ajax: - $attributes['data-ajax-update-sections'] = wp_json_encode( - array( - '.elementor-widget-dce-dynamicposts-v2' . $search_filter_results_class, - ) - ); - - if ( isset( $attributes['data-infinite-scroll-result-class'] ) ) { - unset( $attributes['data-infinite-scroll-result-class'] ); - } - - if ( isset( $attributes['data-ajax-pagination-type'] ) ) { - unset( $attributes['data-ajax-pagination-type'] ); - } - - if ( isset( $attributes['data-infinite-scroll-container'] ) ) { - unset( $attributes['data-infinite-scroll-container'] ); - } - } - } - - return $attributes; - } - - public function dce_filter_display_results_options( $display_results_methods ) { - $display_results_methods['custom_dce_posts'] = array( - 'label' => __( 'Dynamic.ooo: Posts' ), - 'description' => - '

    ' . __( 'Use the powerful Dynamic Posts v2 widget for Elementor to create any kind of layout you can imagine.', $this->plugin_slug ) . '

    ' . - '

    ' . __( 'View the setup instructions', $this->plugin_slug ) . '

    ', - - 'base' => 'shortcode', - ); - - if ( version_compare( DCE_VERSION, '1.13.0', '>=' ) ) { - $display_results_methods['custom_dce_google_maps'] = array( - 'label' => __( 'Dynamic.ooo: Google Maps' ), - 'description' => - '

    ' . __( 'Use the powerful Dynamic Google Maps widget for Elementor to create advanced searches that work with your maps!', $this->plugin_slug ) . '

    ' . - '

    ' . __( 'View the setup instructions', $this->plugin_slug ) . '

    ', - - 'base' => 'shortcode', - ); - } - - if ( version_compare( DCE_VERSION, '1.13.0', '>=' ) ) { - $display_results_methods['custom_dce_google_maps_posts'] = array( - 'label' => __( 'Dynamic.ooo: Posts + Google Maps' ), - 'description' => - '

    ' . __( 'Use the powerful Dynamic Google Maps widget combined with a Dynamic Posts widget to create advanced searches that work with your maps + posts at the same time!', $this->plugin_slug ) . '

    ' . - '

    ' . __( 'View the setup instructions', $this->plugin_slug ) . '

    ', - - 'base' => 'shortcode', - ); - } - - return $display_results_methods; - } - - - - - // update all the translations too (in case they were auto updated / synced by ) - // the advanced tranlsation editor - public function sf_wpml_update_post_cache( $post ) { - if ( ! Search_Filter_Helper::has_wpml() ) { - return; - } - - // $post_lang_code = Search_Filter_Helper::wpml_post_language_code($post_id); - $element_type = 'post_' . $post->post_type; - $translation_group_id = apply_filters( 'wpml_element_trid', null, $post->ID, $element_type ); - $translations = apply_filters( 'wpml_get_element_translations', null, $translation_group_id, $element_type ); - // $lang_details = apply_filters( 'wpml_post_language_details', "", $post->ID ); - $current_lang_code = strtolower( Search_Filter_Helper::wpml_post_language_code( $post->ID ) ); - - if ( is_array( $translations ) ) { - foreach ( $translations as $translation ) { - $translation_lang = strtolower( $translation->language_code ); - // don't update the current post, because we're already doing it - if ( $translation_lang !== $current_lang_code ) { - - if ( ( $current_lang_code !== '' ) && ( ! empty( $current_lang_code ) ) ) { - do_action( 'wpml_switch_language', $translation_lang ); - - // don't infinite loop... - remove_action( 'search_filter_pre_update_post_cache', array( $this, 'sf_wpml_update_post_cache' ), 10, 2 ); - do_action( 'search_filter_update_post_cache', $translation->element_id ); - - add_action( 'search_filter_pre_update_post_cache', array( $this, 'sf_wpml_update_post_cache' ), 10, 2 ); } - } - } - } - - do_action( 'wpml_switch_language', $current_lang_code ); - } - - - - - - // this is the last stage to modify the query, it doesn't modify anything relating to auto count or hte cache, only - // the main query which is holding the actual results - public function sf_beaver_themer_pre_get_posts( $query, $sfid ) { - if ( ! class_exists( 'FLThemeBuilderLoader' ) ) { - return $query; - } - - if ( ! $query->is_main_query() ) { - return $query; - } - - if ( isset( $query->query_vars['search_filter_id'] ) ) { - if ( $query->get( 'paged' ) == 1 ) { - $query->set( 'paged', 0 ); - } - } - - return $query; - - } - - // public function sf_edd_fes_field_save_frontend($field, $save_id, $value, $user_id) - public function sf_edd_fes_field_save_frontend( $field, $save_id, $value ) { - // FES has an issue where the same filter is used but with 3 args or 4 args - // if the field is a digit, then actually this is the ID - - $post_id = 0; - if ( ctype_digit( $field ) ) { - $post_id = $field; - } elseif ( ctype_digit( $save_id ) ) { - $post_id = $save_id; - } - - // do_action('search_filter_update_post_cache', $save_id); - } - public function sf_edd_fes_submission_form_published( $post_id ) { - do_action( 'search_filter_update_post_cache', $post_id ); - } - - /* EDD integration */ - - public function edd_prep_downloads_sf_query( $query, $atts ) { - return $query; - } - - // polylang integration - // tells polylang that the post type `search-filter-widget` should be translatable - public function pll_sf_add_translations( $types, $hide ) { - $types['search-filter-widget'] = 'search-filter-widget'; - return $types; - } - public function pll_sf_get_translations( $types, $hide ) { - $this->polylang_post_types = $types; - return $types; - } - - public function sf_poly_query_args( $query_args, $sfid ) { - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - if ( Search_Filter_Helper::has_polylang() ) { - - // manually set language of our query, based on the lang of the S&F post (this is because ajax requests don't get a lang set, which only occurs on this display method - // if($sf_inst->settings("display_results_as")=="shortcode") { - - $terms = wp_get_post_terms( $sfid, 'language', array( 'fields' => 'all' ) ); - $terms_arr = array(); // this shold only ever have 1 value, as a post can only be in 1 lang at a time - - // but lets support it anyway - foreach ( $terms as $term ) { - array_push( $terms_arr, $term->slug ); - } - - // check to see if hte language we are searching, is being handles by polylang - $post_types_arr = $sf_inst->settings( 'post_types' ); - $post_types = array(); - if ( is_array( $post_types_arr ) ) { - $post_types = array_keys( $post_types_arr ); - } - - $polylang_post_types = array_keys( $this->polylang_post_types ); - - $intersect = array_intersect( $post_types, $polylang_post_types ); - if ( count( $intersect ) > 0 ) { - $query_args['lang'] = implode( ',', $terms_arr ); - } - // otherwise, don't set the lang of course, because the posts certainly won't have a lang attribute (yet) - // there will be problems however, if a user is searching multiple post types, some of which are handles by polylang - // some not, in this case, all language must be set to be handled by polylang for consistency - - // } - } - - return $query_args; - } - - public function poly_lang_sf_edit_cache_query_args( $query_args, $sfid ) { - if ( Search_Filter_Helper::has_polylang() ) { - /* - $langs = array(); - global $polylang; - foreach ($polylang->model->get_languages_list() as $term) - { - array_push($langs, $term->slug); - } - - //$query_args["lang"] = $langs; - //$query_args["lang"] = implode(",", $langs); - */ - // this sets a query for all languages (seems to changes quite often, the above was the old method of include all languages) - $query_args['lang'] = ''; - } - - return $query_args; - } - - public function sf_pre_get_posts_admin_cache( $query, $sfid ) { - if ( Search_Filter_Helper::has_polylang() ) { - $query->set( 'lang', 'all' ); - } - - return $query; - } - - - public function add_url_args( $url, $str ) { - $query_arg = '?'; - if ( strpos( $url, '?' ) !== false ) { - - // url has a question mark - $query_arg = '&'; - } - - return $url . $query_arg . $str; - - } - public function pll_sf_rewrite_args( $args ) { - // if((function_exists('pll_home_url'))&&(function_exists('pll_current_language'))) - if ( Search_Filter_Helper::has_polylang() ) { - $args['lang'] = ''; - } - - return $args; - } - public function pll_sf_archive_slug_rewrite( $newrules, $sfid, $page_slug ) { - // if((function_exists('pll_home_url'))&&(function_exists('pll_current_language'))) - if ( Search_Filter_Helper::has_polylang() ) { - // takes into account language prefix - // $newrules = array(); - $newrules[ '([a-zA-Z0-9_-]+)/' . $page_slug . '$' ] = 'index.php?&sfid=' . $sfid; // regular plain slug - } - - return $newrules; - } - public function pll_sf_ajax_results_url( $ajax_url, $sfid ) { - if ( ( function_exists( 'pll_home_url' ) ) && ( function_exists( 'pll_current_language' ) ) ) { - - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - // these are the display results methods that use the current url for ajax - // we want to do it this way, to allow other display methods (like VC / ajax integration) to carry on working - // $retain_results_methods = array("archive", "post_type_archive", "custom", "custom_woocommerce_store", "custom_edd_store", "bb_posts_module", "divi_post_module", "divi_shop_module", "elementor_posts_element","custom_layouts","custom_dce_posts"); - - // todo - need to add extensions via external plugin - - if ( $sf_inst->settings( 'display_results_as' ) !== 'shortcode' ) { - // so don't modify the ajax url, it will have the lang in there - return $ajax_url; - } else { - // if we are doing an ajax request, make sure we are including the proper home url, with lang `/en` - // allow sf_data to remain the same value - $sf_data = 'all'; - $url_parts = parse_url( $ajax_url ); - if ( isset( $url_parts['query'] ) ) { - parse_str( $url_parts['query'], $url_vars ); - if ( isset( $url_vars['sf_data'] ) ) { - $sf_data = $url_vars['sf_data']; - } - } - - // if ( $sf_inst->settings( "display_results_as" ) == "shortcode" ) { - if ( get_option( 'permalink_structure' ) ) { - $home_url = trailingslashit( pll_home_url() ); - $ajax_url = $this->add_url_args( $home_url, "sfid=$sfid&sf_action=get_data&sf_data=$sf_data" ); - - } else { - $ajax_url = $this->add_url_args( pll_home_url(), "sfid=$sfid&sf_action=get_data&sf_data=$sf_data" ); - } - } - } - - return $ajax_url; - } - public function pll_sf_archive_results_url( $results_url, $sfid, $page_slug = '' ) { - if ( ( function_exists( 'pll_home_url' ) ) && ( function_exists( 'pll_current_language' ) ) ) { - $results_url = pll_home_url( pll_current_language() ); - - if ( get_option( 'permalink_structure' ) ) { - if ( $page_slug != '' ) { - $results_url = trailingslashit( trailingslashit( $results_url ) . $page_slug ); - } else { - $results_url = trailingslashit( $results_url ); - $results_url = $this->add_url_args( $results_url, "sfid=$sfid" ); - } - } else { - if ( strpos( $results_url, '?' ) !== false ) { - $param = '&'; - } else { - $param = '?'; - } - $results_url .= $param . 'sfid=' . $sfid; - - } - } - - return $results_url; - } - - public function pll_sf_form_url( $results_url, $sfid, $page_slug = '' ) { - if ( ( function_exists( 'pll_home_url' ) ) && ( function_exists( 'pll_current_language' ) ) ) { - $results_url = pll_home_url( pll_current_language() ); - - if ( get_option( 'permalink_structure' ) ) { - $results_url = trailingslashit( $results_url ); - $results_url = $this->add_url_args( $results_url, "sfid=$sfid" ); - $results_url = $this->add_url_args( $results_url, 'sf_action=get_data' ); - $results_url = $this->add_url_args( $results_url, 'sf_data=form' ); - - } else { - $results_url = $this->add_url_args( $results_url, "sfid=$sfid" ); - $results_url = $this->add_url_args( $results_url, 'sf_action=get_data' ); - $results_url = $this->add_url_args( $results_url, 'sf_data=form' ); - // $results_url .= "&sfid=".$sfid; - } - } - - return $results_url; - } - - /* Relevanssi integration */ - public function remove_relevanssi_defaults() { - // relevanssi free + older premium - remove_filter( 'the_posts', 'relevanssi_query' ); - remove_filter( 'posts_request', 'relevanssi_prevent_default_request', 9 ); - remove_filter( 'posts_request', 'relevanssi_prevent_default_request' ); - - // new premium - remove_filter( 'the_posts', 'relevanssi_query', 99 ); - remove_filter( 'posts_request', 'relevanssi_prevent_default_request', 10 ); - - remove_filter( 'query_vars', 'relevanssi_query_vars' ); - } - - public function relevanssi_filter_query_args( $query_args, $sfid ) { - // always remove normal relevanssi behaviour - $this->remove_relevanssi_defaults(); - - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - if ( $sf_inst->settings( 'use_relevanssi' ) == 1 ) {// ensure it is enabled in the admin - - if ( isset( $query_args['s'] ) ) {// only run if a search term has actually been set - if ( trim( $query_args['s'] ) != '' ) { - - $search_term = $query_args['s']; - $query_args['s'] = ''; - } - } - } - - return $query_args; - } - - public function relevanssi_sort_result_ids( $result_ids, $query_args, $sfid ) { - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - if ( count( $result_ids ) == 1 ) { - if ( isset( $result_ids[0] ) ) { - if ( $result_ids[0] == 0 ) { - return $result_ids; - } - } - } - - if ( ( $sf_inst->settings( 'use_relevanssi' ) == 1 ) && ( $sf_inst->settings( 'use_relevanssi_sort' ) == 1 ) ) {// ensure it is enabled in the admin - - if ( isset( $this->relevanssi_result_ids[ 'sf-' . $sfid ] ) ) { - $return_ids_ordered = array(); - - $ordering_array = $this->relevanssi_result_ids[ 'sf-' . $sfid ]; - - $ordering_array = array_flip( $ordering_array ); - - foreach ( $result_ids as $result_id ) { - $return_ids_ordered[ $ordering_array[ $result_id ] ] = $result_id; - } - - ksort( $return_ids_ordered ); - - return $return_ids_ordered; - } - } - - return $result_ids; - } - - - public function relevanssi_add_custom_filter( $ids_array, $query_args, $sfid ) { - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - $this->remove_relevanssi_defaults(); - - if ( $sf_inst->settings( 'use_relevanssi' ) == 1 ) {// ensure it is enabled in the admin - - if ( isset( $query_args['s'] ) ) {// only run if a search term has actually been set - - if ( trim( $query_args['s'] ) != '' ) { - // $search_term = $query_args['s']; - - if ( function_exists( 'relevanssi_do_query' ) ) { - $expand_args = array( - 'posts_per_page' => -1, - 'paged' => 1, - 'fields' => 'ids', // relevanssi only implemented support for this in 3.5 - before this, it would return the whole post object - - // 'orderby' => "", //remove sorting - 'meta_key' => '', - // 'order' => "asc", - - /* speed improvements */ - 'no_found_rows' => true, - 'update_post_meta_cache' => false, - 'update_post_term_cache' => false, - - ); - - $query_args = array_merge( $query_args, $expand_args ); - - // $query_args['orderby'] = "relevance"; - // $query_args['order'] = "asc"; - unset( $query_args['order'] ); - unset( $query_args['orderby'] ); - - // The Query - $query_arr = new WP_Query( $query_args ); - relevanssi_do_query( $query_arr ); - - $ids_array = array(); - if ( $query_arr->have_posts() ) { - - foreach ( $query_arr->posts as $post ) { - $post_id = 0; - - if ( is_numeric( $post ) ) { - $post_id = $post; - } elseif ( is_object( $post ) ) { - if ( isset( $post->ID ) ) { - $post_id = $post->ID; - } - } - - if ( $post_id != 0 ) { - array_push( $ids_array, $post_id ); - } - } - } - - if ( $sf_inst->settings( 'use_relevanssi_sort' ) == 1 ) { - // keep a copy for ordering the results later - $this->relevanssi_result_ids[ 'sf-' . $sfid ] = $ids_array; - - // now add the filter - add_filter( 'sf_apply_filter_sort_post__in', array( $this, 'relevanssi_sort_result_ids' ), 10, 3 ); - } - - return $ids_array; - } - } - } - } - - return array( false ); // this tells S&F to ignore this custom filter - } -} -require_once plugin_dir_path( __FILE__ ) . 'third-party/class-search-filter-woocommerce.php'; diff --git a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-wp-cache.php b/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-wp-cache.php deleted file mode 100644 index 35704a50..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/class-search-filter-wp-cache.php +++ /dev/null @@ -1,133 +0,0 @@ -term_id ] = $taxonomy_term; - self::$wp_tax_terms[ $taxonomy_name ]['slug'][ $taxonomy_term->slug ] = $taxonomy_term; - } - - self::$wp_tax_terms_found_all[ $taxonomy_name ] = true; - } - } - } - } - - public static function get_taxonomy_terms( $taxonomy_name ) { - self::setup( $taxonomy_name ); - - if ( ( isset( self::$wp_tax_terms[ $taxonomy_name ] ) ) && ( isset( self::$wp_tax_terms_found_all[ $taxonomy_name ] ) ) ) { - if ( self::$wp_tax_terms_found_all[ $taxonomy_name ] == true ) { - return self::$wp_tax_terms[ $taxonomy_name ]['id']; - } - } - - self::$wp_tax_terms_found_all[ $taxonomy_name ] = true; - - self::$wp_tax_terms[ $taxonomy_name ] = array(); - self::$wp_tax_terms[ $taxonomy_name ]['id'] = array(); - self::$wp_tax_terms[ $taxonomy_name ]['slug'] = array(); - - self::$wp_tax_terms[ $taxonomy_name ] = array(); - $t_taxonomy_terms = get_terms( - $taxonomy_name, - array( - 'hide_empty' => false, - ) - ); - - if ( ! empty( $t_taxonomy_terms ) ) { - - foreach ( $t_taxonomy_terms as $taxonomy_term ) { - $tax_term_basic = new stdClass(); - $tax_term_basic->term_id = $taxonomy_term->term_id; - $tax_term_basic->slug = $taxonomy_term->slug; - - self::$wp_tax_terms[ $taxonomy_name ]['id'][ $taxonomy_term->term_id ] = $tax_term_basic; - self::$wp_tax_terms[ $taxonomy_name ]['slug'][ $taxonomy_term->slug ] = $tax_term_basic; - - // self::$wp_tax_terms[$taxonomy_name]['id'][$t_taxonomy_terms[$ti]->term_id] = $t_taxonomy_terms[$ti]; - // self::$wp_tax_terms[$taxonomy_name]['slug'][$t_taxonomy_terms[$ti]->slug] = $t_taxonomy_terms[$ti]; - } - - if ( self::$use_transients == 1 ) { - Search_Filter_Wp_Cache::set_transient( self::$wp_tax_terms_cache_key . $taxonomy_name, array_values( self::$wp_tax_terms[ $taxonomy_name ]['id'] ) ); - } - } - - /* - for ($ti = 0; $ti < count($t_taxonomy_terms); $ti++) { - self::$wp_tax_terms[$taxonomy_name]['id'][$t_taxonomy_terms[$ti]->term_id] = $t_taxonomy_terms[$ti]; - self::$wp_tax_terms[$taxonomy_name]['slug'][$t_taxonomy_terms[$ti]->slug] = $t_taxonomy_terms[$ti]; - }*/ - - if ( empty( self::$wp_tax_terms[ $taxonomy_name ] ) ) { - return array(); - } - - return self::$wp_tax_terms[ $taxonomy_name ]['id']; - } - - - public static function get_taxonomy_term_by( $by, $term_name, $taxonomy_name ) { - self::setup( $taxonomy_name ); - - if ( ! isset( self::$wp_tax_terms[ $taxonomy_name ] ) ) { - self::$wp_tax_terms[ $taxonomy_name ] = array(); - self::$wp_tax_terms[ $taxonomy_name ]['id'] = array(); - self::$wp_tax_terms[ $taxonomy_name ]['slug'] = array(); - } - - if ( isset( self::$wp_tax_terms[ $taxonomy_name ][ $by ][ $term_name ] ) ) { - return self::$wp_tax_terms[ $taxonomy_name ][ $by ][ $term_name ]; - } - - // else, term name does not exist, so fetch it - $term = get_term_by( $by, $term_name, $taxonomy_name ); - - // if ( !is_wp_error( $term ) ) { - if ( $term ) { - self::$wp_tax_terms[ $taxonomy_name ]['id'][ $term->term_id ] = $term; - self::$wp_tax_terms[ $taxonomy_name ]['slug'][ $term->slug ] = $term; - - if ( isset( self::$wp_tax_terms[ $taxonomy_name ][ $by ][ $term_name ] ) ) { - return self::$wp_tax_terms[ $taxonomy_name ][ $by ][ $term_name ]; - } else { - return array(); - } - } - - return false; - } - - public static function get_post_type_taxonomies( $post_type ) { - } - - public static function is_taxonomy_archive( $query = '' ) { - if ( $query == '' ) { - if ( self::$is_taxonomy_archive === -1 ) { - self::$is_taxonomy_archive = false; - - if ( ( is_tax() || is_category() || is_tag() ) && ( is_archive() ) ) { - - self::$is_taxonomy_archive = true; - } - } - - return self::$is_taxonomy_archive; - } else { - if ( ( $query->is_tax() || $query->is_category() || $query->is_tag() ) && ( $query->is_archive() ) ) { - - return true; - } - - return false; - } - - } - public static function get_post_types_by_taxonomy( $tax = 'category' ) { - $out = array(); - $post_types = get_post_types(); - foreach ( $post_types as $post_type ) { - - if ( ! isset( self::$post_types[ $post_type ] ) ) { - self::$post_types[ $post_type ] = array(); - } - - if ( ! isset( self::$post_types[ $post_type ]['taxonomies'] ) ) { - self::$post_types[ $post_type ]['taxonomies'] = get_object_taxonomies( $post_type ); - } - - $taxonomies = self::$post_types[ $post_type ]['taxonomies']; - if ( in_array( $tax, $taxonomies ) ) { - $out[] = $post_type; - } - } - return $out; - } - - public static function is_taxonomy_archive_of_post_type( $post_type, $single = true ) { - if ( ! self::is_taxonomy_archive() ) { - return false; - } - - if ( ! isset( self::$post_types[ $post_type ] ) ) { - self::$post_types[ $post_type ] = array(); - } - - if ( ! isset( self::$post_types[ $post_type ]['taxonomies'] ) ) { - self::$post_types[ $post_type ]['taxonomies'] = get_object_taxonomies( $post_type ); - } - - global $searchandfilter; - $term = $searchandfilter->get_queried_object(); - $is_taxonomy_archive = false; - - if ( isset( $term->taxonomy ) ) { - $taxonomy_name = $term->taxonomy; - - $tax_post_types = self::get_post_types_by_taxonomy( $taxonomy_name ); - - // make sure this tax is not shared unless single is false(we need for woocommerce, because all taxes are shared betweeen 2 post types - variations and products - if ( ( ( 1 === count( $tax_post_types ) ) && ( $single ) ) || ( ! $single ) ) { - $is_taxonomy_archive = in_array( $taxonomy_name, self::$post_types[ $post_type ]['taxonomies'] ); - } - } - - return $is_taxonomy_archive; - } -} - diff --git a/wp/wp-content/plugins/search-filter-pro/includes/index.php b/wp/wp-content/plugins/search-filter-pro/includes/index.php deleted file mode 100644 index 8142269b..00000000 --- a/wp/wp-content/plugins/search-filter-pro/includes/index.php +++ /dev/null @@ -1 +0,0 @@ -cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - if ( ( ! is_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { - add_filter( 'sf_edit_query_args', array( $this, 'sf_woocommerce_query_args' ), 11, 2 ); - add_filter( 'sf_main_query_pre_get_posts', array( $this, 'sf_woocommerce_pre_get_posts' ), 11, 2 ); - add_filter( 'sf_query_cache_post__in', array( $this, 'sf_woocommerce_get_variable_product_ids' ), 11, 2 ); - add_filter( 'sf_query_post__in', array( $this, 'sf_woocommerce_convert_variable_product_ids' ), 11, 2 ); - add_filter( 'sf_query_cache_count_ids', array( $this, 'sf_woocommerce_conv_variable_ids' ), 11, 2 ); - add_filter( 'sf_admin_filter_settings_save', array( $this, 'sf_woocommerce_filter_settings_save' ), 11, 2 ); - add_filter( 'sf_query_cache_register_all_ids', array( $this, 'sf_woocommerce_register_all_result_ids' ), 11, 2 ); - add_filter( 'sf_apply_custom_filter', array( $this, 'sf_woocommerce_add_stock_status' ), 11, 3 ); - // Integrate with WC products shortcode. - add_filter( 'shortcode_atts_products', array( $this, 'wc_products_shortcode_attributes' ), 1000, 3 ); - } - - // Public + admin. - add_filter( 'search_filter_post_cache_insert_data', array( $this, 'sf_woo_post_cache_insert_data' ), 10, 3 ); - add_action( 'search_filter_cache_update_post', array( $this, 'sf_woo_update_post_cache' ), 10, 3 ); - add_filter( 'search_filter_post_cache_data', array( $this, 'sf_woocommerce_cache_data' ), 11, 2 ); - add_filter( 'search_filter_cache_should_index_post', array( $this, 'sf_woocommerce_cache_update' ), 11, 3 ); - } - - public function is_woo_enabled() { - if ( ! isset( $this->woocommerce_enabled ) ) { - if ( ! function_exists( 'is_plugin_active' ) ) { - include_once ABSPATH . '/wp-admin/includes/plugin.php'; - } - - $this->woocommerce_enabled = is_plugin_active( 'woocommerce/woocommerce.php' ); - } - return $this->woocommerce_enabled; - } - - public function wc_products_shortcode_attributes( $out, $pairs, $atts ) { - - if ( ! isset( $atts['search_filter_id'] ) ) { - return $out; - } - - // Remove products shortcode caching. - $out['cache'] = false; - $this->wc_products_query_id = absint( $atts['search_filter_id'] ); - - add_filter( 'woocommerce_shortcode_products_query', array( $this, 'wc_add_sf_query' ) ); - remove_filter( 'shortcode_atts_products', array( $this, 'wc_products_shortcode_attributes' ), 1000, 3 ); - return $out; - } - - public function wc_add_sf_query( $query_args ) { - - // Remove products shortcode caching. - if ( $this->wc_products_query_id !== 0 ) { - $query_args['search_filter_id'] = $this->wc_products_query_id; - $this->wc_products_query_id = 0; - } - - remove_filter( 'woocommerce_shortcode_products_query', array( $this, 'wc_add_sf_query' ) ); - return $query_args; - } - - public function sf_woocommerce_product_sorting( $orderby ) { - if ( isset( $orderby['popularity'] ) ) { - unset( $orderby['popularity'] ); - } - return $orderby; - } - - public function sf_woocommerce_add_stock_status( $ids_array, $query_args, $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return $ids_array; - } - - if ( ! $this->sf_woocommerce_is_woo_query( $sfid ) ) { - return $ids_array; - } - - /* - * Get the instock IDs from the DB directly check for the woocommerce setting - * "show out of stock products", and only enable this on that condition. - */ - - if ( get_option( 'woocommerce_hide_out_of_stock_items' ) === 'yes' ) { - - $merge = true; - if ( isset( $ids_array[0] ) ) { - if ( $ids_array[0] === false ) { - $merge = false; - } - } - - global $wpdb; - - $term_results_table_name = Search_Filter_Helper::get_table_name( 'search_filter_term_results' ); - - $field_terms_results = $wpdb->get_results( - " - SELECT field_name, field_value, result_ids - FROM $term_results_table_name - WHERE field_name = '_sfm__stock_status' - AND field_value = 'instock' LIMIT 0, 1 - " - ); - - if ( ( count( $field_terms_results ) === 1 ) && ( property_exists( $field_terms_results[0], 'result_ids' ) ) ) { - $instock_ids = explode( ',', $field_terms_results[0]->result_ids ); - - if ( $merge === false ) { - $ids_array = $instock_ids; - } else { - $ids_array = array_intersect( $ids_array, $instock_ids ); - } - } - } - - return $ids_array; - } - - public function sf_woo_update_product_insert_data( $insert_data, $post_id, $type ) { - - $product = wc_get_product( $post_id ); - // $post_status = get_post_status($post->ID); //don't index variations if the parent is private - - if ( $product->is_type( 'variable' ) ) { - - // then remove `price`, and remove all taxonomy related attributes (as we want to add them manually, based on variations data) - if ( $type == 'taxonomy' ) { - - $product_attributes = $product->get_attributes(); - - foreach ( $insert_data as $data_key => $data ) { - - $attr_key = strpos( $data_key, '_sft_pa_' ); - - if ( $attr_key !== false ) { - - $tax_name = str_replace( '_sft_', '', $data_key ); - - if ( isset( $product_attributes[ $tax_name ] ) ) { - - // Now check to see if the attribute is used as variation, if not, then index it. - if ( $product_attributes[ $tax_name ]['variation'] === true ) { - unset( $insert_data[ $data_key ] ); - } - } - } - } - } elseif ( $type === 'meta' ) { - $this->wc_variable_meta_keys = array_keys( $insert_data ); - } - } elseif ( $product->is_type( 'simple' ) ) { - // Then we need to add product attributes, that are not taxonomies. - if ( $type === 'meta' ) { - - $product_attributes = $product->get_attributes(); - - foreach ( $product_attributes as $product_attribute ) { - - if ( ! $product_attribute->is_taxonomy() ) { - $attribute_name = $product_attribute->get_name(); - $sf_field_name = '_sfm_attribute_' . $attribute_name; - $attribute_options = $product_attribute->get_options(); - - $insert_data[ $sf_field_name ] = $attribute_options; - } - } - } - } - - return $insert_data; - } - public function sf_woo_update_post_cache( $post_id, $post, $context ) { - // If we're not in the cache context, and we update a parent post, then we want to - // rebuild the children. - if ( $post->post_type !== 'product' ) { - return; - } - - if ( $context !== 'none' ) { - return; - } - - // If the product is variable, loop the through the IDS: - $product = wc_get_product( $post_id ); - if ( $product->is_type( 'variable' ) ) { - $variations = $product->get_available_variations(); - foreach ( $variations as $variation ) { - do_action( 'search_filter_update_post_cache', $variation['variation_id'] ); - } - } - } - public function sf_woo_update_variation_insert_data( $insert_data, $post_id, $type ) { - - if ( $type === 'taxonomy' ) { - $variation_tax_data = $this->sf_woo_get_variation_insert_data_tax( $post_id ); - $insert_data = array_merge( $insert_data, $variation_tax_data ); - - } elseif ( $type === 'meta' ) { - $variation_meta_data = $this->sf_woo_get_variation_insert_data_meta( $post_id ); - $insert_data = array_merge( $insert_data, $variation_meta_data ); - - } - return $insert_data; - } - - public function sf_woo_post_cache_insert_data( $insert_data, $post_id, $type ) { - if ( ! $this->is_woo_enabled() ) { - return $insert_data; - } - - $post = get_post( $post_id ); - - if ( ! $post ) { - return $insert_data; - } - if ( $post->post_type === 'product' ) { - return $this->sf_woo_update_product_insert_data( $insert_data, $post_id, $type ); - } elseif ( $post->post_type === 'product_variation' ) { - return $this->sf_woo_update_variation_insert_data( $insert_data, $post_id, $type ); - } - - return $insert_data; - } - - - private function sf_woo_get_product_terms_insert_data( $post_id ) { - - $insert_arr = array(); - - if ( ! $this->is_woo_enabled() ) { - return $insert_arr; - } - - $post = get_post( $post_id ); - $post_type = $post->post_type; - $taxonomies = get_object_taxonomies( $post_type, 'objects' ); - $current_language = false; - - if ( Search_Filter_Helper::has_wpml() ) { - $current_language = Search_Filter_Helper::wpml_current_language(); - $post_language_details = apply_filters( 'wpml_post_language_details', null, $post_id ); - - if ( ! empty( $post_language_details ) ) { - $language_code = $post_language_details['language_code']; - if ( ( $language_code !== '' ) && ( ! empty( $language_code ) ) ) { - do_action( 'wpml_switch_language', $language_code ); - } - } - } - - foreach ( $taxonomies as $taxonomy_slug => $taxonomy ) { - - $attr_key = strpos( $taxonomy_slug, 'pa_' ); - if ( ( $attr_key === false ) && ( $attr_key !== 0 ) ) { - - // get the terms related to post - $terms = get_the_terms( $post_id, $taxonomy_slug ); - $insert_arr[ '_sft_' . $taxonomy_slug ] = array(); - - if ( ! empty( $terms ) ) { - foreach ( $terms as $term ) { - - $term_id = $term->term_id; - - if ( Search_Filter_Helper::has_wpml() ) { - // we need to find the language of the post - $post_lang_code = Search_Filter_Helper::wpml_post_language_code( $post_id ); - - // then send this with object ID to ensure that WPML is not converting this back - $term_id = Search_Filter_Helper::wpml_object_id( $term->term_id, $term->taxonomy, true, $post_lang_code ); - } - - array_push( $insert_arr[ '_sft_' . $taxonomy_slug ], (string) $term_id ); - } - } - } - } - - if ( Search_Filter_Helper::has_wpml() ) { - do_action( 'wpml_switch_language', $current_language ); - } - - return $insert_arr; - - } - - public function sf_woo_get_variation_post_meta_values( $variation_id ) { - - $index_data = array(); - - $meta_key_fields = $this->get_all_meta_key_names(); - - $wanted_meta_keys = array(); - foreach ( $meta_key_fields as $meta_key_field_name ) { - - if ( ( $meta_key_field_name !== '_price' ) && ( strpos( $meta_key_field_name, 'attribute_' ) === false ) ) { - array_push( $wanted_meta_keys, $meta_key_field_name ); - } - } - - $remove_keys = array( '_stock_status' ); - $wanted_meta_keys = array_diff( $wanted_meta_keys, $remove_keys ); - - foreach ( $wanted_meta_keys as $wanted_meta_key ) { - - $post_meta_values = get_post_meta( $variation_id, $wanted_meta_key ); - - if ( ! empty( $post_meta_values ) ) { - $index_data[ '_sfm_' . $wanted_meta_key ] = array(); - $index_data[ '_sfm_' . $wanted_meta_key ]['values'] = $post_meta_values; - $index_data[ '_sfm_' . $wanted_meta_key ]['type'] = 'string'; - } - } - - if ( isset( $index_data['_sfm__stock_status'] ) ) { - - } - - return $index_data; - } - public function sf_woo_get_variation_taxonomy_values( $index_data, $product_id ) { - - // $index_data = array(); - - $product = wc_get_product( $product_id ); - - $product_attributes = $product->get_attributes(); - - foreach ( $product_attributes as $product_attribute ) { - - // now check to see if the attribute is used as variation, if not, then index it - if ( $product_attribute['variation'] === false ) { - - $name = $product_attribute['name']; - // $product_options = array(); - if ( ( ! is_array( $product_attribute['options'] ) ) && ( ! empty( $product_attribute['options'] ) ) ) { - $product_options = array( $product_attribute['options'] ); - } else { - $product_options = $product_attribute['options']; - } - - if ( ! empty( $product_options ) ) { - $index_data[ '_sft_' . $name ] = array(); - $index_data[ '_sft_' . $name ]['values'] = $product_options; - $index_data[ '_sft_' . $name ]['type'] = 'number'; - } - } - } - - return $index_data; - - } - - public function sf_woo_get_variation_taxonomy_insert_data( $index_data, $product_id ) { - - $product = wc_get_product( $product_id ); - - if ( $product ) { - $product_attributes = $product->get_attributes(); - - foreach ( $product_attributes as $product_attribute ) { - - // now check to see if the attribute is used as variation, if not, then index it - if ( $product_attribute['variation'] === false ) { - - $name = $product_attribute['name']; - // $product_options = array(); - if ( ( ! is_array( $product_attribute['options'] ) ) && ( ! empty( $product_attribute['options'] ) ) ) { - $product_options = array( $product_attribute['options'] ); - } else { - $product_options = $product_attribute['options']; - } - - if ( ! empty( $product_options ) ) { - $index_data[ '_sft_' . $name ] = $product_options; - } - } - } - } - - return $index_data; - - } - - public function sf_woo_post_cache_get_delete_variation_data( $post_id ) { - - // delete all variation data from the cache - we lookup our own tables, because the variation IDs might have changed - global $wpdb; - - // so loop through any IDs, collect all the field name & values - // delete them all, then send the field name and values to the term updater - // do_action("search_filter_delete_post_cache", $variation_id); - $this->cache_table_name = Search_Filter_Helper::get_table_name( 'search_filter_cache' ); - - $results = $wpdb->get_results( - $wpdb->prepare( - " - SELECT DISTINCT post_id - FROM $this->cache_table_name - WHERE post_parent_id = '%d' - ", - $post_id - ) - ); - - foreach ( $results as $result ) { - do_action( 'search_filter_delete_post_cache', $result->post_id ); - } - } - - public function sf_woo_get_variation_insert_data_meta( $variation_id ) { - - if ( ! $this->is_woo_enabled() ) { - return array(); - } - - $current_language = false; - if ( Search_Filter_Helper::has_wpml() ) { - $current_language = Search_Filter_Helper::wpml_current_language(); - $post_language_details = apply_filters( 'wpml_post_language_details', null, $variation_id ); - - if ( ! empty( $post_language_details ) ) { - $language_code = $post_language_details['language_code']; - if ( ( $language_code !== '' ) && ( ! empty( $language_code ) ) ) { - do_action( 'wpml_switch_language', $language_code ); - } - } - } - - $variation = wc_get_product( $variation_id ); - $parent_product = wc_get_product( $variation->get_parent_id() ); - - // loop through the variations - $single_variation = new WC_Product_Variation( $variation_id ); - $variation_price = $single_variation->get_price(); - $variation_attributes = $single_variation->get_variation_attributes(); - - // start by adding post meta / can be an empty array - // $variation_values = array(); - - // TODO - WHAT IS THIS DOING? - $variation_values = $this->sf_woo_get_variation_post_meta_values( $variation_id ); - // loop through the variations attributes - foreach ( $variation_attributes as $variation_key => $variation_value ) { - - if ( strpos( $variation_key, 'attribute_' ) !== false ) { - // if the name begins with attribute_pa, then its a taxonomy - if ( strpos( $variation_key, 'attribute_pa' ) === false ) { - - if ( ! empty( $variation_value ) ) { - $meta_name = $variation_key; - $field_name = '_sfm_' . $meta_name; - $variation_values[ $field_name ] = array( $variation_value ); - } - } - } - } - - // Figure out which meta keys to index of the variations. - global $search_filter_post_cache; - $cache_data = $search_filter_post_cache->get_cache_data(); - $meta_keys = array(); - if ( isset( $cache_data['meta_keys'] ) ) { - if ( is_array( $cache_data['meta_keys'] ) ) { - // $meta_keys = $cache_data['meta_keys']; - foreach ( $cache_data['meta_keys'] as $meta_key ) { - $meta_key = '_sfm_' . $meta_key; - array_push( $meta_keys, $meta_key ); - } - } - } - - // merge meta keys in the post cache with the existing passed through - $this->wc_variable_meta_keys = array_unique( array_merge( $this->wc_variable_meta_keys, $meta_keys ) ); - - // now we add the other post meta, like _width, _height - $post_meta = get_post_meta( $variation_id ); - - foreach ( $this->wc_variable_meta_keys as $meta_key ) { - - // make sure the key starts with meta prefix - $prefix = '_sfm_'; - if ( strpos( $meta_key, $prefix ) !== false ) { - - if ( substr( $meta_key, 0, strlen( $prefix ) ) == $prefix ) { - $meta_key = substr( $meta_key, strlen( $prefix ) ); - } - - if ( isset( $post_meta[ $meta_key ] ) ) { - $field_name = '_sfm_' . $meta_key; - $variation_value = $post_meta[ $meta_key ]; - $variation_values[ $field_name ] = array(); - if ( ! is_array( $variation_value ) ) { - $variation_value = array( $variation_value ); - } - $variation_values[ $field_name ] = $variation_value; - } else { - if ( ! isset( $meta_missing_count[ $meta_key ] ) ) { - $meta_missing_count[ $meta_key ] = 0; - } - $meta_missing_count[ $meta_key ]++; - } - } - } - - $variation_values['_sfm__price'] = array( $variation_price ); - - // We're managing stock status at product level, not variation, so forget about it for variations - // (ie, just copy the parent value). - if ( $parent_product->managing_stock() == true ) { - if ( isset( $variation_values['_sfm__stock_status'] ) ) { - unset( $variation_values['_sfm__stock_status'] ); - } - // Copy the value from the parent product to the variation so we can get matches on _stock_status. - $variation_values['_sfm__stock_status'] = array( $parent_product->get_stock_status() ); - } - $variation_insert_data = $variation_values; - - if ( Search_Filter_Helper::has_wpml() ) { - do_action( 'wpml_switch_language', $current_language ); - } - return $variation_insert_data; - } - public function sf_woo_get_variation_insert_data_tax( $variation_id ) { - - if ( ! $this->is_woo_enabled() ) { - return array(); - } - - $current_language = false; - if ( Search_Filter_Helper::has_wpml() ) { - $current_language = Search_Filter_Helper::wpml_current_language(); - $post_language_details = apply_filters( 'wpml_post_language_details', null, $variation_id ); - - if ( ! empty( $post_language_details ) ) { - $language_code = $post_language_details['language_code']; - if ( ( $language_code !== '' ) && ( ! empty( $language_code ) ) ) { - do_action( 'wpml_switch_language', $language_code ); - } - } - } - - $variation = wc_get_product( $variation_id ); - $parent_product = wc_get_product( $variation->get_parent_id() ); - - // loop through the variations - $single_variation = new WC_Product_Variation( $variation_id ); - $variation_price = $single_variation->get_price(); - $variation_attributes = $single_variation->get_variation_attributes(); - - // start by adding post meta / can be an empty array - $variation_values = array(); - $variation_values = $this->sf_woo_get_variation_taxonomy_insert_data( $variation_values, $variation->get_parent_id() ); - // loop through the variations attributes - foreach ( $variation_attributes as $variation_key => $variation_value ) { - - if ( strpos( $variation_key, 'attribute_' ) !== false ) { - - // if(!empty($variation_value)) { - - // if the name begins with attribute_pa, then its a taxonomy - if ( strpos( $variation_key, 'attribute_pa' ) !== false ) { - - if ( ! empty( $variation_value ) ) { - - $taxonomy_name = str_replace( 'attribute_', '', $variation_key ); - $term = get_term_by( 'slug', $variation_value, $taxonomy_name ); - - if ( ( ! is_wp_error( $term ) ) && ( ! empty( $term ) ) ) { - $field_name = '_sft_' . $taxonomy_name; - $variation_values[ $field_name ] = array( $term->term_id ); - } - } else { - // the attribute was empty, which means "ANY" was selected, which means we need to attach all - // possible attributes to this variation - $taxonomy_name = str_replace( 'attribute_', '', $variation_key ); - - if ( isset( $product_attributes[ $taxonomy_name ] ) ) { - - $values = $product_attributes[ $taxonomy_name ]->get_options(); - - $field_name = '_sft_' . $taxonomy_name; - $variation_values[ $field_name ] = $values; - } - } - } - } - } - - // get the terms on the parent post, so we can add them to all the variations in our cache - $term_values = $this->sf_woo_get_product_terms_insert_data( $variation->get_parent_id() ); - // combine parent taxonomies with variation attributes - - $variation_insert_data = array_merge( $term_values, $variation_values ); - - if ( Search_Filter_Helper::has_wpml() ) { - do_action( 'wpml_switch_language', $current_language ); - } - - return $variation_insert_data; - } - - public function get_cache_post_types() { - - if ( empty( $this->wc_forms_post_types ) ) { - - $search_form_post_types = array(); - - $search_form_query = new WP_Query( 'post_type=search-filter-widget&post_status=publish&posts_per_page=-1&suppress_filters=1' ); - $search_forms = $search_form_query->get_posts(); - - foreach ( $search_forms as $search_form ) { - - $search_form_settings = Search_Filter_Helper::get_settings_meta( $search_form->ID ); - $this_post_types = array_keys( $search_form_settings['post_types'] ); - foreach ( $this_post_types as $this_post_type ) { - - array_push( $search_form_post_types, $this_post_type ); - } - } - $this->wc_forms_post_types = array_unique( $search_form_post_types ); - - } - - return $this->wc_forms_post_types; - - } - - public function sf_woocommerce_cache_update( $should_index_post, $post_id, $post ) { - - if ( ! $this->is_woo_enabled() ) { - return $should_index_post; - } - $post_type = $post->post_type; - - // Essentially we want to remove private posts from all our queries & db, - // causing too many counting errors depending on if user is logged in - if ( ( $post_type === 'product' ) ) { - // Inly really needs to be product, because variation will always have published status - $post_status = get_post_status( $post_id ); // don't index variations if the parent is private, and if its not in any search forms - - $exclude_from_catalog = false; - if ( has_term( 'exclude-from-catalog', 'product_visibility', $post_id ) ) { - $exclude_from_catalog = true; - } - // drafts & private mess up the count numbers, while the main query doesn't show them, so may aswell sync, and exclude across the board - if ( ( $post_status === 'private' ) || ( $post_status === 'draft' ) || ( $exclude_from_catalog === true ) ) { - $this->sf_woo_post_cache_get_delete_variation_data( $post_id ); - do_action( 'search_filter_delete_post_cache', $post_id ); - return false; - } - } - - return $should_index_post; - } - - public function sf_woocommerce_cache_data( $cache_data ) { - // check to see if we are using woocommerce post types - if ( ! $this->is_woo_enabled() ) { - return $cache_data; - } - - if ( empty( $cache_data ) ) { - return $cache_data; - } - - if ( empty( $cache_data['post_types'] ) ) { - return $cache_data; - } - - // if either product or variation - // we want to record `_stock_status` regardless if it has been set as a field - we need this because calc get complicated when checking if stock is managed at variation or product level - if ( ( in_array( 'product', $cache_data['post_types'] ) ) || ( in_array( 'product_variation', $cache_data['post_types'] ) ) ) { - if ( ! in_array( '_stock_status', $cache_data['meta_keys'] ) ) { - if ( ! isset( $cache_data['meta_keys'] ) ) { - $cache_data['meta_keys'] = array(); - } - array_push( $cache_data['meta_keys'], '_stock_status' ); - } - } - - /* - * TODO - potential problem, this data is only calculated when a search form is saved, - * it should also be recalculated when the cache restarts building, - * may be not, depends maybe only need for debug - */ - - return $cache_data; - - } - - public function sf_woocommerce_is_woo_variations_query( $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return false; - } - - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - $post_types_arr = $sf_inst->settings( 'post_types' ); - $post_types = array(); - if ( is_array( $post_types_arr ) ) { - $post_types = array_keys( $post_types_arr ); - } - - if ( ( in_array( 'product', $post_types ) ) && ( in_array( 'product_variation', $post_types ) ) ) { - // then we need to store the vairation data in the DB, variations (even when taxonomies) are actually stored as post meta on the variation itself, so add these to the meta list - return true; - } - - return false; - } - public function sf_woocommerce_should_reduce_variations( $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return false; - } - $should_reduce = apply_filters( 'search_filter_woo_should_reduce_variation', true ); - return $should_reduce; - } - - public function sf_woocommerce_is_woo_query( $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return false; - } - - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - $post_types_arr = $sf_inst->settings( 'post_types' ); - $post_types = array(); - if ( is_array( $post_types_arr ) ) { - $post_types = array_keys( $post_types_arr ); - } - - if ( in_array( 'product', $post_types ) ) { - // then we need to store the vairation data in the DB, variations (even when taxonomies) are actually stored as post meta on the variation itself, so add these to the meta list - return true; - } - return false; - } - - public function sf_woocommerce_convert_term_results( $filters, $cache_term_results, $sfid ) { - - // check to see if we are using woocommerce post types - if ( ! $this->is_woo_enabled() ) { - return $filters; - } - - if ( empty( $filters ) ) { - return $filters; - } - - foreach ( $this->woo_meta_keys_added as $woo_tax_name ) { - - if ( isset( $cache_term_results[ '_sfm_attribute_' . $woo_tax_name ] ) ) { - $terms = $cache_term_results[ '_sfm_attribute_' . $woo_tax_name ]; - - foreach ( $terms as $term_name => $result_ids ) { - - $tax = Search_Filter_Wp_Data::get_taxonomy_term_by( 'slug', $term_name, $woo_tax_name ); - - if ( ( $tax ) && ( isset( $filters[ '_sft_' . $woo_tax_name ] ) ) ) { - // Remove the parent post ID from the `cache_result_ids`. - if ( ! isset( $filters[ '_sft_' . $woo_tax_name ]['terms'][ $term_name ] ) ) { - $filters[ '_sft_' . $woo_tax_name ]['terms'][ $term_name ] = array(); - $filters[ '_sft_' . $woo_tax_name ]['terms'][ $term_name ]['term_id'] = $tax->term_id; - $filters[ '_sft_' . $woo_tax_name ]['terms'][ $term_name ]['cache_result_ids'] = array(); - } - $filters[ '_sft_' . $woo_tax_name ]['terms'][ $term_name ]['cache_result_ids'] = array_merge( $filters[ '_sft_' . $woo_tax_name ]['terms'][ $term_name ]['cache_result_ids'], $result_ids ); - } - } - } - } - return $filters; - } - public function sf_woocommerce_register_all_result_ids( $register, $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return $register; - } - - return $register; - - } - public function sf_woocommerce_is_filtered() { - return true; - } - - public function sf_woocommerce_convert_variable_product_ids( $post_ids, $sfid ) { - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - // make sure this search form is tyring to use woocommerce - if ( $this->sf_woocommerce_is_woo_variations_query( $sfid ) && $this->sf_woocommerce_should_reduce_variations( $sfid ) ) { - $post_ids = $this->sf_woocommerce_conv_variable_ids( $post_ids, $sfid ); - } - - return $post_ids; - } - public function sf_woocommerce_get_variable_product_ids( $post_ids, $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return $post_ids; - } - - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - // make sure this search form is tyring to use woocommerce - if ( $this->sf_woocommerce_is_woo_variations_query( $sfid ) && $this->sf_woocommerce_should_reduce_variations( $sfid ) ) { - - $this->woo_all_results_ids_keys = $sf_inst->query->cache->get_registered_result_ids(); - $all_result_ids = array_keys( $this->woo_all_results_ids_keys ); - - // run query to convert variation IDs to parent/product IDs - $parent_conv_args = array( - 'post_type' => 'product_variation', - 'posts_per_page' => -1, - 'paged' => 1, - 'post__in' => $all_result_ids, - 'fields' => 'id=>parent', - - 'orderby' => '', // remove sorting - 'meta_key' => '', - 'order' => '', - 'post_status' => '', - - // speed improvements - 'no_found_rows' => true, - 'update_post_meta_cache' => false, - 'update_post_term_cache' => false, - ); - - // The Query - $query_arr = new WP_Query( $parent_conv_args ); - - $new_ids = array(); - if ( $query_arr->have_posts() ) { - foreach ( $query_arr->posts as $post ) { - - if ( $post->post_parent == 0 ) { - // $new_ids[$post->ID] = $post->ID; - } else { - $new_ids[ $post->ID ] = $post->post_parent; - } - } - } - - $this->woo_result_ids_map = ( $new_ids ); - } - - return $post_ids; - } - - public function sf_woocommerce_conv_variable_ids( $post_ids, $sfid ) { - // make sure this search form is tyring to use woocommerce - if ( $this->sf_woocommerce_is_woo_variations_query( $sfid ) && $this->sf_woocommerce_should_reduce_variations( $sfid ) ) { - - // $post_ids = array_unique($post_ids); //so no duplicates - $replacements = $this->woo_result_ids_map; - foreach ( $post_ids as $key => $value ) { - if ( isset( $replacements[ $value ] ) ) { - $post_ids[ $key ] = $replacements[ $value ]; - } - } - $post_ids = array_unique( $post_ids ); // so no duplicates - } - - return $post_ids; - } - - public function sf_woocommerce_pre_get_posts( $query, $sfid ) { - - if ( ! $this->is_woo_enabled() ) { - return $query; - } - - $is_shop = false; - if ( function_exists( 'is_shop' ) ) { - $is_shop = is_shop(); - } - - // is_shop is not always true for product attributes / archives - // so we need to detect if we are one of those - global $searchandfilter; - $enable_taxonomy_archives = $searchandfilter->get( $sfid )->settings( 'enable_taxonomy_archives' ); - - if ( ( $enable_taxonomy_archives == 1 ) && ( Search_Filter_Wp_Data::is_taxonomy_archive_of_post_type( 'product', false ) ) ) { - - $sf_current_query = $searchandfilter->get( $sfid )->current_query(); - $term = $searchandfilter->get_queried_object(); - $taxonomy = $term->taxonomy; - - // exclude current tax archive as a filter when checking "is_filtered" - if ( ! $sf_current_query->is_filtered( array( '_sft_' . $taxonomy ) ) ) { - $is_shop = true; - } - } - - if ( $is_shop ) { - // in woocommerce, don't set paged for page 1 - otherwise page description will be hidden - if ( $query->get( 'paged' ) == 1 ) { - $query->set( 'paged', null ); - } - } - - // make sure post type is "product" only, not with variations, otherwise, - // they will show in the results (if the variation ID has not been converted to its parent ID yet) - if ( $this->sf_woocommerce_is_woo_variations_query( $sfid ) && $this->sf_woocommerce_should_reduce_variations( $sfid ) ) { - $query->set( 'post_type', 'product' ); - } elseif ( $this->sf_woocommerce_is_woo_variations_query( $sfid ) && ! $this->sf_woocommerce_should_reduce_variations( $sfid ) ) { - $query->set( 'post_type', array( 'product', 'product_variation' ) ); - } - - return $query; - } - public function sf_woocommerce_query_args( $query_args, $sfid ) { - if ( ! $this->is_woo_enabled() ) { - return $query_args; - } - - global $searchandfilter; - $sf_inst = $searchandfilter->get( $sfid ); - - // make sure this search form is tyring to use woocommerce - if ( $sf_inst->settings( 'display_results_as' ) == 'custom_woocommerce_store' ) { - - $enable_taxonomy_archives = $sf_inst->settings( 'enable_taxonomy_archives' ); - - if ( ( $enable_taxonomy_archives == 1 ) && ( Search_Filter_Wp_Data::is_taxonomy_archive_of_post_type( 'product', false ) ) ) { - - // if its using tax archive, and we're on a tax archive, make sure we don't include the current tax in `is_filtered` before applying WC is_filtered - - $sf_current_query = $searchandfilter->get( $sfid )->current_query(); - $term = $searchandfilter->get_queried_object(); - $taxonomy = $term->taxonomy; - - // exclude current tax archive as a filter when checking "is_filtered" - if ( ( $sf_current_query->is_filtered( array( '_sft_' . $taxonomy ) ) ) || ( ! empty( $sf_current_query->get_search_term() ) ) ) { - add_filter( 'woocommerce_is_filtered', array( $this, 'sf_woocommerce_is_filtered' ) ); - } - } else { - $sf_current_query = $sf_inst->current_query(); - if ( ( $sf_current_query->is_filtered() ) || ( ! empty( $sf_current_query->get_search_term() ) ) ) { - add_filter( 'woocommerce_is_filtered', array( $this, 'sf_woocommerce_is_filtered' ) ); - } - } - - return $query_args; - } - - return $query_args; - } - public function sf_woocommerce_filter_settings_save( $settings, $sfid ) { - // make sure this search form is tyring to use woocommerce - if ( isset( $settings['display_results_as'] ) ) { - // if($settings["display_results_as"]=="custom_woocommerce_store"){ - if ( $this->sf_woocommerce_is_woo_variations_query( $sfid ) && $this->sf_woocommerce_should_reduce_variations( $sfid ) ) { - - $settings['treat_child_posts_as_parent'] = 1; - } else { - $settings['treat_child_posts_as_parent'] = 0; - } - } - - return $settings; - } - - private function get_fields_meta( $sfid ) { - - $meta_key = '_search-filter-fields'; - $search_form_fields = ( get_post_meta( $sfid, $meta_key, true ) ); - - return $search_form_fields; - } - public function get_all_meta_key_names() { - $filters = array(); - - $search_form_query = new WP_Query( 'post_type=search-filter-widget&post_status=publish&posts_per_page=-1&suppress_filters=1' ); - $search_forms = $search_form_query->get_posts(); - - foreach ( $search_forms as $search_form ) { - $search_form_fields = $this->get_fields_meta( $search_form->ID ); - - if ( $search_form_fields ) { - foreach ( $search_form_fields as $key => $field ) { - if ( $field['type'] === 'post_meta' ) { - if ( $field['meta_type'] === 'choice' ) { - array_push( $filters, $field['meta_key'] ); - } - } - } - } - } - $filters = array_unique( $filters ); - return $filters; - } -} diff --git a/wp/wp-content/plugins/search-filter-pro/index.php b/wp/wp-content/plugins/search-filter-pro/index.php deleted file mode 100644 index e71af0ef..00000000 --- a/wp/wp-content/plugins/search-filter-pro/index.php +++ /dev/null @@ -1 +0,0 @@ -\n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;" -"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n" -"X-Poedit-Basepath: ../\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-SearchPath-0: .\n" - -#: class-plugin-name-admin.php:170 -msgid "Page Title" -msgstr "" - -#: class-plugin-name-admin.php:171 -msgid "Menu Text" -msgstr "" - -#: class-plugin-name-admin.php:197 -msgid "Settings" -msgstr "" diff --git a/wp/wp-content/plugins/search-filter-pro/public/assets/css/chosen-sprite.png b/wp/wp-content/plugins/search-filter-pro/public/assets/css/chosen-sprite.png deleted file mode 100644 index 3611ae4ace1c4b1cbeacd6145b5a79cbc72e0bdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 646 zcmV;10(t$3P)0006_Nkl&pbAC0n?)s%2x5M$#UgGxI1~gymp~v; zh<`zGaTJP5BybQY4tlRo;SIcmE0t>ueW3>*u6N;@_u;;|BoL8PuhZ#FWY9$(flan1oVvxDBL8~}0Q5z;^2p>Ov z7}Q$E7=l>$BZLUt1*uKMCaQwKYf$lsJCyerWMd+%BeGH6f_f&Vpy%=$BN%uK%Ahxi zF+%Jj=Pc-WXF;djSiJw|m4>cN%^Fi|FBZ!E{_yJLS?RI<3U696XLkQSs z{{&kQJ$K(#5CgC1;GbA>mjm56zJZ^-Hg2_ASKI_K@CybPh7Rq}8ud``)NM~eZx}qT z)oK?Lf>t!B;%Uh}*P+)Ef?jbx#w|BNEVb(l{2LK}m#fw4xx>ddF;&j}!S{N-e!<&Q z?kvzyI_AT@H-u4tUz1h&GCh8>?TnA~?BZ7WGP<9`r gQ6DuZO!_~60ju@{TzXF%TmS$707*qoM6N<$g2#CqL;wH) diff --git a/wp/wp-content/plugins/search-filter-pro/public/assets/css/chosen-sprite@2x.png b/wp/wp-content/plugins/search-filter-pro/public/assets/css/chosen-sprite@2x.png deleted file mode 100644 index ffe4d7d1121ca45cd35783696940050c690a8676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcmeAS@N?(olHy`uVBq!ia0vp^89?mC!3-o5mOWetq|OBRgt-3y{~yTgfB`oc01C8& zL0el}Lqh|Q1oD8A5J8A6G6@lfkU;ftMr&&;+$f+RkloVK0wm!8C|FWb0x`e2xj8g6 z6i7l;BAWwL4-tfu5G@ccP!{MmqnYOy06pVW666=m!0_*bfx(A_gav;C1PU5HKT!C5 z;g7@l4POuZ{>hQBP{j4uqq`I2WP9&Sn{}I8xJi*&v*QL&+Dw-Bf-CQLyLk0Ht2-;T zynum$iPO`?F{C2y?bYjfj|~J`6Xz~`vM4Ef+U{Vpli%)D%kKSey_RG0Bi9Xw4jtOb z@!)?~_%DVelO793W#Pl3vjdNCDTnGGb(^YY+BbF2;mJK!nq}@nBGoHxCn#7X*gdxr z+~ZQF6rpL6;MDP)JzehcJBL53AM-QU?@65Plc4-}1EW@`H@EEGrnFmTubZ~5iUzVn zrZYyBIm|RmW$3F@+wkq2)c>|mGh5Rv3%(p~zjStyruBl(TP2_51LpTH2noN*e&}J; z1;$+4EpJ(Mb+^1}Fv>ms%b`r}+KYy~zf5x(4?8l28%eNnEHzx({;NGP)_hX&tEw9t zSKv=Qjt(d#~b;F7hbDdUu$OUK8iumkkl&-=~$APCd2zdqHg6@=Z#Pt*5RY_s@Hw*YS9+ z^u)7AmzM6Ux!dus_!gJY)Vtf?+t>a3wO2S)_Vct=T}#@RuG(h!d8WYZS9Tst+VfKv zt~zntPsvfyqLY`klZSPslCz_dlcSRJLa$Px)_+W2Y&u!?oJrIMCNTz2S3j3^P6