[wp-hackers] missing custom fields

Mark Jaquith mark.wordpress at txfx.net
Tue Jan 24 22:39:08 GMT 2006

On Jan 24, 2006, at 4:03 PM, Stefan Hartweg wrote:

> Does anyone know where to change the number of selectable custom  
> fields in
> the code (assuming that it's just a problem of not allowing more  
> than 10
> fields as a standard setting)?

Lines 843-150 in /wp-admin/admin-functions.php (latest SVN checkout):

> function meta_form() {
> 	global $wpdb;
> 	$keys = $wpdb->get_col("
> 			SELECT meta_key
> 			FROM $wpdb->postmeta
> 			GROUP BY meta_key
> 			ORDER BY meta_id DESC
> 			LIMIT 10");

Might be a good place for a hook... $num = apply_filters 
('dropdown_key_number', '10'); and then use $num in the query.  Gives  
us the flexibility to change it, without cluttering the options table  
for everyone.

Mark Jaquith

More information about the wp-hackers mailing list