LLMS_Admin_Assets::get_analytics_options()
Retrieve an array of options used to localize the llms.analytics
JS instance.
Return Return
(array)
Source Source
File: includes/admin/class.llms.admin.assets.php
protected function get_analytics_options() { /** * Create a number format string readable by google charts * * Replacing `9.9` with `9,9` and `0,0` with `0.0` to prevent loading errors encountered * as a result of the chart pattern not allowing usage of a comma for the decimal separator. * * @see https://stackoverflow.com/a/18204679/400568 */ $currency_format = str_replace( array( '9.9', '0,0', '9' ), array( '9,9', '0.0', '#' ), llms_price_raw( 9990.00 ) ); /** * Customize Javascript localization options passed to the `llms.analytics` JS instance. * * @since 4.5.1 * * @param array $opts Associative array of option data. */ return apply_filters( 'llms_get_analytics_js_options', compact( 'currency_format' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.5.1 | Introduced. |