Changeset 47808 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 05/16/2020 06:40:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r47550 r47808 156 156 157 157 $thelist = ''; 158 if ( '' == $separator ) {158 if ( '' === $separator ) { 159 159 $thelist .= '<ul class="post-categories">'; 160 160 foreach ( $categories as $category ) { … … 352 352 353 353 // Back compat. 354 if ( isset( $args['type'] ) && 'link' == $args['type'] ) {354 if ( isset( $args['type'] ) && 'link' === $args['type'] ) { 355 355 _deprecated_argument( 356 356 __FUNCTION__, … … 560 560 561 561 if ( ! isset( $parsed_args['class'] ) ) { 562 $parsed_args['class'] = ( 'category' == $parsed_args['taxonomy'] ) ? 'categories' : $parsed_args['taxonomy'];562 $parsed_args['class'] = ( 'category' === $parsed_args['taxonomy'] ) ? 'categories' : $parsed_args['taxonomy']; 563 563 } 564 564 … … 573 573 574 574 $output = ''; 575 if ( $parsed_args['title_li'] && 'list' == $parsed_args['style'] && ( ! empty( $categories ) || ! $parsed_args['hide_title_if_empty'] ) ) { 575 576 if ( $parsed_args['title_li'] && 'list' === $parsed_args['style'] 577 && ( ! empty( $categories ) || ! $parsed_args['hide_title_if_empty'] ) 578 ) { 576 579 $output = '<li class="' . esc_attr( $parsed_args['class'] ) . '">' . $parsed_args['title_li'] . '<ul>'; 577 580 } 581 578 582 if ( empty( $categories ) ) { 579 583 if ( ! empty( $show_option_none ) ) { 580 if ( 'list' == $parsed_args['style'] ) {584 if ( 'list' === $parsed_args['style'] ) { 581 585 $output .= '<li class="cat-item-none">' . $show_option_none . '</li>'; 582 586 } else { … … 605 609 // Fallback for the 'All' link is the posts page. 606 610 if ( ! $posts_page ) { 607 if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) {611 if ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) { 608 612 $posts_page = get_permalink( get_option( 'page_for_posts' ) ); 609 613 } else { … … 613 617 614 618 $posts_page = esc_url( $posts_page ); 615 if ( 'list' == $parsed_args['style'] ) {619 if ( 'list' === $parsed_args['style'] ) { 616 620 $output .= "<li class='cat-item-all'><a href='$posts_page'>$show_option_all</a></li>"; 617 621 } else { … … 635 639 } 636 640 637 if ( $parsed_args['title_li'] && 'list' == $parsed_args['style'] && ( ! empty( $categories ) || ! $parsed_args['hide_title_if_empty'] ) ) { 641 if ( $parsed_args['title_li'] && 'list' === $parsed_args['style'] 642 && ( ! empty( $categories ) || ! $parsed_args['hide_title_if_empty'] ) 643 ) { 638 644 $output .= '</ul></li>'; 639 645 } … … 714 720 715 721 foreach ( $tags as $key => $tag ) { 716 if ( 'edit' == $args['link'] ) {722 if ( 'edit' === $args['link'] ) { 717 723 $link = get_edit_term_link( $tag->term_id, $tag->taxonomy, $args['post_type'] ); 718 724 } else { … … 741 747 $return = apply_filters( 'wp_tag_cloud', $return, $args ); 742 748 743 if ( 'array' == $args['format'] || empty( $args['echo'] ) ) {749 if ( 'array' === $args['format'] || empty( $args['echo'] ) ) { 744 750 return $return; 745 751 } … … 940 946 $tags_data[] = array( 941 947 'id' => $tag_id, 942 'url' => '#' != $tag->link? $tag->link : '#',943 'role' => '#' != $tag->link? '' : ' role="button"',948 'url' => ( '#' !== $tag->link ) ? $tag->link : '#', 949 'role' => ( '#' !== $tag->link ) ? '' : ' role="button"', 944 950 'name' => $tag->name, 945 951 'formatted_count' => $formatted_count,
Note: See TracChangeset
for help on using the changeset viewer.