Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielmerovingi/5ae8dbe90d0f51b22e0867b3d98c183d to your computer and use it in GitHub Desktop.
Save gabrielmerovingi/5ae8dbe90d0f51b22e0867b3d98c183d to your computer and use it in GitHub Desktop.
Log the event under a unique reference based on the post type being published.
/**
* Adjust Publish Reference
* Log the event under a unique reference based on the post type being published.
* @version 1.0
*/
function mycred_pro_publish_ref_by_type( $reference, $post ) {
return 'publish_' . $post->post_type;
}
add_filter( 'mycred_publish_hook_ref', 'mycred_pro_publish_ref_by_type', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment