-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MU WPCOM: Enable the custom-line-height feature for classic theme by …
…default (#38317) * MU WPCOM: Enable the custom-line-height feature by default * changelog
- Loading branch information
1 parent
a96f994
commit ca355da
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/packages/jetpack-mu-wpcom/changelog/mu-wpcom-custom-line-height
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
MU WPCOM: Enable the custom-line-height feature by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
projects/packages/jetpack-mu-wpcom/src/features/block-editor/custom-line-height.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
/** | ||
* Enable line-height settings for all themes with Gutenberg. | ||
* | ||
* @package jetpack-mu-wpcom | ||
*/ | ||
|
||
define( 'MU_WPCOM_CUSTOM_LINE_HEIGHT', true ); | ||
|
||
/** | ||
* Prior to Gutenberg 8.6, line-height was always enabled, which meant that wpcom | ||
* users had been utilizing the feature. With the 8.6 release, though, line-height | ||
* was turned off by default unless the theme supported it. As a result, users | ||
* suddenly were no longer able to access the settings they previously had access | ||
* to. This turns the setting on for all wpcom users regardless of theme. | ||
* | ||
* @see https://github.com/WordPress/gutenberg/pull/23904 | ||
**/ | ||
function jetpack_mu_wpcom_gutenberg_enable_custom_line_height() { | ||
add_theme_support( 'custom-line-height' ); | ||
} | ||
add_action( 'after_setup_theme', 'jetpack_mu_wpcom_gutenberg_enable_custom_line_height' ); |