removing an action in the child theme
-
I have a very basic, very confused question:
if I do this in the parent theme’s functions.php:
function some_action(){ do_action('some_action'); } function print_hello(){ echo "hello" } add_action('some_action','print_hello'); some_action(); //echos hello
That’s all fine and dandy. But if in the child theme’s functions.php I do:
require_once(TEMPLATEPATH . '/functions.php'); var_dump(remove_action('some_action', 'print_hello')); exit;
I get
bool(false)
Why?
I recently wrote a test:
if(has_action('some_action', 'print_hello')){ echo "true"; }else{ echo "action deos not exist"; }
and got:
action deos not exist
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘removing an action in the child theme’ is closed to new replies.