gravityflow_columns_status_table

Description

The gravityflow_columns_status_table filter allows the columns to be modified for the status page.

Note: Only use this filter if understand what you’re doing as it can interfere with the status filters. Different filters return different columns, so you need to make sure you return the right columns.

Parameters

ParameterTypeDetails
$columnsArrayThe columns to be filtered.
$argsArrayThe array of args for this status table.
$tableWP_List_TableThe current WP_List_Table object.

Examples

Change the order of columns in the Workflow Status table

1
2
3
4
5
6
7
8
9
10
11
12
add_filter( 'gravityflow_columns_status_table', 'sh_gravityflow_columns_status_table', 10, 3 );
function sh_gravityflow_columns_status_table( $columns, $args, $table ) {
    $order = array( 'cb', 'workflow_final_status','created_by', 'form_id' );
    $new_columns   = array();
    foreach ( $order as $k ) {
        if ( isset( $columns[ $k ] ) ) {
            $new_columns[ $k ] = $columns[ $k ];
        }
    }
 
    return $new_columns;
}

Change column headers in the Workflow Status table.

1
2
3
4
5
6
add_filter( 'gravityflow_columns_status_table', 'nc_gravityflow_columns_status_table', 10, 3 );
function nc_gravityflow_columns_status_table( $columns, $args, $table ) {
   $columns['created_by'] = "New title for submitter column";
   $columns['workflow_step'] = "New column title";
   return $columns;
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?