/**
 * Main instance of Off-Canvas Sidebars Frontend.
 *
 * Returns the main instance of OCS_Off_Canvas_Sidebars_Frontend to prevent the need to use globals.
 *
 * @since   0.3
 * @return  OCS_Off_Canvas_Sidebars_Frontend|false
 */
function Off_Canvas_Sidebars_Frontend()
{
    if (class_exists('OCS_Off_Canvas_Sidebars_Frontend')) {
        return OCS_Off_Canvas_Sidebars_Frontend::get_instance();
    }
    return false;
}
 /**
  * Init function/action to check current user, load nessesary data and classes, register hooks
  *
  * @return  void
  * @since   0.1
  */
 function init()
 {
     // Get the current user
     //$this->curUser = wp_get_current_user();
     // Load translations
     $this->load_textdomain();
     // Register the enabled sidebars
     $this->register_sidebars();
     if (is_admin()) {
         // Load the admin
         include_once 'includes/off-canvas-sidebars-settings.class.php';
         OCS_Off_Canvas_Sidebars_Settings::get_instance();
         // Add settings link to plugins page
         add_filter('plugin_action_links', array($this, 'add_settings_link'), 10, 2);
     } else {
         // If a sidebar is enabled, load the front-end
         if ($this->is_sidebar_enabled()) {
             include_once 'includes/off-canvas-sidebars-frontend.class.php';
             OCS_Off_Canvas_Sidebars_Frontend::get_instance();
         }
     }
 }
 /**
  * Main Off-Canvas Sidebars Frontend Instance.
  *
  * Ensures only one instance of this class is loaded or can be loaded.
  *
  * @since   0.3
  * @static
  * @return  OCS_Off_Canvas_Sidebars_Frontend
  */
 public static function get_instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }