/**
  * Hook that runs after the 'wpseo_redirect' option is updated
  *
  * @param array $old_value
  * @param array $value
  */
 public function save_redirect_files($old_value, $value)
 {
     // Check if we need to remove the WPSEO redirect entries from the .htacccess file.
     $remove_htaccess_entries = false;
     // Check if the 'disable_php_redirect' option set to true/on.
     if (null != $value && isset($value['disable_php_redirect']) && 'on' == $value['disable_php_redirect']) {
         // Remove .htaccess entries if the 'separate_file' option is set to true.
         if (WPSEO_Utils::is_apache() && isset($value['separate_file']) && 'on' == $value['separate_file']) {
             $remove_htaccess_entries = true;
         }
         // The 'disable_php_redirect' option is set to true(on) so we need to generate a file.
         // The Redirect Manager will figure out what file needs to be created.
         $redirect_manager = new WPSEO_URL_Redirect_Manager();
         $redirect_manager->save_redirect_file();
     } else {
         if (WPSEO_Utils::is_apache()) {
             // No settings are set so we should also strip the .htaccess redirect entries in this case.
             $remove_htaccess_entries = true;
         }
     }
     // Check if we need to remove the .htaccess redirect entries.
     if ($remove_htaccess_entries) {
         // Remove the .htaccess redirect entries.
         $redirect_manager = new WPSEO_URL_Redirect_Manager();
         $redirect_manager->clear_htaccess_entries();
     }
 }