/home/vianto5/duettowers.mx/wp-content/plugins/wp-rocket/inc/3rd-party/hosting
Edit: /home/vianto5/duettowers.mx/wp-content/plugins/wp-rocket/inc/3rd-party/hosting/godaddy.php (3490B)
pagination_base );
rocket_godaddy_request( 'PURGE', $home_url );
rocket_godaddy_request( 'PURGE', $home_pagination_url );
}
add_action( 'before_rocket_clean_home', 'rocket_clean_home_godaddy', 10, 2 );
/**
* Perform the call to the Varnish server to purge
*
* @since 2.9.5
* @source WPaaS\Cache
*
* @param string $method can be BAN or PURGE.
* @param string $url URL to purge.
* @return void
*/
function rocket_godaddy_request( $method, $url = null ) {
if ( ! method_exists( 'WPass\Plugin', 'vip' ) ) {
return;
}
if ( empty( $url ) ) {
$url = home_url();
}
$host = rocket_extract_url_component( $url, PHP_URL_HOST );
$url = set_url_scheme( str_replace( $host, WPaas\Plugin::vip(), $url ), 'http' );
wp_cache_flush();
// This forces the APC cache to flush across the server.
update_option( 'gd_system_last_cache_flush', time() );
wp_remote_request(
esc_url_raw( $url ),
[
'method' => $method,
'blocking' => false,
'headers' => [
'Host' => $host,
],
]
);
}