Changeset 4413 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 10/22/2006 03:18:07 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4408 r4413 1025 1025 function meta_form() { 1026 1026 global $wpdb; 1027 $limit = (int) apply_filters('postmeta_form_limit', 30); 1027 1028 $keys = $wpdb->get_col(" 1028 SELECT meta_key 1029 FROM $wpdb->postmeta 1030 GROUP BY meta_key 1031 ORDER BY meta_id DESC 1032 LIMIT 10"); 1029 SELECT meta_key 1030 FROM $wpdb->postmeta 1031 GROUP BY meta_key 1032 ORDER BY meta_id DESC 1033 LIMIT $limit"); 1034 natcasesort($keys); 1033 1035 ?> 1034 1036 <h3><?php _e('Add a new custom field:') ?></h3> … … 1040 1042 <tr valign="top"> 1041 1043 <td align="right" width="18%"> 1042 <?php if ( $keys) : ?>1044 <?php if ( $keys ) : ?> 1043 1045 <select id="metakeyselect" name="metakeyselect" tabindex="7"> 1044 1046 <option value="#NONE#"><?php _e('- Select -'); ?></option> 1045 1047 <?php 1046 1048 1047 foreach ( $keys as $key) {1049 foreach ( $keys as $key ) { 1048 1050 $key = wp_specialchars($key, 1); 1049 1051 echo "\n\t<option value='$key'>$key</option>";
Note: See TracChangeset
for help on using the changeset viewer.