LLMS_Admin_Assets::admin_print_scripts()
Initialize the “llms” object for other scripts to hook into
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.assets.php
public function admin_print_scripts() { global $post; if ( ! empty( $post ) ) { $postdata = array( 'id' => $post->ID, 'post_type' => $post->post_type, ); } else { $postdata = array(); } echo ' <script type="text/javascript"> window.llms = window.llms || {}; window.llms.admin_url = "' . admin_url() . '"; window.llms.post = ' . json_encode( $postdata ) . '; </script> '; echo '<script type="text/javascript">window.LLMS = window.LLMS || {};</script>'; echo '<script type="text/javascript">window.LLMS.l10n = window.LLMS.l10n || {}; window.LLMS.l10n.strings = ' . LLMS_L10n::get_js_strings( true ) . ';</script>'; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |