This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rocket_minify_excluded_external_js', '__fix_wprocket_excluded_external_js' ); | |
function __fix_wprocket_excluded_external_js( $external_js ) { | |
$external_js[] = 'google.com'; | |
return $external_js; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( current_user_can('administrator') ){ | |
define('DONOTCACHEPAGE', true); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'rocket_minify_excluded_external_js', '__fix_wprocket_excluded_external_js' ); | |
function __fix_wprocket_excluded_external_js( $external_js ) { | |
$external_js[] = 'ir-de.amazon-adsystem.com'; | |
return $external_js; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_GET['min_price']) or isset($_GET['max_price']) ){ | |
define('DONOTCACHEPAGE', true); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wp', '__deactivate_rocket_lazyload_if_only_content' ); | |
function __deactivate_rocket_lazyload_if_only_content() | |
{ | |
if( isset($_GET['content-only']) && $_GET['content-only'] == 1 ) { | |
add_filter( 'do_rocket_lazyload', '__return_false' ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! wp_next_scheduled( 'clear_home_page_hourly' ) ) { | |
wp_schedule_event( time(), 'hourly', 'clear_home_page_hourly' ); | |
} | |
add_action( 'clear_home_page_hourly', 'clear_home_page' ); | |
function clear_home_page() { | |
rocket_clean_home(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_browser_cache(){ | |
$rules = '# Expires headers (for better cache control)' . PHP_EOL; | |
$rules .= '<IfModule mod_expires.c>' . PHP_EOL; | |
$rules .= 'ExpiresActive on' . PHP_EOL . PHP_EOL; | |
$rules .= '# Perhaps better to whitelist expires rules? Perhaps.' . PHP_EOL; | |
$rules .= 'ExpiresDefault "access plus 1 month"' . PHP_EOL . PHP_EOL; | |
$rules .= '# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)' . PHP_EOL; | |
$rules .= 'ExpiresByType text/cache-manifest "access plus 0 seconds"' . PHP_EOL . PHP_EOL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' ); | |
/* | |
Plugin Name: Add suPHP | |
Author: Jonathan (WP Rocket Team) | |
Author URI: http://wp-rocket.me | |
*/ | |
add_filter( 'before_rocket_htaccess_rules', '__rocket_add_su' ); | |
function __rocket_add_su( $marker ) { | |
$redirection = 'suPHP_ConfigPath /home/shaman2/public_html/' . PHP_EOL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! wp_next_scheduled( 'rocket_clear_cache_task' ) ) { | |
wp_schedule_event( time(), 'twicedaily', 'rocket_clear_cache_task' ); | |
} | |
add_action( 'rocket_clear_cache_task', 'rocket_clear_cache_image' ); | |
function rocket_clear_cache_image() { | |
rocket_clean_files('http://www.spa-villa.de/hotel/wellness-suiten/'): | |
} |