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

auth_{$object_type}_meta_{$meta_key}

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/capabilities.php:
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
			 * @since 3.3.0 As 'auth_post_meta_{$meta_key}'.
			 * @since 4.6.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}_meta_{$meta_key}", false, $meta_key, $object_id, $user_id, $cap, $caps );

			/**
			 * Filters whether the user is allowed to add post meta to a post of a given type.
			 *
			 * Use the {@see auth_$object_type_$sub_type_meta_$meta_key} filter to modify capabilities 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.