There is add_action() function inside function which is callback for add_shortcode(). Any idea how to remove this action with the help of custom plugin? Should I hook to any action which is called later then add_shortcode() function? I do not want to removing and re-adding shortcode, because there is huge function beyond it.
Simple example:
function test_shortcode() {
... other code ...
add_action( 'some_hook', 'custom_function');
... other code ...
}
add_action( 'wp_head', 'setup_theme' );
function setup_theme() {
... other code...
add_shortcode( 'test', 'test_shortcode' );
... other code ...
}
I need to remove custom_function() from this shortcode.
Thank you for your help...
remove_action( 'wp_head', 'custom_function');
?custom_function
? I mean, is it always the same and always bound towp_head
with the same priority?