function add_hooks()
 {
     add_action('init', array($this, 'init_cookies'));
     add_action('wp_enqueue_scripts', array($this, 'css_load_styles'));
     add_action('wp_enqueue_scripts', array($this, 'js_load_scripts'));
     $hook = trim($this->_data->get_option('custom_injection_hook'));
     $hook = $hook ? $hook : Wdsi_SlideIn::get_default_injection_hook();
     add_action($hook, array($this, 'add_message'));
     add_filter('wdsi_content', 'wpautop');
     if ($this->_data->get_option('allow_shortcodes')) {
         add_filter('wdsi_content', 'do_shortcode');
     }
 }
 function create_advanced_box()
 {
     echo '' . '<input type="hidden" name="wdsi[allow_shortcodes]" value="" />' . '<input type="checkbox" name="wdsi[allow_shortcodes]" id="wdsi-allow_shortcodes" value="1" ' . ($this->_get_option('allow_shortcodes') ? 'checked="checked"' : '') . ' />' . '&nbsp;' . '<label for="wdsi-allow_shortcodes">' . __('Allow shortcodes', 'wdsi') . '</label>' . $this->_create_hint(__('Enabling this option will allow processing shortcodes in your slide-in messages.', 'wdsi')) . '';
     echo '' . '<input type="hidden" name="wdsi[allow_widgets]" value="" />' . '<input type="checkbox" name="wdsi[allow_widgets]" id="wdsi-allow_widgets" value="1" ' . ($this->_get_option('allow_widgets') ? 'checked="checked"' : '') . ' />' . '&nbsp;' . '<label for="wdsi-allow_widgets">' . __('Allow widgets', 'wdsi') . '</label>' . $this->_create_hint(__('Enabling this option will add a new sidebar that you can populate with widgets in Appearance &gt; Widgets.', 'wdsi')) . '';
     if (class_exists('MarketPress')) {
         echo '' . '<input type="hidden" name="wdsi[show_on_marketpress_pages]" value="" />' . '<input type="checkbox" name="wdsi[show_on_marketpress_pages]" id="wdsi-show_on_marketpress_pages" value="1" ' . ($this->_get_option('show_on_marketpress_pages') ? 'checked="checked"' : '') . ' />' . '&nbsp;' . '<label for="wdsi-show_on_marketpress_pages">' . __('Show on MarketPress pages (except products):', 'wdsi') . '</label>' . $this->_create_hint(__('Decide if you want your messages to appear on MarketPress virtual pages.', 'wdsi')) . '';
     }
     $hook = $this->_get_option('custom_injection_hook');
     $hook = $hook ? $hook : Wdsi_SlideIn::get_default_injection_hook();
     echo '' . '<label for="wdsi-custom_injection_hook">' . __('Custom injection hook', 'wdsi') . '</label>' . '&nbsp;' . '<input type="text" class="long" name="wdsi[custom_injection_hook]" id="wdsi-custom_injection_hook" value="' . esc_attr($hook) . '" />' . $this->_create_hint(__('Try a different injection hook if you experience problems with the default one. Leave empty for default.', 'wdsi')) . '';
 }