Wordpress - Deactivate Gutenberg tips forever - not Gutenberg

enter image description here

Update #1:

After asking from @leymannx I checked how these settings are stored. It turned out that settings are not permanent, they are saved in the browser as localStorage.

key: WP_DATA_USER_{id}:
value: {
    "core/nux":{
        "preferences":{
            "areTipsEnabled":false,
            "dismissedTips":{}
        }
    },
    //"core/edit-post"
    //...

Update #2:

Gutenberg tips can be disabled by using dispatch('core/nux').disableTips() (NUX package) and action hook enqueue_block_editor_assets.

file functions.php:

function se334561_editor_tips() {

    wp_enqueue_script(
        'se334561-js',
        // --- to use in plugin ---
        // plugins_url('/disable-tips.js', __FILE__),
        get_stylesheet_directory_uri() . '/disable-tips.js',
        array('wp-blocks')
    );
}
add_action('enqueue_block_editor_assets', 'se334561_editor_tips');

file disable-tips.js:

jQuery(document).ready(function(){
    var isVisible = wp.data.select('core/nux').areTipsEnabled()
    if (isVisible) {
        wp.data.dispatch('core/nux').disableTips();
    }
});

As @nmr found out this seems to be stored browser-wise only. Though I found a workaround to simply hide it via CSS. Quick and dirty.

functions.php:

// Add backend styles for Gutenberg.
add_action('enqueue_block_editor_assets', 'gutenberg_editor_assets');

function gutenberg_editor_assets() {
  // Load the theme styles within Gutenberg.
  wp_enqueue_style('my-gutenberg-editor-styles', get_theme_file_uri('/assets/gutenberg-editor-styles.css'), FALSE);
}

assets/gutenberg-editor-styles.css:

.components-popover.nux-dot-tip {
  display: none !important;
}

Source: Creating theme editor styles for Gutenberg


Small plugin that should fix it: https://wordpress.org/plugins/disable-welcome-messages-and-tips/

The relevant part of the code is:

<style>
    /* disable tips */
    .wp-admin .components-popover.nux-dot-tip {
        display: none !important;
    }
</style>

<script>
    /* disable welcome message */
    window.onload = function(){
        wp.data && wp.data.select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
    };
</script>

Tags:

Block Editor