diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 87236d4846..a0e433a5e9 100644
|
a
|
b
|
function _list_meta_row( $entry, &$count ) { |
| 573 | 573 | * Prints the form in the Custom Fields meta box. |
| 574 | 574 | * |
| 575 | 575 | * @since 1.2.0 |
| | 576 | * @since x.x.x The default list of meta keys used to populate the dropdown was removed. |
| 576 | 577 | * |
| 577 | 578 | * @global wpdb $wpdb WordPress database abstraction object. |
| 578 | 579 | * |
| … |
… |
function meta_form( $post = null ) { |
| 595 | 596 | */ |
| 596 | 597 | $keys = apply_filters( 'postmeta_form_keys', null, $post ); |
| 597 | 598 | |
| 598 | | if ( null === $keys ) { |
| 599 | | /** |
| 600 | | * Filters the number of custom fields to retrieve for the drop-down |
| 601 | | * in the Custom Fields meta box. |
| 602 | | * |
| 603 | | * @since 2.1.0 |
| 604 | | * |
| 605 | | * @param int $limit Number of custom fields to retrieve. Default 30. |
| 606 | | */ |
| 607 | | $limit = apply_filters( 'postmeta_form_limit', 30 ); |
| 608 | | $sql = "SELECT DISTINCT meta_key |
| 609 | | FROM $wpdb->postmeta |
| 610 | | WHERE meta_key NOT BETWEEN '_' AND '_z' |
| 611 | | HAVING meta_key NOT LIKE %s |
| 612 | | ORDER BY meta_key |
| 613 | | LIMIT %d"; |
| 614 | | $keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( '_' ) . '%', $limit ) ); |
| 615 | | } |
| 616 | | |
| 617 | 599 | if ( $keys ) { |
| 618 | 600 | natcasesort( $keys ); |
| 619 | 601 | $meta_key_input_id = 'metakeyselect'; |