-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunctions.php
executable file
·125 lines (109 loc) · 3.86 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php
/**
* The functions file is used to initialize everything in the theme. It controls how the theme is loaded and
* sets up the supported features, default actions, and default filters.
*
* @package Feather
* @version 1.0.1
* @author Ed Reckers <[email protected]>
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( ! function_exists( 'feather_theme_setup' ) ) :
/**
* Theme setup.
*
* Set up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support post thumbnails.
*/
function feather_theme_setup() {
/*
* Make available for translation.
*
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Feather, use a find and
* replace to change 'feather' to the name of your theme in all
* template files.
*/
//load_theme_textdomain( THEME_TEXTDOMAIN, get_template_directory() . '/languages' );
// Add RSS feed links to <head> for posts and comments.
add_theme_support( 'automatic-feed-links' );
/*
* Enable support for Post Thumbnails, and declare two sizes.
*
* Recommended Media Settings > Image Sizes
*
* thumbnail: 200x9999 (unset cropping)
* medium: 415x9999
* large: 1440x9999
*/
add_theme_support( 'post-thumbnails' );
//set_post_thumbnail_size( 200, 9999, false );
// Finer control for Bootstrap Grid
/*
add_image_size( 'img-4col', 193, 9999 ); // span width of 4 column grid w/ unlimited height
add_image_size( 'img-3col', 267, 9999 ); // span width of 3 column grid w/ unlimited height
add_image_size( 'img-2col', 415, 9999 ); // span width of 2 column grid w/ unlimited height
*/
// Add post formats (http://codex.wordpress.org/Post_Formats)
// add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) );
// Register menu locations for creating menus with wp_nav_menu().
register_nav_menus( array(
'primary' => __( 'Primary Menu', THEME_TEXTDOMAIN ),
'secondary' => __( 'Secondary Menu', THEME_TEXTDOMAIN ),
'footer' => __( 'Footer Menu', THEME_TEXTDOMAIN )
) );
}
endif; // feather_theme_setup
add_action( 'after_setup_theme', 'feather_theme_setup' );
/**
* $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; }
/**
* Load config
*/
require get_template_directory() . '/lib/config.php';
/**
* Load utils
*
* This includes functions lifted from Roots and Underscores themes that
* couldn't be added by including the main file, needed customizations, or both.
*/
require get_template_directory() . '/lib/utils.php';
/**
* Register widget areas
*/
require get_template_directory() . '/lib/register-widgets.php';
/**
* Enqueue scripts and styles
*/
require get_template_directory() . '/lib/enqueue-scripts.php';
/**
* Load custom post types
*/
//require get_template_directory() . '/lib/post-types.php';
/**
* Load Roots /lib Files
*
* https://github.com/roots/roots
* http://roots.io/starter-theme/
*/
require get_template_directory() . '/lib/roots/comments.php';
require get_template_directory() . '/lib/roots/nav.php';
require get_template_directory() . '/lib/roots/utils.php';
require get_template_directory() . '/lib/roots/cleanup.php';
require get_template_directory() . '/lib/roots/titles.php';
/**
* Register alternative (to Roots) Custom Navigation Walker
*
* https://github.com/twittem/wp-bootstrap-navwalker
*
*/
//require get_template_directory() . '/lib/wp_bootstrap_navwalker.php';