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/default-widgets.php

    r32600 r32650  
    645645
    646646    /**
     647     * @staticvar bool $first_dropdown
     648     *
    647649     * @param array $args
    648650     * @param array $instance
    649651     */
    650652    public function widget( $args, $instance ) {
     653        static $first_dropdown = true;
     654
    651655        /** This filter is documented in wp-includes/default-widgets.php */
    652656        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base );
     
    668672
    669673        if ( $d ) {
    670             static $first_dropdown = true;
    671 
    672674            $dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
    673675            $first_dropdown = false;
Note: See TracChangeset for help on using the changeset viewer.