本文整理汇总了PHP中bbp_reply_id函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_reply_id函数的具体用法?PHP bbp_reply_id怎么用?PHP bbp_reply_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bbp_reply_id函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bbp_move_reply_form_fields
</div>
</div>
<?php
bbp_move_reply_form_fields();
?>
</fieldset>
</form>
</div>
<?php
} else {
?>
<div id="no-reply-<?php
bbp_reply_id();
?>
" class="bbp-no-reply">
<div class="entry-content"><?php
is_user_logged_in() ? _e('You do not have the permissions to edit this reply!', 'bbpress') : _e('You cannot edit this reply.', 'bbpress');
?>
</div>
</div>
<?php
}
?>
</div>
示例2: bbp_reply_form_fields
/**
* Output the required hidden fields when creating/editing a reply
*
* @since bbPress (r2753)
*
* @uses bbp_is_reply_edit() To check if it's the reply edit page
* @uses wp_nonce_field() To generate hidden nonce fields
* @uses bbp_reply_id() To output the reply id
* @uses bbp_topic_id() To output the topic id
* @uses bbp_forum_id() To output the forum id
*/
function bbp_reply_form_fields()
{
if (bbp_is_reply_edit()) {
?>
<input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php
printf(__('Reply To: %s', 'bbpress'), bbp_get_topic_title());
?>
" maxlength="<?php
bbp_get_title_max_length();
?>
" />
<input type="hidden" name="bbp_reply_id" id="bbp_reply_id" value="<?php
bbp_reply_id();
?>
" />
<input type="hidden" name="action" id="bbp_post_action" value="bbp-edit-reply" />
<?php
if (current_user_can('unfiltered_html')) {
wp_nonce_field('bbp-unfiltered-html-reply_' . bbp_get_reply_id(), '_bbp_unfiltered_html_reply', false);
}
?>
<?php
wp_nonce_field('bbp-edit-reply_' . bbp_get_reply_id());
} else {
?>
<input type="hidden" name="bbp_reply_title" id="bbp_reply_title" value="<?php
printf(__('Reply To: %s', 'bbpress'), bbp_get_topic_title());
?>
" maxlength="<?php
bbp_get_title_max_length();
?>
" />
<input type="hidden" name="bbp_topic_id" id="bbp_topic_id" value="<?php
bbp_topic_id();
?>
" />
<input type="hidden" name="action" id="bbp_post_action" value="bbp-new-reply" />
<?php
if (current_user_can('unfiltered_html')) {
wp_nonce_field('bbp-unfiltered-html-reply_' . bbp_get_topic_id(), '_bbp_unfiltered_html_reply', false);
}
?>
<?php
wp_nonce_field('bbp-new-reply');
// Show redirect field if not viewing a specific topic
if (bbp_is_query_name('bbp_single_topic')) {
bbp_redirect_to_field(get_permalink());
}
}
}