removed all nocache headers

This commit is contained in:
asus
2024-04-04 14:28:06 +02:00
parent c87ba760fc
commit 6cd25725e0
3 changed files with 4 additions and 18 deletions

View File

@@ -17,10 +17,6 @@ if (!defined('ABSPATH')) {
function redirect_home_CIPF(){
Plgntls::debug_infos();
// Set up nocache headers before redirecting : https://developer.wordpress.org/reference/functions/wp_safe_redirect/#user-contributed-notes
// i dont really know what it does, but it creates a warning sometimes : 'PHP Warning: Cannot modify - header information headers already sent in /var/www/html/wp-includes/pluggable.php'
//nocache_headers();
wp_redirect(home_url(), 301);
exit;
}
@@ -36,9 +32,6 @@ function redirect_prof_command_CIPF(){
Plgntls::debug_infos();
$slug_command_card = Cipf::SLUG_COMMAND_CARD;
// Set up nocache headers before redirecting : https://developer.wordpress.org/reference/functions/wp_safe_redirect/#user-contributed-notes
nocache_headers();
wp_redirect(home_url($slug_command_card), 301);
exit;
}
@@ -62,7 +55,9 @@ function redirection_profil_CIPF(){
$current_user_id = get_current_user_id();
// Set up nocache headers before redirecting : https://developer.wordpress.org/reference/functions/wp_safe_redirect/#user-contributed-notes
nocache_headers();
// i dont really know what it does, but it creates a warning sometimes : 'PHP Warning: Cannot modify - header information headers already sent in /var/www/html/wp-includes/pluggable.php'
//nocache_headers();
if (!is_user_logged_in()) {
redirect_home_CIPF();

View File

@@ -95,13 +95,4 @@ add_action('template_redirect', 'partner_form_creation_page_CIPF');
?>