Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:WordPress/gutenberg into feat/issu…
Browse files Browse the repository at this point in the history
…e-65018
  • Loading branch information
vipul0425 committed Sep 6, 2024
2 parents 0a6ca4f + 9523fb4 commit 8fa351c
Show file tree
Hide file tree
Showing 411 changed files with 4,559 additions and 1,827 deletions.
3 changes: 3 additions & 0 deletions backport-changelog/6.7/7258.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7258

* https://github.com/WordPress/gutenberg/pull/64570
356 changes: 356 additions & 0 deletions changelog.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality.
* Requires at least: 6.5
* Requires PHP: 7.2
* Version: 19.1.0
* Version: 19.2.0-rc.1
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand Down
15 changes: 15 additions & 0 deletions lib/compat/wordpress-6.7/block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ function gutenberg_add_server_block_bindings_sources_to_editor_settings( $editor
}

add_filter( 'block_editor_settings_all', 'gutenberg_add_server_block_bindings_sources_to_editor_settings', 10 );

/**
* Initialize `canUpdateBlockBindings` editor setting if it doesn't exist. By default, it is `true` only for admin users.
*
* @param array $settings The block editor settings from the `block_editor_settings_all` filter.
* @return array The editor settings including `canUpdateBlockBindings`.
*/
function gutenberg_add_can_update_block_bindings_editor_setting( $editor_settings ) {
if ( empty( $editor_settings['canUpdateBlockBindings'] ) ) {
$editor_settings['canUpdateBlockBindings'] = current_user_can( 'manage_options' );
}
return $editor_settings;
}

add_filter( 'block_editor_settings_all', 'gutenberg_add_can_update_block_bindings_editor_setting', 10 );
9 changes: 3 additions & 6 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,15 @@ function gutenberg_enable_experiments() {
if ( gutenberg_is_experiment_enabled( 'gutenberg-full-page-client-side-navigation' ) ) {
wp_add_inline_script( 'wp-block-library', 'window.__experimentalFullPageClientSideNavigation = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-zoomed-out-patterns-tab', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableZoomedOutPatternsTab = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-quick-edit-dataviews', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalQuickEditDataViews = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-block-bindings-ui', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalBlockBindingsUI = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-media-processing', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalMediaProcessing = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-zoom-out-experiment', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableZoomOutExperiment = true', 'before' );
}
}

add_action( 'admin_init', 'gutenberg_enable_experiments' );
Expand Down
29 changes: 8 additions & 21 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,6 @@ function gutenberg_initialize_experiments_settings() {
)
);

add_settings_field(
'gutenberg-zoomed-out-patterns-tab',
__( 'Enable zoomed out view when patterns are browsed in the inserter', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Enable zoomed out view when selecting a pattern category in the main inserter.', 'gutenberg' ),
'id' => 'gutenberg-zoomed-out-patterns-tab',
)
);

add_settings_field(
'gutenberg-new-posts-dashboard',
__( 'Redesigned posts dashboard', 'gutenberg' ),
Expand All @@ -176,29 +164,28 @@ function gutenberg_initialize_experiments_settings() {
);

add_settings_field(
'gutenberg-block-bindings-ui',
__( 'UI to create block bindings', 'gutenberg' ),
'gutenberg-media-processing',
__( 'Client-side media processing', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Add UI to create and update block bindings in block inspector controls.', 'gutenberg' ),
'id' => 'gutenberg-block-bindings-ui',
'label' => __( 'Enable client-side media processing.', 'gutenberg' ),
'id' => 'gutenberg-media-processing',
)
);

add_settings_field(
'gutenberg-media-processing',
__( 'Client-side media processing', 'gutenberg' ),
'gutenberg-zoom-out-experiment',
__( 'Zoom out experiments', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Enable client-side media processing.', 'gutenberg' ),
'id' => 'gutenberg-media-processing',
'label' => __( 'Enable zoom out experiments; shows zoom out in the device preview and other zoom out experiments.', 'gutenberg' ),
'id' => 'gutenberg-zoom-out-experiment',
)
);

register_setting(
'gutenberg-experiments',
'gutenberg-experiments'
Expand Down
Loading

0 comments on commit 8fa351c

Please sign in to comment.