| @@ -197,9 +197,9 @@ | ||
| 197 | 197 | * @phpstan-param 'metabox_translation'|'list_translation'|'list_current' $mode |
| 198 | 198 | */ |
| 199 | 199 | private function get_edit_item_link_html( string $url, PLL_Language $language, int $item_id, string $item_name, string $mode ): string { |
| 200 | 200 | if ( 'list_current' === $mode ) { |
| 201 | - $flag = $this->get_flag_html( $language ); | |
| 201 | + $flag = $language->get_admin_flag( 'aria-hidden' ); | |
| 202 | 202 | $class = 'pll_column_flag'; |
| 203 | 203 | } else { |
| 204 | 204 | $flag = ''; |
| 205 | 205 | $class = 'pll_icon_edit'; |
| @@ -333,20 +333,8 @@ | ||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | $url = (string) get_edit_term_link( $term->term_id, $term->taxonomy, $post_type ); |
| 336 | 336 | return $this->get_edit_item_link_html( $url, $language, $term->term_id, $term->name, $mode ); |
| 337 | - } | |
| 338 | - | |
| 339 | - /** | |
| 340 | - * Returns the language flag or the language slug if there is no flag. | |
| 341 | - * | |
| 342 | - * @since 3.8 | |
| 343 | - * | |
| 344 | - * @param PLL_Language $language PLL_Language object. | |
| 345 | - * @return string | |
| 346 | - */ | |
| 347 | - public function get_flag_html( PLL_Language $language ): string { | |
| 348 | - return $language->flag ?: sprintf( '<abbr>%s</abbr>', esc_html( $language->slug ) ); | |
| 349 | 337 | } |
| 350 | 338 | |
| 351 | 339 | /** |
| 352 | 340 | * Returns some data (`from_post` and `new_lang`) from the current request. |