Changeset 4259
- Timestamp:
- 10/19/2012 08:11:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbp-includes/admin/metaboxes.php
r4250 r4259 299 299 <strong class="label"><?php _e( 'Parent:', 'bbpress' ); ?></strong> 300 300 <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum Parent', 'bbpress' ); ?></label> 301 302 <?php 303 bbp_dropdown( array( 304 'exclude' => $post_id, 305 'selected' => $post_parent, 306 'show_none' => __( '(No Parent)', 'bbpress' ), 307 'select_id' => 'parent_id', 308 'disable_categories' => false 309 ) ); 310 ?> 311 301 <input name="parent_id" id="parent_id" type="number" step="1" value="<?php echo esc_attr( $post_parent ); ?>" /> 312 302 </p> 313 303 … … 315 305 <strong class="label"><?php _e( 'Order:', 'bbpress' ); ?></strong> 316 306 <label class="screen-reader-text" for="menu_order"><?php _e( 'Forum Order', 'bbpress' ); ?></label> 317 <input name="menu_order" type=" text" size="4" id="menu_order" value="<?php echo $menu_order; ?>" />307 <input name="menu_order" type="number" step="1" size="4" id="menu_order" value="<?php echo esc_attr( $menu_order ); ?>" /> 318 308 </p> 319 309 … … 333 323 * 334 324 * @uses bbp_get_topic_forum_id() To get the topic forum id 335 * @uses bbp_dropdown() To show a dropdown of the forums for topic parent336 325 * @uses do_action() Calls 'bbp_topic_metabox' 337 326 */ … … 339 328 340 329 // Post ID 341 $post_id = get_the_ID(); 342 343 $args = array( 344 'selected' => bbp_get_topic_forum_id( $post_id ), 345 'select_id' => 'parent_id', 346 'show_none' => is_super_admin() ? __( '(No Forum)', 'bbpress' ) : '', 347 ); ?> 348 349 <p><strong><?php _e( 'Forum', 'bbpress' ); ?></strong></p> 350 351 <p> 352 <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum', 'bbpress' ); ?></label> 353 <?php bbp_dropdown( $args ); ?> 354 </p> 330 $post_id = get_the_ID(); ?> 355 331 356 332 <p><strong><?php _e( 'Topic Type', 'bbpress' ); ?></strong></p> … … 359 335 <label class="screen-reader-text" for="bbp_stick_topic"><?php _e( 'Topic Type', 'bbpress' ); ?></label> 360 336 <?php bbp_topic_type_select( array( 'topic_id' => $post_id ) ); ?> 337 </p> 338 339 <p><strong><?php _e( 'Forum', 'bbpress' ); ?></strong></p> 340 341 <p> 342 <label class="screen-reader-text" for="parent_id"><?php _e( 'Forum', 'bbpress' ); ?></label> 343 <input name="parent_id" id="parent_id" type="number" step="1" value="<?php bbp_topic_forum_id( $post_id ); ?>" /> 361 344 </p> 362 345 … … 376 359 * 377 360 * @uses bbp_get_topic_post_type() To get the topic post type 378 * @uses bbp_dropdown() To show a dropdown of the topics for reply parent379 361 * @uses do_action() Calls 'bbp_reply_metabox' 380 362 */ … … 389 371 390 372 // Allow individual manipulation of reply forum 391 if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) : 392 393 // Forums 394 $args = array( 395 'selected' => $reply_forum_id, 396 'select_id' => 'bbp_forum_id', 397 'show_none' => __( '(Use Forum of Topic)', 'bbpress' ) 398 ); ?> 373 if ( current_user_can( 'edit_others_replies' ) || current_user_can( 'moderate' ) ) : ?> 399 374 400 375 <p><strong><?php _e( 'Forum', 'bbpress' ); ?></strong></p> … … 402 377 <p> 403 378 <label class="screen-reader-text" for="bbp_forum_id"><?php _e( 'Forum', 'bbpress' ); ?></label> 404 405 <?php bbp_dropdown( $args ); ?> 406 379 <input name="bbp_forum_id" id="bbp_forum_id" type="number" step="1" value="<?php echo esc_attr( $reply_forum_id ); ?>" /> 407 380 </p> 408 381 409 <?php endif; 410 411 // Topics 412 $args = array( 413 'post_type' => bbp_get_topic_post_type(), 414 'selected' => $reply_topic_id, 415 'select_id' => 'parent_id', 416 'orderby' => 'post_date', 417 'numberposts' => '250', 418 'show_none' => is_super_admin() ? __( '(No Topic)', 'bbpress' ) : '', 419 ); 420 421 // Allow the dropdown to be filtered, to extend or limit the available 422 // topics to choose as the reply parent. 423 $args = apply_filters( 'bbp_reply_parent_dropdown', $args ); ?> 382 <?php endif; ?> 424 383 425 384 <p><strong><?php _e( 'Topic', 'bbpress' ); ?></strong></p> … … 427 386 <p> 428 387 <label class="screen-reader-text" for="parent_id"><?php _e( 'Topic', 'bbpress' ); ?></label> 429 430 <?php bbp_dropdown( $args ); ?> 431 388 <input name="parent_id" id="parent_id" type="number" step="1" value="<?php echo esc_attr( $reply_topic_id ); ?>" /> 432 389 </p> 433 390
Note: See TracChangeset
for help on using the changeset viewer.