From 037a61c69f8dedc661a895d31fea9c2ade596de4 Mon Sep 17 00:00:00 2001 From: Kiran Prajapati Date: Tue, 21 Nov 2023 17:44:35 +0530 Subject: [PATCH 1/2] Breakdance Page Builder(themeless) compatibility - FIXED --- includes/class-geodir-compatibility.php | 5 +++-- readme.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-geodir-compatibility.php b/includes/class-geodir-compatibility.php index 04113c64..57006bd6 100644 --- a/includes/class-geodir-compatibility.php +++ b/includes/class-geodir-compatibility.php @@ -4159,14 +4159,15 @@ public static function ajax_listings_before( $data ) { * Block theme like Twenty Twenty Two has issue in loading scripts. * * @since 2.1.1.14 + * @since 2.3.30 Breakdance Page Builder(themeless) compatibility. * - * @param array $options Super Duper block options. + * @param array $options Super Duper block options. * @param object $super_duper Super Duper object. */ public static function block_theme_load_scripts( $options, $super_duper ) { global $geodir_frontend_scripts_loaded; - if ( ! $geodir_frontend_scripts_loaded && function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() && ! wp_script_is( 'geodir', 'registered' ) ) { + if ( ! $geodir_frontend_scripts_loaded && ( ( function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() ) || defined( '__BREAKDANCE_VERSION' ) ) && ! wp_script_is( 'geodir', 'registered' ) ) { $geodir_frontend_scripts_loaded = true; GeoDir_Frontend_Scripts::load_scripts(); diff --git a/readme.txt b/readme.txt index 8cc519ed..33f3848a 100644 --- a/readme.txt +++ b/readme.txt @@ -309,6 +309,7 @@ __WARNING: GDv2 is a significant update over GDv1 and may require manual work, s * Astra + Spectra category pages compatibility - FIXED * AJAX search page title not updating on Elementor template - FIXED * Elementor Pro native lightbox slideshow not working with GD post images - FIXED +* Breakdance Page Builder(themeless) compatibility - FIXED = GeoDirectory v2.3.30 - 2023-11-08 = * Elementor Loop Carousel don't show post category image - FIXED From b86bf4fb2178acc00bccc99d1dc8e8918635e11f Mon Sep 17 00:00:00 2001 From: Kiran Prajapati Date: Tue, 21 Nov 2023 17:47:00 +0530 Subject: [PATCH 2/2] Do not show address title when private address fields return empty values via hook --- includes/custom-fields/output-functions.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/includes/custom-fields/output-functions.php b/includes/custom-fields/output-functions.php index 2f2b2682..b48ee68b 100644 --- a/includes/custom-fields/output-functions.php +++ b/includes/custom-fields/output-functions.php @@ -2519,19 +2519,23 @@ function geodir_cf_address($html,$location,$cf,$p='',$output=''){ // Render private address. $address_fields = geodir_post_address( $address_fields, 'address', $gd_post ); + $plain_value = wp_strip_all_tags( $address_fields, true ); + if ( $plain_value == '' ) { + return $html; + } + // Database value. if ( ! empty( $output ) && isset( $output['raw'] ) ) { - $address_fields = str_replace("
","",$address_fields); - return stripslashes( wp_strip_all_tags($address_fields) ); + $address_fields = str_replace( "
", "", $address_fields ); + return stripslashes( wp_strip_all_tags( $address_fields, true ) ); } // Stripped value. if ( ! empty( $output ) && isset( $output['strip'] ) ) { - $address_fields = str_replace("
",",",$address_fields); - return stripslashes( wp_strip_all_tags($address_fields) ); + $address_fields = str_replace( "
", ",", $address_fields ); + return stripslashes( wp_strip_all_tags( $address_fields, true ) ); } -// print_r($cf);exit; $html = '