Ticket #23855: 23855-shortcodes.patch
File 23855-shortcodes.patch, 1.1 KB (added by , 12 years ago) |
---|
-
wp-includes/shortcodes.php
function shortcode_exists( $tag ) { 151 151 * @return boolean 152 152 */ 153 153 function has_shortcode( $content, $tag ) { 154 if ( false === strpos( $content, '[' ) ) 155 return false; 156 154 157 if ( shortcode_exists( $tag ) ) { 155 158 $matches = array(); 156 159 preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); … … function has_shortcode( $content, $tag ) { 182 185 function do_shortcode($content) { 183 186 global $shortcode_tags; 184 187 188 if ( false === strpos( $content, '[' ) ) 189 return $content; 190 185 191 if (empty($shortcode_tags) || !is_array($shortcode_tags)) 186 192 return $content; 187 193 … … function shortcode_atts( $pairs, $atts, $shortcode = '' ) { 358 364 function strip_shortcodes( $content ) { 359 365 global $shortcode_tags; 360 366 367 if ( false === strpos( $content, '[' ) ) 368 return $content; 369 361 370 if (empty($shortcode_tags) || !is_array($shortcode_tags)) 362 371 return $content; 363 372