bp_core_install( array|bool $active_components = false )

Main installer.

Description

Can be passed an optional array of components to explicitly run installation routines on, typically the first time a component is activated in Settings.

Parameters

$active_components

(Optional) Components to install.

Default value: false

Source

File: bp-core/admin/bp-core-admin-schema.php

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
function bp_core_install( $active_components = false ) {
 
    bp_pre_schema_upgrade();
 
    // If no components passed, get all the active components from the main site.
    if ( empty( $active_components ) ) {
 
        /** This filter is documented in bp-core/admin/bp-core-admin-components.php */
        $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
    }
 
    // Install Activity Feeds even when inactive (to store last_activity data).
    bp_core_install_activity_streams();
 
    // Install the signups table.
    bp_core_maybe_install_signups();
 
    // Notifications.
    if ( !empty( $active_components['notifications'] ) ) {
        bp_core_install_notifications();
    }
 
    // Connections.
    if ( !empty( $active_components['friends'] ) ) {
        bp_core_install_friends();
    }
 
    // Follow.
    if ( !empty( $active_components['activity'] ) ) {
        bp_core_install_follow();
    }
 
    // Extensible Groups.
    if ( !empty( $active_components['groups'] ) ) {
        bp_core_install_groups();
    }
 
    // Private Messaging.
    if ( !empty( $active_components['messages'] ) ) {
        bp_core_install_private_messaging();
    }
 
    // Profile Fields.
    if ( !empty( $active_components['xprofile'] ) ) {
        bp_core_install_extended_profiles();
    }
 
    // Blog tracking.
    if ( !empty( $active_components['blogs'] ) ) {
        bp_core_install_blog_tracking();
    }
 
    // Discussion forums
    if ( !empty( $active_components['forums'] ) ) {
        bp_core_install_discussion_forums();
    }
 
    // Media
    if ( !empty( $active_components['media'] ) ) {
        bp_core_install_media();
    }
 
    // Network search
    if ( ! empty( $active_components['search'] ) ) {
        bp_core_install_network_search();
    }
}

Changelog

Changelog
Version Description
BuddyPress 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.