Make WordPress Core

Ticket #1865: metakeys_filterable_limit.diff

File metakeys_filterable_limit.diff, 685 bytes (added by coffee2code, 19 years ago)

Solution 2: Make LIMIT value filterable

  • wp-admin/admin-functions.php

     
    763763
    764764function meta_form() {
    765765        global $wpdb;
     766        $limit = apply_filters('meta_form_limit', 50);
    766767        $keys = $wpdb->get_col("
    767768                        SELECT meta_key
    768769                        FROM $wpdb->postmeta
    769770                        GROUP BY meta_key
    770771                        ORDER BY meta_id DESC
    771                         LIMIT 10");
     772                        LIMIT $limit");
    772773?>
    773774<h3><?php _e('Add a new custom field:') ?></h3>
    774775<table cellspacing="3" cellpadding="3">
     
    17331734                return array((int) ($width / $height * $hmax), $hmax);
    17341735}
    17351736
    1736 ?>
    1737  No newline at end of file
     1737?>