Skip to content

Commit

Permalink
Only run GB 19.8 hotfix for non-admin users (#41110)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-jackson authored Jan 16, 2025
1 parent be0d34b commit dc47154
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

GB 19.8.0 hotfix: further refine hotfix so site editor opens correct template by default
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
add_filter(
'register_post_type_args',
function ( $args ) {
if ( current_user_can( 'manage_options' ) ) {
// Admins still need default_rendering_mode for the site editor to select the correct default template.
// See: p1736989403607879-slack-C02FMH4G8
return $args;
}

unset( $args['default_rendering_mode'] );
return $args;
},
Expand Down

0 comments on commit dc47154

Please sign in to comment.