Posts

Proper way to use apply_filters() with class functions?

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0; } 3 I want to allow my user to override a function. It's a plugin. I believe that apply_filters() can be used for this. this can be overridden by add_filter(). I am confused about how to use it. Say if i have a class like this class Example{ public function hello(){ $title = the_title_attribute(); return $title; } } What change should I make to allow that $title to be modified? where to place the apply filter? Thanks plugin-development filters share | improve this question edite...