c92ef7c441
Extends meta registration to support complex schema values, mirroring the functionality in the settings controller. Error when trying to modify a meta key containing schema-nonconformant data. Props @TimothyBlynJacobs, @birgire, @mnelson4, @flixos90. Fixes #43392. git-svn-id: https://develop.svn.wordpress.org/trunk@45807 602fd350-edb4-49c9-b593-d223f7449a82
43 lines
771 B
PHP
43 lines
771 B
PHP
<?php
|
|
/**
|
|
* Unit Tests: Basic_Object cloass
|
|
*
|
|
* @package WordPress
|
|
* @subpackage UnitTests
|
|
* @since 4.7.0
|
|
*/
|
|
|
|
/**
|
|
* Class used to test accessing methods and properties
|
|
*
|
|
* @since 4.0.0
|
|
*/
|
|
class Basic_Object {
|
|
private $foo = 'bar';
|
|
|
|
public function __get( $name ) {
|
|
return $this->$name;
|
|
}
|
|
|
|
public function __set( $name, $value ) {
|
|
return $this->$name = $value;
|
|
}
|
|
|
|
public function __isset( $name ) {
|
|
return isset( $this->$name );
|
|
}
|
|
|
|
public function __unset( $name ) {
|
|
unset( $this->$name );
|
|
}
|
|
|
|
public function __call( $name, $arguments ) {
|
|
return call_user_func_array( array( $this, $name ), $arguments );
|
|
}
|
|
|
|
// phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
|
|
private function callMe() {
|
|
return 'maybe';
|
|
}
|
|
}
|