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 |
|---|---|
| 706 | * |
| 707 | * @param mixed $value The value to return, either a single metadata value or an array |
| 708 | * of values depending on the value of `$single`. |
| 709 | * @param int $object_id ID of the object metadata is for. |
| 710 | * @param string $meta_key Metadata key. |
| 711 | * @param bool $single Whether to return only the first value of the specified `$meta_key`. |
| 712 | * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', |
| 713 | * or any other object type with an associated meta table. |
| 714 | */ |
| 715 | $value = apply_filters( "default_{$meta_type}_metadata", $value, $object_id, $meta_key, $single, $meta_type ); |
| 716 | |
| 717 | if ( ! $single && ! wp_is_numeric_array( $value ) ) { |
| 718 | $value = array( $value ); |
| 719 | } |
| 720 | |
| 721 | return $value; |
| 722 | } |
| 723 | |
| 724 | /** |