Action
rpress_before_graph
On this page
Fires before a graph is output.
Runs at the start of RPRESS_Graph::display(), before the graph script and container are printed. The graph object is passed so a callback can adjust its options or print markup above the chart.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$graph | RPRESS_Graph | The graph object about to be displayed. |
Example#
function my_before_graph( $graph ) {
echo '<h4>' . esc_html__( 'Last 30 days', 'my-plugin' ) . '</h4>';
}
add_action( 'rpress_before_graph', 'my_before_graph', 10, 1 );
Source#
Fired from:
includes/admin/reporting/class-rpress-graph.php(line 232), inRPRESS_Graph::display()
See also#
Was this page helpful?
