Skip to content

Commit

Permalink
Merge pull request #150 from Idealien/feature/admin-icon-filter
Browse files Browse the repository at this point in the history
Adding msls_options_admin_get_flag_icon filter
  • Loading branch information
lloc authored Nov 29, 2023
2 parents ec1281b + f293ce0 commit 7b4d50c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion includes/MslsAdminIcon.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,16 @@ public function get_a(): string {
*/
public function get_icon(): string {
if ( 'flag' === $this->iconType ) {
return ! is_string( $this->language ) ? '' : sprintf( '<span class="flag-icon %s">%s</span>',
/**
* Use your own filename for the flag-icon
* @since 2.6.1
*
* @param MslsAdminIcon $icon
* @param string $language
*/
$icon = apply_filters( 'msls_options_admin_get_flag_icon', $this, $this->language );

return sprintf( '<span class="flag-icon %s">%s</span>',
( new IconSvg() )->get( $this->language ),
$this->language
);
Expand Down

0 comments on commit 7b4d50c

Please sign in to comment.