<?php defined( 'ABSPATH' ) || exit; ?>

<div class="mh-copyrights">
    <?php 
    $mharty_cr_notice = get_theme_mod('cr_notice', '');
    $default_notice = '&copy; ' . date('Y') . ' <a href="' . esc_url(get_bloginfo('url')) . '">' . esc_html(get_bloginfo('name')) . '</a>';
    $mharty_cr_notice = $mharty_cr_notice !== '' ? mh_sanitize_text_input($mharty_cr_notice) : $default_notice;

    if (true === get_theme_mod('mharty_show_cr', true)) {
        $powered_by = sprintf('<span>%1$s <a href="https://mharty.com" title="%2$s">%3$s</a></span>',
            esc_html__('Powered by', 'mharty'),
            esc_attr__('Premium RTL Wordpress Theme', 'mharty'),
            esc_html__('Mharty Theme', 'mharty')
        );
        echo $mharty_cr_notice . ' | ' . $powered_by;
    } else {
        echo $mharty_cr_notice;
    }
    ?>
</div>
