postmeta_form_limit
Filters the number of custom fields to retrieve for the drop-down in the Custom Fields meta box.
Description
Parameters (1)
- 0. $int (int) =>
30
- Number of custom fields to retrieve. Default 30.
Usage
- To run the hook, copy the example below.
- $int = apply_filters( 'postmeta_form_limit', $int );
- if ( !empty( $int ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the postmeta_form_limit callback
- function filter_postmeta_form_limit( $int ) {
- // make filter magic happen here...
- return $int;
- };
- // add the filter
- add_filter( 'postmeta_form_limit', 'filter_postmeta_form_limit', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'postmeta_form_limit', 'filter_postmeta_form_limit', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-admin/includes/template.php
- $limit = apply_filters( 'postmeta_form_limit', 30 );