LLMS_Admin_Assets::maybe_enqueue_reporting( WP_Sreen $screen )
Register and enqueue scripts used on and related-to reporting and analytics
Parameters Parameters
- $screen
-
(WP_Sreen) (Required) Screen object from WP
get_current_screen()
.
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.assets.php
*/ return apply_filters( 'llms_get_analytics_js_options', compact( 'currency_format' ) ); } /** * Register and enqueue scripts used on and related-to reporting and analytics * * @since 4.3.3 * @since 5.9.0 Stop using deprecated `FILTER_SANITIZE_STRING`. * @since 7.2.0 Load on dashboard screen. * Use `LLMS_ASSETS_VERSION` for asset versions. * * @param WP_Sreen $screen Screen object from WP `get_current_screen()`. * @return void */ protected function maybe_enqueue_reporting( $screen ) { if ( in_array( $screen->base, array( 'lifterlms_page_llms-reporting', 'lifterlms_page_llms-dashboard', 'dashboard' ), true ) ) { $current_tab = llms_filter_input( INPUT_GET, 'tab' ); wp_register_script( 'llms-google-charts', LLMS_PLUGIN_URL . 'assets/js/vendor/gcharts-loader.min.js', array(), '2019-09-04', false ); wp_register_script( 'llms-analytics', LLMS_PLUGIN_URL . 'assets/js/llms-analytics' . LLMS_ASSETS_SUFFIX . '.js', array( 'jquery', 'llms', 'llms-admin-scripts', 'llms-google-charts' ), LLMS_ASSETS_VERSION, true );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Stop using deprecated FILTER_SANITIZE_STRING . |
4.3.3 | Introduced. |