Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/02/2013 07:20:49 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Normalize forum, topic, and reply dropdown form fields and associated functions. Includes several new functions with _get_ equivalents to replace incorrectly named _select() functions.

First pass at adding custom topic status handling. Props jkudish. See #2187.

Also replaces $wpdb->update() calls with wp_update_post() in associated functions. Fixes #2351.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/metaboxes.php

    r5015 r5060  
    261261                <strong class="label"><?php esc_html_e( 'Type:', 'bbpress' ); ?></strong>
    262262                <label class="screen-reader-text" for="bbp_forum_type_select"><?php esc_html_e( 'Type:', 'bbpress' ) ?></label>
    263                 <?php bbp_form_forum_type_dropdown( $post_id ); ?>
     263                <?php bbp_form_forum_type_dropdown( array( 'forum_id' => $post_id ) ); ?>
    264264        </p>
    265265
     
    273273                <strong class="label"><?php esc_html_e( 'Status:', 'bbpress' ); ?></strong>
    274274                <label class="screen-reader-text" for="bbp_forum_status_select"><?php esc_html_e( 'Status:', 'bbpress' ) ?></label>
    275                 <?php bbp_form_forum_status_dropdown( $post_id ); ?>
     275                <?php bbp_form_forum_status_dropdown( array( 'forum_id' => $post_id ) ); ?>
    276276        </p>
    277277
     
    285285                <strong class="label"><?php esc_html_e( 'Visibility:', 'bbpress' ); ?></strong>
    286286                <label class="screen-reader-text" for="bbp_forum_visibility_select"><?php esc_html_e( 'Visibility:', 'bbpress' ) ?></label>
    287                 <?php bbp_form_forum_visibility_dropdown( $post_id ); ?>
     287                <?php bbp_form_forum_visibility_dropdown( array( 'forum_id' => $post_id ) ); ?>
    288288        </p>
    289289
     
    345345
    346346        // Post ID
    347         $post_id = get_the_ID(); ?>
     347        $post_id = get_the_ID();
     348
     349        /** Type ******************************************************************/
     350
     351        ?>
    348352
    349353        <p>
    350354                <strong class="label"><?php esc_html_e( 'Type:', 'bbpress' ); ?></strong>
    351355                <label class="screen-reader-text" for="bbp_stick_topic"><?php esc_html_e( 'Topic Type', 'bbpress' ); ?></label>
    352                 <?php bbp_topic_type_select( array( 'topic_id' => $post_id ) ); ?>
    353         </p>
     356                <?php bbp_form_topic_type_dropdown( array( 'topic_id' => $post_id ) ); ?>
     357        </p>
     358
     359        <?php
     360
     361        /** Status ****************************************************************/
     362
     363        ?>
     364
     365        <p>
     366                <strong class="label"><?php esc_html_e( 'Status:', 'bbpress' ); ?></strong>
     367                <label class="screen-reader-text" for="bbp_open_close_topic"><?php esc_html_e( 'Select whether to open or close the topic.', 'bbpress' ); ?></label>
     368                <?php bbp_form_topic_status_dropdown( array( 'select_id' => 'post_status', 'topic_id' => $post_id ) ); ?>
     369        </p>
     370
     371        <?php
     372
     373        /** Parent *****************************************************************/
     374
     375        ?>
    354376
    355377        <p>
Note: See TracChangeset for help on using the changeset viewer.