2020-05-01 / 5164阅 / 悠然
Build an object with all post type capabilities out of a post type object
Post type capabilities use the ‘capability_type’ argument as a base, if the capability is not set in the ‘capabilities’ argument array or if the ‘capabilities’ argument is not supplied.
The capability_type argument can optionally be registered as an array, with the first value being singular and the second plural, e.g. array(‘story, ‘stories’) Otherwise, an ‘s’ will be added to the value for the plural form. After registration, capability_type will always be a string of the singular value.
By default, eight keys are accepted as part of the capabilities array:
edit_post, read_post, and delete_post are meta capabilities, which are then generally mapped to corresponding primitive capabilities depending>map_meta_cap(), which takes the three aforementioned meta capabilities and translates them into>map_meta_cap(). Thus, they are id="see-also" tabindex="-1">See also See also
Top ↑
(object)
(Required)
Post type registration arguments.
(object) Object with all the capabilities as member variables.