Changeset 2804 for branches/plugin/bbp-includes/bbp-classes.php
- Timestamp:
- 01/14/2011 02:55:38 AM (15 years ago)
- File:
-
- 1 edited
-
branches/plugin/bbp-includes/bbp-classes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-classes.php
r2787 r2804 339 339 * @since bbPress (r2746) 340 340 * 341 * @param string $output Passed by reference. Used to append additional content. 341 * @param string $output Passed by reference. Used to append additional 342 * content. 342 343 * @param object $post Post data object. 343 * @param int $depth Depth of post in reference to parent posts. Used for padding. 344 * @param array $args Uses 'selected' argument for selected post to set selected HTML attribute for option element. 344 * @param int $depth Depth of post in reference to parent posts. Used 345 * for padding. 346 * @param array $args Uses 'selected' argument for selected post to set 347 * selected HTML attribute for option element. 348 * @uses bbp_is_forum_category() To check if the forum is a category 349 * @uses current_user_can() To check if the current user can post in 350 * closed forums 351 * @uses bbp_is_forum_closed() To check if the forum is closed 352 * @uses apply_filters() Calls 'bbp_walker_dropdown_post_title' with the 353 * title, output, post, depth and args 345 354 */ 346 355 function start_el( &$output, $post, $depth, $args ) { … … 350 359 $output .= "\t<option class=\"level-$depth\""; 351 360 352 // Disable the <option> if we're told to do so, the post type is bbp_forum and the forum is a category 353 if ( $args['disable_categories'] == true && $post->post_type == $bbp->forum_id && bbp_is_forum_category( $post->ID) )361 // Disable the <option> if we're told to do so, the post type is bbp_forum and the forum is a category or is closed 362 if ( true == $args['disable_categories'] && $post->post_type == $bbp->forum_id && ( bbp_is_forum_category( $post->ID ) || ( !current_user_can( 'edit_forum', $post->ID ) && bbp_is_forum_closed( $post->ID ) ) ) ) 354 363 $output .= ' disabled="disabled" value=""'; 355 364 else
Note: See TracChangeset
for help on using the changeset viewer.