wphooks.info - auth_{$object_type}_{$sub_type}_meta_{$meta_key}

auth_{$object_type}_{$sub_type}_meta_{$meta_key}

(trunk - 5.0-alpha-42490)

The hook occurs in the following file:

wp-includes/capabilities.php:
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
				 * @since 4.6.0 As 'auth_post_{$post_type}_meta_{$meta_key}'.
				 * @since 4.7.0
				 *
				 * @param bool   $allowed  Whether the user can add the post meta. Default false.
				 * @param string $meta_key The meta key.
				 * @param int    $post_id  Post ID.
				 * @param int    $user_id  User ID.
				 * @param string $cap      Capability name.
				 * @param array  $caps     User capabilities.
				 */
				$allowed = apply_filters( "auth_{$object_type}_{$sub_type}_meta_{$meta_key}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );

				if ( ! $allowed ) {
					$caps[] = $cap;
				}
			} elseif ( $meta_key && is_protected_meta( $meta_key, $object_type ) ) {
				$caps[] = $cap;
			}
			break;
		case 'edit_comment':