|[ Index ]||
PHP Cross Reference of BuddyPress
BuddyPress Admin Component Functions.
|File Size:||422 lines (15 kb)|
|Included or required:||0 times|
|Includes or requires:||0 files|
|Renders the Component Setup admin panel.|
|Creates reusable markup for component setup on the Components and Pages dashboard panel.|
|Handle saving the Component settings.|
|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
param: array $submitted This is the array of component settings coming from the POST
return: array The calculated list of component settings
|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.
param: string $type Optional; component type to fetch. Default value is 'all', or 'optional', 'retired', 'required'.
return: array Requested components' data.
|Generated: Thu Jul 2 01:01:34 2020||Cross-referenced by PHPXref 0.7.1|