Ticket #24222: 24222.diff
| File 24222.diff, 5.0 KB (added by , 13 years ago) |
|---|
-
wp-includes/ms-functions.php
460 460 $errors->add( 'user_name', __( 'Sorry, usernames may not contain the character “_”!' ) ); 461 461 462 462 // all numeric? 463 $match = array();464 463 preg_match( '/[0-9]*/', $user_name, $match ); 465 464 if ( $match[0] == $user_name ) 466 465 $errors->add('user_name', __('Sorry, usernames must have letters too!')); … … 572 571 $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) ); 573 572 574 573 // all numeric? 575 $match = array();576 574 preg_match( '/[0-9]*/', $blogname, $match ); 577 575 if ( $match[0] == $blogname ) 578 576 $errors->add('blogname', __('Sorry, site names must have letters too!')); -
wp-includes/shortcodes.php
152 152 */ 153 153 function has_shortcode( $content, $tag ) { 154 154 if ( shortcode_exists( $tag ) ) { 155 $matches = array();156 155 preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); 157 156 if ( empty( $matches ) ) 158 157 return false; -
wp-includes/post-template.php
185 185 186 186 $output = ''; 187 187 $has_teaser = false; 188 $matches = array();189 188 190 189 // If post password required and it doesn't match the cookie. 191 190 if ( post_password_required() ) -
wp-includes/media.php
1908 1908 */ 1909 1909 function get_content_media( $type, &$content, $html = true, $remove = false, $limit = 0 ) { 1910 1910 $items = array(); 1911 $matches = array();1912 1911 1913 1912 if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) { 1914 1913 foreach ( $matches as $shortcode ) { … … 1927 1926 if ( $html ) 1928 1927 return $items; 1929 1928 1930 $src = '';1931 1929 $data = array(); 1932 1930 1933 1931 foreach ( $items as $item ) { … … 1958 1956 */ 1959 1957 function get_embedded_media( $type, &$content, $remove = false, $limit = 0 ) { 1960 1958 $html = array(); 1961 $matches = '';1962 1959 1963 1960 foreach ( array( $type, 'object', 'embed', 'iframe' ) as $tag ) { 1964 1961 if ( preg_match( '#' . get_tag_regex( $tag ) . '#', $content, $matches ) ) { … … 2206 2203 * @return array The found images or srcs 2207 2204 */ 2208 2205 function get_content_images( &$content, $html = true, $remove = false, $limit = 0 ) { 2209 $matches = array();2210 2206 $tags = array(); 2211 2207 $captions = array(); 2212 2208 … … 2255 2251 if ( $html ) 2256 2252 return $tags; 2257 2253 2258 $src = '';2259 2254 $srcs = array(); 2260 2255 2261 2256 foreach ( $tags as $tag ) { … … 2300 2295 * @return array A list of galleries, which in turn are a list of their srcs in order 2301 2296 */ 2302 2297 function get_content_galleries( &$content, $html = true, $remove = false, $limit = 0 ) { 2303 $src = '';2304 2298 $galleries = array(); 2305 $matches = array();2306 2299 2307 2300 if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) { 2308 2301 foreach ( $matches as $shortcode ) { … … 2493 2486 $urls[] = get_attachment_link( $media->ID ); 2494 2487 2495 2488 $count = 1; 2496 $matches = array();2497 2489 $content = $post->post_content; 2498 2490 2499 2491 if ( preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) && ! empty( $matches ) ) { -
wp-includes/post-formats.php
580 580 continue; 581 581 } 582 582 583 $matches = array();584 583 $matched = preg_match( $newline_regex, $line, $matches ); 585 584 if ( ! $matched ) 586 585 continue; … … 709 708 if ( empty( $content ) ) 710 709 return ''; 711 710 712 $matches = array();713 711 if ( ! preg_match( '/<blockquote[^>]*>(.+?)<\/blockquote>/is', $content, $matches ) ) { 714 712 $quote = $content; 715 713 if ( $remove || ! empty( $replace ) ) … … 783 781 if ( empty( $content ) ) 784 782 return ''; 785 783 786 $matches = array();787 788 784 // the content is a URL 789 785 $trimmed = trim( $content ); 790 786 if ( 0 === stripos( $trimmed, 'http' ) && ! preg_match( '#\s#', $trimmed ) ) { … … 883 879 884 880 $output = ''; 885 881 $has_teaser = false; 886 $matches = array();887 882 888 883 // If post password required and it doesn't match the cookie. 889 884 if ( post_password_required() ) -
wp-includes/formatting.php
3264 3264 $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) ); 3265 3265 } 3266 3266 3267 $match = array();3268 3267 $found = false; 3269 3268 while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) { 3270 3269 $filtered = str_replace($match[0], '', $filtered);