Ticket #40922: 40922.3.diff
File 40922.3.diff, 2.3 KB (added by , 7 years ago) |
---|
-
src/wp-includes/capabilities.php
488 488 $caps[] = 'manage_options'; 489 489 } 490 490 break; 491 case 'delete_customize_changeset': 492 case 'edit_customize_changeset': 493 case 'read_customize_changeset': 494 case 'edit_customize_changesets': 495 case 'edit_others_customize_changesets': 496 case 'publish_customize_changesets': 497 case 'read_private_customize_changesets': 498 $caps = call_user_func_array( 'map_meta_cap', array_merge( array( 'customize', $user_id ), $args ) ); 499 break; 491 500 default: 492 501 // Handle meta capabilities for custom post types. 493 502 global $post_type_meta_caps; -
src/wp-includes/post.php
168 168 ), 169 169 'public' => false, 170 170 '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 171 'map_meta_cap' => true,171 'map_meta_cap' => false, 172 172 'hierarchical' => false, 173 173 'rewrite' => false, 174 174 'query_var' => false, … … 177 177 'supports' => array( 'title', 'author' ), 178 178 'capability_type' => 'customize_changeset', 179 179 'capabilities' => array( 180 'create_posts' => 'customize', 181 'delete_others_posts' => 'customize', 182 'delete_post' => 'customize', 183 'delete_posts' => 'customize', 184 'delete_private_posts' => 'customize', 185 'delete_published_posts' => 'customize', 186 'edit_others_posts' => 'customize', 187 'edit_post' => 'customize', 188 'edit_posts' => 'customize', 189 'edit_private_posts' => 'customize', 190 'edit_published_posts' => 'do_not_allow', 191 'publish_posts' => 'customize', 180 'delete_others_posts' => 'delete_others_customize_changesets', 181 'delete_posts' => 'delete_customize_changesets', 182 'delete_private_posts' => 'delete_private_customize_changesets', 183 'delete_published_posts' => 'delete_published_customize_changesets', 184 'edit_private_posts' => 'edit_private_customize_changesets', 185 'edit_published_posts' => 'edit_published_customize_changesets', 192 186 'read' => 'read', 193 'read_post' => 'customize',194 'read_private_posts' => 'customize',195 187 ), 196 188 ) ); 197 189