Skip to content

Commit

Permalink
Add shortcode snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsak committed Oct 2, 2013
1 parent 0b39680 commit 17647ac
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions shortcode.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<snippet>
<content><![CDATA[
function ${1:function name}( $atts ) {
extract( shortcode_atts( array(
'${2:attribute}' => '${3:value}'
), $atts ) );
return '${4:what to return}';
}
add_shortcode( '${5:shortcode name}', '${1:function name}' );
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>shortcode</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>

0 comments on commit 17647ac

Please sign in to comment.