Making WordPress.org


Ignore:
Timestamp:
07/03/2023 08:06:02 PM (3 years ago)
Author:
coffee2code
Message:

Photo Directory, Registrations: Simplify 'photo' post type capability configuration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/registrations.php

    r11688 r12708  
    9393            'show_in_rest'      => true,
    9494            'rest_base'         => 'photos',
    95             'capability_type'   => 'photos',
    96             'capabilities'      => [
    97                 'edit_posts'             => 'edit_photos',
    98                 'delete_posts'           => 'delete_photos',
    99                 'publish_posts'          => 'publish_photos',
    100                 'edit_others_posts'      => 'edit_others_photos',
    101                 'delete_others_posts'    => 'delete_others_photos',
    102                 'edit_published_posts'   => 'edit_published_photos',
    103                 'delete_published_posts' => 'delete_published_photos',
    104                 'edit_private_posts'     => 'edit_private_photos',
    105                 'delete_private_posts'   => 'delete_private_photos',
    106                 'read_private_posts'     => 'read_private_photos',
    107                 'edit_post'              => 'edit_photo',
    108                 'delete_post'            => 'delete_photo',
    109                 'read_post'              => 'read_photo',
    110             ],
     95            'capability_type'   => [ 'photo', 'photos' ],
    11196            'map_meta_cap'      => true,
    11297            'has_archive'       => true,
Note: See TracChangeset for help on using the changeset viewer.