blob: 809aee70ccb15f7c82a9af3050f581997484dcbb (
plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<?php
/**
* Enable theme features
*/
add_theme_support('root-relative-urls'); // Enable relative URLs
add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's top navbar
add_theme_support('bootstrap-gallery'); // Enable Bootstrap's thumbnails component on [gallery]
add_theme_support('nice-search'); // Enable /?s= to /search/ redirect
add_theme_support('jquery-cdn'); // Enable to load jQuery from the Google CDN
/**
* Configuration values
*/
define('GOOGLE_ANALYTICS_ID', ''); // UA-XXXXX-Y (Note: Universal Analytics only, not Classic Analytics)
define('POST_EXCERPT_LENGTH', 40); // Length in words for excerpt_length filter (http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length)
/**
* .main classes
*/
function roots_main_class() {
if (roots_display_sidebar()) {
// Classes on pages with the sidebar
$class = 'col-sm-8';
} else {
// Classes on full width pages
$class = 'col-sm-12';
}
return $class;
}
/**
* .sidebar classes
*/
function roots_sidebar_class() {
return 'col-sm-4';
}
/**
* Define which pages shouldn't have the sidebar
*
* See lib/sidebar.php for more details
*/
function roots_display_sidebar() {
$sidebar_config = new Roots_Sidebar(
/**
* Conditional tag checks (http://codex.wordpress.org/Conditional_Tags)
* Any of these conditional tags that return true won't show the sidebar
*
* To use a function that accepts arguments, use the following format:
*
* array('function_name', array('arg1', 'arg2'))
*
* The second element must be an array even if there's only 1 argument.
*/
array(
'is_404',
'is_front_page'
),
/**
* Page template checks (via is_page_template())
* Any of these page templates that return true won't show the sidebar
*/
array(
'blogpage.php',
'template-custom.php'
)
);
return apply_filters('roots_display_sidebar', $sidebar_config->display);
}
/**
* $content_width is a global variable used by WordPress for max image upload sizes
* and media embeds (in pixels).
*
* Example: If the content area is 640px wide, set $content_width = 620; so images and videos will not overflow.
* Default: 1140px is the default Bootstrap container width.
*/
if (!isset($content_width)) { $content_width = 1140; }
|