mc4wp_get_form

Returns a Form instance.

Description

(string) mc4wp_get_form( (int) $id = 0 ); 

Returns (string)

HTML of given form_id.

Parameters (1)

0. $id — Optional. (int)
The id.

Usage

  1. if ( !function_exists( 'mc4wp_get_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'mailchimp-for-wordpress-lite/includes/functions/template.php'; 
  3.  
  4. // The id. 
  5. $id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = mc4wp_get_form($id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/functions/template.php  
  1. function mc4wp_get_form( $id = 0 ) { 
  2. $form_manager = MC4WP_Lite::instance()->get_form_manager(); 
  3. return $form_manager->output_form( array( 'id' => $id ) );