<?php
$digital_marketing_blog_default_copyright = sprintf(
	/* translators: %s: current year. */
	esc_html__( 'Copyright %s. All rights reserved.', 'digital-marketing-blog' ),
	esc_html( gmdate( 'Y' ) )
);

Kirki::add_section( 'copyright_section', array(
    'title'          => esc_html__( 'Copyright Section', 'digital-marketing-blog' ),
    'panel'          => 'digital_marketing_blog_global_panel',
    'capability'     => 'edit_theme_options',
) );

Kirki::add_field( 'digital_marketing_blog_config', [
	'type'     => 'editor',
	'settings' => 'copyright_text',
	'label'    => esc_html__( 'Edit Copyright Text', 'digital-marketing-blog' ),
	'section'  => 'copyright_section',
	'default'  => $digital_marketing_blog_default_copyright,
	'transport' => 'postMessage',
    'js_vars'   => [
        [
            'element'  => '.site-copyright .site-info .site-copyright-text',
            'function' => 'html',
        ]
    ],

] );