Skip to content

Commit ba36e52

Browse files
Twenty Twelve: Add missing documentation for some global variables.
Props sabernhardt, upadalavipul, shailu25, rajinsharwar, audrasjb, viralsampat, noruzzaman, huzaifaalmesbah, SergeyBiryukov. See #58715. git-svn-id: https://develop.svn.wordpress.org/trunk@62451 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3771c1c commit ba36e52

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

src/wp-content/themes/twentyeleven/header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
/**
13-
* @global int $page WordPress paginated post page count.
14-
* @global int $paged WordPress archive pagination page count.
13+
* @global int $page Page number of a single post.
14+
* @global int $paged Page number of a list of posts.
1515
*/
1616
global $page, $paged;
1717

src/wp-content/themes/twentyten/header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
/**
13-
* @global int $page WordPress paginated post page count.
14-
* @global int $paged WordPress archive pagination page count.
13+
* @global int $page Page number of a single post.
14+
* @global int $paged Page number of a list of posts.
1515
*/
1616
global $page, $paged;
1717

src/wp-content/themes/twentytwelve/functions.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
4444
*
4545
* @since Twenty Twelve 1.0
46+
*
47+
* @global string $wp_version The WordPress version string.
4648
*/
4749
function twentytwelve_setup() {
4850
/*
@@ -181,6 +183,8 @@ function twentytwelve_get_font_url() {
181183
* Enqueues scripts and styles for front end.
182184
*
183185
* @since Twenty Twelve 1.0
186+
*
187+
* @global WP_Styles $wp_styles The WP_Styles object for printing styles.
184188
*/
185189
function twentytwelve_scripts_styles() {
186190
global $wp_styles;
@@ -242,6 +246,8 @@ function twentytwelve_block_editor_styles() {
242246
* @since Twenty Twelve 2.2
243247
* @deprecated Twenty Twelve 3.9 Disabled filter because, by default, fonts are self-hosted.
244248
*
249+
* @global string $wp_version The WordPress version string.
250+
*
245251
* @param array $urls URLs to print for resource hints.
246252
* @param string $relation_type The relation type the URLs are printed.
247253
* @return array URLs to print for resource hints.
@@ -299,6 +305,9 @@ function twentytwelve_mce_css( $mce_css ) {
299305
*
300306
* @since Twenty Twelve 1.0
301307
*
308+
* @global int $paged Page number of a list of posts.
309+
* @global int $page Page number of a single post.
310+
*
302311
* @param string $title Default title text for current view.
303312
* @param string $sep Optional separator.
304313
* @return string Filtered title.
@@ -411,6 +420,8 @@ function wp_get_list_item_separator() {
411420
* Displays navigation to next/previous pages when applicable.
412421
*
413422
* @since Twenty Twelve 1.0
423+
*
424+
* @global WP_Query $wp_query WordPress Query object.
414425
*/
415426
function twentytwelve_content_nav( $html_id ) {
416427
global $wp_query;
@@ -451,7 +462,12 @@ function twentytwelve_content_nav( $html_id ) {
451462
*
452463
* @since Twenty Twelve 1.0
453464
*
454-
* @global WP_Post $post Global post object.
465+
* @global WP_Comment $comment Global comment object.
466+
* @global WP_Post $post Global post object.
467+
*
468+
* @param WP_Comment $comment The comment object.
469+
* @param array $args An array of comment arguments. @see get_comment_reply_link()
470+
* @param int $depth The depth of the comment.
455471
*/
456472
function twentytwelve_comment( $comment, $args, $depth ) {
457473
$GLOBALS['comment'] = $comment;
@@ -644,6 +660,8 @@ function twentytwelve_body_class( $classes ) {
644660
* templates, and when there are no active widgets in the sidebar.
645661
*
646662
* @since Twenty Twelve 1.0
663+
*
664+
* @global int $content_width Content width.
647665
*/
648666
function twentytwelve_content_width() {
649667
if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) {

0 commit comments

Comments
 (0)