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();
    }
});

Leave a Comment