Better meta form query. Props Denis-de-Bernardy. fixes #9684
git-svn-id: http://svn.automattic.com/wordpress/trunk@11196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc57e47e02
commit
5d499eb3fd
|
@ -2458,15 +2458,11 @@ function meta_form() {
|
|||
SELECT meta_key
|
||||
FROM $wpdb->postmeta
|
||||
GROUP BY meta_key
|
||||
ORDER BY meta_key
|
||||
HAVING meta_key NOT LIKE '\_%'
|
||||
ORDER BY LOWER(meta_key)
|
||||
LIMIT $limit" );
|
||||
if ( $keys ) {
|
||||
function filter_private_keys($key) {
|
||||
return ( 0 === strpos($key, '_') ) ? false : true;
|
||||
}
|
||||
$keys = array_filter($keys, 'filter_private_keys');
|
||||
if ( $keys )
|
||||
natcasesort($keys);
|
||||
}
|
||||
?>
|
||||
<p><strong><?php _e( 'Add new custom field:' ) ?></strong></p>
|
||||
<table id="newmeta">
|
||||
|
|
Loading…
Reference in New Issue