Skip to content

Commit dff8c68

Browse files
Twenty Ten: Add missing documentation for some global variables.
Props sabernhardt, upadalavipul, shailu25, rajinsharwar, audrasjb, viralsampat, noruzzaman, huzaifaalmesbah, SergeyBiryukov. See #58715. Built from https://develop.svn.wordpress.org/trunk@62438 git-svn-id: http://core.svn.wordpress.org/trunk@61719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 84ff13d commit dff8c68

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

wp-content/themes/twentyten/functions.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
7373
*
7474
* @since Twenty Ten 1.0
75+
*
76+
* @global string $wp_version The WordPress version string.
7577
*/
7678
function twentyten_setup() {
7779

@@ -436,7 +438,12 @@ function twentyten_custom_excerpt_more( $output ) {
436438
function twentyten_remove_gallery_css( $css ) {
437439
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
438440
}
439-
// Backward compatibility with WordPress 3.0.
441+
442+
/**
443+
* Backward compatibility with WordPress 3.0.
444+
*
445+
* @global string $wp_version The WordPress version string.
446+
*/
440447
if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) ) {
441448
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
442449
}
@@ -452,8 +459,10 @@ function twentyten_remove_gallery_css( $css ) {
452459
*
453460
* @since Twenty Ten 1.0
454461
*
462+
* @global WP_Comment $comment Global comment object.
463+
*
455464
* @param WP_Comment $comment The comment object.
456-
* @param array $args An array of arguments. @see get_comment_reply_link()
465+
* @param array $args An array of comment arguments. @see get_comment_reply_link()
457466
* @param int $depth The depth of the comment.
458467
*/
459468
function twentyten_comment( $comment, $args, $depth ) {

wp-content/themes/twentyten/header.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@
88
* @subpackage Twenty_Ten
99
* @since Twenty Ten 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>
1421
<meta charset="<?php bloginfo( 'charset' ); ?>" />
1522
<title>
1623
<?php
17-
/*
18-
* Print the <title> tag based on what is being viewed.
19-
*/
20-
global $page, $paged;
21-
24+
// Print the <title> tag based on what is being viewed.
2225
wp_title( '|', true, 'right' );
2326

2427
// Add the site name.

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '7.1-alpha-62437';
19+
$wp_version = '7.1-alpha-62438';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)