#1865 closed defect (bug) (wontfix)
Admin custom field key dropdown has hardcoded limit of 10
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.6 |
Component: | Administration | Keywords: | meta_key custom fields custom fields has-patch |
Focuses: | Cc: |
Description
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.
-Scott
Attachments (2)
Change History (6)
#2
@
19 years ago
Thank you for this patch. :) It fixed my disappearing custom fields that were driving me crazy. I can magically see them again. YAY! I wish this would've also fixed the ability to still see the "_encloseme" and "_pingme" custom fields on the "Write Post" page and over and over again in the database as I mention in Ticket #2316, but that is another story that will hopefully be fixed in 2.0.1???
Thanks again for the patch and info.
cnc137.
Solution 1: Remove LIMIT clause all together