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 |
---|---|
643 | * |
644 | * @param mixed $value The value to return, either a single metadata value or an array |
645 | * of values depending on the value of `$single`. |
646 | * @param int $object_id ID of the object metadata is for. |
647 | * @param string $meta_key Metadata key. |
648 | * @param bool $single Whether to return only the first value of the specified `$meta_key`. |
649 | * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', |
650 | * or any other object type with an associated meta table. |
651 | */ |
652 | $value = apply_filters( "default_{$meta_type}_metadata", $value, $object_id, $meta_key, $single, $meta_type ); |
653 |
|
654 | if ( ! $single && ! wp_is_numeric_array( $value ) ) { |
655 | $value = array( $value ); |
656 | } |
657 |
|
658 | return $value; |
659 | } |
660 |
|
661 | /** |