From 1235894559f0523b925551bdee28a5ed610c16ce Mon Sep 17 00:00:00 2001 From: Simon Tiplady <62300999+shakethatweight-simon@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:56:31 +0100 Subject: [PATCH] Sort meta fields by group_id first If meta fields are grouped, then it would be useful to keep related fields together when displaying them --- pro-features/plus/meta-fields/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pro-features/plus/meta-fields/db.php b/pro-features/plus/meta-fields/db.php index 9333c873..f4b85c79 100755 --- a/pro-features/plus/meta-fields/db.php +++ b/pro-features/plus/meta-fields/db.php @@ -232,7 +232,7 @@ function ws_ls_meta_fields( $exclude_system = true, $ignore_cache = false ) { $sql .= ' Where `system` = 0'; } - $sql .= ' order by sort, field_name asc'; + $sql .= ' order by group_id, sort, field_name asc'; $data = $wpdb->get_results( $sql , ARRAY_A );