Skip to Content
Menu

$brain

This global variable stores useful data that is available throughout PHP files and is localized for JavaScript usage too.

PHP April 3, 2021

Usage

This is a variable or event handle.

Demo


Available Key Names

version
	number
	date
	child
site
	name
	charset
	is_child
	directory
		root
		template
			path
			uri
		stylesheet
			path
			uri
		modules
		uploads
	home_url
	sw_url
	domain
	hostname
	protocol
	language
	ajax
		url
		nonce
	options
		sw
		gaid
		nebula_google_browser_api_key
		facebook_url
		facebook_app_id
		twitter_username
		twitter_url
		linkedin_url
		youtube_url
		instagram_url
		pinterest_url
		attribution_tracking
		adblock_detect
		manage_options
		debug
		js_error_log
		bypass_cache
		sidebar_expanders
	resources
		styles
			wp_pagenavi
			nebula_bootstrap
			nebula_font_awesome
			nebula_main
			nebula_datatables
			nebula_chosen
			nebula_jquery_ui
			nebula_pre
			nebula_docs
			nebula_child
		scripts
			nebula_vimeo_block
			nebula_youtube_block
			nebula_bootstrap
			nebula_jquery_ui
			nebula_vimeo
			nebula_datatables
			nebula_chosen
			nebula_usage
			nebula_nebula
			nebula_docs
			nebula_main
		lazy
			styles
				nebula-font_awesome
				wp-pagenavi
			scripts
	timings
	ecommerce
post
	id
	permalink
	title
	excerpt
	author
	year
	categories
	tags
	page
	isFrontPage
	ancestors
screen
	isFrontend
	pagenow
dom
session
	ip
	id
	utms
	flags
		adblock
	geolocation
	referrer
	landing_page
user
	id
	name
		first
		last
		full
	email
	ip
	dnt
	cid
	client
		bot
		remote_addr
		user_agent
		device
			full
			formfactor
			brand
			model
			type
		os
			full
			name
			version
		browser
			full
			name
			version
			engine
			type
	address
	facebook
	flags
		fbconnect
	staff
	known

Additional Notes

Hierarchy of the Nebula array/object:

  • “site”: Data about the website in general
    • Includes “name”, “directory”, “home_url”, “domain”, “protocol”, “language”, “ajax”, “upload_dir”, “ecommerce”, “options”, “resources”
  • “post”: Helps search results use the correct ID
  • “dom”: DOM objects for caching selectors (only available in JavaScript)
    • “window”, “document”, “html”, “body”
  • “session”: Session information of the user
    • “id”, “flags”
  • “user”: User information for future visits
    • “cid”

This is localized into the nebula object in JavaScript.

Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!

    Source File

    Located in /libs/Scripts.php.

    No Hooks

    This function does not have any filters or actions available. Request one?