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

auth_{$object_type}_meta_{$meta_key}

(trunk - 5.0-alpha-42993)

The hook occurs in the following file:

wp-includes/capabilities.php:
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
				 * @since 3.3.0 As `auth_post_meta_{$meta_key}`.
				 * @since 4.6.0
				 *
				 * @param bool     $allowed   Whether the user can add the object meta. Default false.
				 * @param string   $meta_key  The meta key.
				 * @param int      $object_id Object ID.
				 * @param int      $user_id   User ID.
				 * @param string   $cap       Capability name.
				 * @param string[] $caps      Array of the user's capabilities.
				 */
				$allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}", false, $meta_key, $object_id, $user_id, $cap, $caps );

				/**
				 * Filters whether the user is allowed to edit meta for specific object types/subtypes.
				 *
				 * Return true to have the mapped meta caps from `edit_{$object_type}` apply.
				 *
				 * The dynamic portion of the hook name, `$object_type` refers to the object type being filtered.
				 * The dynamic portion of the hook name, `$sub_type` refers to the object subtype being filtered.
				 * The dynamic portion of the hook name, `$meta_key`, refers to the meta key passed to map_meta_cap().