LLMS_AJAX::register()

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


Description Description


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' ) );
			add_action( 'wp_loaded', array( $this, 'register_script' ) );
		}

	}


Top ↑

User Contributed Notes User Contributed Notes

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