Skip to content
Docs
Get RestroPress

Action

rpress_graph_load_scripts

Updated
On this page

Fires after the graphing library script is enqueued.

Runs inside RPRESS_Graph::load_scripts() right after the jquery-flot script is enqueued. Use it to enqueue plugins that depend on the flot library.

Example#

function my_enqueue_flot_extras() {
	wp_enqueue_script( 'my-flot-extras', plugins_url( 'js/flot-extras.js', __FILE__ ), array( 'jquery-flot' ), '1.0.0', false );
}
add_action( 'rpress_graph_load_scripts', 'my_enqueue_flot_extras' );

Notes#

The pie graph also calls load_scripts(), so this fires for pie charts too.

Source#

Fired from:

  • includes/admin/reporting/class-rpress-graph.php (line 109), in RPRESS_Graph::load_scripts()

See also#

Was this page helpful?