Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: auth_post_meta_{$meta_key}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

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 );
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                 *