-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugin: Filter safe CSS to allow column flex-basis CSS attribute
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
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,26 @@ | ||
<?php | ||
/** | ||
* Temporary compatibility shims for features present in Gutenberg, pending | ||
* upstream commit to the WordPress core source repository. Functions here | ||
* exist only as long as necessary for corresponding WordPress support, and | ||
* each should be associated with a Trac ticket. | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
/** | ||
* Filters allowed CSS attributes to include `flex-basis`, included in saved | ||
* markup of the Column block. | ||
* | ||
* @since 5.7.0 | ||
* | ||
* @param string[] $attr Array of allowed CSS attributes. | ||
* | ||
* @return string[] Filtered array of allowed CSS attributes. | ||
*/ | ||
function gutenberg_safe_style_css_column_flex_basis( $attr ) { | ||
$attr[] = 'flex-basis'; | ||
|
||
return $attr; | ||
} | ||
add_filter( 'safe_style_css', 'gutenberg_safe_style_css_column_flex_basis' ); |
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