*
* @since 2.0.0
*
+ * @global array $post_type_meta_caps Used to get post type meta capabilities.
+ *
* @param string $cap Capability name.
* @param int $user_id User ID.
* @param int $object_id Optional. ID of the specific object to check against if `$cap` is a "meta" cap.
break;
default:
// Handle meta capabilities for custom post types.
- $post_type_meta_caps = _post_type_meta_capabilities();
+ global $post_type_meta_caps;
if ( isset( $post_type_meta_caps[ $cap ] ) ) {
$args = array_merge( array( $post_type_meta_caps[ $cap ], $user_id ), $args );
return call_user_func_array( 'map_meta_cap', $args );
* While checking against particular roles in place of a capability is supported
* in part, this practice is discouraged as it may produce unreliable results.
*
+ * Note: Will always return true if the current user is a super admin, unless specifically denied.
+ *
* @since 2.0.0
*
* @see WP_User::has_cap()
}
/**
- * Whether current user has a capability or role for a given blog.
+ * Whether current user has a capability or role for a given site.
*
* @since 3.0.0
*
- * @param int $blog_id Blog ID
+ * @param int $blog_id Site ID.
* @param string $capability Capability or role name.
* @return bool
*/