Skip to content

Commit

Permalink
MU WPCOM: Enable the custom-line-height feature for classic theme by …
Browse files Browse the repository at this point in the history
…default (#38317)

* MU WPCOM: Enable the custom-line-height feature by default

* changelog
  • Loading branch information
arthur791004 authored Jul 12, 2024
1 parent a96f994 commit ca355da
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public static function load_features() {
* Can be moved back to load_features() once the feature no longer exists in the ETK plugin.
*/
public static function load_etk_features() {
require_once __DIR__ . '/features/block-editor/custom-line-height.php';
require_once __DIR__ . '/features/block-inserter-modifications/block-inserter-modifications.php';
require_once __DIR__ . '/features/hide-homepage-title/hide-homepage-title.php';
require_once __DIR__ . '/features/jetpack-global-styles/class-global-styles.php';
Expand Down
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' );

0 comments on commit ca355da

Please sign in to comment.