coningham
1/27/2015 - 5:02 PM

remove action

remove action

/*The child themes ”functions.php” is executed before the parent themes ”functions.php” and the remove_action command doesn’t know about the function it is trying to remove. We somehow need to remove the old function after it has been declared. The wordpress hook after_setup_theme seems to be a good candidate for a solution because it runs AFTER the parent and childs functions are loaded.*/

//Exemplo site Sedcare:
//remove functions
function remove_theme_features() {
     remove_action('init','slider_register');
}

add_action('after_setup_theme','remove_theme_features');