Example #1
0
function puzzler_plugin_activate()
{
    global $v_ok;
    if ($v_ok) {
        $cacheDir = WP_CONTENT_DIR . '/' . PUZZLER_Trait::$cacheDir;
        if (!file_exists($cacheDir)) {
            @mkdir($cacheDir, 0777, true);
        }
    }
    $settings = get_option('puzzler_settings', array());
    if (empty($settings)) {
        update_option('puzzler_settings', puzzler_get_default_settings());
    }
}
Example #2
0
 /**
  * Set settings of lazy load styles
  */
 public function __construct()
 {
     $settings = get_option('puzzler_settings', puzzler_get_default_settings());
     $this->_lazyHead = $settings['HStylesLazy'];
     $this->_lazyFoot = $settings['FStylesLazy'];
 }