/**
  * Registers UI for when shortcake is activated
  */
 public function register_shortcake_ui()
 {
     $assets = new MC4WP_Form_Asset_Manager();
     $assets->load_stylesheets();
     $forms = mc4wp_get_forms();
     $options = array();
     foreach ($forms as $form) {
         $options[$form->ID] = $form->name;
     }
     /**
      * Register UI for your shortcode
      *
      * @param string $shortcode_tag
      * @param array $ui_args
      */
     shortcode_ui_register_for_shortcode('mc4wp_form', array('label' => esc_html__('MailChimp Sign-Up Form', 'mailchimp-for-wp'), 'listItemImage' => 'dashicons-feedback', 'attrs' => array(array('label' => esc_html__('Select the form to show', 'mailchimp-for-wp'), 'attr' => 'id', 'type' => 'select', 'options' => $options))));
 }
Example #2
0
 public function init_asset_manager()
 {
     $assets = new MC4WP_Form_Asset_Manager($this->output_manager);
     $assets->initialize();
 }
 /**
  * Initialise asset manager
  *
  * @hooked `template_redirect`
  */
 public function init_asset_manager()
 {
     $assets = new MC4WP_Form_Asset_Manager();
     $assets->hook();
 }