HEX
Server: Apache
System: Linux www 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64
User: root (0)
PHP: 8.2.1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals
Upload Files
File: /mnt/drbd/www/edenhouse/wp-content/plugins/essential-blocks/views/advanced-image/site-logo.php
<?php
// wrapper classes
$_parent_classes = [
    'eb-parent-wrapper',
    'eb-parent-' . $blockId,
    $classHook
    ];

$_wrapper_classes = [
'eb-advanced-image-wrapper',
$blockId,
$hoverEffect,
$className
];

$custom_logo = get_custom_logo();

if ( empty( $custom_logo ) ) {
    return ''; // Return early if no custom logo is set, avoiding extraneous wrapper div.
}

if ( ! $enableLink ) {
    // Remove the link.
    $custom_logo = preg_replace( '#<a.*?>(.*?)</a>#i', '\1', $custom_logo );
}

$linkTarget = $openInNewTab ? '_blank' : '';

if ( $enableLink && '_blank' === $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', $linkTarget );
}
$custom_logo = $processor->get_updated_html();
}

?>

<div class="<?php echo esc_attr( implode( ' ', $_parent_classes ) ); ?>">
    <figure class="<?php echo esc_attr( implode( ' ', $_wrapper_classes ) ); ?>"
        data-id="<?php echo esc_attr( $blockId ); ?>">
        <div class="image-wrapper">
            <?php echo $custom_logo; ?>
        </div>
    </figure>
</div>