jobrelay_wpcon_google_indexing_should_notify hook

In this article

apply_filters( 'jobrelay_wpcon_google_indexing_should_notify', $notify bool, $url string, $type string, $post_id int )

Allows filtering of whether Google is told about a job. Return false to stop the job being queued.

Parameters

  • $notify (bool) Whether to tell Google. Defaults to true.
  • $url (string) The URL of the job.
  • $type (string) Either URL_UPDATED or URL_DELETED.
  • $post_id (int) The post ID of the job, if there is one.

Example

// don't tell google about featured jobs being removed.
add_filter( 'jobrelay_wpcon_google_indexing_should_notify', function( $notify, $url, $type, $post_id ) {
	if ( 'URL_DELETED' === $type && '1' === get_post_meta( $post_id, '_featured', true ) ) {
		return false;
	}
	return $notify;
}, 10, 4 );

All docs

Can’t find what you need?

Our integrations team set up every JobRelay site, so they know it inside out. Get in touch and we’ll help.