Base Directory:
/home/toolrmtm/crazyespresso.com/wp-content/mu-plugins
'wpapi.hostinger.io',
'downloads.wordpress.org' => 'wpdownloads.hostinger.io',
];
foreach ( $proxy_domains as $original_domain => $proxy_domain ) {
if ( strpos( $url, $original_domain ) !== false ) {
$proxy_url = str_replace( $original_domain, $proxy_domain, $url );
$response = wp_remote_request( $proxy_url, $args );
return $response;
}
}
return $response_override;
}
}
add_filter( 'pre_http_request', 'hostinger_use_proxy_services', 10, 3 );
/**
* Modify the default auto-update tests.
*
* @param array $tests The array of site status tests.
* @return array Modified array of site status tests.
*/
if ( ! function_exists( 'hostinger_change_default_autoupdates_test' ) ) {
function hostinger_change_default_autoupdates_test( $tests ) {
// Remove default auto-update tests
unset( $tests['async']['background_updates'] );
unset( $tests['direct']['plugin_theme_auto_updates'] );
// Add a new test to indicate Hostinger manages updates
$tests['direct']['hostinger_plugin_theme_auto_updates'] = [
'label' => __( 'Auto-updates managed by Hostinger' ),
'test' => function () {
$result = [
'label' => __( 'Automatic updates managed by Hostinger' ),
'status' => 'good',
'badge' => [
'label' => __( 'Security' ),
'color' => 'blue',
],
'description' => __( 'Automatic updates ensure your site is always running the latest and most secure versions of WordPress, plugins, and themes.' ),
'actions' => '',
'test' => 'hostinger_managed_updates',
];
return $result;
},
];
return $tests;
}
}
add_filter( 'site_status_tests', 'hostinger_change_default_autoupdates_test' );