Changeset 31151 for trunk/src/wp-includes/query.php
- Timestamp:
- 01/11/2015 10:40:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r31126 r31151 1300 1300 */ 1301 1301 private $stopwords; 1302 1303 private $compat_fields = array( 'query_vars_hash', 'query_vars_changed' ); 1304 1305 private $compat_methods = array( 'init_query_flags', 'parse_tax_query' ); 1302 1306 1303 1307 /** … … 3957 3961 */ 3958 3962 public function __get( $name ) { 3959 return $this->$name; 3960 } 3961 3962 /** 3963 * Make private properties settable for backwards compatibility. 3963 if ( in_array( $name, $this->compat_fields ) ) { 3964 return $this->$name; 3965 } 3966 } 3967 3968 /** 3969 * Make private properties checkable for backwards compatibility. 3964 3970 * 3965 3971 * @since 4.0.0 … … 3970 3976 */ 3971 3977 public function __isset( $name ) { 3972 return isset( $this->$name ); 3973 } 3974 3975 /** 3976 * Make private properties settable for backwards compatibility. 3977 * 3978 * @since 4.0.0 3979 * @access public 3980 * 3981 * @param string $name Property to unset. 3982 */ 3983 public function __unset( $name ) { 3984 unset( $this->$name ); 3978 if ( in_array( $name, $this->compat_fields ) ) { 3979 return isset( $this->$name ); 3980 } 3985 3981 } 3986 3982 … … 3993 3989 * @param callable $name Method to call. 3994 3990 * @param array $arguments Arguments to pass when calling. 3995 * @return mixed|bool Return value of the callback, otherwise false.3991 * @return mixed|bool Return value of the callback, false otherwise. 3996 3992 */ 3997 3993 public function __call( $name, $arguments ) { 3998 return call_user_func_array( array( $this, $name ), $arguments ); 3994 if ( in_array( $name, $this->compat_methods ) ) { 3995 return call_user_func_array( array( $this, $name ), $arguments ); 3996 } 3997 return false; 3999 3998 } 4000 3999
Note: See TracChangeset
for help on using the changeset viewer.