Order by metadatum value the results of fetch all metadatum values

This commit is contained in:
weryques 2018-07-31 10:06:54 -03:00
parent 3af62e3539
commit a04a8b93d9
2 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,10 @@
width: 100%; width: 100%;
} }
.modal {
display: inline-block;
}
.tainacan-modal-title { .tainacan-modal-title {
h1, h2 { h1, h2 {
font-size: 20px; font-size: 20px;

View File

@ -860,7 +860,7 @@ class Metadata extends Repository {
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
FROM $wpdb->postmeta $search_query FROM $wpdb->postmeta $search_query
) metas ) metas
ON items.item_id = metas.post_id AND metas.metadatum_id = %d", ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
$item_post_type, $post_status, $metadatum_id $item_post_type, $post_status, $metadatum_id
); );
} else { } else {
@ -875,7 +875,7 @@ class Metadata extends Repository {
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
FROM $wpdb->postmeta $search_query FROM $wpdb->postmeta $search_query
) metas ) metas
ON items.item_id = metas.post_id AND metas.metadatum_id = %d", ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
$post_status, $metadatum_id $post_status, $metadatum_id
); );
} }
@ -906,7 +906,7 @@ class Metadata extends Repository {
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
FROM $wpdb->postmeta $search_query FROM $wpdb->postmeta $search_query
) metas ) metas
ON items.item_id = metas.post_id AND metas.metadatum_id = %d", ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
$item_post_type, $post_status, $metadatum_id $item_post_type, $post_status, $metadatum_id
); );
} else { } else {
@ -921,7 +921,7 @@ class Metadata extends Repository {
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
FROM $wpdb->postmeta $search_query FROM $wpdb->postmeta $search_query
) metas ) metas
ON items.item_id = metas.post_id AND metas.metadatum_id = %d", ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
$post_status, $metadatum_id $post_status, $metadatum_id
); );
} }