This gravityflow_workflow_url is used to filter any URL(s) which Gravity Flow outputs. It is primarily called through notifications and merge tags for inbox or status pages. 


$url string
$page_id int
$assignee object


Example 1 - Customize the host portion of URL for a local environment

This is an example for a non-prod environment which sets WP_HOME / WP_SITEURL different by environment.
For most local, dev or staging environments, this use of filter should not be required.

add_filter( 'gravityflow_workflow_url', 'sh_custom_workflow_url', 10, 3 );
function sh_custom_workflow_url( $url, $page_id, $assignee ) {
    //Identify server level info host provides to compare / confirm environment
    if ( $_SERVER['HTTP_ORIGIN'] == 'http://local.test' ) {
        //Replace prod details with local/test URL
        $url = str_replace( "http://production.url", "http://local.test", $url );
    return $url;

Another use case for the filter might be when you want to include analytic tracking info onto all links.


This code should be placed in the functions.php file of your active theme.