file['query'] ); if ( $file['query'] ) { return true; } return false; } /** * Sets the current file extension and minify key * * @since 3.1 * @author Remy Perona * * @param string $extension Current file extension. * @return void */ public function set_extension( $extension ) { $this->extension = $extension; $this->minify_key = $this->options->get( 'minify_' . $this->extension . '_key' ); } /** * Gets the CDN zones. * * @since 3.1 * @author Remy Perona * * @return array */ public function get_zones() { return [ 'all', 'css_and_js', $this->extension ]; } /** * Gets the cache URL for the static file * * @since 3.1 * @author Remy Perona * * @param string $filename Filename for the static file. * @return string */ protected function get_cache_url( $filename ) { $cache_url = $this->busting_url . $filename; switch ( $this->extension ) { case 'css': // This filter is documented in inc/classes/optimization/css/class-abstract-css-optimization.php. $cache_url = apply_filters( 'rocket_css_url', $cache_url ); break; case 'js': // This filter is documented in inc/classes/optimization/css/class-abstract-js-optimization.php. $cache_url = apply_filters( 'rocket_js_url', $cache_url ); break; } return $cache_url; } /** * Gets content from an URL * * @since 3.1 * @author Remy Perona * * @param string $url URL to get the content from. * @return string|bool */ protected function get_url_content( $url ) { $content = wp_remote_retrieve_body( wp_remote_get( $url ) ); if ( ! $content ) { return false; } return $content; } }