/>
$component_page ) {
if ( in_array( $component_id, array( 'register', 'activate' ), true ) ) {
continue;
}
// Use the global value if a specific value hasn't been set.
$component_value = isset( $saved_value[ $component_id ] ) ? $saved_value[ $component_id ] : $retval['global'];
// Valid values are 'anyone' or 'memebers'.
if ( ! in_array( $component_value, array( 'anyone', 'members' ), true ) ) {
$component_value = $retval['global'];
}
$retval[ $component_id ] = $component_value;
}
return $retval;
}
/**
* Form element to change the active template pack.
*/
function bp_admin_setting_callback_theme_package_id() {
$options = '';
/*
* Note: This should never be empty. /bp-templates/ is the
* canonical backup if no other packages exist. If there's an error here,
* something else is wrong.
*
* See BuddyPress::register_theme_packages()
*/
foreach ( (array) buddypress()->theme_compat->packages as $id => $theme ) {
$options .= sprintf(
'',
esc_attr( $id ),
selected( $theme->id, bp_get_theme_package_id(), false ),
esc_html( $theme->name )
);
}
// phpcs:disable WordPress.Security.EscapeOutput
if ( $options ) : ?>
/>
/>
/>
/>
/>
/>
/>