These are special kind of variables in wordpress. All the data generated by wordpress can be found in global variables. These can be used anywhere in themes or plugins, or even if new theme is installed or new plugin is created.To access the variables,we need to globalize it like: global $variable, where global is predifined keyword.
Some Global Variables:
1) Admin Globals:
a) $pagenow(string)
b) $post_type(string)
c) $allowedposttags(array)
d) $allowedtags(array)
e) $menu(array)

2)Browser Detection Booleans:
It gives information about user browser,some examples are
a) $is_phone(boolean)
b) $is_chrome(boolean)
c) $is_safari(boolean)
d) $is_safari(boolean)..etc

3)Inside the loops Variables:
These variables store information about current post processing,some examples are
a)$post
b)$page(int)
c)$pages(int)
d)$currentmonth

4)Misc:
a)$wpdb(object)
b)$wp_query(object)
c)$wp(object)..etc

5)Version Variables:
a)$wp_versions(string)
b)$wp_db_versions(int)..etc

6)Web Server Detection Booleans:
These contain information about which web server is being used by wordpress.
a)$is_apache(boolean)
b)$is_iis7(boolean)
c)$is_IIS(boolean)

SHARE
Previous articleShortcode
Next articleFunctions in Wordpess

LEAVE A REPLY