WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/30/2014 05:57:51 PM (7 years ago)
Author:
wonderboymusic
Message:

Cleanup for switch statements:

  • Move default to the bottom in WP_Theme_Install_List_Table
  • switch/endswitch syntax is not supported in Hack. Switch to switch (...) { .... } syntax. (A few template-type instances linger).

Fixes #28409.
See #27881.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r28572 r28633  
    786786    }
    787787
    788     switch ( $args['format'] ) :
    789     case 'array' :
    790         $return =& $a;
    791         break;
    792     case 'list' :
    793         $return = "<ul class='wp-tag-cloud'>\n\t<li>";
    794         $return .= join( "</li>\n\t<li>", $a );
    795         $return .= "</li>\n</ul>\n";
    796         break;
    797     default :
    798         $return = join( $args['separator'], $a );
    799         break;
    800     endswitch;
     788    switch ( $args['format'] ) {
     789        case 'array' :
     790            $return =& $a;
     791            break;
     792        case 'list' :
     793            $return = "<ul class='wp-tag-cloud'>\n\t<li>";
     794            $return .= join( "</li>\n\t<li>", $a );
     795            $return .= "</li>\n</ul>\n";
     796            break;
     797        default :
     798            $return = join( $args['separator'], $a );
     799            break;
     800    }
    801801
    802802    if ( $args['filter'] ) {
Note: See TracChangeset for help on using the changeset viewer.