You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Updated the delete_location_grid_meta method to include an optional parameter for location_meta_field_settings, allowing for better handling of shared dt rows.
- Improved the logic to unlink fields and delete metadata only when necessary, enhancing performance and preventing unintended data loss.
- Adjusted calls to delete_location_grid_meta throughout the codebase to accommodate the new parameter, ensuring consistent behavior across the application.
Copy file name to clipboardExpand all lines: dt-mapping/location-grid-meta.php
+25-10Lines changed: 25 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -215,8 +215,9 @@ public static function add_location_grid_meta( $post_id, array $location_grid_me
215
215
* @param int $value
216
216
* @param array|null $existing_post
217
217
* @param string $location_meta_field_key DT field key for postmeta pointers (default location_grid_meta).
218
+
* @param array|null $location_meta_field_settings Field definitions for the post type; when set, shared dt rows are not removed while another location_meta field still references the grid_meta_id.
0 commit comments