Changeset 5065
- Timestamp:
- 08/09/2013 06:33:49 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/common/classes.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/common/classes.php
r5048 r5065 234 234 * title, output, post, depth and args 235 235 */ 236 public function start_el( &$output, $ _post, $depth = 0, $args = array(), $current_object_id = 0 ) {236 public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) { 237 237 $pad = str_repeat( ' ', (int) $depth * 3 ); 238 238 $output .= '<option class="level-' . (int) $depth . '"'; … … 244 244 // - forum is closed 245 245 if ( ( true === $args['disable_categories'] ) 246 && ( bbp_get_forum_post_type() === $ _post->post_type )247 && ( bbp_is_forum_category( $ _post->ID )248 || ( !current_user_can( 'edit_forum', $ _post->ID ) && bbp_is_forum_closed( $_post->ID )246 && ( bbp_get_forum_post_type() === $object->post_type ) 247 && ( bbp_is_forum_category( $object->ID ) 248 || ( !current_user_can( 'edit_forum', $object->ID ) && bbp_is_forum_closed( $object->ID ) 249 249 ) 250 250 ) ) { 251 251 $output .= ' disabled="disabled" value=""'; 252 252 } else { 253 $output .= ' value="' . (int) $ _post->ID .'"' . selected( $args['selected'], $_post->ID, false );253 $output .= ' value="' . (int) $object->ID .'"' . selected( $args['selected'], $object->ID, false ); 254 254 } 255 255 256 256 $output .= '>'; 257 $title = apply_filters( 'bbp_walker_dropdown_post_title', $ _post->post_title, $output, $_post, $depth, $args );257 $title = apply_filters( 'bbp_walker_dropdown_post_title', $object->post_title, $output, $object, $depth, $args ); 258 258 $output .= $pad . esc_html( $title ); 259 259 $output .= "</option>\n"; … … 372 372 * @since bbPress (r4944) 373 373 */ 374 public function start_el( &$output = '', $reply = false, $depth = 0, $args = array(), $id = 0 ) {374 public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) { 375 375 376 376 // Set up reply 377 377 $depth++; 378 378 bbpress()->reply_query->reply_depth = $depth; 379 bbpress()->reply_query->post = $ reply;380 bbpress()->current_reply_id = $ reply->ID;379 bbpress()->reply_query->post = $object; 380 bbpress()->current_reply_id = $object->ID; 381 381 382 382 // Check for a callback and use it if specified 383 383 if ( !empty( $args['callback'] ) ) { 384 call_user_func( $args['callback'], $ reply, $args, $depth );384 call_user_func( $args['callback'], $object, $args, $depth ); 385 385 return; 386 386 } … … 405 405 * @since bbPress (r4944) 406 406 */ 407 public function end_el( &$output = '', $ reply= false, $depth = 0, $args = array() ) {407 public function end_el( &$output = '', $object = false, $depth = 0, $args = array() ) { 408 408 409 409 // Check for a callback and use it if specified 410 410 if ( !empty( $args['end-callback'] ) ) { 411 call_user_func( $args['end-callback'], $ reply, $args, $depth );411 call_user_func( $args['end-callback'], $object, $args, $depth ); 412 412 return; 413 413 }
Note: See TracChangeset
for help on using the changeset viewer.