WPLessPlugin::registerHooks PHP Method

registerHooks() protected method

Method to register hooks (and do it only once)
Since: 1.1
Author: oncletom
protected registerHooks ( )
    protected function registerHooks()
    {
        if ($this->is_hooks_registered) {
            return false;
        }
        is_admin() ? do_action('wp-less_init_admin', $this) : do_action('wp-less_init', $this);
        add_action('wp_enqueue_scripts', array($this, 'processStylesheets'), PHP_INT_MAX, 0);
        add_action('admin_enqueue_scripts', array($this, 'processStylesheets'), PHP_INT_MAX, 0);
        add_action('login_enqueue_scripts', array($this, 'processStylesheets'), PHP_INT_MAX, 0);
        add_filter('mce_css', array($this, 'processEditorStylesheets'), PHP_INT_MAX);
        add_filter('wp-less_stylesheet_save', array($this, 'filterStylesheetUri'), 10, 2);
        return $this->is_hooks_registered = true;
    }