Skip to:
Content

bbPress.org

Changeset 5065


Ignore:
Timestamp:
08/09/2013 06:33:49 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Rename Walker class parameters to prevent PHP5.4 E_STRICT warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/classes.php

    r5048 r5065  
    234234     *                        title, output, post, depth and args
    235235     */
    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 ) {
    237237        $pad     = str_repeat( ' ', (int) $depth * 3 );
    238238        $output .= '<option class="level-' . (int) $depth . '"';
     
    244244        // - forum is closed
    245245        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 )
    249249                )
    250250            ) ) {
    251251            $output .= ' disabled="disabled" value=""';
    252252        } 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 );
    254254        }
    255255
    256256        $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 );
    258258        $output .= $pad . esc_html( $title );
    259259        $output .= "</option>\n";
     
    372372     * @since bbPress (r4944)
    373373     */
    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 ) {
    375375
    376376        // Set up reply
    377377        $depth++;
    378378        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;
    381381
    382382        // Check for a callback and use it if specified
    383383        if ( !empty( $args['callback'] ) ) {
    384             call_user_func( $args['callback'], $reply, $args, $depth );
     384            call_user_func( $args['callback'], $object, $args, $depth );
    385385            return;
    386386        }
     
    405405     * @since bbPress (r4944)
    406406     */
    407     public function end_el( &$output = '', $reply = false, $depth = 0, $args = array() ) {
     407    public function end_el( &$output = '', $object = false, $depth = 0, $args = array() ) {
    408408
    409409        // Check for a callback and use it if specified
    410410        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 );
    412412            return;
    413413        }
Note: See TracChangeset for help on using the changeset viewer.