Shortcode widget issue
-
Hi there – i Have a simple shortcode for making a sidenote ..
Although it works when I look at the post – it doesnt seem to allow the publish screen on the backend to work properly – the page just goes blank on publish/update .. what am i doing wrong?!
here’s the plugin code..add_shortcode('bigfoot',function($vars,$highlight){ // ----------------- defaults -----------------------// $vars = shortcode_atts( // overide itself with the following! array( 'comment'=>'you arent sayin nothin', 'highlight' => !empty($highlight)? $highlight : 'i am empty' // if not empty then use the input OR default! ),$vars ); // ----------------- defaults -----------------------// extract($vars); // php method to extract array elements as instant variables! so no more $vars['linkurl'] return "<span class='underline'>$highlight</span><div class='sidenote'>$comment</div>"; });usage in post content would be:
my text etc [bigfoot comment=’here is my comment’]and here is special text[/bigfoot]and the main content carries on …..
thanks!!!
The topic ‘Shortcode widget issue’ is closed to new replies.