Skip to:
Content

BuddyPress.org

Ticket #3922: $params.patch

File $params.patch, 1.5 KB (added by fanquake, 13 years ago)
  • bp-core-avatars.php

     
    136136                                break;
    137137                }
    138138
    139                 $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object );
     139                $item_id = apply_filters( 'bp_core_avatar_item_id', $item_id, $object, $params );
    140140
    141141                if ( empty( $item_id ) ) {
    142142                        return false;
    143143                }
    144144        }
    145145
     146        $class = apply_filters( 'bp_core_avatar_class', $class, $item_id, $object, $params );
     147       
    146148        /** Set avatar_dir ********************************************************/
    147149
    148150        if ( empty( $avatar_dir ) ) {
     
    168170                                break;
    169171                }
    170172
    171                 $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object );
     173                $avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object, $params );
    172174
    173175                if ( empty( $avatar_dir ) ) {
    174176                        return false;
     
    198200                                break;
    199201                }
    200202
    201                 $item_name = apply_filters( 'bp_core_avatar_alt', $item_name, $item_id, $object );
     203                $item_name = apply_filters( 'bp_core_avatar_alt', $item_name, $item_id, $object, $params );
    202204                $alt       = sprintf( $alt, $item_name );
    203205        }
    204206
     
    210212
    211213        // Set title tag, if it's been provided
    212214        if ( !empty( $title ) )
    213                 $title = " title='" . esc_attr( apply_filters( 'bp_core_avatar_title', $title, $item_id, $object ) ) . "'";
    214  No newline at end of file
     215                $title = " title='" . esc_attr( apply_filters( 'bp_core_avatar_title', $title, $item_id, $object, $params ) ) . "'";
     216 No newline at end of file
    215217
    216218        // Set CSS ID if passed