[wp-trac] [WordPress Trac] #59086: Twenty Twenty Theme black background hides text editing after 6.3 update
WordPress Trac
noreply at wordpress.org
Mon Aug 14 13:05:02 UTC 2023
#59086: Twenty Twenty Theme black background hides text editing after 6.3 update
-------------------------------------+---------------------
Reporter: floydwilde | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.3.1
Component: Bundled Theme | Version: 6.3
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------
Comment (by greenshady):
That should work, @poena. The one thing I'm not sure we should be doing is
loading the `editor-script.js` on `enqueue_block_assets` since it's
specifically for the editor and not the "content".
This is untested, but this is how I'd probably approach this:
I'd use `add_editor_style()` for the `editor-style-block.css` stylesheet.
Then, I'd do something like this for the inline CSS:
{{{
add_filter( 'block_editor_settings_all', 'twentytwenty_editor_settings' );
function twentytwenty_editor_settings( $settings ) {
// Add inline style from the Customizer.
$customizer_css = twentytwenty_get_customizer_css( 'block-editor'
);
// Add inline style for non-latin fonts.
$custom_css = TwentyTwenty_Non_Latin_Languages::get_non_latin_css(
'block-editor' );
$settings['styles'][] = [
'css' => $customizer_css . $custom_css,
'__unstableType' => 'theme',
'source' => 'twentytwenty'
];
return $settings;
}
}}}
And the script should be loaded on `enqueue_block_editor_assets` as
normal.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59086#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list