function handle_shortcode($attr){ return get_option($attr['name']); } add_shortcode('get_option', 'handle_shortcode');