get_url_component( $tag[2], PHP_URL_PATH ); if ( static::$FILE_TYPE && pathinfo( $file_path, PATHINFO_EXTENSION ) !== static::$FILE_TYPE ) { return true; } $excluded_files = Settings::get_settings()->excluded_minify_files; $excluded_files = preg_split( "/\\r\\n|\\r|\\n/u", trim( $excluded_files ), -1, PREG_SPLIT_NO_EMPTY ); $excluded_files = array_filter( $excluded_files ); $excluded_files = array_merge( $excluded_files, ['elementor/css/post-'] ); $excluded_files = array_unique( $excluded_files ); $excluded_files = apply_filters( 'ezcache_excluded_minify_files', $excluded_files ); foreach ( $excluded_files as $file ) { if ( preg_match( '/' . preg_quote( $file, '/' ) . '/', $file_path ) ) { return true; } } return false; } /** * Finds nodes matching the pattern in the HTML * * @param string $pattern Pattern to match. * @param string $html HTML content. * * @return bool|array */ protected function find( $pattern, $html ) { $html_nocomments = preg_replace( '//uUis', '', $html ); preg_match_all( '/' . $pattern . '/uUmsi', $html_nocomments, $matches, PREG_SET_ORDER ); if ( empty( $matches ) ) { return false; } return $matches; } /** * Rewrites the paths inside the CSS file content * * @param string $file File path. * @param string $content File content. * * @return string */ public function rewrite_paths( $file, $content ) { return Minify_CSS_UriRewriter::rewrite( $content, dirname( $file ) ); } public function get_url_component( $url, $component = -1 ) { return _get_component_from_parsed_url_array( wp_parse_url( $url ), $component ); } }