mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user