LLMS_AJAX::register()

Register the AJAX handler class with all the appropriate WordPress hooks.


Description Description


Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.ajax.php

	public function register() {

		$handler = 'LLMS_AJAX';
		$methods = get_class_methods( 'LLMS_AJAX_Handler' );

		foreach ( $methods as $method ) {
			add_action( 'wp_ajax_' . $method, array( $handler, 'handle' ) );
			add_action( 'wp_ajax_nopriv_' . $method, array( $handler, 'handle' ) );
		}

		$action = is_admin() ? 'admin_enqueue_scripts' : 'wp_enqueue_scripts';
		add_action( $action, array( $this, 'register_script' ), 20 );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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