WordPress.org

Make WordPress Core

Changeset 47287


Ignore:
Timestamp:
02/14/2020 12:05:43 AM (2 weeks ago)
Author:
SergeyBiryukov
Message:

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

See #49222.

Location:
trunk/src
Files:
5 edited

Legend:

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

    r47219 r47287  
    639639    }
    640640
    641     list( $n, $d ) = explode( '/', $str );
    642     if ( ! empty( $d ) ) {
    643         return $n / $d;
     641    list( $numerator, $denominator ) = explode( '/', $str );
     642    if ( ! empty( $denominator ) ) {
     643        return $numerator / $denominator;
    644644    }
    645645    return $str;
  • trunk/src/wp-includes/comment-template.php

    r47276 r47287  
    544544 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
    545545 *
    546  * @param string          $d          Optional. The format of the date. Default user's setting.
     546 * @param string          $format     Optional. The format of the date. Default user's setting.
    547547 * @param int|WP_Comment  $comment_ID WP_Comment or ID of the comment for which to get the date.
    548548 *                                    Default current comment.
    549549 * @return string The comment's date.
    550550 */
    551 function get_comment_date( $d = '', $comment_ID = 0 ) {
     551function get_comment_date( $format = '', $comment_ID = 0 ) {
    552552    $comment = get_comment( $comment_ID );
    553     if ( '' == $d ) {
     553    if ( '' == $format ) {
    554554        $date = mysql2date( get_option( 'date_format' ), $comment->comment_date );
    555555    } else {
    556         $date = mysql2date( $d, $comment->comment_date );
     556        $date = mysql2date( $format, $comment->comment_date );
    557557    }
    558558    /**
     
    562562     *
    563563     * @param string|int $date    Formatted date string or Unix timestamp.
    564      * @param string     $d       The format of the date.
     564     * @param string     $format  The format of the date.
    565565     * @param WP_Comment $comment The comment object.
    566566     */
    567     return apply_filters( 'get_comment_date', $date, $d, $comment );
     567    return apply_filters( 'get_comment_date', $date, $format, $comment );
    568568}
    569569
     
    574574 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object.
    575575 *
    576  * @param string         $d          Optional. The format of the date. Default user's settings.
     576 * @param string         $format     Optional. The format of the date. Default user's settings.
    577577 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date.
    578578 *                                   Default current comment.
    579579 */
    580 function comment_date( $d = '', $comment_ID = 0 ) {
    581     echo get_comment_date( $d, $comment_ID );
     580function comment_date( $format = '', $comment_ID = 0 ) {
     581    echo get_comment_date( $format, $comment_ID );
    582582}
    583583
     
    10321032 * @since 1.5.0
    10331033 *
    1034  * @param string $d         Optional. The format of the time. Default user's settings.
     1034 * @param string $format    Optional. The format of the time. Default user's settings.
    10351035 * @param bool   $gmt       Optional. Whether to use the GMT date. Default false.
    10361036 * @param bool   $translate Optional. Whether to translate the time (for use in feeds).
     
    10381038 * @return string The formatted time.
    10391039 */
    1040 function get_comment_time( $d = '', $gmt = false, $translate = true ) {
     1040function get_comment_time( $format = '', $gmt = false, $translate = true ) {
    10411041    $comment = get_comment();
    10421042
    10431043    $comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;
    1044     if ( '' == $d ) {
     1044    if ( '' == $format ) {
    10451045        $date = mysql2date( get_option( 'time_format' ), $comment_date, $translate );
    10461046    } else {
    1047         $date = mysql2date( $d, $comment_date, $translate );
     1047        $date = mysql2date( $format, $comment_date, $translate );
    10481048    }
    10491049
     
    10541054     *
    10551055     * @param string|int $date      The comment time, formatted as a date string or Unix timestamp.
    1056      * @param string     $d         Date format.
     1056     * @param string     $format    Date format.
    10571057     * @param bool       $gmt       Whether the GMT date is in use.
    10581058     * @param bool       $translate Whether the time is translated.
    10591059     * @param WP_Comment $comment   The comment object.
    10601060     */
    1061     return apply_filters( 'get_comment_time', $date, $d, $gmt, $translate, $comment );
     1061    return apply_filters( 'get_comment_time', $date, $format, $gmt, $translate, $comment );
    10621062}
    10631063
     
    10671067 * @since 0.71
    10681068 *
    1069  * @param string $d Optional. The format of the time. Default user's settings.
    1070  */
    1071 function comment_time( $d = '' ) {
    1072     echo get_comment_time( $d );
     1069 * @param string $format Optional. The format of the time. Default user's settings.
     1070 */
     1071function comment_time( $format = '' ) {
     1072    echo get_comment_time( $format );
    10731073}
    10741074
  • trunk/src/wp-includes/general-template.php

    r47230 r47287  
    23452345 * @global string $previousday The day of the previous post in the loop.
    23462346 *
    2347  * @param string $d      Optional. PHP date format defaults to the date_format option if not specified.
     2347 * @param string $format Optional. PHP date format defaults to the date_format option if not specified.
    23482348 * @param string $before Optional. Output before the date.
    23492349 * @param string $after  Optional. Output after the date.
     
    23512351 * @return string|void String if retrieving.
    23522352 */
    2353 function the_date( $d = '', $before = '', $after = '', $echo = true ) {
     2353function the_date( $format = '', $before = '', $after = '', $echo = true ) {
    23542354    global $currentday, $previousday;
    23552355
     
    23572357
    23582358    if ( is_new_day() ) {
    2359         $the_date    = $before . get_the_date( $d ) . $after;
     2359        $the_date    = $before . get_the_date( $format ) . $after;
    23602360        $previousday = $currentday;
    23612361    }
     
    23672367     *
    23682368     * @param string $the_date The formatted date string.
    2369      * @param string $d        PHP date format. Defaults to 'date_format' option
     2369     * @param string $format   PHP date format. Defaults to 'date_format' option
    23702370     *                         if not specified.
    23712371     * @param string $before   HTML output before the date.
    23722372     * @param string $after    HTML output after the date.
    23732373     */
    2374     $the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );
     2374    $the_date = apply_filters( 'the_date', $the_date, $format, $before, $after );
    23752375
    23762376    if ( $echo ) {
     
    23892389 * @since 3.0.0
    23902390 *
    2391  * @param  string      $d    Optional. PHP date format defaults to the date_format option if not specified.
    2392  * @param  int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
     2391 * @param  string      $format Optional. PHP date format defaults to the date_format option if not specified.
     2392 * @param  int|WP_Post $post   Optional. Post ID or WP_Post object. Default current post.
    23932393 * @return string|false Date the current post was written. False on failure.
    23942394 */
    2395 function get_the_date( $d = '', $post = null ) {
     2395function get_the_date( $format = '', $post = null ) {
    23962396    $post = get_post( $post );
    23972397
     
    24002400    }
    24012401
    2402     if ( '' == $d ) {
     2402    if ( '' == $format ) {
    24032403        $the_date = get_post_time( get_option( 'date_format' ), false, $post, true );
    24042404    } else {
    2405         $the_date = get_post_time( $d, false, $post, true );
     2405        $the_date = get_post_time( $format, false, $post, true );
    24062406    }
    24072407
     
    24122412     *
    24132413     * @param string      $the_date The formatted date.
    2414      * @param string      $d        PHP date format. Defaults to 'date_format' option
     2414     * @param string      $format   PHP date format. Defaults to 'date_format' option
    24152415     *                              if not specified.
    24162416     * @param int|WP_Post $post     The post object or ID.
    24172417     */
    2418     return apply_filters( 'get_the_date', $the_date, $d, $post );
     2418    return apply_filters( 'get_the_date', $the_date, $format, $post );
    24192419}
    24202420
     
    24242424 * @since 2.1.0
    24252425 *
    2426  * @param string $d      Optional. PHP date format defaults to the date_format option if not specified.
     2426 * @param string $format Optional. PHP date format defaults to the date_format option if not specified.
    24272427 * @param string $before Optional. Output before the date.
    24282428 * @param string $after  Optional. Output after the date.
     
    24302430 * @return string|void String if retrieving.
    24312431 */
    2432 function the_modified_date( $d = '', $before = '', $after = '', $echo = true ) {
    2433     $the_modified_date = $before . get_the_modified_date( $d ) . $after;
     2432function the_modified_date( $format = '', $before = '', $after = '', $echo = true ) {
     2433    $the_modified_date = $before . get_the_modified_date( $format ) . $after;
    24342434
    24352435    /**
     
    24392439     *
    24402440     * @param string $the_modified_date The last modified date.
    2441      * @param string $d                 PHP date format. Defaults to 'date_format' option
     2441     * @param string $format            PHP date format. Defaults to 'date_format' option
    24422442     *                                  if not specified.
    24432443     * @param string $before            HTML output before the date.
    24442444     * @param string $after             HTML output after the date.
    24452445     */
    2446     $the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $d, $before, $after );
     2446    $the_modified_date = apply_filters( 'the_modified_date', $the_modified_date, $format, $before, $after );
    24472447
    24482448    if ( $echo ) {
     
    24602460 * @since 4.6.0 Added the `$post` parameter.
    24612461 *
    2462  * @param string      $d    Optional. PHP date format defaults to the date_format option if not specified.
    2463  * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
     2462 * @param string      $format Optional. PHP date format defaults to the date_format option if not specified.
     2463 * @param int|WP_Post $post   Optional. Post ID or WP_Post object. Default current post.
    24642464 * @return string|false Date the current post was modified. False on failure.
    24652465 */
    2466 function get_the_modified_date( $d = '', $post = null ) {
     2466function get_the_modified_date( $format = '', $post = null ) {
    24672467    $post = get_post( $post );
    24682468
     
    24702470        // For backward compatibility, failures go through the filter below.
    24712471        $the_time = false;
    2472     } elseif ( empty( $d ) ) {
     2472    } elseif ( empty( $format ) ) {
    24732473        $the_time = get_post_modified_time( get_option( 'date_format' ), false, $post, true );
    24742474    } else {
    2475         $the_time = get_post_modified_time( $d, false, $post, true );
     2475        $the_time = get_post_modified_time( $format, false, $post, true );
    24762476    }
    24772477
     
    24832483     *
    24842484     * @param string|bool  $the_time The formatted date or false if no post is found.
    2485      * @param string       $d        PHP date format. Defaults to value specified in
     2485     * @param string       $format   PHP date format. Defaults to value specified in
    24862486     *                               'date_format' option.
    24872487     * @param WP_Post|null $post     WP_Post object or null if no post is found.
    24882488     */
    2489     return apply_filters( 'get_the_modified_date', $the_time, $d, $post );
     2489    return apply_filters( 'get_the_modified_date', $the_time, $format, $post );
    24902490}
    24912491
     
    24952495 * @since 0.71
    24962496 *
    2497  * @param string $d Either 'G', 'U', or php date format.
    2498  */
    2499 function the_time( $d = '' ) {
     2497 * @param string $format Either 'G', 'U', or PHP date format.
     2498 */
     2499function the_time( $format = '' ) {
    25002500    /**
    25012501     * Filters the time a post was written for display.
     
    25042504     *
    25052505     * @param string $get_the_time The formatted time.
    2506      * @param string $d            The time format. Accepts 'G', 'U',
    2507      *                             or php date format.
    2508      */
    2509     echo apply_filters( 'the_time', get_the_time( $d ), $d );
     2506     * @param string $format       The time format. Accepts 'G', 'U',
     2507     *                             or PHP date format.
     2508     */
     2509    echo apply_filters( 'the_time', get_the_time( $format ), $format );
    25102510}
    25112511
     
    25152515 * @since 1.5.0
    25162516 *
    2517  * @param string      $d    Optional. Format to use for retrieving the time the post
    2518  *                          was written. Either 'G', 'U', or php date format defaults
    2519  *                          to the value specified in the time_format option. Default empty.
    2520  * @param int|WP_Post $post WP_Post object or ID. Default is global `$post` object.
    2521  * @return string|int|false Formatted date string or Unix timestamp if `$d` is 'U' or 'G'. False on failure.
    2522  */
    2523 function get_the_time( $d = '', $post = null ) {
     2517 * @param string      $format Optional. Format to use for retrieving the time the post
     2518 *                            was written. Either 'G', 'U', or PHP date format defaults
     2519 *                            to the value specified in the time_format option. Default empty.
     2520 * @param int|WP_Post $post   WP_Post object or ID. Default is global `$post` object.
     2521 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
     2522 *                          False on failure.
     2523 */
     2524function get_the_time( $format = '', $post = null ) {
    25242525    $post = get_post( $post );
    25252526
     
    25282529    }
    25292530
    2530     if ( '' == $d ) {
     2531    if ( '' == $format ) {
    25312532        $the_time = get_post_time( get_option( 'time_format' ), false, $post, true );
    25322533    } else {
    2533         $the_time = get_post_time( $d, false, $post, true );
     2534        $the_time = get_post_time( $format, false, $post, true );
    25342535    }
    25352536
     
    25402541     *
    25412542     * @param string      $the_time The formatted time.
    2542      * @param string      $d        Format to use for retrieving the time the post was written.
    2543      *                              Accepts 'G', 'U', or php date format value specified
     2543     * @param string      $format   Format to use for retrieving the time the post was written.
     2544     *                              Accepts 'G', 'U', or PHP date format value specified
    25442545     *                              in 'time_format' option. Default empty.
    25452546     * @param int|WP_Post $post     WP_Post object or ID.
    25462547     */
    2547     return apply_filters( 'get_the_time', $the_time, $d, $post );
     2548    return apply_filters( 'get_the_time', $the_time, $format, $post );
    25482549}
    25492550
     
    25532554 * @since 2.0.0
    25542555 *
    2555  * @param string      $d         Optional. Format to use for retrieving the time the post
    2556  *                               was written. Either 'G', 'U', or php date format. Default 'U'.
     2556 * @param string      $format    Optional. Format to use for retrieving the time the post
     2557 *                               was written. Either 'G', 'U', or PHP date format. Default 'U'.
    25572558 * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
    25582559 * @param int|WP_Post $post      WP_Post object or ID. Default is global `$post` object.
    25592560 * @param bool        $translate Whether to translate the time string. Default false.
    2560  * @return string|int|false Formatted date string or Unix timestamp if `$d` is 'U' or 'G'. False on failure.
    2561  */
    2562 function get_post_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
     2561 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
     2562 *                          False on failure.
     2563 */
     2564function get_post_time( $format = 'U', $gmt = false, $post = null, $translate = false ) {
    25632565    $post = get_post( $post );
    25642566
     
    25742576    }
    25752577
    2576     if ( 'U' === $d || 'G' === $d ) {
     2578    if ( 'U' === $format || 'G' === $format ) {
    25772579        $time = $datetime->getTimestamp();
    25782580
     
    25822584        }
    25832585    } elseif ( $translate ) {
    2584         $time = wp_date( $d, $datetime->getTimestamp(), $gmt ? new DateTimeZone( 'UTC' ) : null );
     2586        $time = wp_date( $format, $datetime->getTimestamp(), $gmt ? new DateTimeZone( 'UTC' ) : null );
    25852587    } else {
    25862588        if ( $gmt ) {
     
    25882590        }
    25892591
    2590         $time = $datetime->format( $d );
     2592        $time = $datetime->format( $format );
    25912593    }
    25922594
     
    25962598     * @since 2.6.0
    25972599     *
    2598      * @param string $time The formatted time.
    2599      * @param string $d    Format to use for retrieving the time the post was written.
    2600      *                     Accepts 'G', 'U', or php date format. Default 'U'.
    2601      * @param bool   $gmt  Whether to retrieve the GMT time. Default false.
    2602      */
    2603     return apply_filters( 'get_post_time', $time, $d, $gmt );
     2600     * @param string $time   The formatted time.
     2601     * @param string $format Format to use for retrieving the time the post was written.
     2602     *                       Accepts 'G', 'U', or PHP date format. Default 'U'.
     2603     * @param bool   $gmt    Whether to retrieve the GMT time. Default false.
     2604     */
     2605    return apply_filters( 'get_post_time', $time, $format, $gmt );
    26042606}
    26052607
     
    26812683 * @since 2.0.0
    26822684 *
    2683  * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
    2684  */
    2685 function the_modified_time( $d = '' ) {
     2685 * @param string $format Optional. Either 'G', 'U', or PHP date format defaults
     2686 *                       to the value specified in the time_format option.
     2687 */
     2688function the_modified_time( $format = '' ) {
    26862689    /**
    26872690     * Filters the localized time a post was last modified, for display.
     
    26902693     *
    26912694     * @param string $get_the_modified_time The formatted time.
    2692      * @param string $d                     The time format. Accepts 'G', 'U',
    2693      *                                      or php date format. Defaults to value
     2695     * @param string $format                The time format. Accepts 'G', 'U',
     2696     *                                      or PHP date format. Defaults to value
    26942697     *                                      specified in 'time_format' option.
    26952698     */
    2696     echo apply_filters( 'the_modified_time', get_the_modified_time( $d ), $d );
     2699    echo apply_filters( 'the_modified_time', get_the_modified_time( $format ), $format );
    26972700}
    26982701
     
    27032706 * @since 4.6.0 Added the `$post` parameter.
    27042707 *
    2705  * @param string      $d    Optional. Format to use for retrieving the time the post
    2706  *                           was modified. Either 'G', 'U', or php date format defaults
    2707  *                           to the value specified in the time_format option. Default empty.
    2708  * @param int|WP_Post $post  Optional. Post ID or WP_Post object. Default current post.
     2708 * @param string      $format Optional. Format to use for retrieving the time the post
     2709 *                            was modified. Either 'G', 'U', or PHP date format defaults
     2710 *                            to the value specified in the time_format option. Default empty.
     2711 * @param int|WP_Post $post   Optional. Post ID or WP_Post object. Default current post.
    27092712 * @return string|false Formatted date string or Unix timestamp. False on failure.
    27102713 */
    2711 function get_the_modified_time( $d = '', $post = null ) {
     2714function get_the_modified_time( $format = '', $post = null ) {
    27122715    $post = get_post( $post );
    27132716
     
    27152718        // For backward compatibility, failures go through the filter below.
    27162719        $the_time = false;
    2717     } elseif ( empty( $d ) ) {
     2720    } elseif ( empty( $format ) ) {
    27182721        $the_time = get_post_modified_time( get_option( 'time_format' ), false, $post, true );
    27192722    } else {
    2720         $the_time = get_post_modified_time( $d, false, $post, true );
     2723        $the_time = get_post_modified_time( $format, false, $post, true );
    27212724    }
    27222725
     
    27282731     *
    27292732     * @param string|bool  $the_time The formatted time or false if no post is found.
    2730      * @param string       $d        Format to use for retrieving the time the post was
    2731      *                               written. Accepts 'G', 'U', or php date format. Defaults
     2733     * @param string       $format   Format to use for retrieving the time the post was
     2734     *                               written. Accepts 'G', 'U', or PHP date format. Defaults
    27322735     *                               to value specified in 'time_format' option.
    27332736     * @param WP_Post|null $post     WP_Post object or null if no post is found.
    27342737     */
    2735     return apply_filters( 'get_the_modified_time', $the_time, $d, $post );
     2738    return apply_filters( 'get_the_modified_time', $the_time, $format, $post );
    27362739}
    27372740
     
    27412744 * @since 2.0.0
    27422745 *
    2743  * @param string      $d         Optional. Format to use for retrieving the time the post
    2744  *                               was modified. Either 'G', 'U', or php date format. Default 'U'.
     2746 * @param string      $format    Optional. Format to use for retrieving the time the post
     2747 *                               was modified. Either 'G', 'U', or PHP date format. Default 'U'.
    27452748 * @param bool        $gmt       Optional. Whether to retrieve the GMT time. Default false.
    27462749 * @param int|WP_Post $post      WP_Post object or ID. Default is global `$post` object.
    27472750 * @param bool        $translate Whether to translate the time string. Default false.
    2748  * @return string|int|false Formatted date string or Unix timestamp if `$d` is 'U' or 'G'. False on failure.
    2749  */
    2750 function get_post_modified_time( $d = 'U', $gmt = false, $post = null, $translate = false ) {
     2751 * @return string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
     2752 *                          False on failure.
     2753 */
     2754function get_post_modified_time( $format = 'U', $gmt = false, $post = null, $translate = false ) {
    27512755    $post = get_post( $post );
    27522756
     
    27622766    }
    27632767
    2764     if ( 'U' === $d || 'G' === $d ) {
     2768    if ( 'U' === $format || 'G' === $format ) {
    27652769        $time = $datetime->getTimestamp();
    27662770
     
    27702774        }
    27712775    } elseif ( $translate ) {
    2772         $time = wp_date( $d, $datetime->getTimestamp(), $gmt ? new DateTimeZone( 'UTC' ) : null );
     2776        $time = wp_date( $format, $datetime->getTimestamp(), $gmt ? new DateTimeZone( 'UTC' ) : null );
    27732777    } else {
    27742778        if ( $gmt ) {
     
    27762780        }
    27772781
    2778         $time = $datetime->format( $d );
     2782        $time = $datetime->format( $format );
    27792783    }
    27802784
     
    27842788     * @since 2.8.0
    27852789     *
    2786      * @param string $time The formatted time.
    2787      * @param string $d    Format to use for retrieving the time the post was modified.
    2788      *                     Accepts 'G', 'U', or php date format. Default 'U'.
    2789      * @param bool   $gmt  Whether to retrieve the GMT time. Default false.
    2790      */
    2791     return apply_filters( 'get_post_modified_time', $time, $d, $gmt );
     2790     * @param string $time   The formatted time.
     2791     * @param string $format Format to use for retrieving the time the post was modified.
     2792     *                       Accepts 'G', 'U', or PHP date format. Default 'U'.
     2793     * @param bool   $gmt    Whether to retrieve the GMT time. Default false.
     2794     */
     2795    return apply_filters( 'get_post_modified_time', $time, $format, $gmt );
    27922796}
    27932797
  • trunk/src/wp-includes/widgets/class-wp-widget-archives.php

    r46604 r47287  
    4646        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    4747
    48         $c = ! empty( $instance['count'] ) ? '1' : '0';
    49         $d = ! empty( $instance['dropdown'] ) ? '1' : '0';
     48        $count    = ! empty( $instance['count'] ) ? '1' : '0';
     49        $dropdown = ! empty( $instance['dropdown'] ) ? '1' : '0';
    5050
    5151        echo $args['before_widget'];
     
    5555        }
    5656
    57         if ( $d ) {
     57        if ( $dropdown ) {
    5858            $dropdown_id = "{$this->id_base}-dropdown-{$this->number}";
    5959            ?>
     
    7777                    'type'            => 'monthly',
    7878                    'format'          => 'option',
    79                     'show_post_count' => $c,
     79                    'show_post_count' => $count,
    8080                ),
    8181                $instance
     
    141141                    array(
    142142                        'type'            => 'monthly',
    143                         'show_post_count' => $c,
     143                        'show_post_count' => $count,
    144144                    ),
    145145                    $instance
  • trunk/src/wp-includes/widgets/class-wp-widget-categories.php

    r47122 r47287  
    5050        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    5151
    52         $c = ! empty( $instance['count'] ) ? '1' : '0';
    53         $h = ! empty( $instance['hierarchical'] ) ? '1' : '0';
    54         $d = ! empty( $instance['dropdown'] ) ? '1' : '0';
     52        $count        = ! empty( $instance['count'] ) ? '1' : '0';
     53        $hierarchical = ! empty( $instance['hierarchical'] ) ? '1' : '0';
     54        $dropdown    = ! empty( $instance['dropdown'] ) ? '1' : '0';
    5555
    5656        echo $args['before_widget'];
     
    6262        $cat_args = array(
    6363            'orderby'      => 'name',
    64             'show_count'   => $c,
    65             'hierarchical' => $h,
     64            'show_count'   => $count,
     65            'hierarchical' => $hierarchical,
    6666        );
    6767
    68         if ( $d ) {
     68        if ( $dropdown ) {
    6969            echo sprintf( '<form action="%s" method="get">', esc_url( home_url() ) );
    7070            $dropdown_id    = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
Note: See TracChangeset for help on using the changeset viewer.