lundi 29 décembre 2014

do_action filter function from add_action array


I am looking at the following setup:




-- Combing multiple functions into single action --
add_action( 'single_post_meta_start', array( $this, 'the_title' ), 10 );
add_action( 'single_post_meta_start', array( $this, 'the_author' ), 20 );
add_action( 'single_post_meta_start', array( $this, 'the_category' ), 30 );

-- Combine single_post_meta_xxx into single function --
public function single_job_listing_meta() {
do_action( 'single_job_listing_meta_start' );
do_action( 'single_job_listing_meta_end' );
do_action( 'single_job_listing_meta_after' );
}


Is it possible to filter the action to only retrieve back the function 'the_category' and the other function codes will not pass through to the front end?


Thanks.





Aucun commentaire:

Enregistrer un commentaire