Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35574, comment 24


Ignore:
Timestamp:
04/10/2017 10:46:11 PM (7 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35574, comment 24

    initial v1  
    1 Humm, maybe we should rename a `WP_Widget::get_instance_schema()` method to `WP_Media::get_item_schema()` for parity with `WP_REST_Controller::get_item_schema()`.
     1Humm, maybe we should rename a `WP_Widget::get_instance_schema()` method to `WP_Widget::get_item_schema()` for parity with `WP_REST_Controller::get_item_schema()`.
    22
    33The return value for this function is essentially the schema for the `properties`: https://github.com/xwp/wp-core-media-widgets/blob/994d40f25467591773e76d111bfcc806b351fd40/wp-includes/widgets/class-wp-widget-media.php#L91-L120
     
    1414}}}
    1515
    16 I guess the idea here is that eventually when we have a full-on `WP_REST_Widgets_Controller`, that these root-level schema properties would be supplied there and the `WP_Widget::get_instance_schema()` would essentially be serving the same purpose as `\WP_REST_Controller::get_additional_fields()`.
     16I guess the idea here is that eventually when we have a full-on `WP_REST_Widgets_Controller`, that these root-level schema properties would be supplied there and the `WP_Widget::get_instance_schema()` (or however it is named) would essentially be serving the same purpose as `\WP_REST_Controller::get_additional_fields()`.
    1717
    1818Thoughts from REST API team?