criticalcss(); $ao_ccss_rules = sanitize_rules( $criticalcss->get_option( 'rules' ) ); $ao_ccss_types = $criticalcss->get_types(); if ( empty( $ao_ccss_types ) || ! is_array( $ao_ccss_types ) ) { $ao_ccss_types = array( 'No conditionals, check CSS optimization settings.' ); } ?> $value ) { $newkey = esc_url( $key ); if ( $newkey !== $key ) { if ( 0 === strpos( $newkey, 'http://' ) && 0 !== strpos( $key, 'http://' ) ) { // esc_url adds "http://" to any string that does not start with either a protocol or a // slash, see https://developer.wordpress.org/reference/functions/esc_url/#more-information // this removes that unneeded protocol again. $newkey = substr_replace( $newkey, '', 0, 7 ); } unset( $rules['paths'][ $key ] ); $rules['paths'][ $newkey ] = $value; } } } } $rules = autoptimizeUtils::strip_tags_array( $rules ); return $rules; } ?>