mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Block Editor: Fix PHP warning when loading editor styles while in RTL.
In RTL languages, WordPress adds `style-editor-rtl.css` editor styles to the global `$editor_styles`. This patch ignores handling these styles if the file is not preset. Also, clarify the docs for the return value of the `block_version` function. Props mostafa.s1990, desrosj, mukesh27. Merges [43923] and [43924] to trunk. Fixes #45288, #45342. git-svn-id: https://develop.svn.wordpress.org/trunk@44270 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -283,7 +283,7 @@ function _restore_wpautop_hook( $content ) {
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param string $content Content to test.
|
||||
* @return int The block format version.
|
||||
* @return int The block format version is 1 if the content contains one or more blocks, 0 otherwise.
|
||||
*/
|
||||
function block_version( $content ) {
|
||||
return has_blocks( $content ) ? 1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user