Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1423470

    How does it come, that every (!) user has to use the shortcut, even if he hasn’t logged in for months? Why is it changed for every User if on user used the shortcut? And how to provide this in future, so that this can’t happen anymore?

    Best
    TIm

    #1423493

    Hey slikslok,

    Thank you for the inquiry.

    What do you mean by “shortcut”? If you’re referring to the fullscreen option in the block editor, please know that this has been set to be enabled by default starting on version 5.4. If you want to disable it, try to add this code in the functions.php file.

    add_action( 'enqueue_block_editor_assets', 'ava_disable_editor_fullscreen_by_default' );
    /**
     * Disable Fullscreen Gutenberg.
     */
    function ava_disable_editor_fullscreen_by_default() {
    	$script = "window.onload = function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } }";
    
    	wp_add_inline_script( 'wp-blocks', $script );
    }

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.