-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
executable file
·44 lines (40 loc) · 1.72 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
<?php
/**
* Functions and definitions for WCUS 2019.
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package wcus-2019
*/
/**
* Turn on "new" features for this local site. New features are enabled based on time of site
* creation, approximated based on ID number in the wordcamp.org network. That doesn't map to
* local sites, so there is difference in markup for some features if we don't whitelist the ID.
*
* Change this to the Site ID of your local development site (though it will likely be 47 if
* this is the first additional site you've created)
*/
function wcus_2019_enable_features( $sites ) {
$sites[] = 47;
$sites[] = 49;
return $sites;
}
add_filter( 'wcpt_speaker_post_avatar_enabled_site_ids', 'wcus_2019_enable_features' );
add_filter( 'wcpt_session_post_speaker_info_enabled_site_ids', 'wcus_2019_enable_features' );
add_filter( 'wcpt_session_post_slides_info_enabled_site_ids', 'wcus_2019_enable_features' );
add_filter( 'wcpt_session_post_video_info_enabled_site_ids', 'wcus_2019_enable_features' );
add_filter( 'wcpt_speaker_post_session_info_enabled_site_ids', 'wcus_2019_enable_features' );
/**
* Enqueue child theme style and dequeue the parent style.
*/
function wcus_2019_enqueue_styles() {
$version = '1.0.0';
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
$version = filemtime( dirname( __FILE__ ) . '/style.css' );
}
wp_dequeue_style( 'campsite-2017-style' );
wp_enqueue_style( 'wcus-2019-style', get_stylesheet_directory_uri() . '/style.css', array(), $version );
}
add_action( 'wp_enqueue_scripts', 'wcus_2019_enqueue_styles', 12 );
// Enqueue a mock subscription widget (Jetpack requires a live site).
require_once __DIR__ . '/mock-widget-subscriptions.php';