tize_value_from_schema( $value, $schema ); } /** * Check the 'meta' value of a request is an associative array. * * @since 4.7.0 * * @param mixed $value The meta value submitted in the request. * @param WP_REST_Request $request Full details about the request. * @param string $param The parameter name. * @return array|false The meta array, if valid, false otherwise. */ public function check_meta_is_array( $value, $request, $param ) { if ( ! is_array( $value ) ) { return false; } return $value; } /** * Recursively add additionalProperties = false to all objects in a schema if no additionalProperties setting * is specified. * * This is needed to restrict properties of objects in meta values to only * registered items, as the REST API will allow additional properties by * default. * * @since 5.3.0 * @deprecated 5.6.0 Use rest_default_additional_properties_to_false() instead. * * @param array $schema The schema array. * @return array */ protected function default_additional_properties_to_false( $schema ) { _deprecated_function( __METHOD__, '5.6.0', 'rest_default_additional_properties_to_false()' ); return rest_default_additional_properties_to_false( $schema ); } /** * Gets the empty value for a schema type. * * @since 5.3.0 * * @param string $type The schema type. * @return mixed */ protected static function get_empty_value_for_type( $type ) { switch ( $type ) { case 'string': return ''; case 'boolean': return false; case 'integer': return 0; case 'number': return 0.0; case 'array': case 'object': return array(); default: return null; } } }
Fatal error: Uncaught Error: Class 'WP_REST_Meta_Fields' not found in /home/sportuga/public_html/wp-includes/rest-api/fields/class-wp-rest-comment-meta-fields.php:17 Stack trace: #0 /home/sportuga/public_html/wp-settings.php(307): require() #1 /home/sportuga/public_html/wp-config.php(100): require_once('/home/sportuga/...') #2 /home/sportuga/public_html/wp-load.php(50): require_once('/home/sportuga/...') #3 /home/sportuga/public_html/wp-blog-header.php(13): require_once('/home/sportuga/...') #4 /home/sportuga/public_html/index.php(17): require('/home/sportuga/...') #5 {main} thrown in /home/sportuga/public_html/wp-includes/rest-api/fields/class-wp-rest-comment-meta-fields.php on line 17