Opened 5 years ago
Closed 2 years ago
#49803 closed enhancement (invalid)
Allow for add_theme_support( 'editor-color-palette' ) to append to default palette
Reported by: | wolfpaw | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.0 |
Component: | Editor | Keywords: | close |
Focuses: | ui | Cc: |
Description
Currently, you can use add_theme_support( 'editor-color-palette' )
to create a new palette of colors to choose from while editing posts. I'd like the ability to append custom colors to the palette, as opposed to entirely replacing the existing palette.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi @wolfpaw. You should be able to do this by calling
get_theme_support()
, appending to the return value, and then callingadd_theme_support()
again.$editor_color_palette = get_theme_support( 'editor-color-palette' ); $editor_color_palette[] = array( ...whatever... ); add_theme_support( 'editor-color-palette', $editor_color_palette );
I don't think that a dedicated API for this is necessary.