/
functions.php
31 lines (27 loc) · 1.12 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
<?php
// Enque the scripts we need from mother-theme
add_action( 'wp_enqueue_scripts', 'be_theme_enqueue_styles' );
function be_theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array() );
}
//Usage: get_net_site_info($net_site_name, $net_site_desc);
function get_net_site_info(&$name, &$desc) {
switch_to_blog(1);
$name = get_bloginfo( 'name' );
$desc = get_bloginfo( 'description' );
restore_current_blog();
}
// Load child theme translation files
add_action( 'after_setup_theme', 'be_child_portal_load_theme_textdomain' );
function be_child_portal_load_theme_textdomain() {
load_child_theme_textdomain( 'beyond-expectations', get_stylesheet_directory() . '/languages/parent-textdomain' );
load_theme_textdomain( 'beyond-expectations-child-ngo', get_stylesheet_directory() . '/languages' );
}
// Debug, to show what template file WP loads.
//add_action('wp_head', 'bengo_show_template');
function bengo_show_template() {
global $template;
print_r($template);
}
?>