I would temporarily remove a shortcode, make something and restore it… it’s possible?
// override default wordpress "the_content" hook
remove_filter('the_content', 'do_shortcode', 11);
add_filter('the_content', 'my_the_content', 11);
function my_the_content($content) {
remove_shortcode('some_shortcode');
$content = do_shortcode($content);
// restore the shortcode
add_shortcode('some_shortcode', '?????????????????????????????');
return $content;
}
the problem is how restore it correctly…
original shortcode is in a class, eg.:
class foo {
function __construct(){
add_shortcode('some_shortcode', array($this, 'get_some_shortcode'));
}
public function get_some_shortcode(){
return 'bar';
}
}