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
257                 * @since 3.3.0
258                 *
259                 * @param bool   $allowed  Whether the user can add the post meta. Default false.
260                 * @param string $meta_key The meta key.
261                 * @param int    $post_id  Post ID.
262                 * @param int    $user_id  User ID.
263                 * @param string $cap      Capability name.
264                 * @param array  $caps     User capabilities.
265                 */
266                $allowed = apply_filters( "auth_post_meta_{$meta_key}", false, $meta_key, $post->ID, $user_id, $cap, $caps );
267                if ( ! $allowed )
268                     $caps[] = $cap;
269           } elseif ( $meta_key && is_protected_meta( $meta_key, 'post' ) ) {
270                $caps[] = $cap;
271           }
272           break;
273      case 'edit_comment':
274           $comment = get_comment( $args[0] );
275           if ( ! $comment ) {