Ticket #14122: 14122.remove.post_type_supports.author.diff
| File 14122.remove.post_type_supports.author.diff, 1.9 KB (added by nacin, 19 months ago) |
|---|
-
wp-includes/post.php
1072 1072 $default_capabilities = array_merge( $default_capabilities, $default_capabilities_for_mapping ); 1073 1073 } 1074 1074 1075 if ( ! post_type_supports( $args->name, 'author' ) ) {1076 // While these may be checked in core, users/roles shouldn't need to be granted these.1077 $default_capabilities['edit_others_posts'] = $default_capabilities['edit_posts'];1078 if ( $args->map_meta_cap )1079 $default_capabilities['delete_others_posts'] = $default_capabilities['delete_posts'];1080 }1081 1082 1075 $capabilities = array_merge( $default_capabilities, $args->capabilities ); 1083 1076 1084 1077 // Remember meta capabilities for future reference. -
wp-includes/capabilities.php
831 831 break; 832 832 } 833 833 834 if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' )) {834 if ( '' != $post->post_author ) { 835 835 $post_author_data = get_userdata( $post->post_author ); 836 836 } else { 837 837 // No author set yet or post type doesn't support authors, … … 874 874 break; 875 875 } 876 876 877 if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' )) {877 if ( '' != $post->post_author ) { 878 878 $post_author_data = get_userdata( $post->post_author ); 879 879 } else { 880 880 // No author set yet or post type doesn't support authors, … … 921 921 break; 922 922 } 923 923 924 if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' )) {924 if ( '' != $post->post_author ) { 925 925 $post_author_data = get_userdata( $post->post_author ); 926 926 } else { 927 927 // No author set yet or post type doesn't support authors,
