0

I need help in removing the action of wordpress within a public function of class. I want to remove OLD function and want to define a new function against it.

Code looks like below

function hook_link($c){ return  apply_filters('hook_link', $c);  }

class blue_themes {

    public function blue_themes(){

        add_action( 'hook_link', array($this, 'OLD') );

        function OLD($val){ //want to remove this action

           return $val;

        }       

    }

}
user2096321
  • 53
  • 1
  • 5

1 Answers1

-1

use this function for remove old function and add new function .

remove_filter('remove function name', 1);
add_filter('add function name', 1);
Tushal Bhanderi
  • 128
  • 2
  • 16