PluginProbe
WP Ultimate Post Grid / 3.9.0
WP Ultimate Post Grid v3.9.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
← All changes | includes/public/class-wpupg-blocks.php +7 -1 3.7.03.9.0 View file →
@@ -26,9 +26,15 @@
26 26 */
27 27 public static function init() {
28 28 add_action( 'init', array( __CLASS__, 'register_blocks' ) );
29 29
30 - add_filter( 'block_categories', array( __CLASS__, 'block_categories' ) );
30 + // Deprecation notice after 5.8.0.
31 + global $wp_version;
32 + if ( $wp_version && version_compare( $wp_version, '5.8', '<' ) ) {
33 + add_filter( 'block_categories', array( __CLASS__, 'block_categories' ) );
34 + } else {
35 + add_filter( 'block_categories_all', array( __CLASS__, 'block_categories' ) );
36 + }
31 37 }
32 38
33 39 /**
34 40 * Register block categories.