Changeset 31135
- Timestamp:
- 01/10/2015 10:57:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-diff.php
r30497 r31135 68 68 */ 69 69 protected $_show_split_view = true; 70 71 protected $compat_fields = array( '_show_split_view', 'inline_diff_renderer', '_diff_threshold' ); 70 72 71 73 /** … … 466 468 */ 467 469 public function __get( $name ) { 468 return $this->$name; 470 if ( in_array( $name, $this->compat_fields ) ) { 471 return $this->$name; 472 } 469 473 } 470 474 … … 480 484 */ 481 485 public function __set( $name, $value ) { 482 return $this->$name = $value; 486 if ( in_array( $name, $this->compat_fields ) ) { 487 return $this->$name = $value; 488 } 483 489 } 484 490 … … 493 499 */ 494 500 public function __isset( $name ) { 495 return isset( $this->$name ); 501 if ( in_array( $name, $this->compat_fields ) ) { 502 return isset( $this->$name ); 503 } 496 504 } 497 505 … … 505 513 */ 506 514 public function __unset( $name ) { 507 unset( $this->$name ); 508 } 509 510 /** 511 * Make private/protected methods readable for backwards compatibility. 512 * 513 * @since 4.0.0 514 * @access public 515 * 516 * @param callable $name Method to call. 517 * @param array $arguments Arguments to pass when calling. 518 * @return mixed|bool Return value of the callback, false otherwise. 519 */ 520 public function __call( $name, $arguments ) { 521 return call_user_func_array( array( $this, $name ), $arguments ); 515 if ( in_array( $name, $this->compat_fields ) ) { 516 unset( $this->$name ); 517 } 522 518 } 523 519 }
Note: See TracChangeset
for help on using the changeset viewer.