Changeset 33963
- Timestamp:
- 09/09/2015 02:50:43 AM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/comment.php
r33891 r33963 157 157 * @since 2.5.0 158 158 * 159 * @global object $comment160 *161 159 * @param string $name User name. 162 160 * @return string Avatar with Admin name. 163 161 */ 164 162 function floated_admin_avatar( $name ) { 165 global $comment; 166 $avatar = get_avatar( $comment, 32, 'mystery' ); 163 $avatar = get_avatar( get_comment(), 32, 'mystery' ); 167 164 return "$avatar $name"; 168 165 } -
trunk/src/wp-includes/comment-functions.php
r33954 r33963 170 170 * @return WP_Comment|array|null Depends on $output value. 171 171 */ 172 function get_comment( &$comment, $output = OBJECT) {172 function get_comment( &$comment = null, $output = OBJECT ) { 173 173 if ( empty( $comment ) && isset( $GLOBALS['comment'] ) ) { 174 174 $comment = $GLOBALS['comment']; -
trunk/src/wp-includes/comment-template.php
r33962 r33963 153 153 * address and use it for their own means good and bad. 154 154 * 155 * @global object $comment The current Comment row object.156 *157 155 * @since 2.7.0 158 156 * … … 164 162 */ 165 163 function get_comment_author_email_link( $linktext = '', $before = '', $after = '' ) { 166 global $comment; 167 164 $comment = get_comment(); 168 165 /** 169 166 * Filter the comment author's email for display. … … 605 602 * @since 1.5.0 606 603 * 607 * @global object $comment608 *609 604 * @return int The comment ID. 610 605 */ 611 606 function get_comment_ID() { 612 global $comment;607 $comment = get_comment(); 613 608 614 609 /** … … 874 869 * @since 1.5.0 875 870 * 876 * @global object $comment877 *878 871 * @param string $d Optional. The format of the time. Default user's settings. 879 872 * @param bool $gmt Optional. Whether to use the GMT date. Default false. … … 883 876 */ 884 877 function get_comment_time( $d = '', $gmt = false, $translate = true ) { 885 global $comment; 878 $comment = get_comment(); 879 886 880 $comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date; 887 881 if ( '' == $d ) … … 1654 1648 * @since 2.7.0 1655 1649 * 1656 * @global object $comment1657 *1658 1650 * @param string $noreplytext Optional. Text to display when not replying to a comment. 1659 1651 * Default false. … … 1665 1657 */ 1666 1658 function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = true ) { 1667 global $comment;1659 $comment = get_comment(); 1668 1660 1669 1661 if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' ); -
trunk/src/wp-includes/link-template.php
r33891 r33963 1312 1312 * @since 1.0.0 1313 1313 * 1314 * @global object $comment1315 *1316 1314 * @param string $text Optional. Anchor text. 1317 1315 * @param string $before Optional. Display before edit link. … … 1319 1317 */ 1320 1318 function edit_comment_link( $text = null, $before = '', $after = '' ) { 1321 global $comment;1319 $comment = get_comment(); 1322 1320 1323 1321 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { -
trunk/src/wp-includes/query.php
r33925 r33963 3845 3845 * @since 2.2.0 3846 3846 * @access public 3847 * @global object $comment Current comment.3847 * @global WP_Comment $comment Current comment. 3848 3848 */ 3849 3849 public function the_comment() {
Note: See TracChangeset
for help on using the changeset viewer.