From f48595ab361f42472bb173f781905e5c76430333 Mon Sep 17 00:00:00 2001 From: stiofan Date: Thu, 9 May 2024 12:54:31 +0100 Subject: [PATCH] * Dummy data import does not support external images - FIXED --- .../admin/class-geodir-admin-dummy-data.php | 7 ++++ includes/class-geodir-ajax.php | 5 +++ .../widgets/class-geodir-widget-listings.php | 6 +++ readme.txt | 2 + .../wp-ayecode-ui/ayecode-ui-loader.php | 2 +- vendor/ayecode/wp-ayecode-ui/change-log.txt | 3 +- .../includes/ayecode-ui-settings.php | 2 +- .../wp-ayecode-ui/includes/inc/bs4-js.php | 2 +- .../wp-ayecode-ui/includes/inc/bs5-js.php | 37 ++++++++++++++++--- vendor/composer/installed.json | 14 +++---- vendor/composer/installed.php | 10 ++--- 11 files changed, 69 insertions(+), 21 deletions(-) diff --git a/includes/admin/class-geodir-admin-dummy-data.php b/includes/admin/class-geodir-admin-dummy-data.php index 3ba75186..5708c0e0 100644 --- a/includes/admin/class-geodir-admin-dummy-data.php +++ b/includes/admin/class-geodir-admin-dummy-data.php @@ -501,6 +501,13 @@ public static function create_dummy_posts( $request ) { $post_info['post_status'] = 'publish'; } + // Set all images except first one to be external for speed + if( !empty($post_info['post_images'] ) ){ + for ($i = 1; $i < count($post_info['post_images']); $i++) { + $post_info['post_images'][$i] = '#' . $post_info['post_images'][$i]; + } + } + wp_insert_post( $post_info, true ); // we hook into the save_post hook } } diff --git a/includes/class-geodir-ajax.php b/includes/class-geodir-ajax.php index d1cffb8e..e8e4e8c8 100644 --- a/includes/class-geodir-ajax.php +++ b/includes/class-geodir-ajax.php @@ -878,6 +878,11 @@ public static function insert_dummy_data(){ wp_die( -1 ); } + // defind doing import + if( ! defined( 'GEODIR_DOING_IMPORT' ) ){ + define( 'GEODIR_DOING_IMPORT', true ); + } + //Suspend cache additions wp_suspend_cache_addition(true); diff --git a/includes/widgets/class-geodir-widget-listings.php b/includes/widgets/class-geodir-widget-listings.php index a6e7c968..7eeb204b 100644 --- a/includes/widgets/class-geodir-widget-listings.php +++ b/includes/widgets/class-geodir-widget-listings.php @@ -119,6 +119,12 @@ public function set_arguments() { 'advanced' => false, 'group' => __( 'Title', 'geodirectory' ), ); + + if ( $design_style ) { + // title styles + $arguments = $arguments + geodir_get_sd_title_inputs(); + } + $arguments['hide_if_empty'] = array( 'title' => __( 'Hide widget if no posts?', 'geodirectory' ), 'type' => 'checkbox', diff --git a/readme.txt b/readme.txt index 97d7999c..bf286a4b 100644 --- a/readme.txt +++ b/readme.txt @@ -308,7 +308,9 @@ __WARNING: GDv2 is a significant update over GDv1 and may require manual work, s = GeoDirectory v2.3.52 - TBD = * AUI radio set should skip showing optgroup from option values - FIXED +* GD > Listings block missing title attribute settings - ADDED/FIXED * PHP Warning: Undefined array key "heading_tag" - FIXED +* Dummy data import does not support external images - FIXED * Add "id" as reserved field to prevent custom field with id key - CHANGED = GeoDirectory v2.3.51 - 2024-05-02 = diff --git a/vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php b/vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php index 163a658a..841759cb 100644 --- a/vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php +++ b/vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php @@ -15,7 +15,7 @@ */ add_action('after_setup_theme', function () { global $ayecode_ui_version,$ayecode_ui_file_key; - $this_version = "0.2.13"; + $this_version = "0.2.14"; if(empty($ayecode_ui_version) || version_compare($this_version , $ayecode_ui_version, '>')){ $ayecode_ui_version = $this_version ; $ayecode_ui_file_key = wp_hash( __FILE__ ); diff --git a/vendor/ayecode/wp-ayecode-ui/change-log.txt b/vendor/ayecode/wp-ayecode-ui/change-log.txt index 4b7dfbe4..2fad5dd3 100644 --- a/vendor/ayecode/wp-ayecode-ui/change-log.txt +++ b/vendor/ayecode/wp-ayecode-ui/change-log.txt @@ -1,5 +1,6 @@ -= 0.2.14 - TBD = += 0.2.14 - 2024-05-09 = * Label type top don't have margin to label - FIXED +* Improvements for aui_lightbox_embed() function - CHANGED = 0.2.13 - 2024-05-02 = * BS4 lightbox displays blurred image - FIXED diff --git a/vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php b/vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php index 21445796..d920e9b1 100644 --- a/vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php +++ b/vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php @@ -35,7 +35,7 @@ class AyeCode_UI_Settings { * * @var string */ - public $version = '0.2.13'; + public $version = '0.2.14'; /** * Class textdomain. diff --git a/vendor/ayecode/wp-ayecode-ui/includes/inc/bs4-js.php b/vendor/ayecode/wp-ayecode-ui/includes/inc/bs4-js.php index f71e3cbd..796b10b8 100644 --- a/vendor/ayecode/wp-ayecode-ui/includes/inc/bs4-js.php +++ b/vendor/ayecode/wp-ayecode-ui/includes/inc/bs4-js.php @@ -561,7 +561,7 @@ function aui_lightbox_embed($link,ele){ // remove it first jQuery('.aui-carousel-modal').remove(); - var $modal = ''; + var $modal = ''; jQuery('body').append($modal); jQuery('.aui-carousel-modal').modal({ diff --git a/vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php b/vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php index 7d28350b..b76e5ff3 100644 --- a/vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php +++ b/vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php @@ -597,7 +597,7 @@ function aui_lightbox_embed($link,ele){ // remove it first jQuery('.aui-carousel-modal').remove(); - var $modal = ''; + var $modal = ''; jQuery('body').append($modal); const ayeModal = new bootstrap.Modal('.aui-carousel-modal', {}); @@ -639,7 +639,7 @@ function aui_lightbox_embed($link,ele){ // items $i = 0; - $carousel += ''; $i++; diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index b1b0954b..90c4675d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -55,20 +55,20 @@ }, { "name": "ayecode/wp-ayecode-ui", - "version": "0.2.13", - "version_normalized": "0.2.13.0", + "version": "0.2.14", + "version_normalized": "0.2.14.0", "source": { "type": "git", "url": "https://github.com/AyeCode/wp-ayecode-ui.git", - "reference": "45b6db6d436846578625cf852fcf9b98bf53f5f3" + "reference": "c9c391767426da6e7ebc023eb95f52cee644b8df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AyeCode/wp-ayecode-ui/zipball/45b6db6d436846578625cf852fcf9b98bf53f5f3", - "reference": "45b6db6d436846578625cf852fcf9b98bf53f5f3", + "url": "https://api.github.com/repos/AyeCode/wp-ayecode-ui/zipball/c9c391767426da6e7ebc023eb95f52cee644b8df", + "reference": "c9c391767426da6e7ebc023eb95f52cee644b8df", "shasum": "" }, - "time": "2024-05-02T14:17:46+00:00", + "time": "2024-05-09T11:51:46+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -97,7 +97,7 @@ ], "support": { "issues": "https://github.com/AyeCode/wp-ayecode-ui/issues", - "source": "https://github.com/AyeCode/wp-ayecode-ui/tree/0.2.13" + "source": "https://github.com/AyeCode/wp-ayecode-ui/tree/0.2.14" }, "install-path": "../ayecode/wp-ayecode-ui" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 7efbc44c..4d7d0378 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'ayecode/geodirectory', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'e27c6106d5ee33b08827f927f3daf73e82933a0c', + 'reference' => 'ad2064f097572c4e645f7463d6e0e74ef853be2b', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -22,16 +22,16 @@ 'ayecode/geodirectory' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'e27c6106d5ee33b08827f927f3daf73e82933a0c', + 'reference' => 'ad2064f097572c4e645f7463d6e0e74ef853be2b', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'ayecode/wp-ayecode-ui' => array( - 'pretty_version' => '0.2.13', - 'version' => '0.2.13.0', - 'reference' => '45b6db6d436846578625cf852fcf9b98bf53f5f3', + 'pretty_version' => '0.2.14', + 'version' => '0.2.14.0', + 'reference' => 'c9c391767426da6e7ebc023eb95f52cee644b8df', 'type' => 'library', 'install_path' => __DIR__ . '/../ayecode/wp-ayecode-ui', 'aliases' => array(),