WordPress.org

Make WordPress Core

Changeset 11196


Ignore:
Timestamp:
05/05/09 05:40:03 (5 years ago)
Author:
ryan
Message:

Better meta form query. Props Denis-de-Bernardy. fixes #9684

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r11191 r11196  
    24592459        FROM $wpdb->postmeta 
    24602460        GROUP BY meta_key 
    2461         ORDER BY meta_key 
     2461        HAVING meta_key NOT LIKE '\_%' 
     2462        ORDER BY LOWER(meta_key) 
    24622463        LIMIT $limit" ); 
    2463     if ( $keys ) { 
    2464         function filter_private_keys($key) { 
    2465             return ( 0 === strpos($key, '_') ) ? false : true; 
    2466         } 
    2467         $keys = array_filter($keys, 'filter_private_keys'); 
     2464    if ( $keys ) 
    24682465        natcasesort($keys); 
    2469     } 
    24702466?> 
    24712467<p><strong><?php _e( 'Add new custom field:' ) ?></strong></p> 
Note: See TracChangeset for help on using the changeset viewer.