Making WordPress.org

Changeset 7537


Ignore:
Timestamp:
07/30/2018 08:14:58 AM (8 years ago)
Author:
tellyworth
Message:

Gutenberg: disable embed blocks till we have a safe way to support them.

See #3703

File:
1 edited

Legend:

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

    r7534 r7537  
    6262        }
    6363        add_filter( 'wp_headers', 'disable_x_pingback' );
     64
     65        // Embeds need further work.
     66        add_filter( 'block_categories', function( $cats ) {
     67                foreach ( $cats as $i => $cat ) {
     68                        if ( $cat['slug'] === 'embed' )
     69                                unset( $cats[$i] );
     70                }
     71                return $cats;
     72        } );
     73
     74
    6475});
    6576
Note: See TracChangeset for help on using the changeset viewer.