WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 1025 | * Filters the registration arguments when registering meta. |
| 1026 | * |
| 1027 | * @since 4.6.0 |
| 1028 | * |
| 1029 | * @param array $args Array of meta registration arguments. |
| 1030 | * @param array $defaults Array of default arguments. |
| 1031 | * @param string $object_type Object type. |
| 1032 | * @param string $meta_key Meta key. |
| 1033 | */ |
| 1034 | $args = apply_filters( 'register_meta_args', $args, $defaults, $object_type, $meta_key ); |
| 1035 | $args = wp_parse_args( $args, $defaults ); |
| 1036 | |
| 1037 | // If `auth_callback` is not provided, fall back to `is_protected_meta()`. |
| 1038 | if ( empty( $args['auth_callback'] ) ) { |
| 1039 | if ( is_protected_meta( $meta_key, $object_type ) ) { |
| 1040 | $args['auth_callback'] = '__return_false'; |
| 1041 | } else { |
| 1042 | $args['auth_callback'] = '__return_true'; |
| 1043 | } |