Admin custom field key dropdown has hardcoded limit of 10
|Reported by:||coffee2code||Owned by:||anonymous|
|Severity:||normal||Keywords:||meta_key custom fields custom fields has-patch|
meta_form() in wp-admin/admin-functions.php, which is used in the admin post interface to create the "Add a new custom field:" section, has a hardcoded value of 10 as the LIMIT for the SQL request for meta keys. I've had numerous people contact me after they've exceeded having 10 custom fields and were wondering why some of their keys no longer appeared in the dropdown. My only recommendation has been to modify the core file.
Why was the meta keys dropdown field given such a small limit, or even one at all? Personally I'd favor dropping the LIMIT part of the query (attached as metakeys_no_limit.diff) or at least giving people a shot at changing it without modifying the core (attached as metakeys_filterable_limit.diff; in which the limit value is defined as:
$limit = apply_filters('meta_form_limit', 50);
(notice the default of 50)).
Another alternative would've been to make the value an option (with or without an interface field to allow changing it), but I didn't think that would fly as much.
Change History (6)
- Keywords has-patch added; bg|has-patch removed
- Resolution set to wontfix
- Status changed from new to closed