PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | lib/experimental/dashboard-widgets/class-wp-rest-widget-modules-controller.php +46 -0 23.9.0 → trunk View file →
@@ -218,8 +218,12 @@
218 218 if ( rest_is_field_included( 'actions', $fields ) ) {
219 219 $data['actions'] = $widget_type->actions;
220 220 }
221 221
222 + if ( rest_is_field_included( 'attributes', $fields ) ) {
223 + $data['attributes'] = $widget_type->attributes;
224 + }
225 +
222 226 if ( rest_is_field_included( 'keywords', $fields ) ) {
223 227 $data['keywords'] = $widget_type->keywords;
224 228 }
225 229
@@ -341,8 +345,50 @@
341 345 ),
342 346 'href' => array( 'type' => 'string' ),
343 347 'download' => array( 'type' => array( 'string', 'boolean' ) ),
344 348 'openInNewTab' => array( 'type' => 'boolean' ),
349 + ),
350 + ),
351 + 'context' => array( 'view', 'edit', 'embed' ),
352 + 'readonly' => true,
353 + ),
354 +
355 + 'attributes' => array(
356 + 'description' => __( 'Attribute schema hosts render settings from: the JSON-expressible subset of a DataViews field per entry. User-facing strings are translatable.', 'gutenberg' ),
357 + 'type' => array( 'array', 'null' ),
358 + 'items' => array(
359 + 'type' => 'object',
360 + 'properties' => array(
361 + 'id' => array( 'type' => 'string' ),
362 + 'type' => array( 'type' => 'string' ),
363 + 'label' => array( 'type' => 'string' ),
364 + 'header' => array( 'type' => 'string' ),
365 + 'description' => array( 'type' => 'string' ),
366 + 'placeholder' => array( 'type' => 'string' ),
367 + 'readOnly' => array( 'type' => 'boolean' ),
368 + 'isDisabled' => array( 'type' => 'boolean' ),
369 + 'enableSorting' => array( 'type' => 'boolean' ),
370 + 'enableHiding' => array( 'type' => 'boolean' ),
371 + 'enableGlobalSearch' => array( 'type' => 'boolean' ),
372 + 'elements' => array(
373 + 'type' => 'array',
374 + 'items' => array(
375 + 'type' => 'object',
376 + 'properties' => array(
377 + 'value' => array( 'type' => array( 'string', 'integer', 'number', 'boolean', 'null' ) ),
378 + 'label' => array( 'type' => 'string' ),
379 + 'description' => array( 'type' => 'string' ),
380 + ),
381 + ),
382 + ),
383 + 'filterBy' => array( 'type' => array( 'object', 'boolean' ) ),
384 + 'format' => array( 'type' => 'object' ),
385 + 'isValid' => array( 'type' => 'object' ),
386 + 'Edit' => array( 'type' => array( 'string', 'object' ) ),
387 + 'relevance' => array(
388 + 'type' => 'string',
389 + 'enum' => array( 'high', 'medium', 'low' ),
390 + ),
345 391 ),
346 392 ),
347 393 'context' => array( 'view', 'edit', 'embed' ),
348 394 'readonly' => true,