From 0e51961694ac5165193bd01592492ee55f1c4985 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sun, 22 Oct 2006 03:18:07 +0000 Subject: [PATCH] increase postmeta dropdown limit to 30, add filter for the limit, sort the keys. props Alex King. fixes #3237 git-svn-id: https://develop.svn.wordpress.org/trunk@4413 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-functions.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 0b2ed2ccab..b2e1908f86 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1024,12 +1024,14 @@ function get_meta_keys() { function meta_form() { global $wpdb; + $limit = (int) apply_filters('postmeta_form_limit', 30); $keys = $wpdb->get_col(" - SELECT meta_key - FROM $wpdb->postmeta - GROUP BY meta_key - ORDER BY meta_id DESC - LIMIT 10"); + SELECT meta_key + FROM $wpdb->postmeta + GROUP BY meta_key + ORDER BY meta_id DESC + LIMIT $limit"); + natcasesort($keys); ?>

@@ -1039,12 +1041,12 @@ function meta_form() {
- +