Changeset 13571
- Timestamp:
- 04/19/2024 01:53:16 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-blocks.php
r13562 r13571 25 25 // Enable theme compatibility CSS. 26 26 add_filter( 'blocks_everywhere_theme_compat', '__return_true' ); 27 add_action( 'wp_head', [ $this, 'expand_theme_compat' ], 1 ); 27 28 28 29 // Theme Tweaks, these should be moved to the theme. … … 60 61 } 61 62 63 /** 64 * CSS to expand on Blocks Everywhere support 65 */ 66 public function expand_theme_compat() { 67 wp_add_inline_style( 68 'blocks-everywhere-compat', 69 <<<CSS 70 /* Fix the primary block inserter button */ 71 .blocks-everywhere .components-button.is-primary { 72 --wp-components-color-accent: var(--wp--custom--button--color--background); 73 --wp-components-color-accent-darker-10: var(--wp--custom--button--hover--color--background); 74 --wp-components-color-accent-darker-20: var(--wp--custom--button--hover--color--background); 75 } 76 .gutenberg-support .iso-editor .edit-post-header__toolbar button.components-button.is-primary:hover svg { 77 fill: #fff; 78 } 79 .blocks-everywhere .components-button.is-primary { 80 --wp-admin-theme-color: #fff; 81 } 82 .editor-document-tools .editor-document-tools__left>.components-button.is-primary.has-icon.is-pressed { 83 background: var(--wp--custom--button--color--background); 84 } 85 /* Fix the inline new-block button */ 86 .block-editor-default-block-appender .block-editor-inserter__toggle.components-button.has-icon:hover { 87 background: var( --wp--preset--color--charcoal-3 ); 88 } 89 /* Fix the button selected state */ 90 .gutenberg-support .edit-post-header button:not(:hover):not(:active):not(.has-background):not(.is-primary), 91 .gutenberg-support .edit-post-header button.is-pressed:not(.has-background):not(.is-primary) { 92 color: #fff; 93 } 94 /* Editor toolbar buttons */ 95 .gutenberg-support .iso-editor .block-editor-block-types-list__list-item:hover span { 96 fill: inherit; 97 color: inherit; 98 } 99 .gutenberg-support .iso-editor .edit-post-header__toolbar button.is-pressed:hover svg { 100 fill: #fff; 101 } 102 /* Fix the accessibility navigation block styles */ 103 .block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents, 104 .block-editor-list-view-leaf.is-selected .components-button.has-icon, 105 .gutenberg-support #bbpress-forums fieldset.bbp-form .block-editor-list-view-tree button:focus, 106 .gutenberg-support #bbpress-forums fieldset.bbp-form .block-editor-list-view-tree button:hover { 107 color: var( --wp--preset--color--charcoal-1 ); 108 } 109 /* Fix the accessibility block drag handles */ 110 button.components-button.block-selection-button_drag-handle, 111 button.components-button.block-selection-button_select-button { 112 color: #fff !important; 113 } 114 CSS 115 ); 116 } 117 62 118 public function after_setup_theme() { 63 119 // This will make embeds resize properly. … … 102 158 $settings['iso']['blocks']['allowBlocks'][] = 'core/embed'; 103 159 } 104 105 // Adds a navigation button in the toolbar.106 $settings['toolbar']['navigation'] = false;107 160 108 161 // We don't need these on the forums.
Note: See TracChangeset
for help on using the changeset viewer.