Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
Frederic Fauvel
tagDiv Member

Might have to change the condition before the loop too.

if ( count( $style_matches ) && is_array( $style_matches[ 0 ] ) ) {
foreach ( $style_matches[ 0 ] as $style_match ) {
// find inline css
$result_style .= preg_replace( ‘/.tdi_(\X*)/miU’, ‘.td-gutenberg-editor .editor-styles-wrapper .wp-block’, $style_match );
}
}

should be

if ( count( $style_matches ) && is_array( $style_matches[ 1 ] ) ) {
foreach ( $style_matches[ 1 ] as $style_match ) {
// find inline css
$result_style .= preg_replace( ‘/.tdi_(\X*)/miU’, ‘.td-gutenberg-editor .editor-styles-wrapper .wp-block’, $style_match );
}
}

Viewing 2 posts - 1 through 2 (of 2 total)