[wp-trac] [WordPress Trac] #47181: Custom post type meta won't save in new editor for user role Author
WordPress Trac
noreply at wordpress.org
Sun Sep 15 15:02:41 UTC 2019
#47181: Custom post type meta won't save in new editor for user role Author
---------------------------+------------------------------
Reporter: Guido07111975 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.2
Severity: major | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Changes (by ourakland):
* severity: normal => major
Comment:
I'm having the same problem. For editor and above, my code to check and
save metadata works as desired. For author, the basic post data is saved,
but by the time my save_tour_fields_meta() function is called, $_POST is
empty.
The capabilities for author vs. editor are below. I've removed
delete_published_posts and moderate_comments from the author role. I tried
it without removing those, but still no joy.
{{{
WP_Role::__set_state(array(
'name' => 'author',
'capabilities' =>
array (
'edit_published_posts' => true,
'publish_posts' => true,
'read' => true,
'level_2' => true,
'level_1' => true,
'level_0' => true,
'edit_posts' => true,
'upload_files' => true,
'delete_posts' => true,
'edit_post' => true,
),
))
WP_Role::__set_state(array(
'name' => 'editor',
'capabilities' =>
array (
'moderate_comments' => true,
'manage_categories' => true,
'manage_links' => true,
'upload_files' => true,
'unfiltered_html' => true,
'edit_posts' => true,
'edit_others_posts' => true,
'edit_published_posts' => true,
'publish_posts' => true,
'edit_pages' => true,
'read' => true,
'level_7' => true,
'level_6' => true,
'level_5' => true,
'level_4' => true,
'level_3' => true,
'level_2' => true,
'level_1' => true,
'level_0' => true,
'edit_others_pages' => true,
'edit_published_pages' => true,
'publish_pages' => true,
'delete_pages' => true,
'delete_others_pages' => true,
'delete_published_pages' => true,
'delete_posts' => true,
'delete_others_posts' => true,
'delete_published_posts' => true,
'delete_private_posts' => true,
'edit_private_posts' => true,
'read_private_posts' => true,
'delete_private_pages' => true,
'edit_private_pages' => true,
'read_private_pages' => true,
),
))
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47181#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list