t_rocket_i18n_uri(); // Get host for all langs. if ( $langs ) { foreach ( $langs as $lang ) { $hosts[] = rocket_extract_url_component( $lang, PHP_URL_HOST ); } } $hosts_index = array_flip( array_unique( $hosts ) ); // URL has domain and domain is not part of the internal domains. if ( isset( $file['host'] ) && ! empty( $file['host'] ) && ! isset( $hosts_index[ $file['host'] ] ) ) { return true; } // URL has no domain and doesn't contain the WP_CONTENT path or wp-includes. if ( ! isset( $file['host'] ) && ! preg_match( '#(' . $wp_content['path'] . '|wp-includes)#', $file['path'] ) ) { return true; } return false; } } if ( ! function_exists( 'is_rocket_minify_excluded_file' ) ) { /** * Determines if it is a file excluded from minification * * @since 2.11 * @deprecated 3.1 * @author Remy Perona * * @param array $tag Array containing the matches from the regex. * @param string $extension File extension. * @return bool True if it is a file excluded, false otherwise */ function is_rocket_minify_excluded_file( $tag, $extension ) { _deprecated_function( __FUNCTION__, '3.1' ); // File should not be minified. if ( false !== strpos( $tag[0], 'data-minify=' ) || false !== strpos( $tag[0], 'data-no-minify=' ) ) { return true; } if ( 'css' === $extension ) { // CSS file media attribute is not all or screen. if ( false !== strpos( $tag[0], 'media=' ) && ! preg_match( '/media=["\'](?:["\']|[^"\']*?(all|screen)[^"\']*?["\'])/iU', $tag[0] ) ) { return true; } if ( false !== strpos( $tag[0], 'only screen and' ) ) { return true; } } $file_path = rocket_extract_url_component( $tag[1], PHP_URL_PATH ); // File extension is not .css or .js. if ( pathinfo( $file_path, PATHINFO_EXTENSION ) !== $extension ) { return true; } $excluded_files = get_rocket_exclude_files( $extension ); if ( ! empty( $excluded_files ) ) { foreach ( $excluded_files as $i => $excluded_file ) { $excluded_files[ $i ] = str_replace( '#', '\#', $excluded_file ); } $excluded_files = implode( '|', $excluded_files ); // File is excluded from minification/concatenation. if ( preg_match( '#^(' . $excluded_files . ')$#', $file_path ) ) { return true; } } return false; } } if ( ! function_exists( 'get_rocket_minify_url' ) ) { /** * Creates the minify URL if the minification is successful * * @since 2.11 * @deprecated 3.1 * @author Remy Perona * * @param string|array $files Original file(s) URL(s). * @param string $extension File(s) extension. * @return string|bool The minify URL if successful, false otherwise */ function get_rocket_minify_url( $files, $extension ) { _deprecated_function( __FUNCTION__, '3.1' ); if ( empty( $files ) ) { return false; } $hosts = get_rocket_cnames_host( array( 'all', 'css_and_js', $extension ) ); $hosts['home'] = rocket_extract_url_component( home_url(), PHP_URL_HOST ); $hosts_index = array_flip( $hosts ); $minify_key = get_rocket_option( 'minify_' . $extension . '_key', create_rocket_uniqid() ); if ( is_string( $files ) ) { $file = get_rocket_parse_url( $files ); $file_path = rocket_url_to_path( strtok( $files, '?' ), $hosts_index ); $unique_id = md5( $files . $minify_key ); $filename = preg_replace( '/\.(' . $extension . ')$/', '-' . $unique_id . '.' . $extension, ltrim( rocket_realpath( $file['path'] ), '/' ) ); } else { foreach ( $files as $file ) { $file_path[] = rocket_url_to_path( $file, $hosts_index ); } $files_hash = implode( ',', $files ); $filename = md5( $files_hash . $minify_key ) . '.' . $extension; } $minified_file = WP_ROCKET_MINIFY_CACHE_PATH . get_current_blog_id() . '/' . $filename; if ( ! file_exists( $minified_file ) ) { $minified_content = rocket_minify( $file_path, $extension ); if ( ! $minified_content ) { return false; } $minify_filepath = rocket_write_minify_file( $minified_content, $minified_file ); if ( ! $minify_filepath ) { return false; } } $minify_url = get_rocket_cdn_url( WP_ROCKET_MINIFY_CACHE_URL . get_current_blog_id() . '/' . $filename, array( 'all', 'css_and_js', $extension ) ); if ( 'css' === $extension ) { /** * Filters CSS file URL with CDN hostname * * @since 2.1 * * @param string $minify_url Minified file URL. */ return apply_filters( 'rocket_css_url', $minify_url ); } if ( 'js' === $extension ) { /** * Filters JavaScript file URL with CDN hostname * * @since 2.1 * * @param string $minify_url Minified file URL. */ return apply_filters( 'rocket_js_url', $minify_url ); } } } if ( ! function_exists( 'rocket_minify' ) ) { /** * Minifies the content * * @since 2.11 * @deprecated 3.1 * @author Remy Perona * * @param string|array $files File(s) to minify. * @param string $extension File(s) extension. * @return string|bool Minified content, false if empty */ function rocket_minify( $files, $extension ) { _deprecated_function( __FUNCTION__, '3.1' ); if ( 'css' === $extension ) { $minify = new Minify\CSS(); } elseif ( 'js' === $extension ) { $minify = new Minify\JS(); } $files = (array) $files; foreach ( $files as $file ) { $file_content = rocket_direct_filesystem()->get_contents( $file ); if ( 'css' === $extension ) { /** * Filters the Document Root path to use during CSS minification to rewrite paths * * @since 2.7 * * @param string The Document Root path. */ $document_root = apply_filters( 'rocket_min_documentRoot', ABSPATH ); $file_content = rocket_cdn_css_properties( Minify_CSS_UriRewriter::rewrite( $file_content, dirname( $file ), $document_root ) ); } $minify->add( $file_content ); } $minified_content = $minify->minify(); if ( empty( $minified_content ) ) { return false; } return $minified_content; } } if ( ! function_exists( 'rocket_write_minify_file' ) ) { /** * Writes the minified content to a file * * @since 2.11 * @deprecated 3.1 * @author Remy Perona * * @param string $content Minified content. * @param string $minified_file Path to the minified file to write in. * @return bool True if successful, false otherwise */ function rocket_write_minify_file( $content, $minified_file ) { _deprecated_function( __FUNCTION__, '3.1' ); if ( file_exists( $minified_file ) ) { return true; } if ( ! rocket_mkdir_p( dirname( $minified_file ) ) ) { return false; } return rocket_put_content( $minified_file, $content ); } } if ( ! function_exists( 'get_rocket_minify_excluded_external_js' ) ) { /** * Get all JS externals files to exclude of the minification process * * @since 2.6 * @deprecated 3.1 * * @return array Array of excluded external JS */ function get_rocket_minify_excluded_external_js() { _deprecated_function( __FUNCTION__, '3.1' ); /** * Filters JS externals files to exclude from the minification process (do not move into the header) * * @since 2.2 * * @param array $hostnames Hostname of JS files to exclude. */ $excluded_external_js = apply_filters( 'rocket_minify_excluded_external_js', array( 'forms.aweber.com', 'video.unrulymedia.com', 'gist.github.com', 'stats.wp.com', 'stats.wordpress.com', 'www.statcounter.com', 'widget.rafflecopter.com', 'widget-prime.rafflecopter.com', 'widget.supercounters.com', 'releases.flowplayer.org', 'tools.meetaffiliate.com', 'c.ad6media.fr', 'cdn.stickyadstv.com', 'www.smava.de', 'contextual.media.net', 'app.getresponse.com', 'ap.lijit.com', 'adserver.reklamstore.com', 's0.wp.com', 'wprp.zemanta.com', 'files.bannersnack.com', 'smarticon.geotrust.com', 'js.gleam.io', 'script.ioam.de', 'ir-na.amazon-adsystem.com', 'web.ventunotech.com', 'verify.authorize.net', 'ads.themoneytizer.com', 'embed.finanzcheck.de', 'imagesrv.adition.com', 'js.juicyads.com', 'form.jotformeu.com', 'speakerdeck.com', 'content.jwplatform.com', 'ads.investingchannel.com', 'app.ecwid.com', 'www.industriejobs.de', 's.gravatar.com', 'cdn.jsdelivr.net', 'cdnjs.cloudflare.com', 'code.jquery.com', ) ); return array_flip( $excluded_external_js ); } } if ( ! function_exists( 'rocket_cache_dynamic_resource' ) ) { /** * Create a static file for dynamically generated CSS/JS from PHP * * @since 2.9 * @deprecated 3.1 * @author Remy Perona * * @param string $src dynamic CSS/JS file URL. * @return string URL of the generated static file */ function rocket_cache_dynamic_resource( $src ) { _deprecated_function( __FUNCTION__, '3.1' ); global $pagenow; if ( defined( 'DONOTROCKETOPTIMIZE' ) && DONOTROCKETOPTIMIZE ) { return $src; } if ( is_user_logged_in() && ! get_rocket_option( 'cache_logged_user' ) ) { return $src; } if ( 'wp-login.php' === $pagenow ) { return $src; } if ( false === strpos( $src, '.php' ) ) { return $src; } /** * Filters files to exclude from static dynamic resources * * @since 2.9.3 * @author Remy Perona * * @param array $excluded_files An array of filepath to exclude. */ $excluded_files = apply_filters( 'rocket_exclude_static_dynamic_resources', array() ); $excluded_files[] = '/wp-admin/admin-ajax.php'; $excluded_files = array_flip( $excluded_files ); if ( isset( $excluded_files[ rocket_clean_exclude_file( $src ) ] ) ) { return $src; } $full_src = ( substr( $src, 0, 2 ) === '//' ) ? rocket_add_url_protocol( $src ) : $src; $current_filter = current_filter(); switch ( $current_filter ) { case 'script_loader_src': $extension = 'js'; $minify_key = get_rocket_option( 'minify_js_key' ); break; case 'style_loader_src': $extension = 'css'; $minify_key = get_rocket_option( 'minify_css_key' ); break; } $hosts = get_rocket_cnames_host( array( 'all', 'css_and_js', $extension ) ); $hosts[] = rocket_extract_url_component( home_url(), PHP_URL_HOST ); $hosts_index = array_flip( $hosts ); $file = get_rocket_parse_url( $full_src ); $file['query'] = remove_query_arg( 'ver', $file['query'] ); if ( $file['query'] ) { return $src; } if ( '' === $file['host'] ) { $full_src = home_url() . $src; } if ( strpos( $full_src, '://' ) !== false && ! isset( $hosts_index[ $file['host'] ] ) ) { return $src; } $relative_src = ltrim( $file['path'], '/' ); $abspath_src = rocket_url_to_path( strtok( $full_src, '?' ), $hosts_index ); /* * Filters the dynamic resource cache filename * * @since 2.9 * @author Remy Perona * * @param string $filename filename for the cache file */ $cache_dynamic_resource_filename = apply_filters( 'rocket_dynamic_resource_cache_filename', preg_replace( '/\.(php)$/', '-' . $minify_key . '.' . $extension, $relative_src ) ); $cache_busting_paths = rocket_get_cache_busting_paths( $cache_dynamic_resource_filename, $extension ); if ( file_exists( $cache_busting_paths['filepath'] ) && is_readable( $cache_busting_paths['filepath'] ) ) { return $cache_busting_paths['url']; } if ( rocket_fetch_and_cache_busting( $full_src, $cache_busting_paths, $abspath_src, $current_filter ) ) { return $cache_busting_paths['url']; } return $src; } } if ( ! function_exists( 'rocket_browser_cache_busting' ) ) { /** * Wrapper for get_rocket_browser_cache_busting except when minification is active. * * @since 2.9 * @deprecated 3.1 * @author Remy Perona * * @param string $src CSS/JS file URL. * @return string updated CSS/JS file URL. */ function rocket_browser_cache_busting( $src ) { _deprecated_function( __FUNCTION__, '3.1' ); $current_filter = current_filter(); if ( 'style_loader_src' === $current_filter && get_rocket_option( 'minify_css' ) && ( ! defined( 'DONOTMINIFYCSS' ) || ! DONOTMINIFYCSS ) && ! is_rocket_post_excluded_option( 'minify_css' ) ) { return $src; } if ( 'script_loader_src' === $current_filter && get_rocket_option( 'minify_js' ) && ( ! defined( 'DONOTMINIFYJS' ) || ! DONOTMINIFYJS ) && ! is_rocket_post_excluded_option( 'minify_js' ) ) { return $src; } return get_rocket_browser_cache_busting( $src, $current_filter ); } } if ( ! function_exists( 'get_rocket_browser_cache_busting' ) ) { /** * Create a cache busting file with the version in the filename * * @since 2.9 * @deprecated 3.1 * @author Remy Perona * * @param string $src CSS/JS file URL. * @param string $current_filter Current WordPress filter. * @return string updated CSS/JS file URL */ function get_rocket_browser_cache_busting( $src, $current_filter = '' ) { _deprecated_function( __FUNCTION__, '3.1' ); global $pagenow; if ( defined( 'DONOTROCKETOPTIMIZE' ) && DONOTROCKETOPTIMIZE ) { return $src; } if ( ! get_rocket_option( 'remove_query_strings' ) ) { return $src; } if ( is_user_logged_in() && ! get_rocket_option( 'cache_logged_user', 0 ) ) { return $src; } if ( 'wp-login.php' === $pagenow ) { return $src; } if ( false === strpos( $src, '.css' ) && false === strpos( $src, '.js' ) ) { return $src; } if ( false !== strpos( $src, 'ver=' . $GLOBALS['wp_version'] ) ) { $src = rtrim( str_replace( array( 'ver=' . $GLOBALS['wp_version'], '?&', '&&' ), array( '', '?', '&' ), $src ), '?&' ); } /** * Filters files to exclude from cache busting * * @since 2.9.3 * @author Remy Perona * * @param array $excluded_files An array of filepath to exclude. */ $excluded_files = apply_filters( 'rocket_exclude_cache_busting', array() ); $excluded_files = implode( '|', $excluded_files ); if ( preg_match( '#^(' . $excluded_files . ')$#', rocket_clean_exclude_file( $src ) ) ) { return $src; } if ( empty( $current_filter ) ) { $current_filter = current_filter(); } $full_src = ( substr( $src, 0, 2 ) === '//' ) ? rocket_add_url_protocol( $src ) : $src; switch ( $current_filter ) { case 'script_loader_src': $extension = 'js'; break; case 'style_loader_src': $extension = 'css'; break; } $hosts = get_rocket_cnames_host( array( 'all', 'css_and_js', $extension ) ); $hosts['home'] = rocket_extract_url_component( home_url(), PHP_URL_HOST ); $hosts_index = array_flip( $hosts ); $file = get_rocket_parse_url( $full_src ); if ( '' === $file['host'] ) { $full_src = home_url() . $src; } if ( false !== strpos( $full_src, '://' ) && ! isset( $hosts_index[ $file['host'] ] ) ) { return $src; } if ( empty( $file['query'] ) ) { return $src; } $relative_src = ltrim( $file['path'] . '?' . $file['query'], '/' ); $abspath_src = rocket_url_to_path( strtok( $full_src, '?' ), $hosts_index ); $cache_busting_filename = preg_replace( '/\.(js|css)\?(?:timestamp|ver)=([^&]+)(?:.*)/', '-$2.$1', $relative_src ); if ( $cache_busting_filename === $relative_src ) { return $src; } /* * Filters the cache busting filename * * @since 2.9 * @author Remy Perona * * @param string $filename filename for the cache busting file */ $cache_busting_filename = apply_filters( 'rocket_cache_busting_filename', $cache_busting_filename ); $cache_busting_paths = rocket_get_cache_busting_paths( $cache_busting_filename, $extension ); if ( file_exists( $cache_busting_paths['filepath'] ) && is_readable( $cache_busting_paths['filepath'] ) ) { return $cache_busting_paths['url']; } if ( rocket_fetch_and_cache_busting( $abspath_src, $cache_busting_paths, $abspath_src, $current_filter ) ) { return $cache_busting_paths['url']; } return $src; } } if ( ! function_exists( 'rocket_dns_prefetch_buffer' ) ) { /** * Inserts html code for domain names to DNS prefetch in the buffer before creating the cache file * * @since 2.0 * @deprecated 3.1 * @author Jonathan Buttigieg * * @param String $buffer HTML content. * @return String Updated buffer */ function rocket_dns_prefetch_buffer( $buffer ) { _deprecated_function( __FUNCTION__, '3.1' ); $dns_link_tags = ''; $domains = rocket_get_dns_prefetch_domains(); if ( (bool) $domains ) { foreach ( $domains as $domain ) { $dns_link_tags .= ''; } } $old_ie_conditional_tag = ''; /** * Allow to print an empty IE conditional tag to speed up old IE versions to load CSS & JS files * * @since 2.6.5 * * @param bool true will print the IE conditional tag */ if ( apply_filters( 'do_rocket_old_ie_prefetch_conditional_tag', true ) ) { $old_ie_conditional_tag = ''; } // Insert all DNS prefecth tags in head. $buffer = preg_replace( '//', '' . $old_ie_conditional_tag . $dns_link_tags, $buffer, 1 ); return $buffer; } } Avis sur Way Out! Escape Game Lyon, 219 Rue Vendôme

Avis sur Way Out! Escape Game Lyon, 219 Rue Vendôme