Allow completely disabling/hiding default templates
See original GitHub issueFeature Description
A user has requested a way to customize the default view for the Templates dashboard. Currently, the Templates dashboard loads all templates, but this feature request would allow a customized / filtered view of the templates on load.
Alternatives Considered
Additional Context
related support topic: https://wordpress.org/support/topic/remove-default-story-and-page-templates/
Acceptance Criteria
- Pass
'canViewDefaultTemplates' => true
to app in\Google\Web_Stories\Admin\Editor::get_editor_settings()
and\Google\Web_Stories\Admin\Dashboard::get_dashboard_settings()
- In dashboard, hide “Explore Templates” from menu if user does not have capability
- In dashboard, prevent direct access to templates if user does not have capability (feasible?)
- In editor, hide “Default Templates” from the page templates tab, hide the selection dropdown, and always show the custom templates.
This will allow devs to disable access to default templates via the web_stories_editor_settings
and web_stories_dashboard_settings
filters.
Alternative:
Use something like current_user_can( 'web_stories_view_default_templates' )
instead, which allows devs to filter this via map_meta_cap
.
It’s a bit more verbose which helps a lot with comprehension.
We could even do the same for the showMedia3p
config.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
SOLIDWORKS Default Templates Error - GoEngineer
Defining the Default Templates · Navigate to Options · Under System Options, select Default Templates · Browse to the specific template you want...
Read more >Disabling/Hiding functions in a template based on compile ...
Is it possible to conditionally hide or disable functions in a template class using compile time constants? Imagine the following ...
Read more >Tech Tip - Fix Default Template Issues - YouTube
Content / Presentation: Ruta Deshmukh"An error was encountered while trying to open your file." The horror! Nobody likes unexpected errors ...
Read more >Enable or disable templates - Google Workspace Admin Help
Click Templates - classic Sites. Turn off Enable custom templates and click Save.
Read more >Default Templates Options - 2020 - SolidWorks Web Help
Default Templates Options · Click Options or Tools > Options. · Select Default Templates. · Click the appropriate browse button (Parts, Assemblies, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@swissspidy Yes, that sounds good. Thanks!
@lucymtc ICYMI, this is how the default templates can now be disabled on the dashboard and in the editor:
Available since 1.17.0