当前位置: 首页>>代码示例>>PHP>>正文


PHP comment_author_IP函数代码示例

本文整理汇总了PHP中comment_author_IP函数的典型用法代码示例。如果您正苦于以下问题:PHP comment_author_IP函数的具体用法?PHP comment_author_IP怎么用?PHP comment_author_IP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了comment_author_IP函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: column_author

 function column_author($comment)
 {
     global $comment_status;
     $author_url = get_comment_author_url();
     if ('http://' == $author_url) {
         $author_url = '';
     }
     $author_url_display = preg_replace('|http://(www\\.)?|i', '', $author_url);
     if (strlen($author_url_display) > 50) {
         $author_url_display = substr($author_url_display, 0, 49) . '...';
     }
     echo "<strong>";
     comment_author();
     echo '</strong><br />';
     if (!empty($author_url)) {
         echo "<a title='{$author_url}' href='{$author_url}'>{$author_url_display}</a><br />";
     }
     if ($this->user_can) {
         if (!empty($comment->comment_author_email)) {
             comment_author_email_link();
             echo '<br />';
         }
         echo '<a href="edit-comments.php?s=';
         comment_author_IP();
         echo '&amp;mode=detail';
         if ('spam' == $comment_status) {
             echo '&amp;comment_status=spam';
         }
         echo '">';
         comment_author_IP();
         echo '</a>';
     }
 }
开发者ID:snagga,项目名称:urbantac,代码行数:33,代码来源:class-wp-comments-list-table.php

示例2: _wp_comment_list_item

function _wp_comment_list_item($id, $alt = 0)
{
    global $authordata, $comment, $wpdb;
    $id = (int) $id;
    $comment =& get_comment($id);
    $class = '';
    $post = get_post($comment->comment_post_ID);
    $authordata = get_userdata($post->post_author);
    $comment_status = wp_get_comment_status($comment->comment_ID);
    if ('unapproved' == $comment_status) {
        $class .= ' unapproved';
    }
    if ($alt % 2) {
        $class .= ' alternate';
    }
    echo "<li id='comment-{$comment->comment_ID}' class='{$class}'>";
    ?>
<p><strong><?php 
    comment_author();
    ?>
</strong> <?php 
    if ($comment->comment_author_email) {
        ?>
| <?php 
        comment_author_email_link();
        ?>
 <?php 
    }
    if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) {
        ?>
 | <?php 
        comment_author_url_link();
        ?>
 <?php 
    }
    ?>
| <?php 
    _e('IP:');
    ?>
 <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php 
    comment_author_IP();
    ?>
"><?php 
    comment_author_IP();
    ?>
</a></p>

<?php 
    comment_text();
    ?>

<p><?php 
    comment_date(__('M j, g:i A'));
    ?>
 &#8212; [
<?php 
    if (current_user_can('edit_post', $comment->comment_post_ID)) {
        echo " <a href='comment.php?action=editcomment&amp;c=" . $comment->comment_ID . "'>" . __('Edit') . '</a>';
        echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
        if ('none' != $comment_status && current_user_can('moderate_comments')) {
            echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
            echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
        }
        echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', {$comment->comment_ID}, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ";
    }
    $post = get_post($comment->comment_post_ID, OBJECT, 'display');
    $post_title = wp_specialchars($post->post_title, 'double');
    $post_title = '' == $post_title ? "# {$comment->comment_post_ID}" : $post_title;
    ?>
 ] &#8212; <a href="<?php 
    echo get_permalink($comment->comment_post_ID);
    ?>
"><?php 
    echo $post_title;
    ?>
</a></p>
		</li>
<?php 
}
开发者ID:64kbytes,项目名称:stayinba,代码行数:79,代码来源:template.php

示例3: __

					} else {
						echo " - <a href=\"post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">" . __('Approve') . "</a> ";
					}
				}
				echo "]";
			} // end if any comments to show
			?> 
  <br /> 
  <strong> 
  <?php comment_author() ?> 
  (
  <?php comment_author_email_link() ?> 
  /
  <?php comment_author_url_link() ?> 
  )</strong> (IP:
  <?php comment_author_IP() ?> 
  )
  <?php comment_text() ?> 

</li> 
<!-- /comment --> 
<?php //end of the loop, don't delete
		} // end foreach
	echo '</ol>';
	}//end if comments
	?>
<?php } ?> 
</div> 
<?php 
 include('admin-footer.php');
?> 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:edit.php

示例4: _wp_comment_row


//.........这里部分代码省略.........
				<div class="author-url"><?php echo attribute_escape( $comment->comment_author_url ); ?></div>
				<div class="comment_status"><?php echo $comment->comment_approved; ?></div>
				</div>
				<?php
				$actions = array();

				if ( current_user_can('edit_post', $post->ID) ) {
					$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
					$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
					if ( $comment_status ) { // not looking at all comments
						if ( 'approved' == $the_comment_status ) {
							$actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=unapproved vim-u vim-destructive' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
							unset($actions['approve']);
						} else {
							$actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&amp;new=approved vim-a vim-destructive' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
							unset($actions['unapprove']);
						}
					}
					if ( 'spam' != $the_comment_status )
						$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . _c( 'Spam|verb' ) . '</a>';
					$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete vim-d vim-destructive'>" . __('Delete') . '</a>';
					$actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';
					$actions['quickedit'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\',\'edit\');return false;" class="vim-q" title="'.__('Quick Edit').'" href="#">' . __('Quick&nbsp;Edit') . '</a>';
					if ( 'spam' != $the_comment_status )
						$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$post->ID.'\');return false;" class="vim-r" title="'.__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';

					$actions = apply_filters( 'comment_row_actions', $actions, $comment );

					$i = 0;
					echo '<div class="row-actions">';
					foreach ( $actions as $action => $link ) {
						++$i;
						( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';

						// Reply and quickedit need a hide-if-no-js span when not added with ajax
						if ( ('reply' == $action || 'quickedit' == $action) && ! $from_ajax )
							$action .= ' hide-if-no-js';

						echo "<span class='$action'>$sep$link</span>";
					}
					echo '</div>';
				}

				echo '</td>';
				break;
			case 'author':
				echo "<td $attributes><strong>"; comment_author(); echo '</strong><br />';
				if ( !empty($author_url) )
					echo "<a title='$author_url' href='$author_url'>$author_url_display</a><br />";
				if ( current_user_can( 'edit_post', $post->ID ) ) {
					if ( !empty($comment->comment_author_email) ) {
						comment_author_email_link();
						echo '<br />';
					}
					echo '<a href="edit-comments.php?s=';
					comment_author_IP();
					echo '&amp;mode=detail';
					if ( 'spam' == $comment_status )
						echo '&amp;comment_status=spam';
					echo '">';
					comment_author_IP();
					echo '</a>';
				} //current_user_can
				echo '</td>';
				break;
			case 'date':
				echo "<td $attributes>" . get_comment_date(__('Y/m/d \a\t g:ia')) . '</td>';
				break;
			case 'response':
				if ( 'single' !== $mode ) {
					if ( isset( $_comment_pending_count[$post->ID] ) ) {
						$pending_comments = absint( $_comment_pending_count[$post->ID] );
					} else {
						$_comment_pending_count_temp = (array) get_pending_comments_num( array( $post->ID ) );
						$pending_comments = $_comment_pending_count[$post->ID] = $_comment_pending_count_temp[$post->ID];
					}
					if ( current_user_can( 'edit_post', $post->ID ) ) {
						$post_link = "<a href='" . get_edit_post_link($post->ID) . "'>";
						$post_link .= get_the_title($post->ID) . '</a>';
					} else {
						$post_link = get_the_title($post->ID);
					}
					echo "<td $attributes>\n";
					echo $post_link;

					echo '<div class="response-links"><span class="post-com-count-wrapper">';
					$pending_phrase = sprintf( __('%s pending'), number_format( $pending_comments ) );
					if ( $pending_comments )
						echo '<strong>';
					comments_number("<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?p=$post->ID' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
					if ( $pending_comments )
						echo '</strong>';
					echo '</span> ';
					echo "<a href='" . get_permalink( $post->ID ) . "'>#</a>";
					echo '</div></td>';
				}
		}
	}
	echo "</tr>\n";
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:101,代码来源:template.php

示例5: get_commentdata

                $commentdata = get_commentdata($rowc->comment_ID);
                ?>
				
					<!-- comment -->
					<p>
					<b><?php 
                comment_author();
                ?>
 ( <?php 
                comment_author_email_link();
                ?>
 / <?php 
                comment_author_url_link();
                ?>
 )</b> (IP: <?php 
                comment_author_IP();
                ?>
)
					<br />
					<?php 
                comment_text();
                ?>
					<br />
					<?php 
                comment_date('Y/m/d');
                ?>
 @ <?php 
                comment_time();
                ?>
<br />
					<?php 
开发者ID:ericandrewlewis,项目名称:b2,代码行数:31,代码来源:b2edit.showposts.php

示例6: get_comment_row

    function get_comment_row($comment_id, $comment_status, $checkbox = true)
    {
        global $comment, $post;
        $comment = get_comment($comment_id);
        $post = get_post($comment->comment_post_ID);
        $authordata = get_userdata($post->post_author);
        if (current_user_can('edit_post', $post->ID)) {
            $post_link = sprintf('<a href="%1$s">%2$s</a>', get_comment_link(), get_the_title($comment->comment_post_ID));
            $edit_link = sprintf('<a class="row-title" href="%1$s" title="%2$s">%3$s</a>', add_query_arg(array('c' => $comment->comment_ID, 'page' => 'flagged-comments'), get_option('siteurl') . '/wp-admin/'), $this->__('Edit comment'), get_comment_author());
        } else {
            $post_link = get_the_title($comment->comment_post_ID);
            $edit_link = get_comment_author();
        }
        $author_url = get_comment_author_url();
        if ('http://' == $author_url) {
            $author_url = '';
        }
        $author_url_display = $author_url;
        if (strlen($author_url_display) > 50) {
            $author_url_display = substr($author_url_display, 0, 49) . '...';
        }
        $ptime = date('G', strtotime($comment->comment_date));
        if (abs(time() - $ptime) < 86400) {
            $ptime = sprintf($this->__('%s ago'), human_time_diff($ptime));
        } else {
            $ptime = mysql2date($this->__('Y/m/d \\a\\t g:i A'), $comment->comment_date);
        }
        $url_args = array('c' => $comment->comment_ID, 'p' => $comment->comment_post_ID, 'page' => 'flagged-comments');
        $base_url = get_option('siteurl') . '/wp-admin/comment.php';
        $delete_url = add_query_arg(array_merge($url_args, array('action' => 'deletecomment', '_wpnonce' => wp_create_nonce("delete-comment_{$comment->comment_ID}"))), $base_url);
        $approve_url = add_query_arg(array_merge($url_args, array('action' => 'approvecomment', '_wpnonce' => wp_create_nonce("approve-comment_{$comment->comment_ID}"))), $base_url);
        $unapprove_url = add_query_arg(array_merge($url_args, array('action' => 'unapprovecomment', '_wpnonce' => wp_create_nonce("unapprove-comment_{$comment->comment_ID}"))), $base_url);
        $spam_url = add_query_arg('dt', 'spam', $delete_url);
        $unflag_url = add_query_arg(array_merge($url_args, array('action' => 'unflagcomment', '_wpnonce' => wp_create_nonce("unflag-comment_{$comment->comment_ID}"))), get_option('siteurl') . '/wp-admin/edit-comments.php');
        ?>
		<tr id="comment-<?php 
        echo $comment->comment_ID;
        ?>
" class='unapproved'>
			<?php 
        if ($checkbox) {
            ?>
				<td class="check-column"><?php 
            if (current_user_can('edit_post', $comment->comment_post_ID)) {
                ?>
					<input type="checkbox" name="unflag-comments[]" value="<?php 
                comment_ID();
                ?>
" />
				<?php 
            }
            ?>
</td>
			<?php 
        }
        ?>
			<td class="comment">
			<p class="comment-author"><strong><?php 
        echo $edit_link;
        ?>
</strong><br />
				<?php 
        if (!empty($author_url)) {
            ?>
					<a href="<?php 
            echo $author_url;
            ?>
"><?php 
            echo $author_url_display;
            ?>
</a> |
				<?php 
        }
        ?>
				<?php 
        if (current_user_can('edit_post', $post->ID)) {
            ?>
					<?php 
            if (!empty($comment->comment_author_email)) {
                ?>
						<?php 
                comment_author_email_link();
                ?>
 |
					<?php 
            }
            ?>
					<a href="edit-comments.php?s=<?php 
            comment_author_IP();
            ?>
&amp;mode=detail"><?php 
            comment_author_IP();
            ?>
</a>
				<?php 
        }
        //current_user_can
        ?>
    
			</p>
//.........这里部分代码省略.........
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:101,代码来源:flag-comments-no-totals.php

示例7: better_comment

function better_comment($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    extract($args, EXTR_SKIP);
    if ('article' == $args['style']) {
        $tag = 'div';
        $add_below = 'comment';
    } else {
        $tag = 'div';
        $add_below = 'comment';
    }
    ?>
		          <div class="comment_item" id="comment-<?php 
    comment_ID();
    ?>
">
<?php 
    ?>
             <div class="comment_avatar">
                 <?php 
    echo get_avatar($comment->comment_author_email, 40);
    ?>
             </div>
             <div class="comment_item_content">
                <div class="comment_item_body">
                    <span class="nickname"><?php 
    comment_author();
    ?>
&nbsp;</span>
<!--                    <span class="comment_item_text">-->
                    <?php 
    comment_text();
    ?>
<!--                    </span>-->
                </div>
                <div class="clear"></div>
                <div class="comment_item_footer">
                    <div class="comment_reply_link"><?php 
    comment_reply_link(array_merge($args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => 'Atsakyti')));
    ?>
</div>
                    <div class="comment_item_footer_separator_first">•</div>
                    <div class="comment_item_ip"><?php 
    comment_author_IP();
    ?>
</div>
                    <div class="comment_item_footer_separator">•</div>
                    <div class="comment_item_date"><time><?php 
    echo get_comment_date('Y-m-d H:i');
    ?>
</time></div>
                </div>
                <div class="clear"></div> 
             </div>
		<?php 
}
开发者ID:doobas,项目名称:kazinopaslaptys,代码行数:56,代码来源:functions.php

示例8: ksd_caught

function ksd_caught()
{
    global $wpdb, $comment;
    if (isset($_POST['submit']) && 'recover' == $_POST['action'] && !empty($_POST['not_spam'])) {
        $i = 0;
        foreach ($_POST['not_spam'] as $comment) {
            $comment = (int) $comment;
            if (function_exists('wp_set_comment_status')) {
                wp_set_comment_status($comment, 'approve');
            } else {
                $wpdb->query("UPDATE {$wpdb->comments} SET comment_approved = '1' WHERE comment_ID = '{$comment}'");
            }
            ksd_submit_nonspam_comment($comment);
            ++$i;
        }
        echo '<div class="updated"><p>' . sprintf(__('%1$s comments recovered.'), $i) . "</p></div>";
    }
    if ('delete' == $_POST['action']) {
        $delete_time = addslashes($_POST['display_time']);
        $nuked = $wpdb->query("DELETE FROM {$wpdb->comments} WHERE comment_approved = 'spam' AND '{$delete_time}' > comment_date_gmt");
        if (isset($nuked)) {
            echo '<div class="updated"><p>';
            if ($nuked) {
                _e('All spam deleted.');
            }
            echo "</p></div>";
        }
    }
    ?>
<div class="wrap">
<h2><?php 
    _e('Caught Spam');
    ?>
</h2>
<?php 
    $count = get_option('akismet_spam_count');
    if ($count) {
        ?>
<p><?php 
        printf(__('Akismet has caught <strong>%1$s</strong> for you since you installed it.'), $count);
        ?>
</p>
<?php 
    }
    $spam_count = ksd_spam_count();
    if (0 == $spam_count) {
        echo '<p>' . __('You have no spam currently in the queue. Must be your lucky day. :)') . '</p>';
        echo '</div>';
    } else {
        echo '<p>' . __('You can delete all of the spam from your database with a single click. This operation cannot be undone, so you may wish to check to ensure that no legitimate comments got through first. Spam is automattically deleted after 15 days, so don&#8217;t sweat it.') . '</p>';
        ?>
<form method="post" action="">
<input type="hidden" name="action" value="delete" />
<?php 
        printf(__('There are currently %1$s comments identified as spam.'), $spam_count);
        ?>
&nbsp; &nbsp; <input type="submit" name="Submit" value="<?php 
        _e('Delete all');
        ?>
" />
<input type="hidden" name="display_time" value="<?php 
        echo current_time('mysql', 1);
        ?>
" />
</form>
</div>
<div class="wrap">
<h2><?php 
        _e('Last 15 days');
        ?>
</h2>
<?php 
        echo '<p>' . __('These are the latest comments identified as spam by Akismet. If you see any mistakes, simple mark the comment as "not spam" and Akismet will learn from the submission. If you wish to recover a comment from spam, simply select the comment, and click Not Spam. After 15 days we clean out the junk for you.') . '</p>';
        $comments = $wpdb->get_results("SELECT *, COUNT(*) AS ccount FROM {$wpdb->comments} WHERE comment_approved = 'spam' GROUP BY comment_author_IP ORDER BY comment_date DESC LIMIT 150");
        if ($comments) {
            ?>
<form method="post" action="<?php 
            echo $_SERVER['REQUEST_URI'];
            ?>
">
<input type="hidden" name="action" value="recover" />
<ol id="spam-list" class="commentlist">
<?php 
            $i = 0;
            foreach ($comments as $comment) {
                $i++;
                $comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date);
                $post = get_post($comment->comment_post_ID);
                $post_title = $post->post_title;
                if ($i % 2) {
                    $class = 'class="alternate"';
                } else {
                    $class = '';
                }
                echo "\n\t<li id='comment-{$comment->comment_ID}' {$class}>";
                ?>
	<p><strong><?php 
                _e('Name:');
                ?>
</strong> <?php 
//.........这里部分代码省略.........
开发者ID:robertlange81,项目名称:Website,代码行数:101,代码来源:akismet.php

示例9: _wp_comment_row


//.........这里部分代码省略.........
                        }
                        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . __('Edit comment') . "'>" . __('Edit') . '</a>';
                        $actions['quickedit'] = '<a onclick="commentReply.open(\'' . $comment->comment_ID . '\',\'' . $post->ID . '\',\'edit\');return false;" class="vim-q" title="' . __('Quick Edit') . '" href="#">' . __('Quick&nbsp;Edit') . '</a>';
                        if ('spam' != $the_comment_status) {
                            $actions['reply'] = '<a onclick="commentReply.open(\'' . $comment->comment_ID . '\',\'' . $post->ID . '\');return false;" class="vim-r" title="' . __('Reply to this comment') . '" href="#">' . __('Reply') . '</a>';
                        }
                    }
                    $actions = apply_filters('comment_row_actions', $actions, $comment);
                    $i = 0;
                    echo '<div class="row-actions">';
                    foreach ($actions as $action => $link) {
                        ++$i;
                        ('approve' == $action || 'unapprove' == $action) && 2 === $i || 1 === $i ? $sep = '' : ($sep = ' | ');
                        // Reply and quickedit need a hide-if-no-js span when not added with ajax
                        if (('reply' == $action || 'quickedit' == $action) && !$from_ajax) {
                            $action .= ' hide-if-no-js';
                        } elseif ($action == 'untrash' && $the_comment_status == 'trash') {
                            if ('1' == get_comment_meta($comment_id, '_wp_trash_meta_status', true)) {
                                $action .= ' approve';
                            } else {
                                $action .= ' unapprove';
                            }
                        }
                        echo "<span class='{$action}'>{$sep}{$link}</span>";
                    }
                    echo '</div>';
                }
                echo '</td>';
                break;
            case 'author':
                echo "<td {$attributes}><strong>";
                comment_author();
                echo '</strong><br />';
                if (!empty($author_url)) {
                    echo "<a title='{$author_url}' href='{$author_url}'>{$author_url_display}</a><br />";
                }
                if ($user_can) {
                    if (!empty($comment->comment_author_email)) {
                        comment_author_email_link();
                        echo '<br />';
                    }
                    echo '<a href="edit-comments.php?s=';
                    comment_author_IP();
                    echo '&amp;mode=detail';
                    if ('spam' == $comment_status) {
                        echo '&amp;comment_status=spam';
                    }
                    echo '">';
                    comment_author_IP();
                    echo '</a>';
                }
                //current_user_can
                echo '</td>';
                break;
            case 'date':
                echo "<td {$attributes}>" . get_comment_date(__('Y/m/d \\a\\t g:ia')) . '</td>';
                break;
            case 'response':
                if ('single' !== $mode) {
                    if (isset($_comment_pending_count[$post->ID])) {
                        $pending_comments = absint($_comment_pending_count[$post->ID]);
                    } else {
                        $_comment_pending_count_temp = (array) get_pending_comments_num(array($post->ID));
                        $pending_comments = $_comment_pending_count[$post->ID] = $_comment_pending_count_temp[$post->ID];
                    }
                    if ($user_can) {
                        $post_link = "<a href='" . get_edit_post_link($post->ID) . "'>";
                        $post_link .= get_the_title($post->ID) . '</a>';
                    } else {
                        $post_link = get_the_title($post->ID);
                    }
                    echo "<td {$attributes}>\n";
                    echo '<div class="response-links"><span class="post-com-count-wrapper">';
                    echo $post_link . '<br />';
                    $pending_phrase = sprintf(__('%s pending'), number_format($pending_comments));
                    if ($pending_comments) {
                        echo '<strong>';
                    }
                    comments_number("<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count') . '</span></a>');
                    if ($pending_comments) {
                        echo '</strong>';
                    }
                    echo '</span> ';
                    echo "<a href='" . get_permalink($post->ID) . "'>#</a>";
                    echo '</div>';
                    if ('attachment' == $post->post_type && ($thumb = wp_get_attachment_image($post->ID, array(80, 60), true))) {
                        echo $thumb;
                    }
                    echo '</td>';
                }
                break;
            default:
                echo "<td {$attributes}>\n";
                do_action('manage_comments_custom_column', $column_name, $comment->comment_ID);
                echo "</td>\n";
                break;
        }
    }
    echo "</tr>\n";
}
开发者ID:bluedanbob,项目名称:wordpress,代码行数:101,代码来源:template.php

示例10: _e

    <h2><?php _e('Moderation Queue') ?></h2>
    <form name="approval" action="moderation.php" method="post">
    <?php wp_nonce_field('moderate-comments') ?>
    <input type="hidden" name="action" value="update" />
    <ol id="the-list" class="commentlist">
<?php
$i = 0;
    foreach($comments as $comment) {
	++$i;
	$comment_date = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $comment->comment_date);
	$post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID='$comment->comment_post_ID'");
	if ($i % 2) $class = 'class="alternate"';
	else $class = '';
	echo "\n\t<li id='comment-$comment->comment_ID' $class>"; 
	?>
	<p><strong><?php _e('Name:') ?></strong> <?php comment_author_link() ?> <?php if ($comment->comment_author_email) { ?>| <strong><?php _e('E-mail:') ?></strong> <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <strong><?php _e('URI:') ?></strong> <?php comment_author_url_link() ?> <?php } ?>| <strong><?php _e('IP:') ?></strong> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a> | <strong><?php _e('Date:') ?></strong> <?php comment_date(); ?></p>
<?php comment_text() ?>
<p><?php
echo '<a href="post.php?action=editcomment&amp;comment='.$comment->comment_ID.'">' . __('Edit') . '</a> | ';?>
<a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a> | 
<?php 
echo " <a href=\"" . wp_nonce_url("post.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . __("You are about to delete this comment.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete.") . "' );\">" . __('Delete just this comment') . "</a> | "; ?>  <?php _e('Bulk action:') ?>
	<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment-<?php echo $comment->comment_ID; ?>-approve" value="approve" /> <label for="comment-<?php echo $comment->comment_ID; ?>-approve"><?php _e('Approve') ?></label>
	<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment-<?php echo $comment->comment_ID; ?>-spam" value="spam" /> <label for="comment-<?php echo $comment->comment_ID; ?>-spam"><?php _e('Spam') ?></label>
	<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment-<?php echo $comment->comment_ID; ?>-delete" value="delete" /> <label for="comment-<?php echo $comment->comment_ID; ?>-delete"><?php _e('Delete') ?></label>
	<input type="radio" name="comment[<?php echo $comment->comment_ID; ?>]" id="comment-<?php echo $comment->comment_ID; ?>-nothing" value="later" checked="checked" /> <label for="comment-<?php echo $comment->comment_ID; ?>-nothing"><?php _e('Defer until later') ?></label>
	</p>

	</li>
<?php
    }
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:moderation.php

示例11: _wap_comment_list_item

    function _wap_comment_list_item($id, $view_all = false)
    {
        global $authordata, $comment, $wpdb;
        $id = (int) $id;
        $comment =& get_comment($id);
        $class = '';
        $post = get_post($comment->comment_post_ID);
        $authordata = get_userdata($post->post_author);
        $comment_status = wp_get_comment_status($comment->comment_ID);
        if ('unapproved' == $comment_status) {
            $class .= ' unapproved';
        } else {
            if (!$view_all) {
                return;
            }
        }
        echo "<li id='comment-{$comment->comment_ID}' class='{$class}'>";
        $post = get_post($comment->comment_post_ID, OBJECT, 'display');
        $post_title = wp_specialchars($post->post_title, 'double');
        $post_title = '' == $post_title ? "# {$comment->comment_post_ID}" : $post_title;
        ?>
    <p>
        <strong><?php 
        comment_author();
        ?>
</strong>        
        <br><span class="stamp"><?php 
        _e('Post', 'wap');
        ?>
: <a href="index.php?p=<?php 
        echo $comment->comment_post_ID;
        ?>
"><?php 
        echo $post_title;
        ?>
</a></span>
        <br/><span class="stamp"><?php 
        _e('Time', 'wap');
        ?>
:<?php 
        comment_date(__('Y-m-d H:i:s'));
        ?>
</span>
        <br/><span class="stamp"><?php 
        _e('IP', 'wap');
        ?>
: <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php 
        comment_author_IP();
        ?>
"><?php 
        comment_author_IP();
        ?>
</a></span>
        <?php 
        // email
        if ($comment->comment_author_email != '' && current_user_can('edit_post', $comment->comment_post_ID)) {
            ?>
 <br/><span class="stamp"><?php 
            _e('Email', 'wap');
            ?>
: <a href="<?php 
            echo $comment->comment_author_email;
            ?>
"><?php 
            echo $comment->comment_author_email;
            ?>
</a> </span> <?php 
        }
        if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) {
            ?>
 <br/><span class="stamp"><?php 
            _e('Site', 'wap');
            ?>
: <?php 
            comment_author_url_link();
            ?>
 </span> <?php 
        }
        ?>

    </p>
<?php 
        comment_text();
        ?>

<p> <br/> 
<?php 
        if (current_user_can('edit_post', $comment->comment_post_ID)) {
            echo '[<a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete', 'wap') . '</a> ';
            if ('none' != $comment_status && current_user_can('moderate_comments')) {
                if ('unapproved' != $comment_status) {
                    echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Pending', 'wap') . '</a> </span>';
                } else {
                    echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approved', 'wap') . '</a> </span>';
                }
            }
            echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', {$comment->comment_ID}, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam', 'wap') . "</a> ]";
        }
        ?>
  </p>
//.........这里部分代码省略.........
开发者ID:rfyiamcool,项目名称:solrex,代码行数:101,代码来源:functions.php

示例12: column_author

 /**
  * Render the author column HTML
  *
  * @param object $comment
  */
 function column_author($comment)
 {
     global $comment_status;
     $author_url = get_comment_author_url();
     if ('http://' == $author_url) {
         $author_url = '';
     }
     $author_url_display = preg_replace('|http://(www\\.)?|i', '', $author_url);
     if (strlen($author_url_display) > 50) {
         $author_url_display = substr($author_url_display, 0, 49) . '&hellip;';
     }
     echo "<strong>";
     comment_author();
     echo '</strong><br />';
     if (!empty($author_url)) {
         echo "<a title='{$author_url}' href='{$author_url}'>{$author_url_display}</a><br />";
     }
     if ($this->user_can) {
         if (!empty($comment->comment_author_email)) {
             comment_author_email_link();
             echo '<br />';
         }
         // Base link for current screen
         $link = add_query_arg('page', 'reviews', 'admin.php');
         echo '<a href="' . esc_url($link) . '&amp;s=';
         comment_author_IP();
         echo '&amp;mode=detail';
         if ('spam' == $comment_status) {
             echo '&amp;comment_status=spam';
         }
         echo '">';
         comment_author_IP();
         echo '</a>';
     }
 }
开发者ID:brian3t,项目名称:orchidmate,代码行数:40,代码来源:class-wc-reviews-list-table.php

示例13: _wp_comment_row


//.........这里部分代码省略.........
                    if ('trash' != $the_comment_status) {
                        $actions['edit'] = "<a href='comment.php?action=editcomment&amp;c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>" . __('Edit') . '</a>';
                        $actions['quickedit'] = '<a onclick="commentReply.open(\'' . $comment->comment_ID . '\',\'' . $post->ID . '\',\'edit\');return false;" class="vim-q" title="' . esc_attr__('Quick Edit') . '" href="#">' . __('Quick&nbsp;Edit') . '</a>';
                        if ('spam' != $the_comment_status) {
                            $actions['reply'] = '<a onclick="commentReply.open(\'' . $comment->comment_ID . '\',\'' . $post->ID . '\');return false;" class="vim-r" title="' . esc_attr__('Reply to this comment') . '" href="#">' . __('Reply') . '</a>';
                        }
                    }
                    $actions = apply_filters('comment_row_actions', array_filter($actions), $comment);
                    $i = 0;
                    echo '<div class="row-actions">';
                    foreach ($actions as $action => $link) {
                        ++$i;
                        ('approve' == $action || 'unapprove' == $action) && 2 === $i || 1 === $i ? $sep = '' : ($sep = ' | ');
                        // Reply and quickedit need a hide-if-no-js span when not added with ajax
                        if (('reply' == $action || 'quickedit' == $action) && !$from_ajax) {
                            $action .= ' hide-if-no-js';
                        } elseif ($action == 'untrash' && $the_comment_status == 'trash' || $action == 'unspam' && $the_comment_status == 'spam') {
                            if ('1' == get_comment_meta($comment_id, '_wp_trash_meta_status', true)) {
                                $action .= ' approve';
                            } else {
                                $action .= ' unapprove';
                            }
                        }
                        echo "<span class='{$action}'>{$sep}{$link}</span>";
                    }
                    echo '</div>';
                }
                echo '</td>';
                break;
            case 'author':
                echo "<td {$attributes}><strong>";
                comment_author();
                echo '</strong><br />';
                if (!empty($author_url)) {
                    echo "<a title='{$author_url}' href='{$author_url}'>{$author_url_display}</a><br />";
                }
                if ($user_can) {
                    if (!empty($comment->comment_author_email)) {
                        comment_author_email_link();
                        echo '<br />';
                    }
                    echo '<a href="edit-comments.php?s=';
                    comment_author_IP();
                    echo '&amp;mode=detail';
                    if ('spam' == $comment_status) {
                        echo '&amp;comment_status=spam';
                    }
                    echo '">';
                    comment_author_IP();
                    echo '</a>';
                }
                //current_user_can
                echo '</td>';
                break;
            case 'date':
                echo "<td {$attributes}>" . get_comment_date(__('Y/m/d \\a\\t g:ia')) . '</td>';
                break;
            case 'response':
                if ('single' !== $mode) {
                    if (isset($_comment_pending_count[$post->ID])) {
                        $pending_comments = absint($_comment_pending_count[$post->ID]);
                    } else {
                        $_comment_pending_count_temp = (array) get_pending_comments_num(array($post->ID));
                        $pending_comments = $_comment_pending_count[$post->ID] = $_comment_pending_count_temp[$post->ID];
                    }
                    if ($user_can) {
                        $post_link = "<a href='" . get_edit_post_link($post->ID) . "'>";
                        $post_link .= get_the_title($post->ID) . '</a>';
                    } else {
                        $post_link = get_the_title($post->ID);
                    }
                    echo "<td {$attributes}>\n";
                    echo '<div class="response-links"><span class="post-com-count-wrapper">';
                    echo $post_link . '<br />';
                    $pending_phrase = esc_attr(sprintf(__('%s pending'), number_format($pending_comments)));
                    if ($pending_comments) {
                        echo '<strong>';
                    }
                    comments_number("<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count') . '</span></a>');
                    if ($pending_comments) {
                        echo '</strong>';
                    }
                    echo '</span> ';
                    echo "<a href='" . get_permalink($post->ID) . "'>#</a>";
                    echo '</div>';
                    if ('attachment' == $post->post_type && ($thumb = wp_get_attachment_image($post->ID, array(80, 60), true))) {
                        echo $thumb;
                    }
                    echo '</td>';
                }
                break;
            default:
                echo "<td {$attributes}>\n";
                do_action('manage_comments_custom_column', $column_name, $comment->comment_ID);
                echo "</td>\n";
                break;
        }
    }
    echo "</tr>\n";
}
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:101,代码来源:template.php

示例14: get_comment_list_item

        function get_comment_list_item($id, $alt = 0, $reply = false)
        {
            global $authordata, $comment, $wpdb, $user_identity, $user_email, $user_url;
            get_currentuserinfo();
            $id = (int) $id;
            $comment =& get_comment($id);
            $class = '';
            $post = get_post($comment->comment_post_ID);
            $authordata = get_userdata($post->post_author);
            $comment_status = wp_get_comment_status($comment->comment_ID);
            if (isset($_GET['replyid'])) {
                $query = remove_query_arg('replyid');
            } else {
                $query = add_query_arg('replyid', $comment->comment_ID);
            }
            if ('unapproved' == $comment_status) {
                $class .= ' unapproved';
            }
            if ($alt % 2) {
                $class .= ' alternate';
            }
            echo "<li id='comment-{$comment->comment_ID}' class='{$class}'>";
            ?>
			<p><strong><?php 
            comment_author();
            ?>
</strong> <?php 
            if ($comment->comment_author_email) {
                ?>
| <?php 
                comment_author_email_link();
                ?>
 <?php 
            }
            if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) {
                ?>
 | <?php 
                comment_author_url_link();
                ?>
 <?php 
            }
            ?>
| <?php 
            _e('IP:');
            ?>
 <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php 
            comment_author_IP();
            ?>
"><?php 
            comment_author_IP();
            ?>
</a></p>

			<?php 
            comment_text();
            ?>

			<p><?php 
            comment_date(__('M j, g:i A'));
            ?>
 &#8212; [
			<?php 
            if (current_user_can('edit_post', $comment->comment_post_ID)) {
                echo " <a href='comment.php?action=editcomment&amp;c=" . $comment->comment_ID . "'>" . __('Edit') . '</a>';
                echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
                if ('none' != $comment_status && current_user_can('moderate_comments')) {
                    echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
                    echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&amp;p=' . $comment->comment_post_ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
                }
                echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=" . $comment->comment_post_ID . "&amp;c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', {$comment->comment_ID}, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ";
                echo " | <a href='" . $query . "' onclick=' return addReplyForm(\"" . get_option('siteurl') . "/wp-content/plugins/soc-comments/soc-comments-post.php\"," . $id . "," . $comment->comment_post_ID . ",\"" . $user_identity . "\",\"" . $user_email . "\",\"" . $user_url . "\",\"" . wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) . "\",\"" . add_query_arg('ajax', '1') . "\")' >" . __('Reply') . " </a>";
            }
            $post = get_post($comment->comment_post_ID);
            $post_title = wp_specialchars($post->post_title, 'double');
            $post_title = '' == $post_title ? "# {$comment->comment_post_ID}" : $post_title;
            ?>
 			] &#8212; <a href="<?php 
            echo get_permalink($comment->comment_post_ID);
            ?>
"><?php 
            echo $post_title;
            ?>
</a></p>
			
			<div id="com-<?php 
            echo $comment->comment_ID;
            ?>
" >
			<?php 
            if (true == $reply) {
                ?>
	
			<?php 
                if ('open' == $post->comment_status) {
                    ?>

			<form action="<?php 
                    echo get_option('siteurl');
                    ?>
/wp-comments-post.php" method="POST" id="comment-reply-form">
//.........这里部分代码省略.........
开发者ID:AkimBolushbek,项目名称:wordpress-soc-2007,代码行数:101,代码来源:soc-comments.php

示例15: __

    <th scope="col">' . __('IP') . '</th>
    <th scope="col">' . __('Comment Excerpt') . '</th>
	<th scope="col" colspan="3" style="text-align: center">' .  __('Actions') . '</th>
  </tr>
</thead>';
		foreach ($comments as $comment) {
		$authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"));
		$comment_status = wp_get_comment_status($comment->comment_ID);
		$class = ('alternate' == $class) ? '' : 'alternate';
		$class .= ('unapproved' == $comment_status) ? ' unapproved' : '';
?>
  <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'>
    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td>
    <td><?php comment_author_link() ?></td>
    <td><?php comment_author_email_link() ?></td>
    <td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td>
    <td><?php comment_excerpt(); ?></td>
    <td>
    	<?php if ('unapproved' == $comment_status) { ?>
    		(Unapproved)
    	<?php } else { ?>
    		<a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a>
    	<?php } ?>
    </td>
    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
	echo "<a href='comment.php?action=editcomment&amp;c=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td>
    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
		echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by '%s'. \n  'Cancel' to stop, 'OK' to delete."), $comment->comment_author ))  . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> ";
		} ?></td>
  </tr>
		<?php 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:edit-comments.php


注:本文中的comment_author_IP函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。