register_meta_args

The WordPress Core register meta args hook.

Description

add_filter( 'register_meta_args', (string) $wp_register_meta_args_whitelist, (int) $int, (int) $int ); 

Parameters (3)

0. $wp_register_meta_args_whitelist (string) => '_wp_register_meta_args_whitelist'
The wp register meta args whitelist.
1. $int (int) => 10
The int.
2. $int (int) => 2
The int.

Usage

To run the hook, copy the example below.
  1. $wp_register_meta_args_whitelist = apply_filters( 'register_meta_args', $wp_register_meta_args_whitelist, $int, $int ); 
  2.  
  3. if ( !empty( $wp_register_meta_args_whitelist ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the register_meta_args callback 
  2. function filter_register_meta_args( $wp_register_meta_args_whitelist, $int, $int ) { 
  3. // make filter magic happen here... 
  4. return $wp_register_meta_args_whitelist
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'register_meta_args', 'filter_register_meta_args', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'register_meta_args', 'filter_register_meta_args', 10, 3 ); 

Defined (2)

The filter is defined in the following location(s).

/wp-includes/default-filters.php  
  1. add_filter( 'register_meta_args', '_wp_register_meta_args_whitelist', 10, 2 ); 
/wp-includes/meta.php  
  1. $args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key );