| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * Manages filters and actions related to the classic editor |
| 8 | 5 | * |
| @@ -114,13 +111,9 @@ | ||
| 114 | 111 | do_action( 'pll_before_post_translations', $post_type ); |
| 115 | 112 | |
| 116 | 113 | echo '<div id="post-translations" class="translations">'; |
| 117 | 114 | if ( $lang ) { |
| 118 | - if ( 'attachment' === $post_type ) { | |
| 119 | - include __DIR__ . '/view-translations-media.php'; | |
| 120 | - } else { | |
| 121 | - include __DIR__ . '/view-translations-post.php'; | |
| 122 | - } | |
| 115 | + include PLL_ADMIN_INC . '/view-translations-' . ( 'attachment' == $post_type ? 'media' : 'post' ) . '.php'; | |
| 123 | 116 | } |
| 124 | 117 | echo '</div>' . "\n"; |
| 125 | 118 | } |
| 126 | 119 | |
| @@ -158,13 +151,9 @@ | ||
| 158 | 151 | $this->model->post->save_translations( $post_ID, $translations ); |
| 159 | 152 | |
| 160 | 153 | ob_start(); |
| 161 | 154 | if ( $lang ) { |
| 162 | - if ( 'attachment' === $post_type ) { | |
| 163 | - include __DIR__ . '/view-translations-media.php'; | |
| 164 | - } else { | |
| 165 | - include __DIR__ . '/view-translations-post.php'; | |
| 166 | - } | |
| 155 | + include PLL_ADMIN_INC . '/view-translations-' . ( 'attachment' == $post_type ? 'media' : 'post' ) . '.php'; | |
| 167 | 156 | } |
| 168 | 157 | $x = new WP_Ajax_Response( array( 'what' => 'translations', 'data' => ob_get_contents() ) ); |
| 169 | 158 | ob_end_clean(); |
| 170 | 159 | |