Changeset 885568
- Timestamp:
- 04/01/2014 11:29:09 AM (12 years ago)
- File:
-
- 1 edited
-
instamojo/trunk/shortcode.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
instamojo/trunk/shortcode.php
r883557 r885568 5 5 */ 6 6 7 add_shortcode('instamojo', 'instamojo_button'); 8 9 function instamojo_button($attributes, $content = null) 10 { 11 extract(shortcode_atts(array( 12 'offer' => null, 13 'style' => 'none', 14 'text' => 'Checkout with Instamojo' 15 ), $attributes)); 16 17 $instamojo_credentials = get_option('instamojo_credentials'); 18 19 wp_register_script('widgetjs', 'https://d2xwmjc4uy2hr5.cloudfront.net/im-embed/im-embed.min.js', 'jquery', null, true); 20 wp_enqueue_script('widgetjs'); 21 22 if ($offer) 23 { 24 return '<a href="https://www.instamojo.com/'.$instamojo_credentials['username'].'/'.$offer.'/" rel="im-checkout" data-style="'.$style.'" data-text="'.$text.'"></a>'; 25 } 26 } 27 7 28 ?>
Note: See TracChangeset
for help on using the changeset viewer.