I built a plugin, and I would like to use shortcodes in the integrated wp_editor.
I'm using echo to display the content of the wp_editor, so I think that's the problem why I can't use the shortcode. What's the method to do that?
I'm using the following code for shortcode:
add_shortcode('facebook', 'facebook');
function facebook($atts) {
$options = get_option( 'social_options' );
return '<a class="socialmedia socialfacebook" href="'.$options["facebook"].'">Facebook</a>';
}
..and the following code to get the content of the wp_editor:
<?php
$footer = get_option('footer_options');
$footer_content = array($footer['footer_content_1'], $footer['footer_content_2']);
foreach($footer_content as $content) {
echo'<aside class="tab-content">
'.$content.'
</aside>';
}
?>