-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
55 lines (49 loc) · 1.18 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* BuddyVibes functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package \buddyvibes
* @since 1.0.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'buddyvibes_setup' ) ) {
/**
* Set-up BuddyVibes theme support.
*
* @since 1.0.0
*/
function buddyvibes_setup() {
// Add support for BuddyPress.
add_theme_support(
'buddypress',
array(
'activity' => array( 'block-editor' ),
)
);
// Add support for block styles.
add_theme_support( 'wp-block-styles' );
// Translations.
load_theme_textdomain( 'buddyvibes', get_theme_file_path( '/languages' ) );
}
}
add_action( 'after_setup_theme', 'buddyvibes_setup' );
if ( ! function_exists( 'buddyvibes_includes' ) ) {
/**
* Load BuddyPress & Contributors specific functions.
*
* @since 1.0.0
*/
function buddyvibes_includes() {
if ( ! function_exists( 'bp_theme_compat_is_block_theme' ) ) {
return;
}
require get_theme_file_path( '/inc/buddypress-blocks.php' );
require get_theme_file_path( '/inc/buddypress-compat.php' );
}
}
add_action( 'bp_after_setup_theme', 'buddyvibes_includes' );