HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/testingff/public_html/fdfctr/wp-content/plugins/lifterlms/assets/js/app/rest.js
/**
 * Rest Methods
 * Manages URL and Rest object parsing
 *
 * @package LifterLMS/Scripts
 *
 * @since Unknown
 * @version  Unknown
 */

LLMS.Rest = {

	/**
	 * Init
	 * loads class methods
	 */
	init: function() {
		this.bind();
	},

	/**
	 * Bind Method
	 * Handles dom binding on load
	 *
	 * @return {[type]} [description]
	 */
	bind: function() {
	},

	/**
	 * Searches for string matches in url path
	 *
	 * @param  {Array}  strings [Array of strings to search for matches]
	 * @return {Boolean}         [Was a match found?]
	 */
	is_path: function( strings ) {

		var path_exists = false,
			url         = window.location.href;

		for ( var i = 0; i < strings.length; i++ ) {

			if ( url.search( strings[i] ) > 0 && ! path_exists ) {

				path_exists = true;
			}
		}

		return path_exists;
	},

	/**
	 * Retrieves query variables
	 *
	 * @return {[Array]} [array object of query variable key=>value pairs]
	 */
	get_query_vars: function() {

		var vars   = [], hash,
			hashes = window.location.href.slice( window.location.href.indexOf( '?' ) + 1 ).split( '&' );

		for (var i = 0; i < hashes.length; i++) {
			hash = hashes[i].split( '=' );
			vars.push( hash[0] );
			vars[hash[0]] = hash[1];
		}

		return vars;
	}

};