Make WordPress Core


Ignore:
Timestamp:
05/29/2015 03:42:40 PM (9 years ago)
Author:
wonderboymusic
Message:

Add @static* annotations where they are missing.
Initialize all static vars that are not, most to null.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/vars.php

    r32116 r32650  
    119119 * Test if the current browser runs on a mobile device (smart phone, tablet, etc.)
    120120 *
     121 * @staticvar bool $is_mobile
     122 *
    121123 * @return bool true|false
    122124 */
    123125function wp_is_mobile() {
    124     static $is_mobile;
     126    static $is_mobile = null;
    125127
    126     if ( isset($is_mobile) )
     128    if ( isset( $is_mobile ) ) {
    127129        return $is_mobile;
     130    }
    128131
    129132    if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
Note: See TracChangeset for help on using the changeset viewer.