if ( !
$attributes['isLink'
] ) { // Remove the link.
$custom_logo =
preg_replace( '#<a.*?>(.*?)</a>#i', '\1',
$custom_logo );
} if ( $attributes['isLink'
] && '_blank' ===
$attributes['linkTarget'
] ) { // Add the link target after the rel="home".
// Add an aria-label for informing that the page opens in a new tab.
$processor =
new WP_HTML_Tag_Processor( $custom_logo );
$processor->
next_tag( 'a'
);
if ( 'home' ===
$processor->
get_attribute( 'rel'
) ) { $processor->
set_attribute( 'aria-label',
__( '(Home link, opens in a new tab)'
) );
$processor->
set_attribute( 'target',
$attributes['linkTarget'
] );
} $custom_logo =
$processor->
get_updated_html();
} $classnames = array
();
if ( empty( $attributes['width'
] ) ) { $classnames[] = 'is-default-size';
}