public function optimize( $html, $options = array(), $object_id = 0, $object_type = 'post' ) {
if ( empty( $html ) || ! $object_id ) return $html;
$blog_id = get_current_blog_id();
// Cria a subpasta isolada por site e por ID (ex: assets/blog-2/term-22/)
$this->assets_dir = WP_CONTENT_DIR . '/cache/ftl-enhancer/assets/blog-' . $blog_id . '/' . $object_type . '-' . intval( $object_id ) . '/';
$this->assets_url = content_url( 'cache/ftl-enhancer/assets/blog-' . $blog_id . '/' . $object_type . '-' . intval( $object_id ) . '/' );
if ( ! file_exists( $this->assets_dir ) ) wp_mkdir_p( $this->assets_dir );
$dom = new DOMDocument(); libxml_use_internal_errors( true );
@$dom->loadHTML( mb_convert_encoding( $html, 'HTML-ENTITIES', 'UTF-8' ), LIBXML_NOERROR | LIBXML_NOWARNING );
libxml_clear_errors(); $xpath = new DOMXPath( $dom );
$is_auto = isset( $options['auto_unify'] ) && $options['auto_unify'];
if ( $is_auto ) {
if ( ! empty( $options['unify_css'] ) ) $this->process_css( $dom, $xpath, $options, true );
if ( ! empty( $options['unify_js'] ) ) $this->process_js( $dom, $xpath, $options, true );
if ( ! empty( $options['optimize_images'] ) ) $this->process_images( $xpath, $options, true );
} else {
if ( ! empty( $options['selected_css'] ) ) $this->process_css( $dom, $xpath, $options, false );
if ( ! empty( $options['selected_js'] ) ) $this->process_js( $dom, $xpath, $options, false );
if ( ! empty( $options['selected_images'] ) ) $this->process_images( $xpath, $options, false );
}
$html = $dom->saveHTML();
if ( ! empty( $options['minify_html'] ) ) {
$html = preg_replace( '/).)*-->/s', '', $html );
$html = trim( preg_replace( array( '/\>[^\S ]+/s', '/[^\S ]+\', '<', '\\1' ), $html ) );
}
return $html;
}
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
Warning: Cannot modify header information - headers already sent by (output started at /home/homologacentral/public_html/wp-content/plugins/headless-pwa-wp/includes/class-ftl-optimizer.php:1) in /home/homologacentral/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1930
1.0Virgemhttps://homologa.centralfaveni.com.br/virgemFARMACOLOGIA E TERAPÊUTICA VETERINÁRIA - Virgemrich600338<blockquote class="wp-embedded-content" data-secret="CwC8BAIzGv"><a href="https://homologa.centralfaveni.com.br/virgem/curso/farmacologia-e-terapeutica-veterinaria/">FARMACOLOGIA E TERAPÊUTICA VETERINÁRIA</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://homologa.centralfaveni.com.br/virgem/curso/farmacologia-e-terapeutica-veterinaria/embed/#?secret=CwC8BAIzGv" width="600" height="338" title="“FARMACOLOGIA E TERAPÊUTICA VETERINÁRIA” — Virgem" data-secret="CwC8BAIzGv" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script>
/*! This file is auto-generated */
!function(d,l){"use strict";l.querySelector&&d.addEventListener&&"undefined"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i<o.length;i++)o[i].style.display="none";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute("style"),"height"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):"link"===t.message&&(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document);
//# sourceURL=https://homologa.centralfaveni.com.br/virgem/wp-includes/js/wp-embed.min.js
</script>