Changeset 29318
- Timestamp:
- 07/29/2014 12:50:53 AM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r29163 r29318 875 875 function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) { 876 876 $post_type_obj = get_post_type_object( $post->post_type ); 877 if ( ! $post_type_obj ->public )877 if ( ! $post_type_obj || ! $post_type_obj->public ) { 878 878 return; 879 880 if ( 'publish' != $new_status && 'publish' != $old_status ) 879 } 880 881 if ( 'publish' != $new_status && 'publish' != $old_status ) { 881 882 return; 883 } 882 884 883 885 // Post was freshly published, published post was saved, or published post was unpublished. … … 897 899 898 900 $post_type_obj = get_post_type_object( $post->post_type ); 899 if ( ! $post_type_obj ->public )901 if ( ! $post_type_obj || ! $post_type_obj->public ) { 900 902 return; 901 902 if ( 'publish' != $post->post_status ) 903 } 904 905 if ( 'publish' != $post->post_status ) { 903 906 return; 907 } 904 908 905 909 wpmu_update_blogs_date(); -
trunk/src/wp-includes/post.php
r29113 r29318 2315 2315 if ( 'readable' == $perm && is_user_logged_in() ) { 2316 2316 $post_type_object = get_post_type_object( $type ); 2317 if ( ! current_user_can( $post_type_object->cap->read_private_posts ) ) {2317 if ( $post_type_object && ! current_user_can( $post_type_object->cap->read_private_posts ) ) { 2318 2318 $cache_key .= '_' . $perm . '_' . get_current_user_id(); 2319 2319 }
Note: See TracChangeset
for help on using the changeset viewer.