month

Just like weekday, WordPress uses month global variable to store the month names. It is a single dimensional array set in [wordpress root folder/wp-includes/locale.php]. It stores the localized values of the month names.

Plugin and theme developers can access this global variable, however, to retrieve time and date information about posts within a loop the functions mentioned in weekday can be used.

Back to full list of global variables.

Technorati tags:

weekday_abbrev

WordPress stores in the abbreviations of weekday names in weekday_abbrev weekday variable. It is a single dimensional array, indexed by the weekday name and is set in [wordpress root folder]/wp-includes/locale.php. Just like weekday global variable, weekday_abbrev stores localized values.

Plugin and theme developers can use weekday_abbrev to get abbreviation of a specified weekday name.

Back to full list of global variables.

Technorati tags: .

weekday

WordPress uses weekday global variable to access, exactly what it says, names of the weekdays. It is a one dimensional array set in the file [wordpress root folder]/wp-includes/locale.php. It stores localized values. Additional global variables like weekday_initial, weekday_abbrev, month, month_abbrev are also defined.

WordPress uses weekday internally. WordPress provides following functions, defined in [wordpress root folder]/wp-includes/template-general-functions.php for use within the loop:

The weekday can be accessed by using the format options specified here

Back to full list of global variables.

Technorati tags:

monthnum

monthnum is a WordPress query string variable that stores the two digit month number. It can be used to retrieve archive of posts posted in a certain month, even across years. When a particular post is being displayed, it contains the month when the post was published.

WordPress uses this global variable internally when the archives are requested. Plugin and theme developers can use monthnum to access the month requested or for the month of the current post. Day f the current post can be accessed using day.

Back to full list of global variables.

Technorati tags:

day

day is a WordPress query string variable that can used to request archive of posts published on a certain day, across months and years. day global variable stores day of the current post. It is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php.

WordPress uses this global variable internally, e.g., to form the HTML title when any archive is requested. Plugin and theme developers can use day to get day of the current post.

Back to full list of global variables.

Technorati tags: , .

posts

The global variable posts stores the results of a WordPress query as a single dimensional array. It is set in the method register_globals() of class WP.

Plugin and theme developers can use this global variable to access results of the query outside the loop.

Back to full list of global variables.

Technorati tags: .

more

A WordPress post can be forced to have a teaser by inserting the HTML markup <!-- more --> after the desired teaser in the post. WordPress then splits this into the teaser and the main content. When an explicit excerpt for a post is not specified, this teaser is used as an excerpt. more global variable is used to indicate whether the entire page of the post is to be displayed or only the teaser. Teasers can be included in every page of the post. It is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php.

WordPress uses more global variable internally to determine whether only the teaser has to be displayed or the entire page of the post. Whether the teaser has to be displayed when the entire page of the post is displayed or not can also be specified by including the HTML markup <!-- noteaser --> in the post. Plugin and theme developers can use this global variable if a different behavior is desired.

Back to full list of global variables.

Technorati tags: ,

Follow

Get every new post delivered to your Inbox.