Coding Standards: Rename $d parameter in various date/time functions to $format for clarity.

See #49222.

git-svn-id: https://develop.svn.wordpress.org/trunk@47287 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-02-14 00:05:43 +00:00
parent a41b2d93d3
commit 543944257c
5 changed files with 115 additions and 111 deletions
@@ -45,8 +45,8 @@ class WP_Widget_Archives extends WP_Widget {
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
$c = ! empty( $instance['count'] ) ? '1' : '0';
$d = ! empty( $instance['dropdown'] ) ? '1' : '0';
$count = ! empty( $instance['count'] ) ? '1' : '0';
$dropdown = ! empty( $instance['dropdown'] ) ? '1' : '0';
echo $args['before_widget'];
@@ -54,7 +54,7 @@ class WP_Widget_Archives extends WP_Widget {
echo $args['before_title'] . $title . $args['after_title'];
}
if ( $d ) {
if ( $dropdown ) {
$dropdown_id = "{$this->id_base}-dropdown-{$this->number}";
?>
<label class="screen-reader-text" for="<?php echo esc_attr( $dropdown_id ); ?>"><?php echo $title; ?></label>
@@ -76,7 +76,7 @@ class WP_Widget_Archives extends WP_Widget {
array(
'type' => 'monthly',
'format' => 'option',
'show_post_count' => $c,
'show_post_count' => $count,
),
$instance
);
@@ -140,7 +140,7 @@ class WP_Widget_Archives extends WP_Widget {
'widget_archives_args',
array(
'type' => 'monthly',
'show_post_count' => $c,
'show_post_count' => $count,
),
$instance
)
@@ -49,9 +49,9 @@ class WP_Widget_Categories extends WP_Widget {
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
$c = ! empty( $instance['count'] ) ? '1' : '0';
$h = ! empty( $instance['hierarchical'] ) ? '1' : '0';
$d = ! empty( $instance['dropdown'] ) ? '1' : '0';
$count = ! empty( $instance['count'] ) ? '1' : '0';
$hierarchical = ! empty( $instance['hierarchical'] ) ? '1' : '0';
$dropdown = ! empty( $instance['dropdown'] ) ? '1' : '0';
echo $args['before_widget'];
@@ -61,11 +61,11 @@ class WP_Widget_Categories extends WP_Widget {
$cat_args = array(
'orderby' => 'name',
'show_count' => $c,
'hierarchical' => $h,
'show_count' => $count,
'hierarchical' => $hierarchical,
);
if ( $d ) {
if ( $dropdown ) {
echo sprintf( '<form action="%s" method="get">', esc_url( home_url() ) );
$dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
$first_dropdown = false;