Loads BuddyPress Legacy Theme functionality.
This is not a real theme by WordPress standards, and is instead used as the fallback for any WordPress theme that does not have BuddyPress templates in it.
To make your custom theme BuddyPress compatible and customize the templates, you can copy these files into your theme without needing to merge anything together; BuddyPress should safely handle the rest.
See @link BP_Theme_Compat() for more.
since | 1.7.0 |
---|---|
package | BuddyPress |
subpackage | BP_Theme_Compat |
inherited_from | \BP_Theme_Compat |
__construct()
since | 1.7.0 |
---|---|
inherited_from | \BP_Theme_Compat::__construct() |
__construct(array $properties = array()
)
since | 1.7.0 |
---|
array
Array of properties for BP_Theme_Compat.
__get(string $property) : mixed
since | 1.7.0 |
---|
string
Property name.
mixed
The value of the property if it exists, otherwise an
empty string.__isset(string $property) : boolean
since | 9.0.0 |
---|
string
Property name.
boolean
True if the property exists. False otherwise.__set(string $property, mixed $value) : boolean
since | 1.7.0 |
---|
string
Property name.
mixed
Property value.
boolean
add_nojs_body_class(array $classes) : array
This function ensures that the
element will have the 'no-js' class by default. If you're using JavaScript for some visual functionality in your theme, and you want to provide noscript support, apply those styles to body.no-js.The no-js class is removed by the JavaScript created in buddypress.js.
since | 1.7.0 |
---|
array
Array of classes to append to body tag.
array
$classesenqueue_scripts()
since | 1.7.0 |
---|
enqueue_styles()
since | 1.7.0 |
---|---|
since | 2.3.0 Support custom CSS file named after the current theme or parent theme. |
localize_scripts()
These localizations require information that may not be loaded even by init.
since | 1.7.0 |
---|
secondary_avatars(string $action, \BP_Activity_Activity $activity) : string
since | 1.7.0 |
---|
string
The text of this activity.
\BP_Activity_Activity
Activity object.
string
theme_compat_page_templates(array $templates = array()
) : array
setup_actions()
Meant to be overridden in your class. See BP_Legacy::setup_actions() for an example.
since | 1.7.0 |
---|---|
inherited_from | \BP_Theme_Compat::setup_actions() |
setup_actions()
Meant to be overridden in your class. See BP_Legacy::setup_actions() for an example.
since | 1.7.0 |
---|
setup_globals()
You'll want to customize the values in here, so they match whatever your needs are.
since | 1.7.0 |
---|---|
inherited_from | \BP_Theme_Compat::setup_globals() |
setup_globals()
Meant to be overridden in your class. See BP_Legacy::setup_globals() for an example.
since | 1.7.0 |
---|
start()
Themes should use this method in their constructor.
since | 1.7.0 |
---|
locate_asset_in_stack(string $file, string $type= 'css'
, string $script_handle= ''
) : array
We provide two levels of customizability with respect to where CSS and JS files can be stored: (1) the child theme/parent theme/theme compat hierarchy, and (2) the "template stack" of /buddypress/css/, /community/css/, and /css/. In this way, CSS and JS assets can be overloaded, and default versions provided, in exactly the same way as corresponding PHP templates.
We are duplicating some of the logic that is currently found in bp_locate_template() and the _template_stack() functions. Those functions were built with PHP templates in mind, and will require refactoring in order to provide "stack" functionality for assets that must be accessible both using file_exists() (the file path) and at a public URI.
This method is marked private, with the understanding that the implementation is subject to change or removal in an upcoming release, in favor of a unified _template_stack() system. Plugin and theme authors should not attempt to use what follows.
since | 1.8.0 |
---|
string
A filename like buddypress.css.
string
Optional. Either "js" or "css" (the default).
string
Optional. If set, used as the script name in wp_enqueue_script
.
array
An array of data for the wp_enqueue_* function:
'handle' (eg 'bp-child-css') and a 'location' (the URI of the
asset)$_data : array
array()
since | 1.7.0 |
---|