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