ifacethoughts

WordPress Global Variables

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:

Technorati tags: , ,

Copyright Abhijit Nadgouda

Discussion [Participate or Link]

  1. Red light in a blue box » Global vars in Wordpress said:

    [...] There seems to be little documentation on certain aspects of WordPress. One such under-documented thing is the global variables available. Luckily, Abhijit Nadgouda has complied a list of the WordPress global variables, the list links to any known documentation. [...]

  2. **** FUNKABLOG 64 BASIC V2 **** » Blog Archive » Signs your PHP needs refactoring said:

    [...] first sign is a huge pet peeve of mine: the use of global variables. I’m looking at you, Matt Mullenweg. Tags: php, refactoring, wordpress, [...]

  3. Weblog Tools Collection » Blog Archive » Global Variables and the WordPress Loop said:

    [...] the_post() has been called, you have access to a multitude of template tags and global variables. Below are some examples of template tags that are now [...]

  4. RiverlandPages » Global Variables and the WordPress Loop said:

    [...] the_post() has been called, you have access to a multitude of template tags and global variables. Below are some examples of template tags that are now [...]

  5. Sudar said:

    Thanks for the list. It will be really very helpful to plugin authors like me.

    Regards
    Sudar

  6. Mark said:

    Thanks a bunch, very useful!!!

  7. WordPress????????? said:

    [...] WordPress Global Variables iface thoughts [...]

  8. ?????JOE? » Blog Archive » (?)????? WordPress ??? said:

    [...] ? the_post() ????????????????????????????????????????????? [...]

  9. WordPress????~????~ - typista said:

    [...] http://ifacethoughts.net/2006/02/25/wordpress-global-variables/ ? [...]

  10. WordPress ???????? said:

    [...] ? the_post() ?????????????????????????? [...]

  11. Word Press???????? | My Footsteps said:

    [...] ?????????????????? ifacethoughts.net [...]

  12. WordPress ???????? | ?????? said:

    [...] ? the_post() ?????????????????????????? [...]

  13. Hello world? | TodayBeta said:

    [...] the_post() ?????????????????????????? [...]

  14. Sung Tyndal said:

    As a newcomer in this field I am constantly on the lookout for insightful content on the subject. Your blog has filled my need to a great extent.

  15. CYASOFT Blog | Blog | WordPress Global Variables (updating) said:

    [...] http://ifacethoughts.net/2006/02/25/wordpress-global-variables/ [...]

  16. Michael Fokken said:

    What about comment_depth?

  17. WordPress,???????????????????????? | ???? said:

    [...] ? the_post() ?????????????????????????? [...]

  18. WordPress,?????????????????????? | ???? said:

    [...] ? the_post() ?????????????????????????? [...]

  19. WordPress,?????????????????????? | ???? said:

    [...] ? the_post() ?????????????????????????? [...]

  20. WordPreas???????? « redcocker's notebook said:

    [...] WordPress Global Variables [...]

  21. $post_name said:

    [...] I have no idea where $post_name is assigned. It's not a global variable, I checked it out here: http://ifacethoughts.net/2006/02/25/wordpress-global-variables/ Any ideas? I'm thinking it's in a core file somewhere. Reply With Quote + [...]

  22. WordPress,?????????????????????? – ? said:

    [...] ? the_post() ?????????????????????????? [...]

  23. WordPress ???????? | ???? said:

    [...] ? the_post() ?????????????????????????? [...]

  24. WordPress ???????? | How && Why said:

    [...] ? the_post() ?????????????????????????? [...]

  25. wordpress???WordPress ???????? – ???? said:

    […] the_post() ??????????????????????????? […]

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

freshthoughts

contactme

Abhijit Nadgouda
iface Consulting
India
+91 9819820312
My bookmarks

badgesand...

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.