jetpack_do_subscription_form

The WordPress Core jetpack do subscription form function.

Description

jetpack_do_subscription_form( $instance ); 

Parameters (1)

0. $instance
The instance.

Usage

  1. if ( !function_exists( 'jetpack_do_subscription_form' ) ) { 
  2. require_once '/modules/subscriptions.php'; 
  3.  
  4. // The instance. 
  5. $instance = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_do_subscription_form($instance); 
  9.  

Defined (1)

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

/modules/subscriptions.php  
  1. function jetpack_do_subscription_form( $instance ) { 
  2. if ( empty( $instance ) || ! is_array( $instance ) ) { 
  3. $instance = array(); 
  4. $instance['show_subscribers_total'] = empty( $instance['show_subscribers_total'] ) ? false : true; 
  5.  
  6. $instance = shortcode_atts( 
  7. Jetpack_Subscriptions_Widget::defaults(),  
  8. $instance,  
  9. 'jetpack_subscription_form' 
  10. ); 
  11. $args = array( 
  12. 'before_widget' => sprintf( '<div class="%s">', 'jetpack_subscription_widget' ),  
  13. ); 
  14. ob_start(); 
  15. the_widget( 'Jetpack_Subscriptions_Widget', $instance, $args ); 
  16. $output = ob_get_clean(); 
  17. return $output;