Description
The gravityflow_reports_args filter allows the reports display arguments to be overridden.
Parameters
Parameter | Type | Details |
---|---|---|
$args | Array | The reports display arguments. |
The defaults for the arguments array are:
$defaults = array(
'view' => rgget( 'view' ),
'form_id' => absint( rgget( 'form-id' ) ),
'step_id' => absint( rgget( 'step-id' ) ),
'category' => sanitize_key( rgget( 'category' ) ),
'range' => $range,
'start_date' => $start_date,
'assignee' => $assignee_key,
'assignee_type' => $assignee_type,
'assignee_id' => $assignee_id,
'check_permissions' => true,
'base_url' => admin_url( 'admin.php?page=gravityflow-reports' ),
'display_filter' => true,
);
Examples
add_filter( 'gravityflow_reports_args', 'sh_gravityflow_reports_args', 10, 1 );
function sh_gravityflow_reports_args( $args ) {
Remove the filter bar from the report screen for a specific form ID
if( $args['form_id'] == '42' ) {
$args['display_filter'] = false;
}
return $args;
}
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?