I have a custom field in the theme Customizer that allow to define own copyright information. I created a shortcode displaying the current year. How to make the shortcode work when someone has pasted it into textarea?
I use Kirki framework to create theme options.
Kirki::add_field( 'my_customizer', array(
'type' => 'editor',
'settings' => 'copyright',
'label' => __( 'Content', 'mytheme' ),
'section' => 'section_footer',
'default' => __( 'Copyright ⓒ All rights reserved.', 'mytheme' ),
'description' => __( 'You can use [current-year] shortcode if you want.', 'mytheme' ),
) );
To display above option I add this to footer.php:
echo Kirki::get_option( 'my_customizer', 'copyright' );
What I see on the site:
Copyright ⓒ [current-year] All rights reserved.
All rights reserved. ⓒ [current-year] by XYZ
All rights reserved. ⓒ 2016 - [current-year]
What I need to achieve:
Copyright ⓒ 2019 All rights reserved.
All rights reserved. ⓒ 2019 by XYZ
All rights reserved. ⓒ 2016 - 2019
Any solution / idea? Thanks!