Changeset 42809
- Timestamp:
- 03/08/2018 11:18:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/capabilities.php
r42606 r42809 315 315 316 316 /** 317 * Filters whether the user is allowed to edit meta .317 * Filters whether the user is allowed to edit meta for specific object types. 318 318 * 319 * Use the {@see auth_post_$object_type_meta_$meta_key} filter to modify capabilities for 320 * specific object types. Return true to have the mapped meta caps from edit_{$object_type} apply. 319 * Return true to have the mapped meta caps from `edit_{$object_type}` apply. 321 320 * 322 321 * The dynamic portion of the hook name, `$object_type` refers to the object type being filtered. 323 322 * The dynamic portion of the hook name, `$meta_key`, refers to the meta key passed to map_meta_cap(). 324 323 * 325 * @since 3.3.0 As 'auth_post_meta_{$meta_key}'.324 * @since 3.3.0 As `auth_post_meta_{$meta_key}`. 326 325 * @since 4.6.0 327 326 * 328 * @param bool $allowed Whether the user can add the post meta. Default false.329 * @param string $meta_key The meta key.330 * @param int $ post_id Post ID.331 * @param int $user_id User ID.332 * @param string $cap Capability name.333 * @param array $caps User capabilities.327 * @param bool $allowed Whether the user can add the object meta. Default false. 328 * @param string $meta_key The meta key. 329 * @param int $object_id Object ID. 330 * @param int $user_id User ID. 331 * @param string $cap Capability name. 332 * @param array $caps User capabilities. 334 333 */ 335 334 $allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}", false, $meta_key, $object_id, $user_id, $cap, $caps ); 336 335 337 336 /** 338 * Filters whether the user is allowed to add post meta to a post of a given type.337 * Filters whether the user is allowed to edit meta for specific object types/subtypes. 339 338 * 340 * Use the {@see auth_$object_type_$sub_type_meta_$meta_key} filter to modify capabilities for 341 * specific object types/subtypes. Return true to have the mapped meta caps from edit_{$object_type} apply. 339 * Return true to have the mapped meta caps from `edit_{$object_type}` apply. 342 340 * 343 341 * The dynamic portion of the hook name, `$object_type` refers to the object type being filtered. … … 345 343 * The dynamic portion of the hook name, `$meta_key`, refers to the meta key passed to map_meta_cap(). 346 344 * 347 * @since 4.6.0 As 'auth_post_{$post_type}_meta_{$meta_key}'.345 * @since 4.6.0 As `auth_post_{$post_type}_meta_{$meta_key}`. 348 346 * @since 4.7.0 349 347 * 350 * @param bool $allowed Whether the user can add the post meta. Default false.351 * @param string $meta_key The meta key.352 * @param int $ post_id Post ID.353 * @param int $user_id User ID.354 * @param string $cap Capability name.355 * @param array $caps User capabilities.348 * @param bool $allowed Whether the user can add the object meta. Default false. 349 * @param string $meta_key The meta key. 350 * @param int $object_id Object ID. 351 * @param int $user_id User ID. 352 * @param string $cap Capability name. 353 * @param array $caps User capabilities. 356 354 */ 357 355 $allowed = apply_filters( "auth_{$object_type}_{$sub_type}_meta_{$meta_key}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );
Note: See TracChangeset
for help on using the changeset viewer.