Select Page

There is no denying filters in WordPress are amazing but for me the syntax always seems backwards (im not saying its wrong just how my mind reads it), so i thought i would write an article to make it clear (for me anyway).


Adds a event in the php exacution that you can hook into useing the add_filter() function.

This wrapps what you want to be able to filter(change).

mixed apply_filters ( 
	string $event_name,
	mixed $value,
	mixed $...


Adds a filter to the event that is set by apply_filter() function.

This is the change you want to make to the filter.

bool add_filter ( 
	string $event_name,
	callable $callback_name, 
	integer $priority = 10, 
	integer $number_of_args = 1