init() public static method

Hook in methods.
public static init ( )
コード例 #1
0
        }
        if (!defined('DONOTCACHEDB')) {
            define("DONOTCACHEDB", true);
        }
        nocache_headers();
    }
    /**
     * notices function.
     */
    public static function notices()
    {
        if (!function_exists('w3tc_pgcache_flush') || !function_exists('w3_instance')) {
            return;
        }
        $config = w3_instance('W3_Config');
        $enabled = $config->get_integer('dbcache.enabled');
        $settings = array_map('trim', $config->get_array('dbcache.reject.sql'));
        if ($enabled && !in_array('_wc_session_', $settings)) {
            ?>
			<div class="error">
				<p><?php 
            printf(__('In order for <strong>database caching</strong> to work with WooCommerce you must add %1$s to the "Ignored Query Strings" option in <a href="%2$s">W3 Total Cache settings</a>.', 'woocommerce'), '<code>_wc_session_</code>', admin_url('admin.php?page=w3tc_dbcache'));
            ?>
</p>
			</div>
			<?php 
        }
    }
}
WC_Cache_Helper::init();