Skip to:
Content

BuddyPress.org

Changeset 8160


Ignore:
Timestamp:
03/26/2014 03:26:55 AM (9 years ago)
Author:
imath
Message:

Adapt core to allow BP Attachments to be into the list of optional components

So that next "feature as a plugin" Attachments can be activated just like the other BuddyPress components, we need to create two new hooks.

props johnjamesjacoby, boonebgorges, imath.

See #5429

Location:
trunk/bp-core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-components.php

    r7965 r8160  
    421421    }
    422422
    423     return $components;
     423    return apply_filters( 'bp_core_admin_get_components', $components, $type );
    424424}
  • trunk/bp-core/bp-core-avatars.php

    r7943 r8160  
    765765
    766766        if ( $existing_avatar_path !== $new_avatar_path ) {
    767             bp_core_delete_existing_avatar( array( 'object' => $object, 'avatar_path' => $avatar_folder_dir ) );
     767            bp_core_delete_existing_avatar( array( 'object' => $object, 'item_id' => $item_id, 'avatar_path' => $avatar_folder_dir ) );
    768768        }
    769769    }
  • trunk/bp-core/bp-core-loader.php

    r7756 r8160  
    111111        // Add Core to required components
    112112        $bp->required_components[] = 'core';
     113
     114        do_action( 'bp_core_components_included' );
    113115    }
    114116
Note: See TracChangeset for help on using the changeset viewer.