Make WordPress Core


Ignore:
Timestamp:
09/18/2024 05:17:05 AM (20 months ago)
Author:
ramonopoly
Message:

Global Styles: allow read access to users with edit_posts capabilities

This patch any role that can edit a post, including custom post types, or edit theme options to read global styles from the API. This enables read-only access to global styles in the post editor. Test coverage in included.

Props ramonopoly, peterwilsoncc, mukesh27, aaronrobertshaw, mamaduka, spacedmonkey, talldanwp, timothyblynjacobs.
Fixes #62042.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r59045 r59048  
    490490            'late_route_registration'         => true,
    491491            'capabilities'                    => array(
    492                 'read'                   => 'edit_theme_options',
     492                'read'                   => 'edit_posts',
    493493                'create_posts'           => 'edit_theme_options',
    494494                'edit_posts'             => 'edit_theme_options',
Note: See TracChangeset for help on using the changeset viewer.