Skip to content

Commit

Permalink
chore: fix deprecated hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
antoscarface committed Oct 11, 2024
1 parent 030e8f6 commit e87dd4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/includes/class-wordlift.php
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,9 @@ private function define_admin_hooks( $that ) {
* @since 3.23.0
*/
add_filter(
'allowed_block_types',
version_compare( get_bloginfo( 'version' ), '5.8', '>=' )
? 'allowed_block_types_all'
: 'allowed_block_types',
function ( $value ) {

if ( true === $value ) {
Expand Down
8 changes: 7 additions & 1 deletion src/wordlift.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,13 @@ function wl_enqueue_leaflet( $in_footer = false ) {
wp_enqueue_script( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer );
}

add_filter( 'block_categories', 'wl_block_categories', 10 );
add_filter(
version_compare( get_bloginfo( 'version' ), '5.8', '>=' )
? 'block_categories_all'
: 'block_categories',
'wl_block_categories',
10
);

// Temporary fix for a typo in WooCommerce Extension.
add_filter(
Expand Down

0 comments on commit e87dd4b

Please sign in to comment.