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

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

(trunk - 5.0-alpha-42993)

The hook occurs in the following file:

wp-includes/capabilities.php:
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
				 * @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 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}_{$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':