LLMS_AJAX::register_script()

Register our AJAX JavaScript.


Description Description


Source Source

File: includes/class.llms.ajax.php

	public function register_script() {

		// script will only register once
		wp_register_script( 'llms',  LLMS_PLUGIN_URL . '/assets/js/llms' . LLMS_ASSETS_SUFFIX . '.js', array( 'jquery' ), '', true );
		wp_localize_script( 'llms', 'wp_ajax_data', $this->get_ajax_data() );

		// ensure this doesn't load on the wp-login.php screen
		if ( isset( $_SERVER['SCRIPT_NAME'] ) && false === stripos( $_SERVER['SCRIPT_NAME'], strrchr( wp_login_url(), '/' ) ) ) {
			wp_enqueue_script( 'llms' );
		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.