Changeset 26353
- Timestamp:
- 11/24/2013 02:58:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r25991 r26353 1518 1518 break; 1519 1519 case 'ol': 1520 echo'<ol class="children">' . "\n";1520 $output .= '<ol class="children">' . "\n"; 1521 1521 break; 1522 1522 default: 1523 1523 case 'ul': 1524 echo'<ul class="children">' . "\n";1524 $output .= '<ul class="children">' . "\n"; 1525 1525 break; 1526 1526 } … … 1545 1545 break; 1546 1546 case 'ol': 1547 echo"</ol><!-- .children -->\n";1547 $output .= "</ol><!-- .children -->\n"; 1548 1548 break; 1549 1549 default: 1550 1550 case 'ul': 1551 echo"</ul><!-- .children -->\n";1551 $output .= "</ul><!-- .children -->\n"; 1552 1552 break; 1553 1553 } … … 1624 1624 1625 1625 if ( !empty( $args['callback'] ) ) { 1626 ob_start(); 1626 1627 call_user_func( $args['callback'], $comment, $args, $depth ); 1628 $output .= ob_get_clean(); 1627 1629 return; 1628 1630 } 1629 1631 1630 1632 if ( ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) && $args['short_ping'] ) { 1633 ob_start(); 1631 1634 $this->ping( $comment, $depth, $args ); 1635 $output .= ob_get_clean(); 1632 1636 } elseif ( 'html5' === $args['format'] ) { 1637 ob_start(); 1633 1638 $this->html5_comment( $comment, $depth, $args ); 1639 $output .= ob_get_clean(); 1634 1640 } else { 1641 ob_start(); 1635 1642 $this->comment( $comment, $depth, $args ); 1643 $output .= ob_get_clean(); 1636 1644 } 1637 1645 } … … 1651 1659 function end_el( &$output, $comment, $depth = 0, $args = array() ) { 1652 1660 if ( !empty( $args['end-callback'] ) ) { 1661 ob_start(); 1653 1662 call_user_func( $args['end-callback'], $comment, $args, $depth ); 1663 $output .= ob_get_clean(); 1654 1664 return; 1655 1665 } 1656 1666 if ( 'div' == $args['style'] ) 1657 echo"</div><!-- #comment-## -->\n";1667 $output .= "</div><!-- #comment-## -->\n"; 1658 1668 else 1659 echo"</li><!-- #comment-## -->\n";1669 $output .= "</li><!-- #comment-## -->\n"; 1660 1670 } 1661 1671 … … 1802 1812 * Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'. 1803 1813 * @type bool 'short_ping' Whether to output short pings. Default false. 1814 * @type bool 'echo' Whether to echo the output or return it. Default true. 1804 1815 * } 1805 1816 * @param array $comments Optional. Array of comment objects. @see WP_Query->comments … … 1827 1838 'format' => current_theme_supports( 'html5', 'comment-list' ) ? 'html5' : 'xhtml', 1828 1839 'short_ping' => false, 1840 'echo' => true, 1829 1841 ); 1830 1842 … … 1895 1907 $walker = new Walker_Comment; 1896 1908 1897 $ walker->paged_walk($_comments, $max_depth, $page, $per_page, $r);1909 $output = $walker->paged_walk($_comments, $max_depth, $page, $per_page, $r); 1898 1910 $wp_query->max_num_comment_pages = $walker->max_pages; 1899 1911 1900 1912 $in_comment_loop = false; 1913 1914 if ( $r['echo'] ) 1915 echo $output; 1916 else 1917 return $output; 1901 1918 } 1902 1919
Note: See TracChangeset
for help on using the changeset viewer.