Changeset 32650 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 05/29/2015 03:42:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r32590 r32650 39 39 function wptexturize( $text, $reset = false ) { 40 40 global $wp_cockneyreplace, $shortcode_tags; 41 static $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements, 42 $default_no_texturize_tags, $default_no_texturize_shortcodes, $run_texturize = true; 41 static $static_characters = null, 42 $static_replacements = null, 43 $dynamic_characters = null, 44 $dynamic_replacements = null, 45 $default_no_texturize_tags = null, 46 $default_no_texturize_shortcodes = null, 47 $run_texturize = true; 43 48 44 49 // If there's nothing to do, just stop. … … 631 636 * @access private 632 637 * 633 * @staticvar string |false$_charset638 * @staticvar string $_charset 634 639 * 635 640 * @param string $string The text which is to be encoded. … … 657 662 // Store the site charset as a static to avoid multiple calls to wp_load_alloptions() 658 663 if ( ! $charset ) { 659 static $_charset ;664 static $_charset = null; 660 665 if ( ! isset( $_charset ) ) { 661 666 $alloptions = wp_load_alloptions(); … … 791 796 792 797 // Store the site charset as a static to avoid multiple calls to get_option() 793 static $is_utf8 ;794 if ( ! isset( $is_utf8 ) ) {798 static $is_utf8 = null; 799 if ( ! isset( $is_utf8 ) ) { 795 800 $is_utf8 = in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ); 796 801 } 797 if ( ! $is_utf8 ) {802 if ( ! $is_utf8 ) { 798 803 return $string; 799 804 } 800 805 801 806 // Check for support for utf8 in the installed PCRE library once and store the result in a static 802 static $utf8_pcre ;803 if ( ! isset( $utf8_pcre ) ) {807 static $utf8_pcre = null; 808 if ( ! isset( $utf8_pcre ) ) { 804 809 $utf8_pcre = @preg_match( '/^./u', 'a' ); 805 810 } … … 3960 3965 // Still here? Use the more judicious replacement 3961 3966 static $dblq = false; 3962 if ( false === $dblq ) 3967 if ( false === $dblq ) { 3963 3968 $dblq = _x( '“', 'opening curly double quote' ); 3969 } 3964 3970 return str_replace( 3965 3971 array( ' Wordpress', '‘Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ), 3966 3972 array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ), 3967 3973 $text ); 3968 3969 3974 } 3970 3975 … … 4096 4101 */ 4097 4102 function wp_spaces_regexp() { 4098 static $spaces ;4103 static $spaces = ''; 4099 4104 4100 4105 if ( empty( $spaces ) ) {
Note: See TracChangeset
for help on using the changeset viewer.