Make WordPress Core


Ignore:
Timestamp:
06/24/2014 05:05:56 PM (12 years ago)
Author:
wonderboymusic
Message:

Ensure that a has_children parameter is given to Walker::start_el().

Adds unit tests.

Props scribu, obenland.
Fixes #14041.

File:
1 edited

Legend:

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

    r28813 r28824  
    17851785                }
    17861786?>
    1787                 <<?php echo $tag; ?> <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?> id="comment-<?php comment_ID(); ?>">
     1787                <<?php echo $tag; ?> <?php comment_class( $this->has_children ? 'parent' : '' ); ?> id="comment-<?php comment_ID(); ?>">
    17881788                <?php if ( 'div' != $args['style'] ) : ?>
    17891789                <div id="div-comment-<?php comment_ID(); ?>" class="comment-body">
    … …  
    18311831                $tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
    18321832?>
    1833                 <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
     1833                <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '' ); ?>>
    18341834                        <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
    18351835                                <footer class="comment-meta">
Note: See TracChangeset for help on using the changeset viewer.