Plugin Directory


Ignore:
Timestamp:
09/14/2018 05:19:43 PM (8 years ago)
Author:
lonelyvegan
Message:

Committing Gutenberg version 3.9.0-rc.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gutenberg/trunk/gutenberg.php

    r1939992 r1941474  
    44 * Plugin URI: https://github.com/WordPress/gutenberg
    55 * Description: Printing since 1440. This is the development plugin for the new block editor in core.
    6  * Version: 3.8.0
     6 * Version: 3.9.0-rc.1
    77 * Author: Gutenberg Team
    88 *
     
    1111
    1212### BEGIN AUTO-GENERATED DEFINES
    13 define( 'GUTENBERG_VERSION', '3.8.0' );
    14 define( 'GUTENBERG_GIT_COMMIT', 'a22963998c9f26439630d46a18303b6ae76ca694' );
     13define( 'GUTENBERG_VERSION', '3.9.0' );
     14define( 'GUTENBERG_GIT_COMMIT', '6ec4ca81d271d07955b468b038b3058f35289955' );
    1515### END AUTO-GENERATED DEFINES
    1616
     
    262262        unset( $actions['edit'] );
    263263        unset( $actions['inline hide-if-no-js'] );
     264        $actions['export'] = sprintf(
     265            '<a class="wp-list-reusable-blocks__export" href="#" data-id="%s" aria-label="%s">%s</a>',
     266            $post->ID,
     267            __( 'Export as JSON', 'gutenberg' ),
     268            __( 'Export as JSON', 'gutenberg' )
     269        );
    264270        return $actions;
    265271    }
     
    470476 */
    471477function gutenberg_add_admin_body_class( $classes ) {
    472     // Default to is-fullscreen-mode to avoid jumps in the UI.
    473     return "$classes gutenberg-editor-page is-fullscreen-mode";
    474 }
     478    if ( current_theme_supports( 'editor-styles' ) && current_theme_supports( 'dark-editor-style' ) ) {
     479        return "$classes gutenberg-editor-page is-fullscreen-mode is-dark-theme";
     480    } else {
     481        // Default to is-fullscreen-mode to avoid jumps in the UI.
     482        return "$classes gutenberg-editor-page is-fullscreen-mode";
     483    }
     484}
     485
     486/**
     487 * Adds attributes to kses allowed tags that aren't in the default list
     488 * and that Gutenberg needs to save blocks such as the Gallery block.
     489 *
     490 * @param array $tags Allowed HTML.
     491 * @return array (Maybe) modified allowed HTML.
     492 */
     493function gutenberg_kses_allowedtags( $tags ) {
     494    if ( isset( $tags['img'] ) ) {
     495        $tags['img']['data-link'] = true;
     496        $tags['img']['data-id']   = true;
     497    }
     498    return $tags;
     499}
     500
     501add_filter( 'wp_kses_allowed_html', 'gutenberg_kses_allowedtags', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.