|
@@ -11,29 +11,31 @@ add_editor_color_rule( 'bg', '#FFFFFF', array(
|
|
|
array( '#editor .editor-styles-wrapper', 'background-color' ),
|
|
|
|
|
|
// Text-color
|
|
|
- array( '.button,
|
|
|
- .button.has-focus,
|
|
|
- .button:focus,
|
|
|
- .button:hover,
|
|
|
- .wp-block-a8c-blog-posts + .button,
|
|
|
- .wp-block-a8c-blog-posts + .button:focus,
|
|
|
- .wp-block-a8c-blog-posts + .button:hover,
|
|
|
- .wp-block-a8c-blog-posts + .has-focus.button,
|
|
|
- .wp-block-button__link,
|
|
|
- .wp-block-button__link.has-focus,
|
|
|
- .wp-block-button__link:focus,
|
|
|
- .wp-block-button__link:hover,
|
|
|
- .wp-block-cover,
|
|
|
- .wp-block-cover-image,
|
|
|
- .wp-block-cover-image:not([class*="background-color"]) .block-editor-block-list__block,
|
|
|
- .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
|
|
|
- .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
|
|
|
- .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
|
|
|
- .wp-block-cover:not([class*="background-color"]) .block-editor-block-list__block,
|
|
|
- .wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
|
|
|
- .wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
|
|
|
- .wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
|
|
|
- .wp-block-pullquote.is-style-solid-color', 'color' ),
|
|
|
+ array( '#editor .editor-styles-wrapper .button,
|
|
|
+ #editor .editor-styles-wrapper .button.has-focus,
|
|
|
+ #editor .editor-styles-wrapper .button:focus,
|
|
|
+ #editor .editor-styles-wrapper .button:hover,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-button__link,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-button__link.has-focus,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-button__link:focus,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-button__link:hover,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover-image,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .block-editor-block-list__block,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .block-editor-block-list__block,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .block-editor-block-list__block,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .block-editor-block-list__block,
|
|
|
+ #editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
|
|
|
|
|
|
// Text-color darkened
|
|
|
array( '#editor .editor-styles-wrapper .wp-block-separator.is-style-dots', 'color', '-1' ),
|
|
@@ -221,3 +223,18 @@ add_editor_color_rule( 'fg1', '#007FDB', array(
|
|
|
#editor .editor-styles-wrapper .wp-block .has-secondary-background-color[class]', 'background-color' ),
|
|
|
|
|
|
), __( 'Secondary Color' ) );
|
|
|
+
|
|
|
+/**
|
|
|
+ * Custom CSS
|
|
|
+ */
|
|
|
+function redhill_editor_custom_colors_extra_css() {
|
|
|
+ $colors_array = get_theme_mod( 'colors_manager' );
|
|
|
+ $bg = $colors_array['colors']['bg'];
|
|
|
+ $txt = $colors_array['colors']['txt'];
|
|
|
+?>
|
|
|
+ #editor .editor-styles-wrapper .has-background:not(.has-background-background-color) a:not(.wp-block-button__link),
|
|
|
+ #editor .editor-styles-wrapper p.has-text-color a {
|
|
|
+ color: currentColor;
|
|
|
+ }
|
|
|
+<?php }
|
|
|
+add_theme_support( 'custom_colors_extra_css', 'redhill_editor_custom_colors_extra_css' );
|