| 311 | | /** This filter is documented in wp-includes/meta.php */ |
| | 311 | |
| | 312 | /** |
| | 313 | * Filters whether the user is allowed to edit meta. |
| | 314 | * |
| | 315 | * Use the `auth_post_{$object_type}_meta_{$meta_key}` filter to modify capabilities for |
| | 316 | * specific object types. Return true to have the mapped meta caps from edit_{$object_type} apply. |
| | 317 | * |
| | 318 | * The dynamic portion of the hook name, `{$object_type}` refers to the object type being filtered. |
| | 319 | * The dynamic portion of the hook name, `$meta_key`, refers to the meta key passed to map_meta_cap(). |
| | 320 | * |
| | 321 | * @since 3.3.0 |
| | 322 | * |
| | 323 | * @param bool $allowed Whether the user can add the post meta. Default false. |
| | 324 | * @param string $meta_key The meta key. |
| | 325 | * @param int $post_id Post ID. |
| | 326 | * @param int $user_id User ID. |
| | 327 | * @param string $cap Capability name. |
| | 328 | * @param array $caps User capabilities. |
| | 329 | */ |
| 314 | | /** This filter is documented in wp-includes/meta.php */ |
| | 332 | /** |
| | 333 | * Filters whether the user is allowed to add post meta to a post of a given type. |
| | 334 | * |
| | 335 | * Use the `auth_{$object_type}_{$sub_type}_meta_{$meta_key}` filter to modify capabilities for |
| | 336 | * specific object types/subtypes. Return true to have the mapped meta caps from edit_{$object_type} apply. |
| | 337 | * |
| | 338 | * The dynamic portion of the hook name, `{$object_type}` refers to the object type being filtered. |
| | 339 | * The dynamic portion of the hook name, `{$sub_type}` refers to the object subtype being filtered. |
| | 340 | * The dynamic portion of the hook name, `$meta_key`, refers to the meta key passed to map_meta_cap(). |
| | 341 | * |
| | 342 | * @since 4.6.0 |
| | 343 | * |
| | 344 | * @param bool $allowed Whether the user can add the post meta. Default false. |
| | 345 | * @param string $meta_key The meta key. |
| | 346 | * @param int $post_id Post ID. |
| | 347 | * @param int $user_id User ID. |
| | 348 | * @param string $cap Capability name. |
| | 349 | * @param array $caps User capabilities. |
| | 350 | */ |