-
Notifications
You must be signed in to change notification settings - Fork 73
/
functions.php
80 lines (68 loc) · 3.19 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
<?php
/**
* "Funny, 'cause I look around at this world you're so eager to be a part of and all I see is six billion
* lunatics looking for the fastest ride out. Who's not crazy? Look around, everyone's drinking, smoking,
* shooting up, shooting each other, or just plain screwing their brains out 'cause they don't want 'em anymore.
* I'm crazy? Honey, I'm the original one-eyed chicklet in the kingdom of the blind, 'cause at least I admit the
* world makes me nuts. Name one person who can take it here. That's all I'm asking. Name one."
* ~ Glorificus (Buffy the Vampire Slayer: Season 5 - Weight of the World)
*
* Theme Authors: Make sure to add a favorite quote of yours above, maybe something that inspired you to
* create this theme.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package HybridBase
* @subpackage Functions
* @version 1.0.0
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2013 - 2015, Justin Tadlock
* @link http://themehybrid.com/themes/hybrid-base
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
// Get the template directory and make sure it has a trailing slash.
$hybrid_base_dir = trailingslashit( get_template_directory() );
// Load the Hybrid Core framework and theme files.
require_once( $hybrid_base_dir . 'library/hybrid.php' );
require_once( $hybrid_base_dir . 'inc/custom-background.php' );
require_once( $hybrid_base_dir . 'inc/custom-header.php' );
require_once( $hybrid_base_dir . 'inc/theme.php' );
// Do theme setup on the 'after_setup_theme' hook.
add_action( 'after_setup_theme', 'hybrid_base_theme_setup', 5 );
/**
* Theme setup function. This function adds support for theme features and defines the default theme
* actions and filters.
*
* @since 1.0.0
* @access public
* @return void
*/
function hybrid_base_theme_setup() {
// Theme layouts.
add_theme_support( 'theme-layouts', array( 'default' => is_rtl() ? '2c-r' :'2c-l' ) );
// Enable custom template hierarchy.
add_theme_support( 'hybrid-core-template-hierarchy' );
// The best thumbnail/image script ever.
add_theme_support( 'get-the-image' );
// Breadcrumbs. Yay!
add_theme_support( 'breadcrumb-trail' );
// Nicer [gallery] shortcode implementation.
add_theme_support( 'cleaner-gallery' );
// Automatically add feed links to <head>.
add_theme_support( 'automatic-feed-links' );
// Post formats.
add_theme_support(
'post-formats',
array( 'aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video' )
);
// Handle content width for embeds and images.
hybrid_set_content_width( 1280 );
}