| @@ -46,9 +46,8 @@ | ||
| 46 | 46 | |
| 47 | 47 | // Hierarchical taxonomies |
| 48 | 48 | if ( 'edit' == $screen->base && $taxonomies = get_object_taxonomies( $screen->post_type, 'object' ) ) { |
| 49 | 49 | // Get translated hierarchical taxonomies |
| 50 | - $hierarchical_taxonomies = array(); | |
| 51 | 50 | foreach ( $taxonomies as $taxonomy ) { |
| 52 | 51 | if ( $taxonomy->hierarchical && $taxonomy->show_in_quick_edit && $this->model->is_translated_taxonomy( $taxonomy->name ) ) { |
| 53 | 52 | $hierarchical_taxonomies[] = $taxonomy->name; |
| 54 | 53 | } |
| @@ -54,10 +53,9 @@ | ||
| 54 | 53 | } |
| 55 | 54 | } |
| 56 | 55 | |
| 57 | 56 | if ( ! empty( $hierarchical_taxonomies ) ) { |
| 58 | - $terms = get_terms( $hierarchical_taxonomies, array( 'get' => 'all' ) ); | |
| 59 | - $term_languages = array(); | |
| 57 | + $terms = get_terms( $hierarchical_taxonomies, array( 'get' => 'all' ) ); | |
| 60 | 58 | |
| 61 | 59 | foreach ( $terms as $term ) { |
| 62 | 60 | if ( $lang = $this->model->term->get_language( $term->term_id ) ) { |
| 63 | 61 | $term_languages[ $lang->slug ][ $term->taxonomy ][] = $term->term_id; |
| @@ -72,10 +70,9 @@ | ||
| 72 | 70 | } |
| 73 | 71 | |
| 74 | 72 | // Hierarchical post types |
| 75 | 73 | if ( 'edit' == $screen->base && is_post_type_hierarchical( $screen->post_type ) ) { |
| 76 | - $pages = get_pages(); | |
| 77 | - $page_languages = array(); | |
| 74 | + $pages = get_pages(); | |
| 78 | 75 | |
| 79 | 76 | foreach ( $pages as $page ) { |
| 80 | 77 | if ( $lang = $this->model->post->get_language( $page->ID ) ) { |
| 81 | 78 | $page_languages[ $lang->slug ][] = $page->ID; |