check_download_folder_protection() 공개 정적인 메소드

If using force or x-sendfile, this ensures the .htaccess is in place.
예제 #1
0
 /**
  * Save the settings
  */
 public static function save()
 {
     global $current_section, $current_tab;
     if (empty($_REQUEST['_wpnonce']) || !wp_verify_nonce($_REQUEST['_wpnonce'], 'wc-crm-settings')) {
         die(__('Action failed. Please refresh the page and retry.', 'woocommerce'));
     }
     // Trigger actions
     do_action('wc_crm_settings_save_' . $current_tab);
     do_action('wc_crm_update_options_' . $current_tab);
     do_action('wc_crm_update_options');
     self::add_message(__('Your settings have been saved.', 'woocommerce'));
     WC_Admin_Settings::check_download_folder_protection();
     // Re-add endpoints and flush rules
     WC()->query->init_query_vars();
     WC()->query->add_endpoints();
     flush_rewrite_rules();
     do_action('wc_crm_settings_saved');
 }