Yoast / yoast-acf-analysis

WordPress plugin that adds the content of all ACF fields to the Yoast SEO score analysis.
https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/
GNU General Public License v3.0
61 stars 20 forks source link

Possibly incomplete fix for select2 issue #79

Closed kraftner closed 7 years ago

kraftner commented 7 years ago

I just realised that the fix for #26 we introduced with #45 is incomplete as things can possibly still fail as people can opt to stick with select2 v3 even with ACF5.6+.

add_filter('acf/settings/select2_version', function(){ return 3; });

See https://www.advancedcustomfields.com/blog/acf-pro-5-6-0-ui-ux/ and https://www.advancedcustomfields.com/resources/acf-settings/ for more Details.

So instead of deciding based on the ACF version we'll probably need to determine what is actually enqueued on the page with acf_get_setting('select2_version'), expose this client side as part of the JS config and decide upon this data on how to scrape inside the taxonomy scraper.