PluginProbe
Polylang / 2.6.2
Polylang v2.6.2
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/translated-post.php +3 -13 2.72.6.2 View file →
@@ -178,21 +178,11 @@
178 178 $user = wp_get_current_user();
179 179 return is_user_logged_in() && ( current_user_can( $post_type_object->cap->read_private_posts ) || $user->ID == $post->post_author ); // Comparison must not be strict!
180 180 }
181 181
182 - // In edit context, show draft and future posts.
183 - if ( 'edit' === $context ) {
184 - $states = get_post_stati(
185 - array(
186 - 'protected' => true,
187 - 'show_in_admin_all_list' => true,
188 - )
189 - );
190 -
191 - if ( in_array( $post->post_status, $states ) ) {
192 - $user = wp_get_current_user();
193 - return is_user_logged_in() && ( current_user_can( 'edit_posts' ) || $user->ID == $post->post_author ); // Comparison must not be strict!
194 - }
182 + if ( 'edit' === $context && 'draft' === $post->post_status ) {
183 + $user = wp_get_current_user();
184 + return is_user_logged_in() && ( current_user_can( 'edit_posts' ) || $user->ID == $post->post_author ); // Comparison must not be strict!
195 185 }
196 186
197 187 return false;
198 188 }