remove_action not removing action (on wp_widgets_init)
-
Hi !
I’m trying to get rid of the default WordPress widgets, as I do not use them. Since they are launched by
add_action('init', 'wp_widgets_init', 1);
I tried
remove_action('init', 'wp_widgets_init', 1);
I also use
add_action( 'init', 'other_widgets_init') ; function other_widgets_init() { if ( !is_blog_installed() ) return; do_action('widgets_init'); }
to launch all the other widgets, since this call is in wp_widgets_init.
But
remove_action
does not do its job ! The default widget are still loaded…Everythings works fine if I comment the
add_action
in the core file, but I don’t want to do it this way, I want to do the thing proper.Why doesn’t the
remove_action
do its job of removing the call towp_widgets_init
like the Codex says it should ?!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘remove_action not removing action (on wp_widgets_init)’ is closed to new replies.