This global variable is an array related to multi-paged posts. multipage global variable indicates whether the current post is to be shown in multiple pages. pages is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php. A post is split into multiple pages wherever <!--nextpage--> is inserted. Every element in the pages array corresponds to the split page. The page to be displayed is determined by the global variable page.
The template function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = ''), defined in [wordpress root folder]/wp-includes/template-functions-post.php, uses this global variable to return post content corresponding to the requested page.
Plugin and theme developers can use this global variable to determine number of pages the current post has been split into.
Back to full list of global variables.



















April 27, 2006 at 3:29 pm
[...] pages [...]
April 27, 2006 at 3:30 pm
[...] pages [...]
May 24, 2006 at 2:35 pm
[...] WordPress uses numpages global variable to store the number of pages in a multipage post. It is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php. The split pages are stored in the global variable pages. [...]
July 23, 2006 at 3:32 pm
[...] A WordPress post can be forced to have a teaser by including the HTML markup <!– more –> in the post. WordPress then splits this into the teaser and the main post. 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. [...]