Developer hooks

JobRelay was built with WordPress developers in mind and as such provides a number of customisable options for developers to work with to make customisations.

The connector plugin added to WordPress has a number of hooks and filters which developers can use to run their own code and change values at various different places. Below is a brief overview of the most useful.

JobRelay filters

The following filter hooks are available.

jobrelay_wpcon_job_data( $job_data )

This filter fires before any data is processed. It allows developers to manipulate the data arriving in WordPress before it is processed. The filter is passed the following arguments:

jobrelay_wpcon_insert_job_post_args( $args, $job_data )

Allows developers to change the arguments used in the wp_insert_post() call when before the new job is created.

The filter is passed the following arguments:

jobrelay_wpcon_update_job_post_args( $args, $job_post_id, $job_data)

After a new job is saved to WordPress, it is updated in order to update the jobs URL, based on the newly assigned post ID. This filter allows developers to modify to arguments used in the call wp_update_post() when this happens. The filter is passed the the following arguments:

JobRelay actions

The following action hooks are available.

do_action( 'jobrelay_wpcon_job_inserted', $job_post_id, $job_data );

This action fires directly after a new job has been inserted into WordPress, but before any taxonomy term or meta data has been saved. It is passed the following arguments:

do_action( 'jobrelay_wpcon_meta_added', $job_post_id, $meta_key, $meta_value, $job_data );

Fires directly after job meta data is successfully saved. It is passed the following arguments:

do_action( 'jobrelay_wpcon_job_term_added', $job_post_id, $job_tax_terms, $taxonomy, $job_data );

Fires directly after job taxonomy term data is successfully saved. It is passed the following arguments:

do_action( 'jobrelay_wpcon_job_inserted_complete', $job_post_id, $job_data );

This action runs after the job, its meta data and taxonomy terms have all be processed and added to WordPress. It is passed the following arguments:

do_action( 'jobrelay_wpcon_job_deleted', $update_post_id, $job_data );

Fires directly after a job has been deleted. It is passed the following arguments:

Further reading