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 |
|---|---|
| 259 | * @since 3.3.0 |
| 260 | * |
| 261 | * @param bool $allowed Whether the user can add the post meta. Default false. |
| 262 | * @param string $meta_key The meta key. |
| 263 | * @param int $post_id Post ID. |
| 264 | * @param int $user_id User ID. |
| 265 | * @param string $cap Capability name. |
| 266 | * @param array $caps User capabilities. |
| 267 | */ |
| 268 | $allowed = apply_filters( "auth_post_meta_{$meta_key}", false, $meta_key, $post->ID, $user_id, $cap, $caps ); |
| 269 | |
| 270 | /** |
| 271 | * Filters whether the user is allowed to add post meta to a post of a given type. |
| 272 | * |
| 273 | * The dynamic portions of the hook name, `$meta_key` and `$post_type`, |
| 274 | * refer to the meta key passed to map_meta_cap() and the post type, respectively. |
| 275 | * |
| 276 | * @since 4.6.0 |
| 277 | * |