How to add filter with 2 args?
function my_locate_template( $path, $template ){ $path = MY_INCLUDES_DIR . ‘/document/’. $template; return $path; } add_filter( ‘documents_template’,’my_locate_template’, 10, 2 ); add_filter takes 4 variables. The first and second are required. 1. name of the filter, 2. name of the function. The third is the priority (when does the function gets fired). And the fourth is the … Read more