MC4WP_Form_Asset_Manager::hook PHP Method

hook() public method

Add hooks
public hook ( )
    public function hook()
    {
        // load checkbox css if necessary
        add_action('wp_enqueue_scripts', array($this, 'load_stylesheets'));
        add_action('mc4wp_output_form', array($this, 'before_output_form'));
        add_action('wp_footer', array($this, 'load_scripts'));
        $this->register_assets();
    }

Usage Example

 /**
  * Initialise asset manager
  *
  * @hooked `template_redirect`
  */
 public function init_asset_manager()
 {
     $assets = new MC4WP_Form_Asset_Manager($this->output_manager);
     $assets->hook();
 }