Tracking styles  

Check to remove styles'); ?>

'; foreach ($tracked as $script) { // print_r($script); if (!$script->ver) { $script->ver = '0'; } $check_name = 'remove_enqueued_style_'.$script->handle; $cheked = advset_check_if($check_name, false); $src = (strpos($script->src, '/')===0? get_site_url() : '') . $script->src; // $css = file_get_contents($src); // $urlTest = strpos($css, 'url(')>-1; echo "

$script->handle ($script->ver)"; if ($src) { echo "
$src"; } if ($script->deps) { echo '
dependency: '.implode(', ', $script->deps).''; } // if ($urlTest) { // $urls = preg_match_all('/url\([^\)]+\)/', $css, $matches); // $url_replacements = []; // foreach ($matches[0] as $match) { // if (!preg_match('/url\([^a-z]*(http|data)/i', $match)) { // $newUrl = preg_replace("/(url\(['\"]*)/", "$0".dirname($src).'/', $match); // $url_replacements[] = (object) ['old' => $match, 'new' => $newUrl]; // } // else { // $newUrl = $match; // } // } // if (count($url_replacements)) // { // echo '
Image URL replaces:'; // foreach ($url_replacements as $url_replacement) // { // echo '
    • '.esc_html($url_replacement->old).' › '.esc_html($url_replacement->new).''; // } // } // } echo '
'; } echo '
'; } else { echo 'No tracked styles yet. Try browsing your website.'; } ?>