| Server IP : 80.74.154.100 / Your IP : 216.73.217.0 Web Server : Apache System : Linux marissa.metanet.ch 4.18.0-553.141.2.lve.el7h.x86_64 #1 SMP Wed Jul 8 17:20:31 UTC 2026 x86_64 User : onlineadmin ( 10487) PHP Version : 8.5.7 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/httpd/vhosts/comeonline.ch/httpdocs/wp-content/plugins/wpsso/lib/integ/util/ |
Upload File : |
<?php
/*
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl.txt
* Copyright 2024-2026 Jean-Sebastien Morisset (https://wpsso.com/)
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'These aren\'t the droids you\'re looking for.' );
}
if ( ! class_exists( 'WpssoIntegUtilJetpackBoost' ) ) {
class WpssoIntegUtilJetpackBoost {
private $p; // Wpsso class object.
public function __construct( &$plugin ) {
$this->p =& $plugin;
if ( $this->p->debug->enabled ) {
$this->p->debug->mark();
}
if ( ! is_admin() ) {
/*
* Exclude the WPSSO schema markup from the Jetpack Boost "Defer Non-Essential JavaScript" function.
*/
add_filter( 'jetpack_boost_render_blocking_js_exclude_scripts', array( $this, 'cleanup_defer_scripts' ), 1000, 1 );
}
}
public function cleanup_defer_scripts( array $script_tags ) {
foreach ( $script_tags as $num => $match ) {
if ( isset( $match[ 0 ] ) ) { // Just in case.
if ( false !== strpos( $match[ 0 ], '<script type="application/ld+json" id="wpsso-' ) ) {
unset( $script_tags[ $num ] );
}
}
}
return $script_tags;
}
}
}