Make WordPress Core

Changes between Version 4 and Version 9 of Ticket #28093


Ignore:
Timestamp:
01/04/2017 06:08:57 AM (10 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28093

    • Property Summary Widgets JS APIAdd REST API endpoints for widgets and sidebars
    • Property Focuses rest-api added
    • Property Milestone Awaiting ReviewFuture Release
  • Ticket #28093 – Description

    v4 v9  
    1 There is currently no unified JS API for managing widgets (nor is there an API in PHP). Any widget manipulation requires a lot of manual Ajax calls and reverse engineering of how the widgets admin UI manages widgets.
     1There is currently no proper client-side API for managing widgets and the sidebars they belong in (and any APIs in PHP are also lacking, per #16613). Any widget manipulation requires a lot of manual Ajax calls and reverse engineering of how the widgets admin UI manages widgets.
    22
    3 The widgets admin UI needs a rewrite to utilize Backbone. The 3.9 work on bringing widget management to the customizer introduced some use of Backbone there, but the underlying Backbone logic should be abstracted so that it is suitable for use on the widgets admin page, as well as in the customizer (not to mention elsewhere, such as a TinyMCE view!)
     3The implementation of normalized REST API endpoints could coincide with re-architecture of how widgets are stored by making use of a custom post type instead of storing widgets in options. See #35669.
    44
    5 Related:
     5The way that widgets and sidebars are represented needs to be formalized and normalized in REST API endpoints (ideally in conjunction with nav menus).
    66
    7 * #27151 Live search of available widgets
    8 * #16613 Extend Widget API to allow sidebar/widget manipulation
     7Potentially any endpoints for widgets could be abstracted away as “content blocks”, such as with #33473 (Shortcodes + Widgets + Nav Menus. Unified "component" API (aka Content Blocks))
     8
     9See discussion at https://github.com/WP-API/WP-API/issues/19
     10
     11(Originally this ticket also described a JS API in front of any Ajax/REST interface to facilitate the manipulation of widgets and sidebars, but the scope is now limited specifically to the REST API and any JS interface can be part of the WP-API Backbone JS Client.)