]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/shortcodes.php
Wordpress 2.7.1
[autoinstalls/wordpress.git] / wp-includes / shortcodes.php
index 2cc808ce481b36c11f36413d3f2a7d1ff6013713..c1c6862ba2b5b663ddf9f7912c4382c43ef76ce6 100644 (file)
@@ -48,7 +48,7 @@ $shortcode_tags = array();
  * There can only be one hook for each shortcode. Which means that if another
  * plugin has a similar shortcode, it will override yours or yours will override
  * theirs depending on which order the plugins are included and/or ran.
- * 
+ *
  * Simplest example of a shortcode tag using the API:
  *
  * <code>
@@ -188,10 +188,10 @@ function do_shortcode_tag($m) {
 
        if ( isset($m[4]) ) {
                // enclosing tag - extra parameter
-               return call_user_func($shortcode_tags[$tag], $attr, $m[4]);
+               return call_user_func($shortcode_tags[$tag], $attr, $m[4], $tag);
        } else {
                // self-closing tag
-               return call_user_func($shortcode_tags[$tag], $attr);
+               return call_user_func($shortcode_tags[$tag], $attr, NULL, $tag);
        }
 }
 
@@ -204,7 +204,7 @@ function do_shortcode_tag($m) {
  *
  * @since 2.5
  *
- * @param string $text 
+ * @param string $text
  * @return array List of attributes and their value.
  */
 function shortcode_parse_atts($text) {
@@ -278,6 +278,6 @@ function strip_shortcodes( $content ) {
        return preg_replace('/'.$pattern.'/s', '', $content);
 }
 
-add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() 
+add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()
 
 ?>
\ No newline at end of file