Changeset 16422
- Timestamp:
- 11/17/2010 06:21:34 AM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r16273 r16422 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 // No author set yet or post type doesn't support authors, 838 // so default to current user for cap checks. 837 // No author set yet, so default to current user for cap checks. 839 838 $post_author_data = $author_data; 840 839 } … … 875 874 } 876 875 877 if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' )) {876 if ( '' != $post->post_author ) { 878 877 $post_author_data = get_userdata( $post->post_author ); 879 878 } else { 880 // No author set yet or post type doesn't support authors, 881 // so default to current user for cap checks. 879 // No author set yet, so default to current user for cap checks. 882 880 $post_author_data = $author_data; 883 881 } … … 922 920 } 923 921 924 if ( '' != $post->post_author && post_type_supports( $post_type->name, 'author' )) {922 if ( '' != $post->post_author ) { 925 923 $post_author_data = get_userdata( $post->post_author ); 926 924 } else { 927 // No author set yet or post type doesn't support authors, 928 // so default to current user for cap checks. 925 // No author set yet, so default to current user for cap checks. 929 926 $post_author_data = $author_data; 930 927 } -
trunk/wp-includes/post.php
r16400 r16422 1087 1087 1088 1088 if ( ! post_type_supports( $args->name, 'author' ) ) { 1089 // While these may be checked in core, users/roles shouldn't need to be granted these. 1089 // While these may be checked in core, users/roles shouldn't need to be 1090 // granted these by default if the post type doesn't support authors. 1090 1091 $default_capabilities['edit_others_posts'] = $default_capabilities['edit_posts']; 1091 1092 if ( $args->map_meta_cap )
Note: See TracChangeset
for help on using the changeset viewer.