Changeset 32650
- Timestamp:
- 05/29/2015 03:42:40 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r31815 r32650 380 380 */ 381 381 public function parselisting($line) { 382 static $is_windows ;382 static $is_windows = null; 383 383 if ( is_null($is_windows) ) 384 384 $is_windows = stripos( ftp_systype($this->link), 'win') !== false; -
trunk/src/wp-admin/includes/class-wp-list-table.php
r32644 r32650 901 901 * @access public 902 902 * 903 * @staticvar int $cb_counter 904 * 903 905 * @param bool $with_id Whether to set the id attribute or not 904 906 */ -
trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php
r32644 r32650 163 163 */ 164 164 public function _search_callback( $theme ) { 165 static $term ;165 static $term = null; 166 166 if ( is_null( $term ) ) 167 167 $term = wp_unslash( $_REQUEST['s'] ); -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r32644 r32650 220 220 */ 221 221 public function _search_callback( $plugin ) { 222 static $term ;222 static $term = null; 223 223 if ( is_null( $term ) ) 224 224 $term = wp_unslash( $_REQUEST['s'] ); -
trunk/src/wp-admin/includes/class-wp-upgrader.php
r32642 r32650 1659 1659 * 1660 1660 * @since 3.7.0 1661 * 1662 * @static 1661 1663 */ 1662 1664 public static function async_upgrade( $upgrader = false ) { … … 2136 2138 * 2137 2139 * @since 3.7.0 2140 * 2141 * @static 2138 2142 * 2139 2143 * @param string $offered_ver The offered version, of the format x.y.z. -
trunk/src/wp-admin/includes/deprecated.php
r31717 r32650 733 733 * @deprecated Use wp_editor() 734 734 * @see wp_editor() 735 * 736 * @staticvar int $num 735 737 */ 736 738 function wp_tiny_mce( $teeny = false, $settings = false ) { -
trunk/src/wp-admin/includes/media.php
r32642 r32650 535 535 * 536 536 * @global int $post_ID 537 * 538 * @staticvar int $instance 537 539 * 538 540 * @param string $editor_id -
trunk/src/wp-admin/includes/screen.php
r32643 r32650 11 11 * 12 12 * @since 2.7.0 13 * 14 * @staticvar array $column_headers 13 15 * 14 16 * @param string|WP_Screen $screen The screen you want the headers for … … 328 330 /** 329 331 * Stores old string-based help. 332 * 333 * @static 334 * @access private 335 * 336 * @var array 330 337 */ 331 338 private static $_old_compat_help = array(); … … 344 351 * 345 352 * @since 3.3.0 353 * 354 * @static 355 * @access private 356 * 346 357 * @var array 347 * @access private348 358 */ 349 359 private static $_registry = array(); … … 372 382 * @since 3.3.0 373 383 * @access public 384 * 385 * @static 374 386 * 375 387 * @global string $hook_suffix … … 588 600 * 589 601 * @since 3.3.0 602 * 603 * @static 590 604 * 591 605 * @param WP_Screen $screen A screen object. … … 975 989 * 976 990 * @global array $wp_meta_boxes 977 * 991 * 978 992 * @return bool 979 993 */ -
trunk/src/wp-admin/includes/template.php
r32643 r32650 606 606 * @since 2.5.0 607 607 * 608 * @staticvar string $update_nonce 609 * 608 610 * @param array $entry 609 611 * @param int $count … … 611 613 */ 612 614 function _list_meta_row( $entry, &$count ) { 613 static $update_nonce = false;615 static $update_nonce = ''; 614 616 615 617 if ( is_protected_meta( $entry['meta_key'], 'post' ) ) 616 618 return ''; 617 619 618 if ( ! $update_nonce )620 if ( ! $update_nonce ) 619 621 $update_nonce = wp_create_nonce( 'add-meta' ); 620 622 … … 1992 1994 * remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) ); 1993 1995 * 1996 * @static 1997 * 1994 1998 * @param string $hook_suffix The current admin page. 1995 1999 */ … … 2048 2052 * @since 3.3.0 2049 2053 * 2054 * @static 2055 * 2050 2056 * @param string $pointer_id The pointer ID. 2051 2057 * @param string $selector The HTML elements, on which the pointer should be attached. … … 2095 2101 public static function pointer_wp360_revisions() {} 2096 2102 2103 /** 2104 * @static 2105 */ 2097 2106 public static function pointer_wp360_locks() { 2098 2107 if ( ! is_multi_author() ) { … … 2109 2118 } 2110 2119 2120 /** 2121 * @static 2122 */ 2111 2123 public static function pointer_wp390_widgets() { 2112 2124 if ( ! current_theme_supports( 'widgets' ) ) { … … 2165 2177 * 2166 2178 * @since 3.3.0 2179 * 2180 * @static 2167 2181 * 2168 2182 * @param int $user_id User ID. -
trunk/src/wp-admin/includes/theme.php
r32643 r32650 137 137 * @since 3.8.0 138 138 * 139 * @staticvar object $themes_update 140 * 139 141 * @param WP_Theme $theme WP_Theme object. 140 142 * @return false|string HTML for the update link, or false if invalid info was passed. 141 143 */ 142 144 function get_theme_update_available( $theme ) { 143 static $themes_update ;145 static $themes_update = null; 144 146 145 147 if ( !current_user_can('update_themes' ) ) -
trunk/src/wp-admin/includes/widgets.php
r32642 r32650 105 105 * @global array $wp_registered_widgets 106 106 * 107 * @staticvar int $i 108 * 107 109 * @param array $params 108 110 * @return array -
trunk/src/wp-includes/capabilities.php
r32568 r32650 490 490 var $filter = null; 491 491 492 /** 493 * @static 494 * @access private 495 * @var array 496 */ 492 497 private static $back_compat_keys; 493 498 … … 562 567 * 563 568 * @since 3.3.0 569 * 570 * @static 564 571 * 565 572 * @global wpdb $wpdb -
trunk/src/wp-includes/class-http.php
r32542 r32650 342 342 * 343 343 * @since 3.2.0 344 * 345 * @static 344 346 * @access private 345 347 * … … 627 629 * @link https://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_ACCESSIBLE_HOSTS 628 630 * 631 * @staticvar array|null $accessible_hosts 632 * @staticvar array $wildcard_regex 633 * 629 634 * @param string $uri URI of url. 630 635 * @return bool True to block, false to allow. … … 657 662 return true; 658 663 659 static $accessible_hosts ;660 static $wildcard_regex = false;661 if ( null == $accessible_hosts ) {664 static $accessible_hosts = null; 665 static $wildcard_regex = array(); 666 if ( null === $accessible_hosts ) { 662 667 $accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS); 663 668 … … 688 693 * 689 694 * @since 4.1.0 695 * 696 * @static 690 697 * @access protected 691 698 * … … 726 733 * @since 3.4.0 727 734 * 735 * @static 728 736 * @access public 737 * 729 738 * @param string $maybe_relative_path The URL which might be relative 730 739 * @param string $url The URL which $maybe_relative_path is relative to … … 796 805 * 797 806 * @since 3.7.0 807 * 808 * @static 798 809 * 799 810 * @param string $url The URL which was requested. … … 1799 1810 * @since 2.8.0 1800 1811 * 1812 * @staticvar array|null $bypass_hosts 1813 * @staticvar array $wildcard_regex 1814 * 1801 1815 * @param string $uri URI to check. 1802 1816 * @return bool True, to send through the proxy and false if, the proxy should not be used. … … 1838 1852 return true; 1839 1853 1840 static $bypass_hosts ;1841 static $wildcard_regex = false;1842 if ( null == $bypass_hosts ) {1854 static $bypass_hosts = null; 1855 static $wildcard_regex = array(); 1856 if ( null === $bypass_hosts ) { 1843 1857 $bypass_hosts = preg_split('|,\s*|', WP_PROXY_BYPASS_HOSTS); 1844 1858 … … 2088 2102 * @since 2.8.0 2089 2103 * 2104 * @static 2105 * 2090 2106 * @param string $raw String to compress. 2091 2107 * @param int $level Optional, default is 9. Compression level, 9 is highest. … … 2107 2123 * @since 2.8.0 2108 2124 * 2125 * @static 2126 * 2109 2127 * @param string $compressed String to decompress. 2110 2128 * @param int $length The optional length of the compressed data. … … 2151 2169 * @link http://au2.php.net/manual/en/function.gzinflate.php#70875 2152 2170 * @link http://au2.php.net/manual/en/function.gzinflate.php#77336 2171 * 2172 * @static 2153 2173 * 2154 2174 * @param string $gzData String to decompress. … … 2191 2211 * @since 2.8.0 2192 2212 * 2213 * @static 2214 * 2193 2215 * @param string $url 2194 2216 * @param array $args … … 2237 2259 * @since 2.8.0 2238 2260 * 2261 * @static 2262 * 2239 2263 * @return string Content-Encoding string to send in the header. 2240 2264 */ … … 2247 2271 * 2248 2272 * @since 2.8.0 2273 * 2274 * @static 2249 2275 * 2250 2276 * @param array|string $headers All of the available headers. … … 2271 2297 * @since 2.8.0 2272 2298 * 2299 * @static 2300 * 2273 2301 * @return bool 2274 2302 */ -
trunk/src/wp-includes/class-oembed.php
r32533 r32650 20 20 class WP_oEmbed { 21 21 public $providers = array(); 22 /** 23 * @static 24 * @var array 25 */ 22 26 public static $early_providers = array(); 23 27 … … 612 616 * @access private 613 617 * 614 * @s ee WP_oEmbed618 * @staticvar WP_oEmbed $wp_oembed 615 619 * 616 620 * @return WP_oEmbed object. 617 621 */ 618 622 function _wp_oembed_get_object() { 619 static $wp_oembed ;620 621 if ( is_null( $wp_oembed) )623 static $wp_oembed = null; 624 625 if ( is_null( $wp_oembed ) ) { 622 626 $wp_oembed = new WP_oEmbed(); 623 627 } 624 628 return $wp_oembed; 625 629 } -
trunk/src/wp-includes/class-wp-customize-control.php
r32568 r32650 21 21 * 22 22 * @since 4.1.0 23 * 24 * @static 23 25 * @access protected 24 26 * @var int -
trunk/src/wp-includes/class-wp-customize-panel.php
r32649 r32650 25 25 * 26 26 * @since 4.1.0 27 * 28 * @static 27 29 * @access protected 28 30 * @var int -
trunk/src/wp-includes/class-wp-customize-section.php
r32649 r32650 25 25 * 26 26 * @since 4.1.0 27 * 28 * @static 27 29 * @access protected 28 30 * @var int -
trunk/src/wp-includes/class-wp-customize-widgets.php
r32649 r32650 108 108 * @since 4.2.0 109 109 * @access protected 110 * 111 * @staticvar array $cache 110 112 * 111 113 * @param $setting_id Setting ID. … … 877 879 * 878 880 * @since 3.9.0 879 * @static880 881 * @access protected 881 882 * -
trunk/src/wp-includes/class-wp-image-editor-gd.php
r32554 r32650 35 35 * 36 36 * @since 3.5.0 37 * 38 * @static 37 39 * @access public 38 40 * 39 41 * @param array $args 40 * @return bool ean42 * @return bool 41 43 */ 42 44 public static function test( $args = array() ) { … … 59 61 * 60 62 * @since 3.5.0 63 * 64 * @static 61 65 * @access public 62 66 * 63 67 * @param string $mime_type 64 * @return bool ean68 * @return bool 65 69 */ 66 70 public static function supports_mime_type( $mime_type ) { -
trunk/src/wp-includes/class-wp-image-editor-imagick.php
r32555 r32650 39 39 * 40 40 * @since 3.5.0 41 * 42 * @static 41 43 * @access public 42 44 * … … 87 89 * 88 90 * @since 3.5.0 91 * 92 * @static 89 93 * @access public 90 94 * -
trunk/src/wp-includes/class-wp-image-editor.php
r32546 r32650 32 32 * 33 33 * @since 3.5.0 34 * 35 * @static 34 36 * @access public 35 37 * @abstract … … 47 49 * 48 50 * @since 3.5.0 51 * 52 * @static 49 53 * @access public 50 54 * @abstract … … 443 447 * 444 448 * @since 3.5.0 449 * 450 * @static 445 451 * @access protected 446 452 * … … 469 475 * 470 476 * @since 3.5.0 477 * 478 * @static 471 479 * @access protected 472 480 * -
trunk/src/wp-includes/class-wp-theme.php
r32568 r32650 688 688 * @access private 689 689 * 690 * @stati var string $comma690 * @staticvar string $comma 691 691 * 692 692 * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags. -
trunk/src/wp-includes/comment.php
r32587 r32650 2559 2559 * @see wp_update_comment_count_now() For what could cause a false return value 2560 2560 * 2561 * @staticvar array $_deferred 2562 * 2561 2563 * @param int $post_id Post ID 2562 2564 * @param bool $do_deferred Whether to process previously deferred post comment counts -
trunk/src/wp-includes/compat.php
r32364 r32650 20 20 * @since 4.2.2 21 21 * @access private 22 * 23 * @staticvar string $utf8_pcre 22 24 * 23 25 * @param bool $set - Used for testing only -
trunk/src/wp-includes/default-widgets.php
r32600 r32650 645 645 646 646 /** 647 * @staticvar bool $first_dropdown 648 * 647 649 * @param array $args 648 650 * @param array $instance 649 651 */ 650 652 public function widget( $args, $instance ) { 653 static $first_dropdown = true; 654 651 655 /** This filter is documented in wp-includes/default-widgets.php */ 652 656 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base ); … … 668 672 669 673 if ( $d ) { 670 static $first_dropdown = true;671 672 674 $dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}"; 673 675 $first_dropdown = false; -
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 ) ) { -
trunk/src/wp-includes/functions.php
r32595 r32650 1622 1622 */ 1623 1623 function get_temp_dir() { 1624 static $temp ;1624 static $temp = ''; 1625 1625 if ( defined('WP_TEMP_DIR') ) 1626 1626 return trailingslashit(WP_TEMP_DIR); … … 4484 4484 */ 4485 4485 function wp_allowed_protocols() { 4486 static $protocols ;4486 static $protocols = array(); 4487 4487 4488 4488 if ( empty( $protocols ) ) { -
trunk/src/wp-includes/http.php
r32599 r32650 23 23 */ 24 24 function _wp_http_get_object() { 25 static $http ;26 27 if ( is_null( $http) )25 static $http = null; 26 27 if ( is_null( $http ) ) { 28 28 $http = new WP_Http(); 29 29 } 30 30 return $http; 31 31 } -
trunk/src/wp-includes/ms-functions.php
r32611 r32650 2147 2147 * @staticvar bool $forced_content 2148 2148 * 2149 * @param string|bool $force2149 * @param bool $force 2150 2150 * @return bool True if forced, false if not forced. 2151 2151 */ 2152 2152 function force_ssl_content( $force = '' ) { 2153 static $forced_content ;2153 static $forced_content = false; 2154 2154 2155 2155 if ( '' != $force ) { -
trunk/src/wp-includes/plugin.php
r32615 r32650 690 690 691 691 // Normalize, but store as static to avoid recalculation of a constant value 692 static $wp_plugin_path , $wpmu_plugin_path;692 static $wp_plugin_path = null, $wpmu_plugin_path = null; 693 693 if ( ! isset( $wp_plugin_path ) ) { 694 694 $wp_plugin_path = wp_normalize_path( WP_PLUGIN_DIR ); -
trunk/src/wp-includes/pomo/po.php
r30663 r32650 356 356 * @staticvar string $last_line 357 357 * @staticvar boolean $use_last_line 358 * 358 359 * @param resource $f 359 360 * @param string $action -
trunk/src/wp-includes/revision.php
r32621 r32650 17 17 * @access private 18 18 * 19 * @staticvar array |false$fields19 * @staticvar array $fields 20 20 * 21 21 * @param array $post Optional. A post array to be processed for insertion as a post revision. … … 24 24 */ 25 25 function _wp_post_revision_fields( $post = null, $autosave = false ) { 26 static $fields = false;27 28 if ( !$fields) {26 static $fields = null; 27 28 if ( is_null( $fields ) ) { 29 29 // Allow these to be versioned 30 30 $fields = array( -
trunk/src/wp-includes/rewrite.php
r32648 r32650 2171 2171 */ 2172 2172 public function flush_rules( $hard = true ) { 2173 static $do_hard_later ;2173 static $do_hard_later = null; 2174 2174 2175 2175 // Prevent this action from running before everyone has registered their rewrites -
trunk/src/wp-includes/theme.php
r32632 r32650 411 411 function search_theme_directories( $force = false ) { 412 412 global $wp_theme_directories; 413 static $found_themes = null; 414 413 415 if ( empty( $wp_theme_directories ) ) 414 416 return false; 415 417 416 static $found_themes;417 418 if ( ! $force && isset( $found_themes ) ) 418 419 return $found_themes; … … 1106 1107 */ 1107 1108 function _get_random_header_data() { 1108 static $_wp_random_header ;1109 static $_wp_random_header = null; 1109 1110 1110 1111 if ( empty( $_wp_random_header ) ) { -
trunk/src/wp-includes/vars.php
r32116 r32650 119 119 * Test if the current browser runs on a mobile device (smart phone, tablet, etc.) 120 120 * 121 * @staticvar bool $is_mobile 122 * 121 123 * @return bool true|false 122 124 */ 123 125 function wp_is_mobile() { 124 static $is_mobile ;126 static $is_mobile = null; 125 127 126 if ( isset( $is_mobile) )128 if ( isset( $is_mobile ) ) { 127 129 return $is_mobile; 130 } 128 131 129 132 if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
Note: See TracChangeset
for help on using the changeset viewer.