/** * Main Instance * * @return object */ public static function instance() { if (is_null(self::$_instance)) { self::$_instance = new self(dirname(dirname(__FILE__))); } return self::$_instance; }
public function __construct() { parent::__construct(dirname(dirname(__FILE__))); include_once $this->getBaseDir() . '/types/form-entries-post-type.php'; include_once $this->getBaseDir() . '/inc/cool-php-captcha/captcha.php'; include_once $this->getBaseDir() . '/vendor/autoload.php'; $this->lessParser = new Less_Parser(); $this->settings = SCFP_Settings::instance($this); $this->formSettings = SCFP_FormSettings::instance(); $this->formEntries = SCFP_FormEntries::instance(); $this->session = Agp_Session::instance(); $this->ajax = SCFP_Ajax::instance(); add_action('init', array($this, 'init')); add_action('wp_enqueue_scripts', array($this, 'enqueueScripts')); add_action('admin_enqueue_scripts', array($this, 'enqueueAdminScripts')); add_shortcode('scfp', array($this, 'doScfpShortcode')); add_shortcode('wcp_contactform', array($this, 'doScfpShortcode')); add_action('widgets_init', array($this, 'initWidgets')); add_action('admin_init', array($this, 'tinyMCEButtons')); add_filter('clean_url', array($this, 'deferJavascripts'), 11, 1); }