Usage of global variables in WordPress is easy syntax, but it also makes breaking of functionalities easier while using them. This is an effort to document all the global variables used by WordPress and any possible documentation for it to enable wiser use in plugins and templates. A generic rule to follow while using global variables in plugins and themes is that values should only be read from them and they should never be written. Values will be written to them in the WordPress code and never in the plugins or themes. This documentation is good for WordPress 2.0.1.
You can subscribe to the WordPress Global Variables feed to receive updates on the global variables.
This post will be continuously updated:
- $admin_page_hooks
- $ajax_results
- $all_links
- $allowedposttags
- $allowedtags
- $authordata
- $bgcolor
- $cache_categories
- $cache_lastcommentmodified
- $cache_lastpostdate
- $cache_lastpostmodified
- $cache_userdata
- $category_cache
- $class
- $comment
- $comment_cache
- $comment_count_cache
- $commentdata
- $current_user
- $day
- $debug
- $descriptions
- $error
- $feeds
- $id
- $is_apache
- $is_IIS
- $is_macIE
- $is_winIE
- $l10n
- $locale
- $link
- $m
- $map
- $max_num_pages
- $menu
- $mode
- $month
- $month_abbrev
- $monthnum
- $more
- $multipage
- $names
- $newday
- $numpages
- $page
- $page_cache
- $paged
- $pagenow
- $pages
- $parent_file
- $preview
- $previousday
- $previousweekday
- $plugin_page
- $post
- $post_cache
- $post_default_category
- $post_default_title
- $post_meta_cache
- $postc
- $postdata
- $posts
- $posts_per_page
- $previousday
- $request
- $result
- $richedit
- $single
- $submenu
- $table_prefix
- $targets
- $timedifference
- $timestart
- $timeend
- $updated_timestamp
- $urls
- $user_ID
- $user_email
- $user_identity
- $user_level
- $user_login
- $user_pass_md5
- $user_url
- $weekday
- $weekday_abbrev
- $weekday_initial
- $withcomments
- $wp
- $wp_broken_themes
- $wp_db_version
- $wp_did_header
- $wp_did_template_redirect
- $wp_file_description
- $wp_filter
- $wp_importers
- $wp_plugins
- $wp_themes
- $wp_object_cache
- $wp_query
- $wp_queries
- $wp_rewrite
- $wp_roles
- $wp_similiesreplace
- $wp_smiliessearch
- $wp_version
- $wpcommentspopupfile
- $wpcommentsjavascript
- $wpdb
Technorati tags: wordpress, global variables, plugins
Copyright Abhijit Nadgouda
Image may be NSFW.
Clik here to view.
Clik here to view.
Clik here to view.
Clik here to view.
