REST API: Combine array
and object
cases in WP_REST_Meta_Fields::get_default_for_type()
to remove duplicated line.
Add missing description for `$type` parameter. Props itowhid06, dkarfa. Fixes #48169. git-svn-id: https://develop.svn.wordpress.org/trunk@46346 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f00bceaa86
commit
679b6a09e6
@ -563,7 +563,7 @@ abstract class WP_REST_Meta_Fields {
|
||||
*
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type The schema type.
|
||||
* @return mixed
|
||||
*/
|
||||
protected function get_default_for_type( $type ) {
|
||||
@ -577,7 +577,6 @@ abstract class WP_REST_Meta_Fields {
|
||||
case 'number':
|
||||
return 0.0;
|
||||
case 'array':
|
||||
return array();
|
||||
case 'object':
|
||||
return array();
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user