[ Index ]

PHP Cross Reference of BuddyPress




/src/bp-core/admin/ -> bp-core-admin-components.php (summary)

BuddyPress Admin Component Functions.

File Size: 420 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions


Functions that are not part of a class:

bp_core_admin_components_settings()   X-Ref
Renders the Component Setup admin panel.

since: 1.6.0

bp_core_admin_components_options()   X-Ref
Creates reusable markup for component setup on the Components and Pages dashboard panel.

since: 1.6.0

bp_core_admin_components_settings_handler()   X-Ref
Handle saving the Component settings.

since: 1.6.0

bp_core_admin_get_active_components_from_submitted_settings( $submitted )   X-Ref
Calculates the components that should be active after save, based on submitted settings.

The way that active components must be set after saving your settings must
be calculated differently depending on which of the Components subtabs you
are coming from:
- When coming from All or Active, the submitted checkboxes accurately
reflect the desired active components, so we simply pass them through
- When coming from Inactive, components can only be activated - already
active components will not be passed in the $_POST global. Thus, we must
parse the newly activated components with the already active components
saved in the $bp global
- When activating a Retired component, the situation is similar to Inactive.
- When deactivating a Retired component, no value is passed in the $_POST
global (because the component settings are checkboxes). So, in order to
determine whether a retired component is being deactivated, we retrieve a
list of retired components, and check each one to ensure that its checkbox
is not present, before merging the submitted components with the active

return: array The calculated list of component settings
since: 1.7.0
param: array $submitted This is the array of component settings coming from the POST

bp_core_admin_get_components( $type = 'all' )   X-Ref
Return a list of component information.

We use this information both to build the markup for the admin screens, as
well as to do some processing on settings data submitted from those screens.

return: array Requested components' data.
since: 1.7.0
param: string $type Optional; component type to fetch. Default value is 'all', or 'optional', 'retired', 'required'.

Generated: Mon May 20 01:01:04 2024 Cross-referenced by PHPXref 0.7.1