PluginProbe
Polylang / trunk
Polylang vtrunk
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | src/admin/admin-links.php +1 -13 3.8.9 → trunk View file →
@@ -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.