Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions includes/classes/class-upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,45 +329,6 @@ private function is_custom_field_for_migration( $field ) {
return false;
}

/**
* Normalize field options to array without losing legacy data.
*
* Supports array, object, serialized string, and JSON string formats.
*
* @param mixed $options Raw field options.
* @return array
*/
private function normalize_field_options( $options ) {
if ( is_array( $options ) ) {
return $options;
}

if ( is_object( $options ) ) {
$normalized = json_decode( wp_json_encode( $options ), true );
return is_array( $normalized ) ? $normalized : array();
}

if ( is_string( $options ) && '' !== $options ) {
$unserialized = maybe_unserialize( $options );

if ( is_array( $unserialized ) ) {
return $unserialized;
}

if ( is_object( $unserialized ) ) {
$normalized = json_decode( wp_json_encode( $unserialized ), true );
return is_array( $normalized ) ? $normalized : array();
}

$decoded = json_decode( $options, true );
if ( JSON_ERROR_NONE === json_last_error() && is_array( $decoded ) ) {
return $decoded;
}
}

return array();
}

/**
* Get conditional logic from field safely.
*
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Directorist comes with an AI-powered directory builder. Use the Create with AI o

== Changelog ==

= 8.6 - Feb 25, 2026 =
= 8.6 - Mar 3, 2026 =

**Added**
- Conditional Logic support across all form fields in both Listing Form and Search Form. Fields can now dynamically show or hide based on other field values, allowing more advanced and flexible form configurations. (#2711)
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.5.4
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/color_picker.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.3.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.3.3
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/number.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 8.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/radio.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/select.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.3.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.4.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/time.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.0.5.3
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/address.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.0.5.6
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.7
* @version 7.8.0
* @version 8.6
*/

$placeholder = $data['placeholder'] ?? '';
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/description.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.4.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/excerpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.0.5.6
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/fax.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/hide_contact_owner.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/image_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.7.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/listing-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/location.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.7
* @version 7.8.0
* @version 8.6
*/

$placeholder = $data['placeholder'] ?? '';
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.4.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/phone2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/pricing.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 8.2
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/social_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

use \Directorist\Helper;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.7
* @version 7.8.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/tagline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/terms_privacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 8.0
* @version 8.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/title.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/video.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/website.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 6.7
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/listing-form/fields/zip.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.0.5.3
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/search-form/custom-fields/checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 8.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/search-form/custom-fields/color_picker.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.3.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/search-form/custom-fields/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 7.0.5.3
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/search-form/custom-fields/number.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 6.6
* @version 8.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
2 changes: 1 addition & 1 deletion templates/search-form/custom-fields/number/dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @author wpWax
* @since 8.0
* @version 8.0
* @version 8.6
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand Down
Loading