post_type_link is a filter, not an action.  Also, 2 args instead of 4 is fine, as we're not using the $leavename or $sample variables.