Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function tf_start_buffer() {
ob_start();
}
add_action( 'wp_head', 'tf_start_buffer', 1 );
function tf_end_buffer() {
$output = ob_get_clean();
if( preg_match( '/class=\"themify_builder_row/', $output ) ) {
$output = str_replace(
'<meta name="builder-styles-css" content="" id="builder-styles-css">',
'<link rel="stylesheet" id="builder-styles-css" href="'. THEMIFY_BUILDER_URI . '/css/themify-builder-style.css' .'" media="all" />',
$output
);
}
echo $output;
}
add_action( 'wp_footer', 'tf_end_buffer', 10000 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment