Opened 7 years ago
Last modified 6 years ago
#42644 new feature request
Customize: Add rich text control for managing tagline and new footer credit theme support
Reported by: | westonruter | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.8 |
Component: | Customize | Keywords: | needs-patch |
Focuses: | Cc: |
Description (last modified by )
In #35243 we extended the Text widget to add TinyMCE. This depended on #35760 which introduced the wp.editor.initialize()
API for dynamically-instantiating TinyMCE editors. Similarly in #41897 we introduced a Code Editor control which leveraged the wp.codeEditor.initialize()
API introduced in #12423. It would seem that there should similarly be a rich text control available in the Customizer.
The rich text control could be used to manage the site's tagline.
This rich text control could also be leveraged by themes to manage a site's footer credits; the control could appear in the Site Identity section. Instead of “Powered by WordPress” being hard-coded into the theme's footer, it could instead be the default value for a footer_credit
option. This would then allow a user to easily add additional site credits and copyright information to the footer of their site, without having to modify the theme template to do so. WordPress.com has a dropdown control with preset options for this “powered by” text and then a final option to hide for business plans. There could also be a “custom” option which could then reveal a footer credit rich text input where a user could supply links and other content allowed by the Text widget. Naturally the bundled core themes in WordPress.org could make this available by default without requiring a business plan.
A new footer_credit
theme support could be added support added to Twenty Seventeen to take advantage of this new functionality. Previewing the change to the footer text should be done with selective refresh.
The rich text control could also be used in themes for managing other parts of the template, like business hours appearing in the header, without having to add a new widget sidebar.
Editor should only initialize once the control's containing section is expanded, as was done with the Code Editor control.
Attachments (1)
Change History (14)
#2
@
7 years ago
- Summary changed from Customize: Add rich text control to Customize: Add rich text control and footer credit theme support
#3
@
7 years ago
- Description modified (diff)
- Summary changed from Customize: Add rich text control and footer credit theme support to Customize: Add rich text control for managing tagline and new footer credit theme support
This ticket was mentioned in Slack in #core by westonruter. View the logs.
7 years ago
#8
@
7 years ago
I was going to suggest that the new text control implement buttons for data from bloginfo()
.
#9
in reply to:
↑ 5
@
7 years ago
Replying to joyously:
It looks like two tickets now. I liked it better as "Add rich text control", and then if you want to change something else to use it, it's a different ticket.
Yeah, we can split it up into two. However, there has to be a use case for a new feature, so this makes a case for the value as well.
#10
@
7 years ago
For footer credit, I implemented it in a child theme of Twenty Seventeen, but using the code editor control instead of a rich text control:
https://github.com/westonruter/twentyseventeen-westonson/blob/08b5809/template-parts/footer/site-info.php
https://github.com/westonruter/twentyseventeen-westonson/blob/08b5809/functions.php#L8-L41
#11
@
6 years ago
A rich text control is a good idea. Footer credits seem like the best initial use case, with a related theme support feature. Themes should be able to set defaults, a portion of which would typically be theme-specific. As a result, this probably needs to be a theme_mod
, not an option
(at least for the custom text option). Using a rich text control for footer credits would necessitate a dynamic "year" placeholder to be functional for a majority of sites.
The tagline should remain a plain text control, since it is used in title tags and elsewhere in themes and plugins.
It looks like two tickets now. I liked it better as "Add rich text control", and then if you want to change something else to use it, it's a different ticket.