bbp_forum_form_fields()
Output the required hidden fields when creating/editing a forum
Description
Source
File: bp-forums/common/template.php
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 | function bbp_forum_form_fields() { if ( bbp_is_forum_edit() ) : ?> <input type= "hidden" name= "action" id= "bbp_post_action" value= "bbp-edit-forum" /> <input type= "hidden" name= "bbp_forum_id" id= "bbp_forum_id" value= "<?php bbp_forum_id(); ?>" /> <?php if ( current_user_can( 'unfiltered_html' ) ) wp_nonce_field( 'bbp-unfiltered-html-forum_' . bbp_get_forum_id(), '_bbp_unfiltered_html_forum' , false ); ?> <?php wp_nonce_field( 'bbp-edit-forum_' . bbp_get_forum_id() ); else : if ( bbp_is_single_forum() ) : ?> <input type= "hidden" name= "bbp_forum_parent_id" id= "bbp_forum_parent_id" value= "<?php bbp_forum_parent_id(); ?>" /> <?php endif ; ?> <input type= "hidden" name= "action" id= "bbp_post_action" value= "bbp-new-forum" /> <?php if ( current_user_can( 'unfiltered_html' ) ) wp_nonce_field( 'bbp-unfiltered-html-forum_new' , '_bbp_unfiltered_html_forum' , false ); ?> <?php wp_nonce_field( 'bbp-new-forum' ); endif ; } |
Changelog
Version | Description |
---|---|
bbPress (r3553) | 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.