From 05f4e5254149ebc762269f97e8397258542d3047 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 18 Sep 2015 09:41:27 +0000 Subject: [PATCH] Docs: Add documentation to `get_query_var()` and `WP_Query::get()` for the optional `$default` argument, introduced in 3.9 in [27304]. Props swissspidy. Fixes #33856. Built from https://develop.svn.wordpress.org/trunk@34284 git-svn-id: http://core.svn.wordpress.org/trunk@34248 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 11 +++++++---- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 7bcecf4ad5..5b666a5b31 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -15,12 +15,13 @@ * Retrieve variable in the WP_Query class. * * @since 1.5.0 + * @since 3.9.0 The `$default` argument was introduced. * * @global WP_Query $wp_query * * @param string $var The variable key to retrieve. - * @param mixed $default Value to return if the query variable is not set. Default ''. - * @return mixed + * @param mixed $default Optional. Value to return if the query variable is not set. Default empty. + * @return mixed Contents of the query variable. */ function get_query_var( $var, $default = '' ) { global $wp_query; @@ -2358,11 +2359,13 @@ class WP_Query { * Retrieve query variable. * * @since 1.5.0 + * @since 3.9.0 The `$default` argument was introduced. + * * @access public * * @param string $query_var Query variable key. - * @param mixed $default Value to return if the query variable is not set. Default ''. - * @return mixed + * @param mixed $default Optional. Value to return if the query variable is not set. Default empty. + * @return mixed Contents of the query variable. */ public function get( $query_var, $default = '' ) { if ( isset( $this->query_vars[ $query_var ] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 768e3251e5..1caeaa76a3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34283'; +$wp_version = '4.4-alpha-34284'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.