Use content custom filter for all shortcodes

I have tried many hooks trying to manipulate the processed content coming from of all the shortcodes, customize it, and output the final result on the pages e.g.:

function my_the_content_filter($content) {
/*if ($GLOBALS[‘post’]->post_name == ‘debug’) {
return var_export($GLOBALS[‘post’], TRUE );
}*/

//return $content;
return ‘@@@’;
}

//add_filter( ‘the_content’, ‘my_the_content_filter’ );

or

add_filter(‘query’, ‘some_callback_that_change_query’);

function some_callback_that_change_query($sql){
/*remove_filter(‘query’, ‘some_callback_that_change_query’);
// your banny wrote
add_filter(‘query’, ‘some_callback_that_change_query’);*/
echo ‘<pre>’, print_r( $sql ),'</pre>’;
return $sql;
}

But none seems to have effect for my actual contents, and I have no idea what shortcodes are, so I would like to execute a filter or something that works on every shortcode

Read more here:: Use content custom filter for all shortcodes

Leave a Reply

Your email address will not be published. Required fields are marked *