LLMS_Session::should_init()

Determines if the cookie and related save/destroy handler actions should be initialized


Description Description

When doing CRON or when on the admin panel we don’t want to load, otherwise we do.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/class.llms.session.php

	protected function should_init() {

		$init = ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( is_admin() && ! wp_doing_ajax() ) ? false : true;

		/**
		 * Filter whether or not session cookies and related hooks are initialized
		 *
		 * @since 4.0.0
		 *
		 * @param boolean $init Whether or not initialization should take place.
		 */
		return apply_filters( 'llms_session_should_init', $init );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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