postmeta_form_limit
Filters the number of custom fields to retrieve for the drop-down in the Custom Fields meta box.
Usage
add_filter( 'postmeta_form_limit', 'wp_kama_postmeta_form_limit_filter' );
/**
* Function for `postmeta_form_limit` filter-hook.
*
* @param int $limit Number of custom fields to retrieve.
*
* @return int
*/
function wp_kama_postmeta_form_limit_filter( $limit ){
// filter...
return $limit;
}
- $limit(int)
- Number of custom fields to retrieve.
Default: 30
Changelog
| Since 2.1.0 | Introduced. |
Where the hook is called
postmeta_form_limit
wp-admin/includes/template.php 718
$limit = apply_filters( 'postmeta_form_limit', 30 );