Changeset 53277
- Timestamp:
- 04/26/2022 01:30:47 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r53175 r53277 537 537 * @since 4.5.0 Removed the `comments_popup` public query variable. 538 538 * 539 * @param array $ arrayDefined query variables.539 * @param array $query_vars Defined query variables. 540 540 * @return array Complete query variables with undefined ones filled in empty. 541 541 */ 542 public function fill_query_vars( $ array) {542 public function fill_query_vars( $query_vars ) { 543 543 $keys = array( 544 544 'error', … … 581 581 582 582 foreach ( $keys as $key ) { 583 if ( ! isset( $ array[ $key ] ) ) {584 $ array[ $key ] = '';583 if ( ! isset( $query_vars[ $key ] ) ) { 584 $query_vars[ $key ] = ''; 585 585 } 586 586 } … … 605 605 606 606 foreach ( $array_keys as $key ) { 607 if ( ! isset( $array[ $key ] ) ) { 608 $array[ $key ] = array(); 609 } 610 } 611 return $array; 607 if ( ! isset( $query_vars[ $key ] ) ) { 608 $query_vars[ $key ] = array(); 609 } 610 } 611 612 return $query_vars; 612 613 } 613 614 … … 1748 1749 * 1749 1750 * @since 1.5.0 1750 * @since 3.9.0 The `$default ` argument was introduced.1751 * 1752 * @param string $query_var Query variable key.1753 * @param mixed $default 1751 * @since 3.9.0 The `$default_value` argument was introduced. 1752 * 1753 * @param string $query_var Query variable key. 1754 * @param mixed $default_value Optional. Value to return if the query variable is not set. Default empty string. 1754 1755 * @return mixed Contents of the query variable. 1755 1756 */ 1756 public function get( $query_var, $default = '' ) {1757 public function get( $query_var, $default_value = '' ) { 1757 1758 if ( isset( $this->query_vars[ $query_var ] ) ) { 1758 1759 return $this->query_vars[ $query_var ]; 1759 1760 } 1760 1761 1761 return $default ;1762 return $default_value; 1762 1763 } 1763 1764
Note: See TracChangeset
for help on using the changeset viewer.