Making WordPress.org

Changeset 7584


Ignore:
Timestamp:
08/02/2018 04:49:21 AM (8 years ago)
Author:
dd32
Message:

Gutenberg: Run our tweaks and custom JS after the core Gutenberg JS.

See #3703.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    r7583 r7584  
    155155                        'wp-edit-post',
    156156                        'wp.data.dispatch( "core/edit-post" ).closeGeneralSidebar();' .
    157                         'wp.data.dispatch( "core/nux" ).disableTips();'
    158                 );
    159         } );
     157                        'wp.data.dispatch( "core/nux" ).disableTips();' .
     158                        'wp.domReady( function() { wp.blocks.unregisterBlockType( "core/shortcode" ); } );'
     159                );
     160        }, 11 );
    160161        add_action( 'wp_enqueue_scripts', 'gutenberg_editor_scripts_and_styles' );
    161162
     
    166167        // Disable use XML-RPC
    167168        add_filter( 'xmlrpc_enabled', '__return_false' );
    168 
    169         add_action( 'wp_footer', function() {
    170                 wp_add_inline_script(
    171                         'wp-edit-post',
    172                         'wp.domReady( function() { wp.blocks.unregisterBlockType( "core/shortcode" ); } );'
    173                 );
    174         } );
    175169
    176170        // Disable X-Pingback to header
Note: See TracChangeset for help on using the changeset viewer.