Skip to content

Commit 75d6e2f

Browse files
Twenty Eleven: 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@62442 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9a4f91d commit 75d6e2f

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
* @since Twenty Eleven 1.0
88
*/
99

10+
/**
11+
* @global string $feature_class CSS classes for the article element.
12+
*/
1013
global $feature_class;
1114
?>
1215
<article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
7171
*
7272
* @since Twenty Eleven 1.0
73+
*
74+
* @global string $wp_version The WordPress version string.
7375
*/
7476
function twentyeleven_setup() {
7577

@@ -636,6 +638,8 @@ function twentyeleven_widgets_init() {
636638
*
637639
* @since Twenty Eleven 1.0
638640
*
641+
* @global WP_Query $wp_query WordPress Query object.
642+
*
639643
* @param string $html_id The HTML id attribute.
640644
*/
641645
function twentyeleven_content_nav( $html_id ) {
@@ -753,6 +757,8 @@ function twentyeleven_footer_sidebar_class() {
753757
*
754758
* @since Twenty Eleven 1.0
755759
*
760+
* @global WP_Comment $comment Global comment object.
761+
*
756762
* @param WP_Comment $comment The comment object.
757763
* @param array $args An array of comment arguments. @see get_comment_reply_link()
758764
* @param int $depth The depth of the comment.

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
* @subpackage Twenty_Eleven
99
* @since Twenty Eleven 1.0
1010
*/
11+
12+
/**
13+
* @global int $page WordPress paginated post page count.
14+
* @global int $paged WordPress archive pagination page count.
15+
*/
16+
global $page, $paged;
17+
1118
?><!DOCTYPE html>
1219
<html <?php language_attributes(); ?>>
1320
<head>
@@ -16,8 +23,6 @@
1623
<title>
1724
<?php
1825
// Print the <title> tag based on what is being viewed.
19-
global $page, $paged;
20-
2126
wp_title( '|', true, 'right' );
2227

2328
// Add the site name.

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@
208208
if ( $recent->have_posts() ) :
209209
$recent->the_post();
210210

211-
// Set $more to 0 in order to only get the first part of the post.
211+
/**
212+
* @global int $more
213+
*/
212214
global $more;
215+
// Set $more to 0 in order to only get the first part of the post.
213216
$more = 0;
214217

215218
get_template_part( 'content', get_post_format() );

0 commit comments

Comments
 (0)