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


PHP get_edit_comment_link函数代码示例

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


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

示例1: thematic_commentmeta

 function thematic_commentmeta($print = TRUE)
 {
     $content = '<div class="comment-meta">' . sprintf(__('Posted %1$s at %2$s <span class="meta-sep">|</span> <a href="%3$s" title="Permalink to this comment">Permalink</a>', 'thematic'), get_comment_date(), get_comment_time(), '#comment-' . get_comment_ID());
     if (get_edit_comment_link()) {
         $content .= sprintf(' <span class="meta-sep">|</span><span class="edit-link"> <a class="comment-edit-link" href="%1$s" title="%2$s">%3$s</a></span>', get_edit_comment_link(), __('Edit comment'), __('Edit', 'thematic'));
     }
     $content .= '</div>' . "\n";
     return $print ? print apply_filters('thematic_commentmeta', $content) : apply_filters('thematic_commentmeta', $content);
 }
开发者ID:StudentLifeMarketingAndDesign,项目名称:krui-wp,代码行数:9,代码来源:discussion-extensions.php

示例2: cleanyetibasic_commentmeta

 /**
  * Create comment meta
  * 
  * Located in discussion.php
  * 
  * Override: childtheme_override_commentmeta <br>
  * Filter: cleanyetibasic_commentmeta
  */
 function cleanyetibasic_commentmeta($print = TRUE)
 {
     $content = '<div class="comment-meta">' . sprintf(_x('Posted %s at %s', 'Posted {$date} at {$time}', 'cleanyetibasic'), get_comment_date(), get_comment_time());
     $content .= ' <span class="meta-sep">|</span> ' . sprintf('<a href="%1$s" title="%2$s">%3$s</a>', '#comment-' . get_comment_ID(), __('Permalink to this comment', 'cleanyetibasic'), __('Permalink', 'cleanyetibasic'));
     if (get_edit_comment_link()) {
         $content .= sprintf(' <span class="meta-sep">|</span><span class="edit-link"> <a class="comment-edit-link" href="%1$s" title="%2$s">%3$s</a></span>', get_edit_comment_link(), __('Edit comment', 'cleanyetibasic'), __('Edit', 'cleanyetibasic'));
     }
     $content .= '</div>' . "\n";
     return $print ? print apply_filters('cleanyetibasic_commentmeta', $content) : apply_filters('cleanyetibasic_commentmeta', $content);
 }
开发者ID:shoaibik,项目名称:clean-yeti-basic,代码行数:18,代码来源:discussion-extensions.php

示例3: editCommentLink

 /**
  * Alias simply isn't enough for edit_comment_link()
  * @param string $link
  * @param type $id
  * @param string $before
  * @param string $after
  * @return string HTML link
  */
 public static function editCommentLink($link = null, $id, $before = '', $after = '')
 {
     if (!current_user_can('edit_comment', $id)) {
         return;
     }
     if (is_null($link)) {
         $link = __('Edit This', 'ait');
     }
     $link = '<a class="comment-edit-link" href="' . get_edit_comment_link($id) . '" title="' . esc_attr__('Edit comment') . '">' . $link . '</a>';
     echo $before . apply_filters('edit_comment_link', $link, $id) . $after;
 }
开发者ID:simeont9,项目名称:stoneopen,代码行数:19,代码来源:WpLatteFunctions.php

示例4: st_comment

    function st_comment($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case 'comment':
                global $st_Settings;
                ?>

						<li id="comment-<?php 
                comment_ID();
                ?>
" class="comment">
	
							<?php 
                $avatar_size = '0' != $comment->comment_parent ? 50 : 75;
                $comment_author = get_the_author_meta('user_email') == $comment->comment_author_email ? ' bypostauthor' : '';
                $comment_level = '0' == $comment->comment_parent ? ' class="comment-holder comment-top-level' . $comment_author . '"' : ' class="comment-holder comment-low-level' . $comment_author . '"';
                $out = '<div' . $comment_level . '>';
                // Gravatar
                $out .= '<div class="avatar-box">' . get_avatar($comment, $avatar_size) . '</div>';
                $out .= '<div class="comment-box">';
                // Author name
                $out .= '<div class="comment-author" id="author-' . get_comment_ID() . '">' . get_comment_author_link() . '</div>';
                // Date
                $out .= '<div class="comment-date">';
                if (!empty($st_Settings['nice_time']) && $st_Settings['nice_time'] == 'yes' && function_exists('st_niceTime')) {
                    $out .= st_niceTime(get_comment_date('c', get_comment_ID()));
                } else {
                    $out .= get_comment_date() . ' ' . __('at', 'strictthemes') . ' ' . get_comment_time();
                }
                $out .= '</div>';
                // Comment
                $out .= wpautop(get_comment_text());
                if (comments_open()) {
                    // Reply/Cancel links
                    $out .= '<span class="reply non-selectable">' . '<a title="' . get_comment_ID() . '" class="quick-reply" href="' . get_permalink() . '?replytocom=' . get_comment_ID() . '#respond">' . __('Reply', 'strictthemes') . '</a>' . '<a class="quick-reply-cancel none" href="#">' . __('Cancel', 'strictthemes') . '</a>' . '</span>';
                }
                // Edit link
                if (current_user_can('manage_options')) {
                    $out .= ' - <a href="' . get_edit_comment_link() . '">' . __('Edit', 'strictthemes') . '</a>';
                }
                // Pre-moderation
                if ($comment->comment_approved == '0') {
                    $out .= '<p><em class="comment-awaiting-moderation">' . __('Your comment is awaiting moderation.', 'strictthemes') . '</em></p>';
                }
                $out .= '<div class="quick-holder" id="quick-holder-' . get_comment_ID() . '"></div></div><div class="clear"><!-- --></div>';
                // .comment-box
                $out .= '</div>';
                // .$comment_level
                $out .= '<div class="clear"><!-- --></div>';
                echo $out;
                break;
        }
    }
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:54,代码来源:comment.php

示例5: thematic_commentmeta

 /**
  * Create comment meta
  * 
  * Located in discussion.php
  * 
  * Override: childtheme_override_commentmeta <br>
  * Filter: thematic_commentmeta
  */
 function thematic_commentmeta($print = true)
 {
     $content = '<div class="comment-meta">';
     $content .= '<time datetime="' . get_comment_time('c') . '">';
     $content .= sprintf(_x('Posted %s at %s', 'Posted {$date} at {$time}', 'thematic'), get_comment_date(), get_comment_time());
     $content .= '</time>';
     $content .= ' <span class="meta-sep">|</span> ' . sprintf('<a href="%1$s">%2$s</a>', '#comment-' . get_comment_ID(), __('Permalink', 'thematic'));
     if (get_edit_comment_link()) {
         $content .= sprintf(' <span class="meta-sep">|</span><span class="edit-link"> <a class="comment-edit-link" href="%1$s">%2$s</a></span>', get_edit_comment_link(), __('Edit', 'thematic'));
     }
     $content .= '</div>' . "\n";
     return $print ? print apply_filters('thematic_commentmeta', $content) : apply_filters('thematic_commentmeta', $content);
 }
开发者ID:scottnix,项目名称:Thematic,代码行数:21,代码来源:discussion-extensions.php

示例6: st_pingback

    function st_pingback($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        switch ($comment->comment_type) {
            case 'pingback':
                global $st_Settings;
                ?>

						<li id="comment-<?php 
                comment_ID();
                ?>
" class="pingback">
	
							<?php 
                $out = '<div class="pingback-holder">';
                $out .= '<div class="pingback-box">';
                // Title
                $out .= '<div class="pingback-author" id="author-' . get_comment_ID() . '">' . get_comment_author_link();
                // Edit link
                if (current_user_can('manage_options')) {
                    $out .= ' - <a href="' . get_edit_comment_link() . '"><small>' . __('Edit', 'strictthemes') . '</small></a>';
                }
                $out .= '</div>';
                // Date
                $out .= '<div class="pingback-date">';
                if (!empty($st_Settings['nice_time']) && $st_Settings['nice_time'] == 'yes' && function_exists('st_niceTime')) {
                    $out .= st_niceTime(get_comment_date('c', get_comment_ID()));
                } else {
                    $out .= get_comment_date() . ' ' . __('at', 'strictthemes') . ' ' . get_comment_time();
                }
                $out .= '</div>';
                $out .= '</div>';
                $out .= '<div class="clear"><!-- --></div>';
                echo $out;
                break;
        }
    }
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:37,代码来源:pingback.php

示例7: show_comment_html

    public function show_comment_html($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        $l10n_domain = $this->options->get('cgb_l10n_domain');
        $is_comment_from_other_page = get_the_ID() != $comment->comment_post_ID;
        $other_page_title = $is_comment_from_other_page ? get_the_title($comment->comment_post_ID) : '';
        $other_page_link = $is_comment_from_other_page ? '<a href="' . get_page_link($comment->comment_post_ID) . '">' . $other_page_title . '</a>' : '';
        switch ($comment->comment_type) {
            case 'pingback':
            case 'trackback':
                echo '
					<li class="post pingback">
					<p>' . __('Pingback:', $l10n_domain) . get_comment_author_link() . get_edit_comment_link(__('Edit', $l10n_domain), '<span class="edit-link">', '</span>') . '</p>';
                break;
            default:
                echo '
					<li ' . comment_class('', null, null, false) . ' id="li-comment-' . get_comment_ID() . '">
						<article id="comment-' . get_comment_ID() . '" class="comment">';
                eval('?>' . $this->options->get('cgb_comment_html'));
                echo '
						</article><!-- #comment-## -->';
                break;
        }
    }
开发者ID:andreasylivainio,项目名称:kangos.com,代码行数:24,代码来源:comments-functions.php

示例8: beans_comment_links

/**
 * Echo the comment links.
 *
 * @since 1.0.0
 */
function beans_comment_links()
{
    global $comment;
    echo beans_open_markup('beans_comment_links', 'ul', array('class' => 'tm-comment-links uk-subnav uk-subnav-line'));
    // Reply.
    echo get_comment_reply_link(array_merge($comment->args, array('add_below' => 'comment-content', 'depth' => $comment->depth, 'max_depth' => $comment->args['max_depth'], 'before' => beans_open_markup('beans_comment_item[_reply]', 'li'), 'after' => beans_close_markup('beans_comment_item[_reply]', 'li'))));
    // Edit.
    if (current_user_can('moderate_comments')) {
        echo beans_open_markup('beans_comment_item[_edit]', 'li');
        echo beans_open_markup('beans_comment_item_link[_edit]', 'a', array('href' => esc_url(get_edit_comment_link($comment->comment_ID))));
        echo beans_output('beans_comment_edit_text', __('Edit', 'tm-beans'));
        echo beans_close_markup('beans_comment_item_link[_edit]', 'a');
        echo beans_close_markup('beans_comment_item[_edit]', 'li');
    }
    // Link.
    echo beans_open_markup('beans_comment_item[_link]', 'li');
    echo beans_open_markup('beans_comment_item_link[_link]', 'a', array('href' => esc_url(get_comment_link($comment->comment_ID))));
    echo beans_output('beans_comment_link_text', __('Link', 'tm-beans'));
    echo beans_close_markup('beans_comment_item_link[_link]', 'a');
    echo beans_close_markup('beans_comment_item[_link]', 'li');
    echo beans_close_markup('beans_comment_links', 'ul');
}
开发者ID:MatRouault,项目名称:Beans,代码行数:27,代码来源:comments.php

示例9: tc_comment_callback

    /**
     * Template for comments and pingbacks.
     *
     *
     * Used as a callback by wp_list_comments() for displaying the comments.
     *  Inspired from Twenty Twelve 1.0
     * @package Customizr
     * @since Customizr 1.0 
     */
    function tc_comment_callback($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        //get user defined max comment depth
        $max_comments_depth = get_option('thread_comments_depth');
        $max_comments_depth = isset($max_comments_depth) ? $max_comments_depth : 5;
        ob_start();
        switch ($comment->comment_type) {
            case 'pingback':
            case 'trackback':
                // Display trackbacks differently than normal comments.
                ?>
      <li <?php 
                comment_class();
                ?>
 id="comment-<?php 
                comment_ID();
                ?>
">
        <article id="comment-<?php 
                comment_ID();
                ?>
" class="comment">
          <p><?php 
                _e('Pingback:', 'customizr');
                ?>
 <?php 
                comment_author_link();
                ?>
 <?php 
                edit_comment_link(__('(Edit)', 'customizr'), '<span class="edit-link btn btn-success btn-mini">', '</span>');
                ?>
</p>
        </article>
      <?php 
                break;
            default:
                // Proceed with normal comments.
                global $post;
                ?>
      <li <?php 
                comment_class();
                ?>
 id="li-comment-<?php 
                comment_ID();
                ?>
">
        
          <?php 
                //when do we display the comment content?
                $tc_show_comment_content = 1 == get_option('thread_comments') && $depth < $max_comments_depth && comments_open();
                //gets the comment text => filter parameter!
                $comment_text = get_comment_text($comment->comment_ID, $args);
                printf('<article class="comment"><div class="%1$s"><div class="%2$s">%3$s</div><div class="%4$s">%5$s %6$s %7$s %8$s</div></div></article>', apply_filters('tc_comment_wrapper_class', 'row-fluid'), apply_filters('tc_comment_avatar_class', 'comment-avatar span2'), get_avatar($comment, apply_filters('tc_comment_avatar_size', 80)), apply_filters('tc_comment_content_class', 'span10'), $tc_show_comment_content ? sprintf('<div class="%1$s">%2$s</div>', apply_filters('tc_comment_reply_btn_class', 'reply btn btn-small'), get_comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'customizr') . ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'add_below' => apply_filters('tc_comment_reply_below', 'li-comment'))))) : '', sprintf('<header class="comment-meta comment-author vcard">%1$s %2$s</header>', sprintf('<cite class="fn">%1$s %2$s %3$s</cite>', get_comment_author_link(), $comment->user_id === $post->post_author ? '<span> ' . __('Post author', 'customizr') . '</span>' : '', current_user_can('edit_comment', $comment->comment_ID) ? '<p class="edit-link btn btn-success btn-mini"><a class="comment-edit-link" href="' . get_edit_comment_link($comment->comment_ID) . '">' . __('Edit', 'customizr') . '</a></p>' : ''), sprintf('<a class="comment-date" href="%1$s"><time datetime="%2$s">%3$s</time></a>', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'), sprintf(__('%1$s at %2$s', 'customizr'), get_comment_date(), get_comment_time()))), '0' == $comment->comment_approved ? sprintf('<p class="comment-awaiting-moderation">%1$s</p>', __('Your comment is awaiting moderation.', 'customizr')) : '', sprintf('<section class="comment-content comment">%1$s</section>', apply_filters('comment_text', $comment_text, $comment, $args)));
                //end printf
                ?>
        <!-- #comment-## -->
      <?php 
                break;
        }
        // end comment_type check
        $html = ob_get_contents();
        if ($html) {
            ob_end_clean();
        }
        echo apply_filters('tc_comment_callback', $html, $comment, $args, $depth, $max_comments_depth);
    }
开发者ID:pradeep-web,项目名称:brandt,代码行数:76,代码来源:class-content-comments.php

示例10: get_object_link

 /**
  * {@inheritdoc }
  */
 public function get_object_link($object_id)
 {
     $comment = get_comment($object_id);
     return sprintf('<a href="%s">Comment #%d</a>', get_edit_comment_link($object_id), $object_id);
 }
开发者ID:nihrain,项目名称:accelerate,代码行数:8,代码来源:class-comment-form.php

示例11: manage_links

    /**
     * hooked to bsocial_comments_manage_links outputs manage UI for a comment
     */
    public function manage_links($comment)
    {
        ?>
		<li class="approve-link"><?php 
        echo wp_kses_post($this->get_status_link($comment->comment_ID, 'approve'));
        ?>
</li>
		<li class="feature-link"><?php 
        echo wp_kses_post($this->featured_comments()->get_feature_link($comment->comment_ID));
        ?>
</li>
		<li class="edit-link">
			<a class="comment-edit-link" href="<?php 
        echo esc_url(get_edit_comment_link($comment->comment_ID));
        ?>
">Edit</a>
		</li>
		<li class="spam-link"><?php 
        echo wp_kses_post($this->get_status_link($comment->comment_ID, 'spam'));
        ?>
</li>
		<li class="trash-link"><?php 
        echo wp_kses_post($this->get_status_link($comment->comment_ID, 'trash'));
        ?>
</li>
		<?php 
    }
开发者ID:kgneil,项目名称:bsocial-comments,代码行数:30,代码来源:class-bsocial-comments.php

示例12: start_el

    /** START_EL */
    function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0)
    {
        $depth++;
        $GLOBALS['comment_depth'] = $depth;
        $GLOBALS['comment'] = $comment;
        global $post;
        ?>

		<li <?php 
        comment_class();
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
			<span class="comment-avatar <?php 
        echo $comment->user_id === $post->post_author ? 'thumbnail' : '';
        ?>
">
				<?php 
        if ($comment->user_id === $post->post_author) {
            echo get_avatar($comment, 54);
        } else {
            echo get_avatar($comment, 64);
        }
        ?>
			</span>
			<div class="comment-body">
				<h4 class="comment-author vcard">
					<?php 
        printf('<cite>%1$s %2$s</cite>', get_comment_author_link(), $comment->user_id === $post->post_author ? '<span class="bypostauthor label label-primary"> ' . __('Post author', "toolset_starter") . '</span>' : '');
        ?>
				</h4>
				<?php 
        printf('<a href="%1$s"><time class="comment-date" datetime="%2$s">%3$s</time></a>', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'), sprintf('%1$s ' . __('at', "toolset_starter") . ' %2$s', get_comment_date(), get_comment_time()));
        ?>

				<?php 
        if ('0' == $comment->comment_approved) {
            ?>
					<p class="alert alert-info comment-awaiting-moderation">
						<?php 
            _e('Your comment is awaiting moderation.', "toolset_starter");
            ?>
					</p>
				<?php 
        }
        ?>

				<div class="comment-content">
					<?php 
        comment_text();
        ?>
				</div>

				<div class="reply">
					<a class="btn btn-default btn-xs edit-link"
					   href="<?php 
        echo get_edit_comment_link();
        ?>
"><?php 
        _e('Edit', "toolset_starter");
        ?>
</a>
					<?php 
        comment_reply_link(array_merge($args, array('reply_text' => '<span class="btn btn-default btn-xs">' . __('Reply', "toolset_starter") . '</span>', 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
				</div>

				<?php 
        if (empty($args['has_children'])) {
            ?>
			</div>
			<?php 
        }
        ?>

			<?php 
    }
开发者ID:twelch555,项目名称:core_toolsetstarter,代码行数:80,代码来源:bootstrap-wordpress.php

示例13: start_el

    /** START_EL */
    function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0)
    {
        $depth++;
        $GLOBALS['comment_depth'] = $depth;
        $GLOBALS['comment'] = $comment;
        $parent_class = empty($args['has_children']) ? '' : 'parent';
        ?>
		
		<li <?php 
        comment_class($parent_class);
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
			
			<div class="comment-c">
				
				<ul class="comment-meta">
					<li class="comment-author">
						<?php 
        echo get_comment_author_link();
        ?>
						<?php 
        //echo ( $args['avatar_size'] != 0 ? get_avatar( $comment, $args['avatar_size'] ) : '' );
        ?>
					</li>
					<li class="comment-date">
						<?php 
        comment_date();
        ?>
					</li>
					<li class="comment-time">
						 <?php 
        comment_time();
        ?>
					</li>
					<?php 
        if (get_edit_comment_link()) {
            ?>
						<li class="comment-edit">
							<?php 
            edit_comment_link('<span data-icon="edit"></span>');
            ?>
						</li>
					<?php 
        }
        ?>
					<li class="comment-reply">
						<?php 
        $reply_args = array('depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => '<span data-icon="reply-single"></span>');
        comment_reply_link(array_merge($args, $reply_args));
        ?>
					</li>
					<li class="comment-permalink">
						<a href="<?php 
        echo htmlspecialchars(get_comment_link(get_comment_ID()));
        ?>
"><span data-icon="link"></span></a>
					</li>
				</ul>

				<div class="comment-content">
					
					<?php 
        if (!$comment->comment_approved) {
            ?>
						<em class="comment-awaiting-moderation">Your comment is awaiting moderation.</em>
					
					<?php 
        } else {
            ?>
						<?php 
            comment_text();
            ?>
						
					<?php 
        }
        ?>
				</div>
				
			</div>

	<?php 
    }
开发者ID:Tiger66639,项目名称:electrify,代码行数:86,代码来源:comments.php

示例14: edit_comment_link

/**
 * Display or retrieve edit comment link with formatting.
 *
 * @since 1.0.0
 *
 * @param string $link Optional. Anchor text.
 * @param string $before Optional. Display before edit link.
 * @param string $after Optional. Display after edit link.
 * @return string|null HTML content, if $echo is set to false.
 */
function edit_comment_link($link = null, $before = '', $after = '')
{
    global $comment;
    if (!current_user_can('edit_comment', $comment->comment_ID)) {
        return;
    }
    if (null === $link) {
        $link = __('Edit This');
    }
    $link = '<a class="comment-edit-link" href="' . get_edit_comment_link($comment->comment_ID) . '" title="' . esc_attr__('Edit comment') . '">' . $link . '</a>';
    echo $before . apply_filters('edit_comment_link', $link, $comment->comment_ID) . $after;
}
开发者ID:vpatrinica,项目名称:jfdesign,代码行数:22,代码来源:link-template.php

示例15: bp_dtheme_blog_comments


//.........这里部分代码省略.........
     */
    function bp_dtheme_blog_comments($comment, $args, $depth)
    {
        $GLOBALS['comment'] = $comment;
        if ('pingback' == $comment->comment_type) {
            return false;
        }
        if (1 == $depth) {
            $avatar_size = 50;
        } else {
            $avatar_size = 25;
        }
        ?>

	<li <?php 
        comment_class();
        ?>
 id="comment-<?php 
        comment_ID();
        ?>
">
		<div class="comment-avatar-box">
			<div class="avb">
				<a href="<?php 
        echo get_comment_author_url();
        ?>
" rel="nofollow">
					<?php 
        if ($comment->user_id) {
            ?>
						<?php 
            echo bp_core_fetch_avatar(array('item_id' => $comment->user_id, 'width' => $avatar_size, 'height' => $avatar_size, 'email' => $comment->comment_author_email));
            ?>
					<?php 
        } else {
            ?>
						<?php 
            echo get_avatar($comment, $avatar_size);
            ?>
					<?php 
        }
        ?>
				</a>
			</div>
		</div>

		<div class="comment-content">
			<div class="comment-meta">
				<p>
					<?php 
        /* translators: 1: comment author url, 2: comment author name, 3: comment permalink, 4: comment date/timestamp*/
        printf(__('<a href="%1$s" rel="nofollow">%2$s</a> said on <a href="%3$s"><span class="time-since">%4$s</span></a>', 'buddypress'), get_comment_author_url(), get_comment_author(), get_comment_link(), get_comment_date());
        ?>
				</p>
			</div>

			<div class="comment-entry">
				<?php 
        if ($comment->comment_approved == '0') {
            ?>
				 	<em class="moderate"><?php 
            _e('Your comment is awaiting moderation.', 'buddypress');
            ?>
</em>
				<?php 
        }
        ?>

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

			<div class="comment-options">
					<?php 
        if (comments_open()) {
            ?>
						<?php 
            comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth']));
            ?>
					<?php 
        }
        ?>

					<?php 
        if (current_user_can('edit_comment', $comment->comment_ID)) {
            ?>
						<?php 
            printf('<a class="button comment-edit-link bp-secondary-action" href="%1$s" title="%2$s">%3$s</a> ', get_edit_comment_link($comment->comment_ID), esc_attr__('Edit comment', 'buddypress'), __('Edit', 'buddypress'));
            ?>
					<?php 
        }
        ?>

			</div>

		</div>

<?php 
    }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:101,代码来源:functions.php


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