gravityflow_entry_detail_args
The gravityflow_entry_detail_args filter allows the entry detail arguments to be overridden
Parameters
Parameter | Type | Definition |
---|---|---|
$args | Array | The entry detail page arguments. |
Examples
Example - Enable the timeline if the user is admin
add_filter( 'gravityflow_entry_detail_args', 'sh_gravityflow_entry_detail_args'); function sh_gravityflow_entry_detail_args( $args ) { $user_roles = wp_get_current_user()->roles; if ( in_array( 'administrator', $user_roles ) ) { $args['timeline'] = false; } else { $args['timeline'] = false; } gravity_flow()->log_debug( __METHOD__ . '() args: ' . print_r( $args, true ) ); return $args; }
Placement
This code should be placed in the functions.php file of your active theme.