bp_get_theme_compat_feature( string $feature = '' )

Get a theme compat feature

Description

Parameters

$feature

(Optional) The feature (eg: cover_image).

Default value: ''

Return

(object) The feature settings.

Source

File: bp-core/bp-core-theme-compatibility.php

378
379
380
381
382
383
384
385
386
387
388
389
390
function bp_get_theme_compat_feature( $feature = '' ) {
    // Get current theme compat theme.
    $theme_compat_theme = buddypress()->theme_compat->theme;
 
    // Get features.
    $features = $theme_compat_theme->__get( 'features' );
 
    if ( ! isset( $features[ $feature ] ) ) {
        return false;
    }
 
    return $features[ $feature ];
}

Changelog

Changelog
Version Description
BuddyPress 2.4.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.