WordPress.org

Make WordPress Core

Changeset 34284


Ignore:
Timestamp:
09/18/2015 09:40:51 AM (4 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r34245 r34284  
    1616 *
    1717 * @since 1.5.0
     18 * @since 3.9.0 The `$default` argument was introduced.
    1819 *
    1920 * @global WP_Query $wp_query
    2021 *
    2122 * @param string $var       The variable key to retrieve.
    22  * @param mixed  $default   Value to return if the query variable is not set. Default ''.
    23  * @return mixed
     23 * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty.
     24 * @return mixed Contents of the query variable.
    2425 */
    2526function get_query_var( $var, $default = '' ) {
     
    23592360     *
    23602361     * @since 1.5.0
     2362     * @since 3.9.0 The `$default` argument was introduced.
     2363     *
    23612364     * @access public
    23622365     *
    23632366     * @param string $query_var Query variable key.
    2364      * @param mixed  $default   Value to return if the query variable is not set. Default ''.
    2365      * @return mixed
     2367     * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty.
     2368     * @return mixed Contents of the query variable.
    23662369     */
    23672370    public function get( $query_var, $default = '' ) {
Note: See TracChangeset for help on using the changeset viewer.