This repository was archived by the owner on Mar 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·145 lines (106 loc) · 4.52 KB
/
functions.php
File metadata and controls
executable file
·145 lines (106 loc) · 4.52 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
define( 'ZERO_VERSION_NUMBER', '0.0.2' );
/**
* Loads the default theme supported features. Subthemes can remove them with remove_theme_support
*
*/
add_action( 'after_setup_theme', 'zero_setup', 1 ); // Run as soon as possible
function zero_setup() {
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails' );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
// Configure the post thumbnail sizes
add_theme_support( 'zero-post-thumbnails' );
// Add the Modernizr library
add_theme_support( 'zero-modernizr' );
// Use the Modernizr library as the script loader
add_theme_support( 'zero-modernizr-loader' );
// Adds the Zero base set of CSS files (LES): reset.less, editor.less, and prose.less (requires zero-less theme support)
add_theme_support( 'zero-css-base' );
// Configures the WYSIWYG editor to use the styles in prose.less along with reset.less and editor.less
add_theme_support( 'zero-css-editor' );
// Insert the IE HTML5 shiv
// add_theme_support( 'zero-html5-shiv' );
// Loads the scripts in an async fashion while still running them in order
// add_theme_support( 'zero-async-script-load' );
// Use the thread comments script to move the comment field below where replying
add_theme_support( 'zero-thread-comments-script' );
// Provided better class names on the menu items
add_theme_support( 'zero-menu-class-names' );
// Auto-linking images/favicon.ico as the favicon
add_theme_support( 'zero-favicon' );
// Auto-link images/apple-touch-icon[-<X>x<Y>][-precomposed].png as the Apple touch icons
add_theme_support( 'zero-apple-touch-icon' );
// Adds css/login.less to the login screen and changes the WordPress logo to link to the homepage and read your name
add_theme_support( 'zero-login-theme' );
// Make the wp_page_menu function follow the args betters passed from wp_nav_menu
add_theme_support( 'zero-wp-page-menu' );
// Adds the function zero_paginate_index_links() which wraps WP's paginate_links to work for index pages instead of just paginated posts
add_theme_support( 'zero-pager' );
// Handles the registration of menus
add_theme_support( 'zero-nav-menus' );
// Handles the registration of the widget areas (sidebars)
add_theme_support( 'zero-widget-areas' );
// Removes the embed style element for the gallery printed with shortcode
add_theme_support( 'zero-remove-gallery-css' );
// Clean up the comment output
add_theme_support( 'zero-comments' );
// Add options page
add_theme_support( 'zero-options-page' );
// Add customization of page title
add_theme_support( 'zero-page-title' );
// Will set images/apple-touch-startup-image.png as the web-app start up image (320x460px)
// add_theme_support( 'zero-apple-touch-startup-image' );
// Add the nav element to acceptable elements for the menu
add_theme_support( 'zero-nav-menu-container' );
// Give you helper functions to work with the nav menus
add_theme_support( 'zero-nav-menu-helpers' );
// Give you helper functions to work with posts
add_theme_support( 'zero-posts-helpers' );
// Make theme available for translation
// Translations can be filed in the /languages/ directory
// TODO: Create locale
//load_theme_textdomain( 'zero', TEMPLATEPATH . '/languages' );
//$locale = get_locale();
//$locale_file = TEMPLATEPATH . "/languages/$locale.php";
//if ( is_readable( $locale_file ) )
// require_once( $locale_file );
}
/**
* Start loading up features
*/
add_action( 'after_setup_theme', 'zero_load_features' );
function zero_load_features() {
$path = dirname(__FILE__).'/features/';
$features = array(
'zero-css-base',
'zero-css-editor',
//'zero-html5-shiv',
//'zero-async-script-load',
'zero-thread-comments-script',
'zero-menu-class-names',
'zero-favicon',
'zero-apple-touch-icon',
'zero-login-theme',
'zero-pager',
'zero-nav-menus',
'zero-widget-areas',
'zero-remove-gallery-css',
'zero-post-thumbnails',
'zero-comments',
'zero-options-page',
'zero-page-title',
'zero-apple-touch-startup-image',
'zero-nav-menu-container',
'zero-nav-menu-helpers',
'zero-posts-helpers',
'zero-modernizr-loader',
'zero-modernizr',
);
foreach( $features as $feature ) {
require_if_theme_supports( $feature, $path.str_replace('zero-', '', $feature).'.php' );
}
}
require_once( dirname(__FILE__).'/includes/helpers.php' );
require_once( dirname(__FILE__).'/includes/template-loaders.php' );