Skip to content

Commit

Permalink
Merge pull request #2480 from kprajapatii/master
Browse files Browse the repository at this point in the history
Breakdance Page Builder(themeless) compatibility - FIXED
  • Loading branch information
kprajapatii authored Nov 21, 2023
2 parents 278676e + b86bf4f commit 60ed854
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions includes/class-geodir-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
14 changes: 9 additions & 5 deletions includes/custom-fields/output-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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("<br>","",$address_fields);
return stripslashes( wp_strip_all_tags($address_fields) );
$address_fields = str_replace( "<br>", "", $address_fields );
return stripslashes( wp_strip_all_tags( $address_fields, true ) );
}

// Stripped value.
if ( ! empty( $output ) && isset( $output['strip'] ) ) {
$address_fields = str_replace("<br>",",",$address_fields);
return stripslashes( wp_strip_all_tags($address_fields) );
$address_fields = str_replace( "<br>", ",", $address_fields );
return stripslashes( wp_strip_all_tags( $address_fields, true ) );
}

// print_r($cf);exit;
$html = '<div class="geodir_post_meta ' . $cf['css_class'] . ' geodir-field-' . $cf['htmlvar_name'] . '" itemscope itemtype="http://schema.org/PostalAddress">';

$maybe_secondary_class = isset($output['icon']) ? 'gv-secondary' : '';
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 60ed854

Please sign in to comment.