Plugin Directory

Changeset 3367726


Ignore:
Timestamp:
09/25/2025 10:03:52 AM (6 months ago)
Author:
Jules Colle
Message:

1.2 (2025-09-25)

  • Prevent JS error when wp.data is defined but wp.data.select('...') is not
Location:
disable-welcome-messages-and-tips/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • disable-welcome-messages-and-tips/trunk/disable-welcome-messages-and-tips.php

    r2954056 r3367726  
    33  Plugin Name: Disable Welcome Messages and Tips
    44  Description: Hide Welcome Messages and Tips in the Gutenberg Block Editor
    5   Version: 1.1
     5  Version: 1.2
    66  Author: Jules Colle
    77  Author URI: https://bdwm.be
     
    2222    <script>
    2323        jQuery(window).on('load', function(){
    24             wp.data && wp.data.select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
    25             wp.data && wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' );
     24            wp.data?.select( 'core/edit-post' )?.isFeatureActive?.( 'welcomeGuide' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'welcomeGuide' );
     25            wp.data?.select( 'core/edit-post' )?.isFeatureActive?.( 'fullscreenMode' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' );
    2626        });
    2727    </script>
  • disable-welcome-messages-and-tips/trunk/readme.txt

    r2954056 r3367726  
    55Tags: gutenberg, block-editor, notifications
    66Requires at least: 5.0
    7 Tested up to: 5.9
    8 Stable tag: 1.1
     7Tested up to: 6.3
     8Stable tag: 1.2
    99Requires PHP: 5.7
    1010License: GPLv2 or later
     
    3333
    3434== Changelog ==
     35
     36= 1.2 (2025-09-25) =
     37* Prevent JS error when wp.data is defined but wp.data.select('...') is not
    3538
    3639= 1.1 (2023-08-16) =
Note: See TracChangeset for help on using the changeset viewer.