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 and matticbot committed Jan 16, 2025
1 parent 192728d commit 95b1b27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ This is an alpha version! The changes listed here are not final.
### Removed
- Global Styles: Revert changes that hide notice in distraction free mode

### Fixed
- GB 19.8.0 hotfix: further refine hotfix so site editor opens correct template by default

## [6.1.0] - 2025-01-10
### Added
- Add watch command for this package in composer.json file. [#40927]
Expand Down
6 changes: 6 additions & 0 deletions src/features/wpcom-hotfixes/wpcom-hotfixes.php
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 95b1b27

Please sign in to comment.