I am creating a Wordpress plugin. I want to create 1 single shortcode that changes output based on the settings changed by the user on the admin settings page.
So for starters, I have something like this below:
add_shortcode( 'my_shortcode', 'my_shortcode');
function my_shortcode($atts) {
$atts = shortcode_atts (
array (
'display' => get_option('setting_1'),
'toolbar' => get_option('setting_2'),
'branding' => get_option('setting_3')
), $atts);
}
What do I need to do next in order to store these settings into a single shortcode that keeps it's name despite the settings changing?