Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widgets: Define widget screen admin locations for extension via SlotFill #18068

Closed
ryanwelcher opened this issue Oct 22, 2019 · 2 comments · Fixed by #25758
Closed

Widgets: Define widget screen admin locations for extension via SlotFill #18068

ryanwelcher opened this issue Oct 22, 2019 · 2 comments · Fixed by #25758
Assignees
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Dev Ready for, and needs developer efforts

Comments

@ryanwelcher
Copy link
Contributor

ryanwelcher commented Oct 22, 2019

The current implementation of the Widgets screen has no exposed SlotFill locations for developers to leverage.

The existing widgets.php page has two actions that can be leveraged to add additional items to the page:

widgets_admin_page: appears below the title of the page.

widget-admin-page

sidebar_admin_page: appears above the footer:

sidebar-admin-page

I propose that we start by introducing a SlotFill equivalent for each of these actions on the new widget screen:

  1. PluginPreWidgetAreas: appears before the Widget areas are rendered
  2. PluginPostWidgetAreas: appears after the Widget areas are rendered
    widgetScreenSlots
@ryanwelcher ryanwelcher added the [Feature] Extensibility The ability to extend blocks or the editing experience label Oct 22, 2019
@noisysocks noisysocks added [Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Dev Ready for, and needs developer efforts labels Aug 14, 2020
@ryanwelcher
Copy link
Contributor Author

I would also like to propose a new location here:
widgetAreasPanel

@noisysocks
Copy link
Member

PluginPreWidgetAreas and PluginPostWidgetAreas is difficult because that entire part of the screen (the grey area) is a block editor. I think instead let's make it so that plugins can insert blocks at the first and last position using wp.data.dispatch( 'core/block-editor' ).insertBlock( ... ).

PluginWidgetAreasPanel sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Feature] Widgets Screen The block-based screen that replaced widgets.php. Needs Dev Ready for, and needs developer efforts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants