The Problem

WordPress 5.0 includes a javascript library called wp.hooks. FacetWP has been using a similar library of the same name (wp.hooks) for several years. Unfortunately, the two versions aren’t compatible.

The Solution

We’ve renamed our library to FWP.hooks and have released updates to FacetWP (version 3.2.11) and all affected add-ons:

  • Time Since
  • Alphabetical Listing
  • Bookings
  • Color
  • Hierarchy Select
  • Load More
  • Map Facet
  • Range List

We encourage you to update to the latest version(s) as soon as possible.

What about custom code?

If you’re using any custom (JavaScript) code that makes use of wp.hooks, this will unfortunately need to be corrected manually.

Before:

How to use custom JavaScript code?

JavaScript code can be placed in your (child) theme's main JavaScript file. Alternatively, you can add it manually between <script> tags in the <head> section of your (child) theme's header.php file. You can also load it with a hook in your (child) theme's functions.php file, or in the Custom Hooks add-on. To load the code only on pages with facets, use the facetwp_scripts hook. To load it on all pages, use wp_head or wp_footer. Or you can use a code snippets plugin. More info

wp.hooks.addFilter('facetwp/refresh/checkboxes', function() { /* do something */ });

After:

How to use custom JavaScript code?

JavaScript code can be placed in your (child) theme's main JavaScript file. Alternatively, you can add it manually between <script> tags in the <head> section of your (child) theme's header.php file. You can also load it with a hook in your (child) theme's functions.php file, or in the Custom Hooks add-on. To load the code only on pages with facets, use the facetwp_scripts hook. To load it on all pages, use wp_head or wp_footer. Or you can use a code snippets plugin. More info

FWP.hooks.addFilter('facetwp/refresh/checkboxes', function() { /* do something */ });

The State of WordPress 5.0 (Gutenberg)

Gutenberg is the new editor that the WordPress core team has been developing for about 2 years. As of the time of this writing (December 5, 2018), Gutenberg is still a plugin.

WordPress 5.0 is scheduled to ship tomorrow (December 6, 2018) with Gutenberg built-in. This will likely cause a huge shift in the WordPress community. Gutenberg replaces the familiar WYSIWYG editor with a new block-based UI.

See also

Last updated: September 11, 2024