bbp_reply_form_fields()
Output the required hidden fields when creating/editing a reply
Description
Source
File: bp-forums/common/template.php
1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 | function bbp_reply_form_fields() { if ( bbp_is_reply_edit() ) : ?> <input type= "hidden" name= "bbp_reply_id" id= "bbp_reply_id" value= "<?php bbp_reply_id(); ?>" /> <input type= "hidden" name= "bbp_reply_to" id= "bbp_reply_to" value= "<?php bbp_form_reply_to(); ?>" /> <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_topic_id" id= "bbp_topic_id" value= "<?php bbp_topic_id(); ?>" /> <input type= "hidden" name= "bbp_reply_to" id= "bbp_reply_to" value= "<?php bbp_form_reply_to(); ?>" /> <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() ); endif ; endif ; } |
Changelog
Version | Description |
---|---|
bbPress (r2753) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.