Ticket #62366: template.php.patch
File template.php.patch, 3.5 KB (added by , 3 months ago) |
---|
-
src/wp-admin/includes/template.php
2292 2292 $post_status = ''; 2293 2293 } 2294 2294 2295 if ( ! empty( $post->post_password ) ) { 2296 $post_states['protected'] = _x( 'Password protected', 'post status' ); 2297 } 2295 if ( $post instanceof WP_Post ) { 2296 if ( ! empty( $post->post_password ) ) { 2297 $post_states['protected'] = _x( 'Password protected', 'post status' ); 2298 } 2298 2299 2299 if ( 'private' === $post->post_status && 'private' !== $post_status ) {2300 $post_states['private'] = _x( 'Private', 'post status' );2301 }2300 if ( 'private' === $post->post_status && 'private' !== $post_status ) { 2301 $post_states['private'] = _x( 'Private', 'post status' ); 2302 } 2302 2303 2303 if ( 'draft' === $post->post_status ) { 2304 if ( get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) { 2305 $post_states[] = __( 'Customization Draft' ); 2306 } elseif ( 'draft' !== $post_status ) { 2307 $post_states['draft'] = _x( 'Draft', 'post status' ); 2304 if ( 'draft' === $post->post_status ) { 2305 if ( get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) { 2306 $post_states[] = __( 'Customization Draft' ); 2307 } elseif ( 'draft' !== $post_status ) { 2308 $post_states['draft'] = _x( 'Draft', 'post status' ); 2309 } 2310 } elseif ( 'trash' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) { 2311 $post_states[] = _x( 'Customization Draft', 'post status' ); 2308 2312 } 2309 } elseif ( 'trash' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) {2310 $post_states[] = _x( 'Customization Draft', 'post status' );2311 }2312 2313 2313 if ( 'pending' === $post->post_status && 'pending' !== $post_status ) {2314 $post_states['pending'] = _x( 'Pending', 'post status' );2315 }2314 if ( 'pending' === $post->post_status && 'pending' !== $post_status ) { 2315 $post_states['pending'] = _x( 'Pending', 'post status' ); 2316 } 2316 2317 2317 if ( is_sticky( $post->ID ) ) {2318 $post_states['sticky'] = _x( 'Sticky', 'post status' );2319 }2318 if ( is_sticky( $post->ID ) ) { 2319 $post_states['sticky'] = _x( 'Sticky', 'post status' ); 2320 } 2320 2321 2321 if ( 'future' === $post->post_status ) {2322 $post_states['scheduled'] = _x( 'Scheduled', 'post status' );2323 }2322 if ( 'future' === $post->post_status ) { 2323 $post_states['scheduled'] = _x( 'Scheduled', 'post status' ); 2324 } 2324 2325 2325 if ( 'page' === get_option( 'show_on_front' ) ) { 2326 if ( (int) get_option( 'page_on_front' ) === $post->ID ) { 2327 $post_states['page_on_front'] = _x( 'Front Page', 'page label' ); 2326 if ( 'page' === get_option( 'show_on_front' ) ) { 2327 if ( (int) get_option( 'page_on_front' ) === $post->ID ) { 2328 $post_states['page_on_front'] = _x( 'Front Page', 'page label' ); 2329 } 2330 2331 if ( (int) get_option( 'page_for_posts' ) === $post->ID ) { 2332 $post_states['page_for_posts'] = _x( 'Posts Page', 'page label' ); 2333 } 2328 2334 } 2329 2335 2330 if ( (int) get_option( ' page_for_posts' ) === $post->ID ) {2331 $post_states['page_for_p osts'] = _x( 'PostsPage', 'page label' );2336 if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) { 2337 $post_states['page_for_privacy_policy'] = _x( 'Privacy Policy Page', 'page label' ); 2332 2338 } 2333 2339 } 2334 2340 2335 if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post->ID ) {2336 $post_states['page_for_privacy_policy'] = _x( 'Privacy Policy Page', 'page label' );2337 }2338 2339 2341 /** 2340 2342 * Filters the default post display states used in the posts list table. 2341 2343 *