From 58cf71bdd9f2dbcdc75de043a7e5e8b5c6298e25 Mon Sep 17 00:00:00 2001 From: stiofan Date: Wed, 17 Jul 2024 17:51:29 +0100 Subject: [PATCH] 2.3.66 --- geodirectory.php | 4 +- includes/class-geodir-defaults.php | 90 +++++++++---------- includes/class-geodir-template-loader.php | 1 + includes/widgets/class-geodir-widget-loop.php | 7 ++ readme.txt | 6 +- .../block-templates/gd-add-listing.html | 10 +-- .../bootstrap/block-templates/gd-archive.html | 22 +++-- .../block-templates/gd-location.html | 22 +++-- .../bootstrap/block-templates/gd-search.html | 22 +++-- .../bootstrap/block-templates/gd-single.html | 22 +++-- 10 files changed, 98 insertions(+), 108 deletions(-) diff --git a/geodirectory.php b/geodirectory.php index 3fadb94ce..1a7e3693a 100644 --- a/geodirectory.php +++ b/geodirectory.php @@ -11,7 +11,7 @@ * Plugin Name: GeoDirectory * Plugin URI: https://wpgeodirectory.com/ * Description: GeoDirectory - Business Directory Plugin for WordPress. - * Version: 2.3.65 + * Version: 2.3.66 * Author: AyeCode - WP Business Directory Plugins * Author URI: https://wpgeodirectory.com * Text Domain: geodirectory @@ -34,7 +34,7 @@ final class GeoDirectory { * * @var string */ - public $version = '2.3.65'; + public $version = '2.3.66'; /** * GeoDirectory instance. diff --git a/includes/class-geodir-defaults.php b/includes/class-geodir-defaults.php index 0513d7f62..13a71d7e3 100644 --- a/includes/class-geodir-defaults.php +++ b/includes/class-geodir-defaults.php @@ -25,12 +25,10 @@ class GeoDir_Defaults { public static function page_add_content($no_filter = false, $blocks = false){ if($blocks){ - $content = " -
[gd_notifications]
- + $content = " - -
[gd_add_listing post_type='' show_login='true' login_msg='' container='' mapzoom='0' label_type='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
"; }else{ $content = "[gd_notifications]\n[gd_add_listing show_login=1]"; @@ -51,24 +49,22 @@ public static function page_add_content($no_filter = false, $blocks = false){ public static function page_search_content($no_filter = false, $blocks = false){ if($blocks){ - $content = " -
[gd_notifications]
- + $content = " - -
[gd_search bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop_actions bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop layout='2' row_gap='' column_gap='' card_border='' card_shadow='' bg='' mt='' mr='' mb='' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop_paging show_advanced='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
"; }else{ $content = "[gd_notifications]\n[gd_search]\n[gd_loop_actions]\n[gd_loop layout=2]\n[gd_loop_paging]"; @@ -88,24 +84,22 @@ public static function page_search_content($no_filter = false, $blocks = false){ */ public static function page_location_content($no_filter = false, $blocks = false){ if($blocks){ - $content = " -
[gd_notifications]
- + $content = " - -
[gd_categories title='' post_type='0' cpt_title='false' title_tag='h4' cpt_ajax='false' filter_ids='' hide_empty='true' hide_count='false' hide_icon='false' use_image='false' cpt_left='false' sort_by='count' max_level='1' max_count='all' max_count_child='all' no_cpt_filter='false' no_cat_filter='false' design_type='icon-top' row_items='' card_padding_inside='' card_color='' icon_color='' icon_size='box-medium' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_map title='' width='100%' height='300px' maptype='ROADMAP' zoom='0' map_type='directory' post_settings='true' post_type='' terms='' tick_terms='' tags='' all_posts='false' post_id='' search_filter='true' post_type_filter='true' cat_filter='true' child_collapse='true' map_directions='false' scrollwheel='false' sticky='false' static='false' bg='' mt='' mr='' mb='4' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_search bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_listings title='' post_type='gd_place' category='' related_to='' tags='' post_author='' post_limit='6' post_ids='' add_location_filter='true' show_featured_only='false' show_special_only='false' with_pics_only='false' with_videos_only='false' show_favorites_only='false' favorites_by_user='' use_viewing_post_type='false' sort_by='' title_tag='h3' layout='2' view_all_link='true' with_pagination='false' top_pagination='false' bottom_pagination='true' pagination_info='' hide_if_empty='false' row_gap='' column_gap='' card_border='' card_shadow='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
"; }else{ $content = "[gd_notifications]\n[gd_categories]\n[gd_map map_type='directory' width=100% height=300 search_filter=1 cat_filter=1 post_type_filter=1]\n[gd_search]\n[gd_listings post_limit=10 add_location_filter='1']"; @@ -125,24 +119,22 @@ public static function page_location_content($no_filter = false, $blocks = false */ public static function page_archive_content($no_filter = false, $blocks = false){ if($blocks){ - $content = " -
[gd_notifications]
- + $content = " - -
[gd_search bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop_actions bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop layout='2' row_gap='' column_gap='' card_border='' card_shadow='' bg='' mt='' mr='' mb='' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop_paging show_advanced='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
"; }else{ $content = "[gd_notifications]\n[gd_category_description]\n[gd_search]\n[gd_loop_actions]\n[gd_loop layout=2]\n[gd_loop_paging]"; @@ -162,7 +154,7 @@ public static function page_archive_content($no_filter = false, $blocks = false) public static function page_archive_item_content($no_filter = false, $blocks = false){ if($blocks){ - $content = "aaa"; + $content = ""; }else{ $content = "[gd_archive_item_section type='open' position='left'] [gd_post_badge key='featured' condition='is_not_empty' badge='FEATURED' bg_color='#fd4700' txt_color='#ffffff' css_class='gd-ab-top-left-angle gd-badge-shadow'] @@ -201,24 +193,22 @@ public static function page_archive_item_content($no_filter = false, $blocks = f */ public static function page_details_content($no_filter = false,$blocks = false){ if($blocks){ - $content = " -
[gd_notifications]
- + $content = " - -
[gd_post_images title='' types='' fallback_types='' ajax_load='true' limit='' limit_show='' css_class='' type='slider' slideshow='true' controlnav='1' animation='slide' show_title='true' show_caption='true' image_size='' aspect='' cover='' link_to='' link_screenshot_to='' bg='' mt='' mr='' mb='' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_single_taxonomies taxonomy='' prefix='' link_style='' link_color='' link_color_custom='' link_icon='false' mt='' mr='' mb='2' ml='' pt='' pr='' pb='' pl='' ]
+ +
- -
[gd_single_tabs show_as_list='false' output='' tab_style='' disable_greedy='false' ]
+ +
- -
[gd_single_next_prev bg='' mt='4' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
"; }else{ $content = "[gd_notifications]\n[gd_post_images type='slider' ajax_load='true' slideshow='true' show_title='true' animation='slide' controlnav='1' ]\n[gd_single_taxonomies]\n[gd_single_tabs]\n[gd_single_next_prev]"; diff --git a/includes/class-geodir-template-loader.php b/includes/class-geodir-template-loader.php index b7b9def8e..d13120395 100644 --- a/includes/class-geodir-template-loader.php +++ b/includes/class-geodir-template-loader.php @@ -59,6 +59,7 @@ public static function init() { * @param $post_ID * @param $post_after * @param $post_before + * @todo we will need ot updated this for block themes */ public static function set_clear_list_view_storage($post_ID, $post_after, $post_before){ if($post_after->post_type=='page' && has_shortcode( $post_after->post_content, 'gd_loop' ) ){ diff --git a/includes/widgets/class-geodir-widget-loop.php b/includes/widgets/class-geodir-widget-loop.php index f44a8f695..88fa40a08 100644 --- a/includes/widgets/class-geodir-widget-loop.php +++ b/includes/widgets/class-geodir-widget-loop.php @@ -358,10 +358,17 @@ public function output( $args = array(), $widget_args = array(), $content = '' ) } elseif ( geodir_is_page( 'search' ) && ! isset( $_REQUEST['geodir_search'] ) ) { geodir_no_listings_found(); } else { + // Check we are not inside a template builder container if ( isset( $wp_query->posts[0] ) && $wp_query->posts[0]->post_type == 'page' ) { // Reset the query count so the correct number of listings are output. rewind_posts(); + + // Reset the proper loop content + if ( isset( $wp_query->posts[0] ) && $wp_query->posts[0]->post_type == 'page' && geodir_is_page('search') ) { + return ob_get_clean(); + } + // Reset the proper loop content global $wp_query, $gd_temp_wp_query; diff --git a/readme.txt b/readme.txt index 198cbb3f0..73e39da07 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://wpgeodirectory.com Tags: business directory, listings, directory plugin, classifieds, directory Requires at least: 4.5 Tested up to: 6.6 -Stable tag: 2.3.65 +Stable tag: 2.3.66 Requires PHP: 5.6 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -317,9 +317,11 @@ We don't offer free trials, but we have a 30-day money-back guarantee if you are __WARNING: GDv2 is a significant update over GDv1 and may require manual work, such as adding widgets to sidebars to recreate your current layout. As always, we recommend trying this on a staging site first. [Learn more](https://docs.wpgeodirectory.com/article/260-upgrading-from-gdv1-to-gdv2)__ -= GeoDirectory v2.3.65 - 2024-07-17 = += GeoDirectory v2.3.66 - 2024-07-17 = * non FSE themes can fail to render new blocks - FIXED * Image attribute in schema shows location when private address is enabled - FIXED +* More block theme template updates for new block rendering system - CHANGED +* GD Search page not rendering on some themes with new block rendering system - FIXED = GeoDirectory v2.3.64 - 2024-07-16 = * GD > Dynamic Content keys added for logged in, logged out, post author, user roles etc - ADDED diff --git a/templates/bootstrap/block-templates/gd-add-listing.html b/templates/bootstrap/block-templates/gd-add-listing.html index e09f46dd3..b2242b0dd 100644 --- a/templates/bootstrap/block-templates/gd-add-listing.html +++ b/templates/bootstrap/block-templates/gd-add-listing.html @@ -1,11 +1,9 @@ - -
[gd_notifications]
- + - -
[gd_add_listing post_type='' show_login='true' login_msg='' container='' mapzoom='0' label_type='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- \ No newline at end of file + diff --git a/templates/bootstrap/block-templates/gd-archive.html b/templates/bootstrap/block-templates/gd-archive.html index bf770ce9a..20e40e6be 100644 --- a/templates/bootstrap/block-templates/gd-archive.html +++ b/templates/bootstrap/block-templates/gd-archive.html @@ -1,23 +1,21 @@ - -
[gd_notifications]
- + - - + + - -
[gd_loop_actions hide_layouts='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop layout='2' row_gap='' column_gap='' card_border='' card_shadow='' bg='' mt='' mr='' mb='' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop_paging show_advanced='' mid_size='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- \ No newline at end of file + diff --git a/templates/bootstrap/block-templates/gd-location.html b/templates/bootstrap/block-templates/gd-location.html index 0ab1b77ab..c518663ab 100644 --- a/templates/bootstrap/block-templates/gd-location.html +++ b/templates/bootstrap/block-templates/gd-location.html @@ -1,23 +1,21 @@ - -
[gd_notifications]
- + - -
[gd_categories title='' post_type='0' cpt_title='false' title_tag='h4' cpt_ajax='false' filter_ids='' hide_empty='true' hide_count='false' hide_icon='false' use_image='false' image_size='medium' cpt_left='false' sort_by='count' max_level='1' max_count='all' max_count_child='all' no_cpt_filter='false' no_cat_filter='false' widget_title_tag='' widget_title_size_class='' widget_title_align_class='' widget_title_color_class='' widget_title_border_class='' widget_title_border_color_class='' widget_title_mt_class='' widget_title_mr_class='' widget_title_mb_class='' widget_title_ml_class='' widget_title_pt_class='' widget_title_pr_class='' widget_title_pb_class='' widget_title_pl_class='' design_type='icon-top' row_items='' row_positioning='' card_padding_inside='' card_color='' card_shadow='' icon_color='' icon_size='box-medium' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_map title='' width='100%' height='425px' maptype='ROADMAP' zoom='0' map_type='directory' post_settings='true' post_type='' terms='' tick_terms='' tags='' all_posts='false' post_id='' search_filter='true' post_type_filter='true' cat_filter='true' child_collapse='true' map_directions='false' scrollwheel='false' sticky='false' static='false' bg='' mt='' mr='' mb='4' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' country='' region='' city='' neighbourhood='' ]
+ +
- - + + - -
[gd_listings title='' post_type='gd_place' category='' related_to='' tags='' post_author='' post_limit='6' post_ids='' package_ids='' add_location_filter='true' show_featured_only='false' show_special_only='false' with_pics_only='false' with_videos_only='false' show_favorites_only='false' favorites_by_user='' use_viewing_post_type='false' use_viewing_term='false' sort_by='' title_tag='h3' layout='2' view_all_link='true' with_pagination='false' top_pagination='false' bottom_pagination='true' pagination_info='' hide_if_empty='false' row_gap='' column_gap='' card_border='' card_shadow='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' with_carousel='' with_indicators='' with_controls='' slide_interval='5' slide_ride='' linked_posts='' linked_post_id='' country='' region='' city='' neighbourhood='' ]
+ +
- \ No newline at end of file + diff --git a/templates/bootstrap/block-templates/gd-search.html b/templates/bootstrap/block-templates/gd-search.html index a72dc6a3b..20e40e6be 100644 --- a/templates/bootstrap/block-templates/gd-search.html +++ b/templates/bootstrap/block-templates/gd-search.html @@ -1,23 +1,21 @@ - -
[gd_notifications]
- + - - + + - -
[gd_loop_actions hide_layouts='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop layout='2' row_gap='' column_gap='' card_border='' card_shadow='' bg='' mt='' mr='' mb='' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_loop_paging show_advanced='' mid_size='' bg='' mt='' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- \ No newline at end of file + diff --git a/templates/bootstrap/block-templates/gd-single.html b/templates/bootstrap/block-templates/gd-single.html index 9cb32ea6a..99e29e1f8 100644 --- a/templates/bootstrap/block-templates/gd-single.html +++ b/templates/bootstrap/block-templates/gd-single.html @@ -1,23 +1,21 @@ - -
[gd_notifications]
- + - -
[gd_post_images title='' id='' types='' fallback_types='' ajax_load='true' limit='' limit_show='' css_class='' type='slider' slideshow='true' controlnav='1' animation='slide' show_title='true' show_caption='true' image_size='' aspect='' cover='' link_to='' link_screenshot_to='' bg='' mt='' mr='' mb='' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- -
[gd_single_taxonomies taxonomy='' prefix='' link_style='' link_color='' link_color_custom='' link_icon='false' mt='' mr='' mb='2' ml='' pt='' pr='' pb='' pl='' ]
+ +
- -
[gd_single_tabs show_as_list='false' output='' tab_style='' disable_greedy='false' ]
+ +
- -
[gd_single_next_prev bg='' mt='4' mr='' mb='3' ml='' pt='' pr='' pb='' pl='' border='' rounded='' rounded_size='' shadow='' ]
+ +
- \ No newline at end of file +