diff --git a/README.TXT b/README.TXT index cc1990629..12d7ad33a 100644 --- a/README.TXT +++ b/README.TXT @@ -4,7 +4,7 @@ Tags: business directory, listings, directory plugin, staff directory, member di Requires at least: 5.9 Requires PHP: 7.4 Tested up to: 7.0 -Stable tag: 6.4.24 +Stable tag: 6.4.25 License: GPLv2 or later The easy Business Directory Plugin for WordPress. Build an easy team directory, member directory, staff directory, church directory, and more. @@ -158,6 +158,12 @@ Yes it is. However, you cannot "network activate" the plugin (as this will share This can be done under Plugins -> Add New as the Administrator user. Do not "network activate" as the "super admin". == Changelog == += 6.4.25 = +* Fix: Sticky listings not sorting correctly when using plan order sort options +* Fix: Translated listings showing empty field values instead of falling back to the original listing +* Fix: WPML translation jobs not saving custom field values for translated listings +* Fix: Legacy template block metadata not recognized in some themes + = 6.4.24 = * Fix: Issues in admin form field and fee reorder actions * Fix: Issues downloading and installing theme updates @@ -229,8 +235,3 @@ This can be done under Plugins -> Add New as the Administrator user. Do not "net = 6.4.9 = * New: Added Stripe payment gateway - -= 6.4.8 = -* Fix: Issue with the redirect chain for the new login redirect feature - -See changelog for all versions diff --git a/business-directory-plugin.php b/business-directory-plugin.php index 44e294cad..b322587b3 100644 --- a/business-directory-plugin.php +++ b/business-directory-plugin.php @@ -3,7 +3,7 @@ * Plugin Name: Business Directory Plugin * Plugin URI: https://businessdirectoryplugin.com * Description: Provides the ability to maintain a free or paid business directory on your WordPress powered site. - * Version: 6.4.24 + * Version: 6.4.25 * Author: Business Directory Team * Author URI: https://businessdirectoryplugin.com * Text Domain: business-directory-plugin diff --git a/includes/class-query-integration.php b/includes/class-query-integration.php index ebd0d55b8..2a8b8568e 100644 --- a/includes/class-query-integration.php +++ b/includes/class-query-integration.php @@ -369,7 +369,7 @@ private function get_sticky_listing_ids( $query ) { /** * Get the SQL query for sticky listing ids. * - * @since x.x + * @since 6.4.25 * * @param string $order_by The orderby value from the current query. * @param string $order The normalized order direction. @@ -428,7 +428,7 @@ private function get_sticky_listing_ids_query( $order_by, $order ) { /** * Get the cache key for sticky listing ids. * - * @since x.x + * @since 6.4.25 * * @param string $order_by The orderby value from the current query. * @param string $order The normalized order direction. diff --git a/includes/class-wpbdp.php b/includes/class-wpbdp.php index 52110fdfa..6bf34094c 100644 --- a/includes/class-wpbdp.php +++ b/includes/class-wpbdp.php @@ -57,7 +57,7 @@ public function __construct() { } private function setup_constants() { - define( 'WPBDP_VERSION', '6.4.24' ); + define( 'WPBDP_VERSION', '6.4.25' ); define( 'WPBDP_PATH', wp_normalize_path( plugin_dir_path( WPBDP_PLUGIN_FILE ) ) ); define( 'WPBDP_INC', trailingslashit( WPBDP_PATH . 'includes' ) ); diff --git a/includes/compatibility/class-wpml-compat.php b/includes/compatibility/class-wpml-compat.php index b8536f267..df98f51e0 100644 --- a/includes/compatibility/class-wpml-compat.php +++ b/includes/compatibility/class-wpml-compat.php @@ -567,7 +567,7 @@ public function search_lang_field() { /** * Fall back to the original listing's field value when the translated post has none. * - * @since x.x + * @since 6.4.25 * * @param mixed $value The field value (may be empty on translated posts). * @param int $post_id The current listing post ID. @@ -598,7 +598,7 @@ public function maybe_use_original_field_value( $value, $post_id, $field ) { /** * Fall back to the original listing's HTML value when a field type bypasses value filters. * - * @since x.x + * @since 6.4.25 * * @param string $value The field HTML value. * @param int $post_id The current listing post ID. @@ -624,7 +624,7 @@ public function maybe_use_original_field_html_value( $value, $post_id, $field, $ /** * Get the original (source) listing ID for a translated post. * - * @since x.x + * @since 6.4.25 * * @param int $listing_id The translated listing post ID. * @@ -657,7 +657,7 @@ private function get_original_listing_id( $listing_id ) { /** * Fallback to find original listing using default language lookup. * - * @since x.x + * @since 6.4.25 * * @param int $listing_id The translated listing post ID. * @@ -682,7 +682,7 @@ private function get_original_listing_id_fallback( $listing_id ) { /** * Register BD custom field meta keys with WPML as translatable fields. * - * @since x.x + * @since 6.4.25 */ public function register_custom_fields_with_wpml() { if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) { @@ -743,7 +743,7 @@ public function register_custom_fields_with_wpml() { /** * Translate field category restrictions to the active language. * - * @since x.x + * @since 6.4.25 * * @param mixed $categories The supported categories field setting. * @@ -776,7 +776,7 @@ private function translate_supported_categories( $categories ) { /** * Save translated BD field values from WPML jobs. * - * @since x.x + * @since 6.4.25 * * @param int $post_id The translated listing post ID. * @param array $fields Job fields. @@ -809,7 +809,7 @@ public function save_translated_field_values( $post_id, $fields, $job ) { /** * Get translated custom field values from a WPML job without relying on WPML's bracket-sensitive regex. * - * @since x.x + * @since 6.4.25 * * @param string $meta_key The custom field meta key. * @param object $job WPML translation job. @@ -847,7 +847,7 @@ private function get_translated_custom_field_values_from_job( $meta_key, $job ) /** * Get a translated WPML job element value. * - * @since x.x + * @since 6.4.25 * * @param string $field_type The job field type. * @param object $job WPML translation job. @@ -870,7 +870,7 @@ private function get_job_element_translation( $field_type, $job ) { /** * Decode a WPML job value. * - * @since x.x + * @since 6.4.25 * * @param string $value The encoded value. * @param string $format The value format. @@ -898,7 +898,7 @@ private function decode_wpml_job_value( $value, $format ) { /** * Decode a WPML field path part. * - * @since x.x + * @since 6.4.25 * * @param string $path_part The encoded path part. * @@ -911,7 +911,7 @@ private function decode_wpml_job_path_part( $path_part ) { /** * Set a nested array value by path. * - * @since x.x + * @since 6.4.25 * * @param array $values The values array. * @param array $path The path to set. diff --git a/includes/fields/class-fieldtypes-radiobutton.php b/includes/fields/class-fieldtypes-radiobutton.php index 96437b1f5..c8fb939cd 100644 --- a/includes/fields/class-fieldtypes-radiobutton.php +++ b/includes/fields/class-fieldtypes-radiobutton.php @@ -17,7 +17,7 @@ class WPBDP_FieldTypes_RadioButton extends WPBDP_Form_Field_Type { /** * Meta radio inputs rejected during conversion. * - * @since x.x + * @since 6.4.25 * * @var array */ @@ -34,7 +34,7 @@ public function get_id() { /** * Convert submitted radio field input to a safe stored value. * - * @since x.x + * @since 6.4.25 * * @param WPBDP_Form_Field $field Field object. * @param mixed $input Submitted value. @@ -259,7 +259,7 @@ public function get_field_value( &$field, $post_id ) { /** * Return escaped HTML-safe output for radio field values. * - * @since x.x + * @since 6.4.25 * * @param WPBDP_Form_Field $field Field object. * @param int|string $post_id Listing ID. @@ -294,7 +294,7 @@ public function get_field_plain_value( &$field, $post_id ) { /** * Return configured radio options as stored string values. * - * @since x.x + * @since 6.4.25 * * @param WPBDP_Form_Field $field Field object. * diff --git a/includes/themes.php b/includes/themes.php index 64d39c29e..8839cf96a 100644 --- a/includes/themes.php +++ b/includes/themes.php @@ -683,7 +683,7 @@ private function get_template_meta( $template_path ) { /** * Gets template metadata from the old `$__template__` declaration. * - * @since x.x + * @since 6.4.25 * * @param string $template_path Path to the template file. * @@ -723,7 +723,7 @@ private function get_legacy_template_meta( $template_path ) { /** * Extracts quoted values from old template metadata arrays. * - * @since x.x + * @since 6.4.25 * * @param string $values List of values from a legacy template metadata array. * diff --git a/includes/utils.php b/includes/utils.php index d718873d6..ece271575 100644 --- a/includes/utils.php +++ b/includes/utils.php @@ -715,7 +715,7 @@ function wpbdp_get_current_domain( $www = true, $prefix = '' ) { /** * Build a Business Directory user agent for outbound HTTP requests. * - * @since x.x + * @since 6.4.25 * * @param string $product Product name. * @param string|null $version Product version. @@ -745,7 +745,7 @@ function wpbdp_http_user_agent( $product = 'Business Directory', $version = null /** * Check if a URL points to the Business Directory domain. * - * @since x.x + * @since 6.4.25 * * @param string $url The URL to check. * @@ -766,7 +766,7 @@ function wpbdp_is_business_directory_request_url( $url ) { /** * Add the Business Directory user agent to package downloads from our servers. * - * @since x.x + * @since 6.4.25 * * @param array $args HTTP request args. * @param string $url Request URL. diff --git a/tests/wpunit/Fields/RadioButtonFieldTest.php b/tests/wpunit/Fields/RadioButtonFieldTest.php index 1a49e9a37..23601b54e 100644 --- a/tests/wpunit/Fields/RadioButtonFieldTest.php +++ b/tests/wpunit/Fields/RadioButtonFieldTest.php @@ -19,7 +19,7 @@ class RadioButtonFieldTest extends WPUnitTestCase { protected $tester; /** - * @since x.x + * @since 6.4.25 */ public function testRadioMetaFieldStoresValidSubmittedOption() { $field = $this->create_radio_field(); @@ -35,7 +35,7 @@ public function testRadioMetaFieldStoresValidSubmittedOption() { } /** - * @since x.x + * @since 6.4.25 */ public function testRadioMetaFieldStoresSubmittedOptionWithLessThanCharacter() { $field = $this->create_radio_field_with_options( array( 'Price < 100', 'Price >= 100' ) ); @@ -53,7 +53,7 @@ public function testRadioMetaFieldStoresSubmittedOptionWithLessThanCharacter() { } /** - * @since x.x + * @since 6.4.25 */ public function testRadioMetaFieldRejectsSubmittedOptionNotConfiguredOnField() { $field = $this->create_radio_field(); @@ -70,7 +70,7 @@ public function testRadioMetaFieldRejectsSubmittedOptionNotConfiguredOnField() { } /** - * @since x.x + * @since 6.4.25 */ public function testRadioMetaFieldPreservesStoredOptionWhenSubmittedOptionNotConfiguredOnField() { $field = $this->create_radio_field(); @@ -93,7 +93,7 @@ public function testRadioMetaFieldPreservesStoredOptionWhenSubmittedOptionNotCon } /** - * @since x.x + * @since 6.4.25 */ public function testRadioMetaFieldClearsStoredOptionWhenSubmittedEmpty() { $field = $this->create_radio_field(); @@ -115,7 +115,7 @@ public function testRadioMetaFieldClearsStoredOptionWhenSubmittedEmpty() { } /** - * @since x.x + * @since 6.4.25 */ public function testRadioMetaFieldEscapesLegacyStoredValueForHtmlDisplay() { $field = $this->create_radio_field(); @@ -128,7 +128,7 @@ public function testRadioMetaFieldEscapesLegacyStoredValueForHtmlDisplay() { } /** - * @since x.x + * @since 6.4.25 * * @return WPBDP_Form_Field */ @@ -137,7 +137,7 @@ private function create_radio_field() { } /** - * @since x.x + * @since 6.4.25 * * @param string[] $options Radio field options. * @@ -166,7 +166,7 @@ private function create_radio_field_with_options( $options ) { } /** - * @since x.x + * @since 6.4.25 * * @return int */ diff --git a/tests/wpunit/Listing/ListingQuerySortTest.php b/tests/wpunit/Listing/ListingQuerySortTest.php index a764028ea..7dd8c5912 100644 --- a/tests/wpunit/Listing/ListingQuerySortTest.php +++ b/tests/wpunit/Listing/ListingQuerySortTest.php @@ -31,7 +31,7 @@ class ListingQuerySortTest extends WPUnitTestCase { private $created_plan_ids = array(); /** - * @since x.x + * @since 6.4.25 */ protected function after_setup() { wpbdp_set_option( @@ -46,7 +46,7 @@ protected function after_setup() { } /** - * @since x.x + * @since 6.4.25 */ public function tearDown() : void { foreach ( $this->created_listing_ids as $listing_id ) { @@ -66,7 +66,7 @@ public function tearDown() : void { } /** - * @since x.x + * @since 6.4.25 */ public function testStickyListingsUsePlanOrderTitleSort() { $plan = $this->create_fee_plan( 'sticky_plan_order_title', 10 ); @@ -87,7 +87,7 @@ public function testStickyListingsUsePlanOrderTitleSort() { } /** - * @since x.x + * @since 6.4.25 */ public function testStickyListingsUsePlanOrderDateSort() { $plan = $this->create_fee_plan( 'sticky_plan_order_date', 10 ); @@ -103,7 +103,7 @@ public function testStickyListingsUsePlanOrderDateSort() { } /** - * @since x.x + * @since 6.4.25 * * @param string $tag Fee plan tag. * @param int $weight Fee plan weight. @@ -139,7 +139,7 @@ private function create_fee_plan( $tag, $weight ) { } /** - * @since x.x + * @since 6.4.25 * * @param string $title Post title. * @param WPBDP__Fee_Plan $plan Fee plan. @@ -167,7 +167,7 @@ private function create_listing_on_plan( $title, $plan, $date ) { } /** - * @since x.x + * @since 6.4.25 * * @param string $order_by Order by value. * @param string $order Order direction. diff --git a/themes/default/theme.json b/themes/default/theme.json index eb5302abb..f2998ad55 100644 --- a/themes/default/theme.json +++ b/themes/default/theme.json @@ -1,7 +1,7 @@ { "name": "Default Theme", "description": "A clean, basic look. This theme is always installed and cannot be removed.", - "version": "6.4.24", + "version": "6.4.25", "author": "Business Directory Team", "author_email": "support@businessdirectoryplugin.com", "author_url": "https://businessdirectoryplugin.com", diff --git a/themes/no_theme/theme.json b/themes/no_theme/theme.json index d0a4c5b9d..d31f1fcc5 100644 --- a/themes/no_theme/theme.json +++ b/themes/no_theme/theme.json @@ -1,7 +1,7 @@ { "name": "No Theme", "description": "If you customized your directory templates and don’t want to use our themes, use this option.", - "version": "6.4.24", + "version": "6.4.25", "author": "Business Directory Team", "author_email": "support@businessdirectoryplugin.com", "author_url": "https://businessdirectoryplugin.com",