mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user