Changeset 54962
- Timestamp:
- 12/13/2022 12:24:17 PM (22 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r54777 r54962 1780 1780 * 1781 1781 * @param string $query_var Query variable key. 1782 * @param mixed $default_value Optional. Value to return if the query variable is not set. Default empty string. 1782 * @param mixed $default_value Optional. Value to return if the query variable is not set. 1783 * Default empty string. 1783 1784 * @return mixed Contents of the query variable. 1784 1785 */ -
trunk/src/wp-includes/query.php
r53549 r54962 16 16 * 17 17 * @since 1.5.0 18 * @since 3.9.0 The `$default` argument was introduced. 19 * 20 * @global WP_Query $wp_query WordPress Query object. 21 * 22 * @param string $var The variable key to retrieve. 23 * @param mixed $default Optional. Value to return if the query variable is not set. Default empty. 18 * @since 3.9.0 The `$default_value` argument was introduced. 19 * 20 * @global WP_Query $wp_query WordPress Query object. 21 * 22 * @param string $query_var The variable key to retrieve. 23 * @param mixed $default_value Optional. Value to return if the query variable is not set. 24 * Default empty string. 24 25 * @return mixed Contents of the query variable. 25 26 */ 26 function get_query_var( $ var, $default= '' ) {27 global $wp_query; 28 return $wp_query->get( $ var, $default);27 function get_query_var( $query_var, $default_value = '' ) { 28 global $wp_query; 29 return $wp_query->get( $query_var, $default_value ); 29 30 } 30 31 … … 68 69 * @global WP_Query $wp_query WordPress Query object. 69 70 * 70 * @param string $ varQuery variable key.71 * @param mixed $value Query variable value.72 */ 73 function set_query_var( $ var, $value ) {74 global $wp_query; 75 $wp_query->set( $ var, $value );71 * @param string $query_var Query variable key. 72 * @param mixed $value Query variable value. 73 */ 74 function set_query_var( $query_var, $value ) { 75 global $wp_query; 76 $wp_query->set( $query_var, $value ); 76 77 } 77 78
Note: See TracChangeset
for help on using the changeset viewer.