| @@ -16,9 +16,8 @@ | ||
| 16 | 16 | $data = []; |
| 17 | 17 | $actions = []; |
| 18 | 18 | $intro = __( 'Currently Viewing', 'assistant' ); |
| 19 | 19 | $type = ''; |
| 20 | - $type_name = ''; | |
| 21 | 20 | $name = __( 'Untitled', 'assistant' ); |
| 22 | 21 | |
| 23 | 22 | $obj = get_queried_object(); |
| 24 | 23 | |
| @@ -52,9 +51,8 @@ | ||
| 52 | 51 | $post_type = get_post_type_object( 'post' ); |
| 53 | 52 | $intro = __( 'Currently Viewing Post Type Archive', 'assistant' ); |
| 54 | 53 | $type = __( 'Post Type Archive', 'assistant' ); |
| 55 | 54 | $name = $post_type->labels->singular_name; |
| 56 | - $type_name = $post_type->name; | |
| 57 | 55 | |
| 58 | 56 | } elseif ( is_tax() || is_category() || is_tag() ) { |
| 59 | 57 | |
| 60 | 58 | $tax = get_taxonomy( $obj->taxonomy ); |
| @@ -73,9 +71,8 @@ | ||
| 73 | 71 | |
| 74 | 72 | } elseif ( is_singular() || is_attachment() ) { |
| 75 | 73 | |
| 76 | 74 | $post_type = get_post_type_object( get_post_type() ); |
| 77 | - $type_name = $post_type->name; | |
| 78 | 75 | $labels = $post_type->labels; |
| 79 | 76 | $post_type = $labels->singular_name; |
| 80 | 77 | $intro = sprintf( esc_html__( 'Currently Viewing %s', 'assistant' ), $post_type ); |
| 81 | 78 | $type = $post_type; |
| @@ -120,9 +117,8 @@ | ||
| 120 | 117 | |
| 121 | 118 | $data['intro'] = $intro; |
| 122 | 119 | $data['name'] = $name; |
| 123 | 120 | $data['type'] = $type; |
| 124 | - $data['type_name'] = $type_name; | |
| 125 | 121 | |
| 126 | 122 | $data['actions'] = $this->filter_actions_by_capability( $actions ); |
| 127 | 123 | |
| 128 | 124 | $theme = wp_get_theme(); |