Ticket #23855: 23855.2.patch
File 23855.2.patch, 997 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/shortcodes.php
155 155 * @return boolean 156 156 */ 157 157 function has_shortcode( $content, $tag ) { 158 if ( false === strpos( $content, '[' ) ) { 159 return false; 160 } 161 158 162 if ( shortcode_exists( $tag ) ) { 159 163 preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); 160 164 if ( empty( $matches ) ) … … 186 190 function do_shortcode($content) { 187 191 global $shortcode_tags; 188 192 193 if ( false === strpos( $content, '[' ) ) { 194 return false; 195 } 196 189 197 if (empty($shortcode_tags) || !is_array($shortcode_tags)) 190 198 return $content; 191 199 … … 375 383 function strip_shortcodes( $content ) { 376 384 global $shortcode_tags; 377 385 386 if ( false === strpos( $content, '[' ) ) { 387 return false; 388 } 389 378 390 if (empty($shortcode_tags) || !is_array($shortcode_tags)) 379 391 return $content; 380 392