Skip to content

Commit e8cfb7d

Browse files
Twenty Thirteen: 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@62456 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3f1fbe7 commit e8cfb7d

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
/**
4242
* Twenty Thirteen only works in WordPress 3.6 or later.
43+
*
44+
* @global string $wp_version The WordPress version string.
4345
*/
4446
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) {
4547
require get_template_directory() . '/inc/back-compat.php';
@@ -70,6 +72,8 @@ function twentythirteen_register_block_patterns() {
7072
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
7173
*
7274
* @since Twenty Thirteen 1.0
75+
*
76+
* @global string $wp_version The WordPress version string.
7377
*/
7478
function twentythirteen_setup() {
7579
/*
@@ -360,6 +364,8 @@ function twentythirteen_scripts_styles() {
360364
* @since Twenty Thirteen 2.1
361365
* @deprecated Twenty Thirteen 3.8 Disabled filter because, by default, fonts are self-hosted.
362366
*
367+
* @global string $wp_version The WordPress version string.
368+
*
363369
* @param array $urls URLs to print for resource hints.
364370
* @param string $relation_type The relation type the URLs are printed.
365371
* @return array URLs to print for resource hints.
@@ -402,8 +408,8 @@ function twentythirteen_block_editor_styles() {
402408
*
403409
* @since Twenty Thirteen 1.0
404410
*
405-
* @global int $paged WordPress archive pagination page count.
406-
* @global int $page WordPress paginated post page count.
411+
* @global int $paged Page number of a list of posts.
412+
* @global int $page Page number of a single post.
407413
*
408414
* @param string $title Default title text for current view.
409415
* @param string $sep Optional separator.
@@ -488,6 +494,8 @@ function wp_get_list_item_separator() {
488494
* Displays navigation to next/previous set of posts when applicable.
489495
*
490496
* @since Twenty Thirteen 1.0
497+
*
498+
* @global WP_Query $wp_query WordPress Query object.
491499
*/
492500
function twentythirteen_paging_nav() {
493501
global $wp_query;

src/wp-content/themes/twentythirteen/inc/back-compat.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ function twentythirteen_switch_theme() {
3232
* Twenty Thirteen on WordPress versions prior to 3.6.
3333
*
3434
* @since Twenty Thirteen 1.0
35+
*
36+
* @global string $wp_version The WordPress version string.
3537
*/
3638
function twentythirteen_upgrade_notice() {
3739
printf(
@@ -48,6 +50,8 @@ function twentythirteen_upgrade_notice() {
4850
* Prevents the Customizer from being loaded on WordPress versions prior to 3.6.
4951
*
5052
* @since Twenty Thirteen 1.0
53+
*
54+
* @global string $wp_version The WordPress version string.
5155
*/
5256
function twentythirteen_customize() {
5357
wp_die(
@@ -68,6 +72,8 @@ function twentythirteen_customize() {
6872
* Prevents the Theme Preview from being loaded on WordPress versions prior to 3.4.
6973
*
7074
* @since Twenty Thirteen 1.0
75+
*
76+
* @global string $wp_version The WordPress version string.
7177
*/
7278
function twentythirteen_preview() {
7379
if ( isset( $_GET['preview'] ) ) {

0 commit comments

Comments
 (0)