Changeset 1527018
- Timestamp:
- 11/02/2016 10:04:38 PM (9 years ago)
- Location:
- cloudstitch/trunk
- Files:
-
- 2 edited
-
cloudstitch-wordpress.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudstitch/trunk/cloudstitch-wordpress.php
r1496008 r1527018 2 2 /* 3 3 * Plugin Name: Cloudstitch 4 * Version: 1. 54 * Version: 1.6 5 5 * Plugin URI: http://www.cloudstitch.io/wordpress 6 6 * Description: This plugin lets you inject Cloudstitch widgets into your WordPress blog. … … 19 19 /* 20 20 * [cloudstitch container="handlebars" user="ted" app="app"] 21 *22 * HEAD23 *24 * HTML25 21 * <cloudstitch-handlebars user="foo" app="bar"></cloudstitch-handlebars> 26 22 */ 27 function handle_cloudstitch_container_shortcode($atts ) {23 function handle_cloudstitch_container_shortcode($atts, $content = null) { 28 24 $a = shortcode_atts( array( 29 25 'container' => '', … … 39 35 if ($a['container'] == 'dust') $a['container'] = 'cloudstitch-dust'; 40 36 $component= "https://components.cloudstitch.com/{$a['container']}.html"; 41 $inline = "<{$a['container']} user=\"{$a['user']}\" app=\"{$a['app']}\" label=\"{$a['label']}\"> </{$a['container']}>" .37 $inline = "<{$a['container']} user=\"{$a['user']}\" app=\"{$a['app']}\" label=\"{$a['label']}\">" . $content . "</{$a['container']}>" . 42 38 "<link href=\"$component\" rel=\"import\" />"; 43 39 $script = "<script>maybeAdd('link', 'href', '$component', 'rel', 'import')</script>"; … … 46 42 47 43 //[cloudstitch] 48 function handle_cloudstitch_shortcode( $atts ){44 function handle_cloudstitch_shortcode( $atts, $content = null ){ 49 45 $a = shortcode_atts( array( 50 46 'widget' => '', … … 63 59 return $html; 64 60 } else { 65 return handle_cloudstitch_container_shortcode($atts );61 return handle_cloudstitch_container_shortcode($atts, $content); 66 62 } 67 63 } -
cloudstitch/trunk/readme.txt
r1496008 r1527018 66 66 * Removes a style="display:block" attribute that was causing problems in some projects. 67 67 68 = 1.6 = 69 * Pass content inside the Cloudstitch short code into the Cloudstitch template engine. 70 68 71 == Upgrade Notice == 69 72 … … 77 80 This version should be backward compatible with version 1.0. 78 81 82 = 1.6 = 83 This version should be backward compatible with version 1.0. 84 79 85 == Frequently Asked Questions == 80 86
Note: See TracChangeset
for help on using the changeset viewer.