Skip to content

Commit

Permalink
Gutenberg 19.8.0 hotfix: don't show the template-locked rendering mod…
Browse files Browse the repository at this point in the history
…e for pages (#40664)

This avoids triggering a bug in Gutenberg 19.8.0 which meant editor roles were unable to edit pages.
  • Loading branch information
fushar authored Dec 18, 2024
1 parent 829b8dc commit 832e258
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Gutenberg 19.8.0 hotfix: don't show the template-locked rendering mode for pages
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public static function load_features() {
require_once __DIR__ . '/features/wpcom-admin-dashboard/wpcom-admin-dashboard.php';
require_once __DIR__ . '/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php';
require_once __DIR__ . '/features/wpcom-block-editor/functions.editor-type.php';
require_once __DIR__ . '/features/wpcom-hotfixes/wpcom-hotfixes.php';
require_once __DIR__ . '/features/wpcom-logout/wpcom-logout.php';
require_once __DIR__ . '/features/wpcom-themes/wpcom-theme-fixes.php';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Various hotfixes to WordPress.com
*
* @package automattic/jetpack-mu-wpcom
*/

/**
* Hotfix for a Gutenberg 19.8.0 bug preventing lower-capability users from editing pages.
* See: p1734525664059729-slack-C02FMH4G8
* See: https://github.com/WordPress/gutenberg/issues/68053#issuecomment-2550730705
*/
add_filter(
'register_post_type_args',
function ( $args ) {
unset( $args['default_rendering_mode'] );
return $args;
},
20
);

0 comments on commit 832e258

Please sign in to comment.