From 51502724429b2afad2e010551564cae0dd2b8049 Mon Sep 17 00:00:00 2001 From: James Koster Date: Wed, 27 Oct 2021 12:36:57 +0100 Subject: [PATCH] Remove slug and status columns --- lib/full-site-editing/templates-utils.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/full-site-editing/templates-utils.php b/lib/full-site-editing/templates-utils.php index bc270a738d967..9eeb046a7c2e5 100644 --- a/lib/full-site-editing/templates-utils.php +++ b/lib/full-site-editing/templates-utils.php @@ -12,9 +12,7 @@ * @return array Filtered $columns. */ function gutenberg_templates_lists_custom_columns( array $columns ) { - $columns['slug'] = __( 'Slug', 'gutenberg' ); $columns['description'] = __( 'Description', 'gutenberg' ); - $columns['status'] = __( 'Status', 'gutenberg' ); $columns['theme'] = __( 'Theme', 'gutenberg' ); if ( isset( $columns['date'] ) ) { unset( $columns['date'] ); @@ -29,29 +27,11 @@ function gutenberg_templates_lists_custom_columns( array $columns ) { * @param int $post_id Post ID. */ function gutenberg_render_templates_lists_custom_column( $column_name, $post_id ) { - if ( 'slug' === $column_name ) { - $post = get_post( $post_id ); - echo esc_html( $post->post_name ); - return; - } - if ( 'description' === $column_name && has_excerpt( $post_id ) ) { the_excerpt( $post_id ); return; } - if ( 'status' === $column_name ) { - $post_status = get_post_status( $post_id ); - // The auto-draft status doesn't have localized labels. - if ( 'auto-draft' === $post_status ) { - echo esc_html_x( 'Auto-Draft', 'Post status', 'gutenberg' ); - return; - } - $post_status_object = get_post_status_object( $post_status ); - echo esc_html( $post_status_object->label ); - return; - } - if ( 'theme' === $column_name ) { $terms = get_the_terms( $post_id, 'wp_theme' ); if ( empty( $terms ) || is_wp_error( $terms ) ) {