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


PHP _wp_comment_row函数代码示例

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


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

示例1: _e

    <th scope="col" class="check-column"><input type="checkbox" /></th>
    <th scope="col"><?php _e('Comment') ?></th>
    <th scope="col"><?php _e('Date') ?></th>
    <th scope="col" class="action-links"><?php _e('Actions') ?></th>
  </tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php
	foreach ($comments as $comment)
		_wp_comment_row( $comment->comment_ID, $mode, $comment_status );
?>
</tbody>
<tbody id="the-extra-comment-list" class="list:comment" style="display: none;">
<?php
	foreach ($extra_comments as $comment)
		_wp_comment_row( $comment->comment_ID, $mode, $comment_status );
?>
</tbody>
</table>

</form>

<form id="get-extra-comments" method="post" action="" class="add:the-extra-comment-list:" style="display: none;">
	<input type="hidden" name="s" value="<?php echo $search; ?>" />
	<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
	<input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" />
	<input type="hidden" name="page" value="<?php echo isset($_REQUEST['page']) ? absint( $_REQUEST['page'] ) : 1; ?>" />
	<?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?>
</form>

<div id="ajax-response"></div>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:edit-comments.php

示例2: _e

        ?>
</th>
    <th scope="col" class="column-author"><?php 
        _e('Author');
        ?>
</th>
    <th scope="col" class="column-date"><?php 
        _e('Submitted');
        ?>
</th>
  </tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php 
        foreach ($comments as $comment) {
            _wp_comment_row($comment->comment_ID, 'single', false, false);
        }
        ?>
</tbody>
</table>

<?php 
        wp_comment_reply();
    }
    // comments
}
// posts;
?>

</div>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:edit-pages.php

示例3: die

     if ('' == $_POST['content']) {
         die(__('Error: please type a comment.'));
     }
     $comment_id = (int) $_POST['comment_ID'];
     $_POST['comment_status'] = $_POST['status'];
     edit_comment();
     $mode = isset($_POST['mode']) && 'single' == $_POST['mode'] ? 'single' : 'detail';
     $position = isset($_POST['position']) && (int) $_POST['position'] ? (int) $_POST['position'] : '-1';
     $checkbox = isset($_POST['checkbox']) && true == $_POST['checkbox'] ? 1 : 0;
     $comments_listing = isset($_POST['comments_listing']) ? $_POST['comments_listing'] : '';
     if (get_option('show_avatars') && 'single' != $mode) {
         add_filter('comment_author', 'floated_admin_avatar');
     }
     $x = new WP_Ajax_Response();
     ob_start();
     _wp_comment_row($comment_id, $mode, $comments_listing, $checkbox);
     $comment_list_item = ob_get_contents();
     ob_end_clean();
     $x->add(array('what' => 'edit_comment', 'id' => $comment->comment_ID, 'data' => $comment_list_item, 'position' => $position));
     $x->send();
     break;
 case 'add-meta':
     check_ajax_referer('add-meta');
     $c = 0;
     $pid = (int) $_POST['post_id'];
     if (isset($_POST['metakeyselect']) || isset($_POST['metakeyinput'])) {
         if (!current_user_can('edit_post', $pid)) {
             die('-1');
         }
         if (isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput'])) {
             die('1');
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:31,代码来源:admin-ajax.php

示例4: die

     }
     if ('' == $_POST['content']) {
         die(__('Error: please type a comment.'));
     }
     $comment_id = (int) $_POST['comment_ID'];
     $_POST['comment_status'] = $_POST['status'];
     edit_comment();
     $mode = isset($_POST['mode']) && 'single' == $_POST['mode'] ? 'single' : 'detail';
     $position = isset($_POST['position']) && (int) $_POST['position'] ? (int) $_POST['position'] : '-1';
     $checkbox = isset($_POST['checkbox']) && true == $_POST['checkbox'] ? 1 : 0;
     if (get_option('show_avatars') && 'single' != $mode) {
         add_filter('comment_author', 'floated_admin_avatar');
     }
     $x = new WP_Ajax_Response();
     ob_start();
     _wp_comment_row($comment_id, $mode, true, $checkbox);
     $comment_list_item = ob_get_contents();
     ob_end_clean();
     $x->add(array('what' => 'edit_comment', 'id' => $comment->comment_ID, 'data' => $comment_list_item, 'position' => $position));
     $x->send();
     break;
 case 'add-meta':
     check_ajax_referer('add-meta');
     $c = 0;
     $pid = (int) $_POST['post_id'];
     if (isset($_POST['metakeyselect']) || isset($_POST['metakeyinput'])) {
         if (!current_user_can('edit_post', $pid)) {
             die('-1');
         }
         if ('#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput'])) {
             die('1');
开发者ID:SymbiSoft,项目名称:litprojects,代码行数:31,代码来源:admin-ajax.php

示例5: _e

	?>

<br class="clear" />

<table class="widefat" style="margin-top: .5em">
<thead>
  <tr>
    <th scope="col"><?php _e('Comment') ?></th>
    <th scope="col"><?php _e('Date') ?></th>
    <th scope="col"><?php _e('Actions') ?></th>
  </tr>
</thead>
<tbody id="the-comment-list" class="list:comment">
<?php
        foreach ($comments as $comment)
                _wp_comment_row( $comment->comment_ID, 'detail', false, false );
?>
</tbody>
</table>

<?php

endif; // comments
endif; // posts;

?>

</div>

<?php include('admin-footer.php'); ?>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:upload.php

示例6: die

     if (!current_user_can('edit_post', $id)) {
         die('-1');
     }
     $search = isset($_POST['s']) ? $_POST['s'] : false;
     $start = isset($_POST['page']) ? intval($_POST['page']) * 25 - 1 : 24;
     $status = isset($_POST['comment_status']) ? $_POST['comment_status'] : false;
     $mode = isset($_POST['mode']) ? $_POST['mode'] : 'detail';
     list($comments, $total) = _wp_get_comment_list($status, $search, $start, 1);
     if (!$comments) {
         die('1');
     }
     $x = new WP_Ajax_Response();
     foreach ((array) $comments as $comment) {
         get_comment($comment);
         ob_start();
         _wp_comment_row($comment->comment_ID, $mode, false);
         $comment_list_item = ob_get_contents();
         ob_end_clean();
         $x->add(array('what' => 'comment', 'id' => $comment->comment_ID, 'data' => $comment_list_item));
     }
     $x->send();
     break;
 case 'add-meta':
     check_ajax_referer('add-meta');
     $c = 0;
     $pid = (int) $_POST['post_id'];
     if (isset($_POST['metakeyselect']) || isset($_POST['metakeyinput'])) {
         if (!current_user_can('edit_post', $pid)) {
             die('-1');
         }
         if ('#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput'])) {
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:admin-ajax.php


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