pmpro_checkout_button_shortcode

Shortcode to show a link/button linking to the checkout page for a specific level.

Description

pmpro_checkout_button_shortcode( $atts, (constant) $content = null, (string) $code = '' ); 

Parameters (3)

0. $atts
The atts.
1. $content — Optional. (constant) => null
The content.
2. $code — Optional. (string) => ''
The code.

Usage

  1. if ( !function_exists( 'pmpro_checkout_button_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/shortcodes/checkout_button.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // The content. 
  8. $content = null; 
  9.  
  10. // The code. 
  11. $code = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = pmpro_checkout_button_shortcode($atts, $content, $code); 
  15.  

Defined (1)

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

/shortcodes/checkout_button.php  
  1. function pmpro_checkout_button_shortcode($atts, $content=null, $code="") 
  2. // $atts ::= array of attributes 
  3. // $content ::= text within enclosing form of shortcode element 
  4. // $code ::= the shortcode found, when == callback name 
  5. // examples: [pmpro_checkout_button level="3"] 
  6.  
  7. extract(shortcode_atts(array( 
  8. 'level' => NULL,  
  9. 'text' => NULL,  
  10. 'class' => NULL 
  11. ), $atts)); 
  12.  
  13. return pmpro_getCheckoutButton($level, $text, $class);