Add @static* annotations where they are missing.

Initialize all static vars that are not, most to `null`.

See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-05-29 15:42:40 +00:00
parent cced199188
commit c8a44d437a
35 changed files with 172 additions and 52 deletions

View File

@@ -644,10 +644,14 @@ class WP_Widget_Categories extends WP_Widget {
}
/**
* @staticvar bool $first_dropdown
*
* @param array $args
* @param array $instance
*/
public function widget( $args, $instance ) {
static $first_dropdown = true;
/** This filter is documented in wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base );
@@ -667,8 +671,6 @@ class WP_Widget_Categories extends WP_Widget {
);
if ( $d ) {
static $first_dropdown = true;
$dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
$first_dropdown = false;