xxScorpionxx replied
It doesn't work either, that plugin with delete defer in logged in user. I have managed to solve it for the moment with a snippet, I put it here in case someone also needs it:
if( is_user_logged_in() && current_user_can('administrator') || is_customize_preview() ) {
add_action('wp_loaded', 'prefix_output_buffer_start');
function prefix_output_buffer_start() {
ob_start("prefix_output_callback");
}
add_action('shutdown', 'prefix_output_buffer_end');
function prefix_output_buffer_end() {
ob_end_flush();
}
function prefix_output_callback($buffer) {
return preg_replace( "%[ ]defer=[\\'\\"]defer[\\'\\"]%", '', $buffer );
}
}
and to exclude stylesheets from optimize CSS I used the id of the style that appears in the html:id:penci_style-css
the handle name:
id:penci-soledad-parent-style - did not work