Skip to:
Content

bbPress.org

Changeset 5398


Ignore:
Timestamp:
06/14/2014 08:20:06 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Update admin area reply-to to use bbp_reply_to_dropdown(). Fixes #2617.

Location:
trunk/src/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/css/admin.css

    r5268 r5398  
    33#poststuff #bbp_forum_attributes select#parent_id,
    44#poststuff #bbp_topic_attributes select#parent_id,
    5 #poststuff #bbp_reply_attributes select#bbp_forum_id {
     5#poststuff #bbp_reply_attributes select#bbp_forum_id,
     6#poststuff #bbp_reply_attributes select#bbp_reply_to {
    67    max-width: 170px;
    78}
  • trunk/src/includes/admin/metaboxes.php

    r5269 r5398  
    471471    $reply_topic_id = bbp_get_reply_topic_id( $post_id );
    472472    $reply_forum_id = bbp_get_reply_forum_id( $post_id );
    473     $reply_to       = bbp_get_reply_to(       $post_id );
    474473
    475474    // Allow individual manipulation of reply forum
     
    509508        <strong class="label"><?php esc_html_e( 'Reply To:', 'bbpress' ); ?></strong>
    510509        <label class="screen-reader-text" for="bbp_reply_to"><?php esc_html_e( 'Reply To', 'bbpress' ); ?></label>
    511         <input name="bbp_reply_to" id="bbp_reply_to" type="text" value="<?php echo esc_attr( $reply_to ); ?>" />
     510        <?php bbp_reply_to_dropdown( $post_id ); ?>
    512511    </p>
    513512
  • trunk/src/includes/common/classes.php

    r5394 r5398  
    502502        $depth++;
    503503
     504        // Get the reply ID
     505        if ( isset( $args['exclude'][0] ) ) {
     506            $reply_id = (int) $args['exclude'][0];
     507        } else {
     508            $reply_id = bbp_get_reply_id();
     509        }
     510
    504511        // Get ancestors to determine which items to disable
    505512        $ancestors = bbp_get_reply_ancestors( $object->ID );
     
    521528        ob_start(); ?>
    522529
    523         <option class="<?php echo esc_attr( $class ); ?>" value="<?php echo esc_attr( $value ); ?>"<?php selected( $args['selected'], $object->ID ); ?> <?php disabled( in_array( bbp_get_reply_id(), $ancestors ), true ); ?>><?php echo $pad . esc_html( $title ); ?></option>
     530        <option class="<?php echo esc_attr( $class ); ?>" value="<?php echo esc_attr( $value ); ?>"<?php selected( $args['selected'], $object->ID ); ?> <?php disabled( in_array( $reply_id, $ancestors ), true ); ?>><?php echo $pad . esc_html( $title ); ?></option>
    524531       
    525532        <?php
Note: See TracChangeset for help on using the changeset viewer.