Skip to:
Content

bbPress.org

Ticket #2270: 2270.patch

File 2270.patch, 2.7 KB (added by MZAWeb, 12 years ago)
  • includes/admin/replies.php

     
    215215                        $publish_box .= '<p>' . __( '<strong>Featured Image</strong> - This allows you to associate an image with your reply without inserting it. This is usually useful only if your theme makes use of the featured image as a reply thumbnail on the home page, a custom header, etc.', 'bbpress' ) . '</p>';
    216216                }
    217217
     218                $forum_option = '';
     219                if ( apply_filters( 'bbp_show_forum_dropdown_on_replies', false ) )
     220                        $forum_option = '<li>' . __( '<strong>Forum</strong> dropdown determines the parent forum that the reply belongs to. Select the forum, or leave the default (Use Forum of Topic) to post the reply in forum of the topic.', 'bbpress' ) . '</li>';
     221
    218222                get_current_screen()->add_help_tab( array(
    219223                        'id'      => 'reply-attributes',
    220224                        'title'   => __( 'Reply Attributes', 'bbpress' ),
    221225                        'content' =>
    222226                                '<p>' . __( 'Select the attributes that your reply should have:', 'bbpress' ) . '</p>' .
    223227                                '<ul>' .
    224                                         '<li>' . __( '<strong>Forum</strong> dropdown determines the parent forum that the reply belongs to. Select the forum, or leave the default (Use Forum of Topic) to post the reply in forum of the topic.', 'bbpress' ) . '</li>' .
     228                                        $forum_option .
    225229                                        '<li>' . __( '<strong>Topic</strong> determines the parent topic that the reply belongs to.', 'bbpress' ) . '</li>' .
    226230                                '</ul>'
    227231                ) );
  • includes/admin/metaboxes.php

     
    391391 *
    392392 * @uses bbp_get_topic_post_type() To get the topic post type
    393393 * @uses do_action() Calls 'bbp_reply_metabox'
     394 * @uses apply_filters() with bbp_show_forum_dropdown_on_replies to enable the forum selector
    394395 */
    395396function bbp_reply_metabox() {
    396397
     
    399400
    400401        // Get some meta
    401402        $reply_topic_id = bbp_get_reply_topic_id( $post_id );
    402         $reply_forum_id = bbp_get_reply_forum_id( $post_id );
    403403
     404        $show_forum_dropdown = apply_filters( 'bbp_show_forum_dropdown_on_replies', false );
     405
    404406        // Allow individual manipulation of reply forum
    405         if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) : ?>
     407        if ( $show_forum_dropdown && ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) ) :
    406408
     409                $reply_forum_id = bbp_get_reply_forum_id( $post_id );
     410                ?>
     411
    407412                <p>
    408413                        <strong class="label"><?php _e( 'Forum:', 'bbpress' ); ?></strong>
    409414                        <label class="screen-reader-text" for="bbp_forum_id"><?php _e( 'Forum', 'bbpress' ); ?></label>