remove twentytwenty one dark mode switch action
-
Hi,
I would like to remove an action from the twentytwenty one parent theme class.
This is the class : Twenty_Twenty_One_Dark_Mode
this is the action : add_action( ‘wp_footer’, array( $this, ‘the_switch’ ) );
I tried this way
function remove_darkmode_switch_parent() { global $darkmode_parent; remove_action('wp_footer', array($darkmode_parent, 'the_switch' )); } add_action( 'after_setup_theme', 'remove_darkmode_switch_parent',0);
but no luck.
Once I got it removed I will be able to extend the class my own way.
Cheers for any clue. Otherwise i’ll use jQuery to custom the button.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘remove twentytwenty one dark mode switch action’ is closed to new replies.