Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 113 lines (99 sloc) 4.087 kB
3289973 @milohuang 1.0.0
authored
1 <?php
747e2c9 @milohuang Reverie 4
authored
2 /*
3 Author: Zhen Huang
4 URL: http://themefortress.com/
5
6 This place is much cleaner. Put your theme specific codes here,
f312d87 @milohuang Foundation 5.0.3 updates, better child theme support
authored
7 anything else you may want to use plugins to keep things tidy.
747e2c9 @milohuang Reverie 4
authored
8
9 */
10
11 /*
12 1. lib/clean.php
7845905 @charleslouis Moves menu walker to its own file and adds class cleaning
charleslouis authored
13 - head cleanup
747e2c9 @milohuang Reverie 4
authored
14 - post and images related cleaning
15 */
16 require_once('lib/clean.php'); // do all the cleaning and enqueue here
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
17
7d3b3dc @milohuang Reverie 5
authored
18 /*
19 2. lib/enqueue-style.php
20 - enqueue Foundation and Reverie CSS
21 */
22 require_once('lib/enqueue-style.php');
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
23
747e2c9 @milohuang Reverie 4
authored
24 /*
25 3. lib/foundation.php
26 - add pagination
27 */
28 require_once('lib/foundation.php'); // load Foundation specific functions like top-bar
29 /*
7845905 @charleslouis Moves menu walker to its own file and adds class cleaning
charleslouis authored
30 4. lib/nav.php
31 - custom walker for top-bar and related
32 */
33 require_once('lib/nav.php'); // filter default wordpress menu classes and clean wp_nav_menu markup
34 /*
35 5. lib/presstrends.php
747e2c9 @milohuang Reverie 4
authored
36 - add PressTrends, tracks how many people are using Reverie
37 */
38 require_once('lib/presstrends.php'); // load PressTrends to track the usage of Reverie across the web, comment this line if you don't want to be tracked
39
40 /**********************
41 Add theme supports
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
42 **********************/
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
43 if( ! function_exists( 'reverie_theme_support' ) ) {
44 function reverie_theme_support() {
45 // Add language supports.
46 load_theme_textdomain('reverie', get_template_directory() . '/lang');
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
47
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
48 // Add post thumbnail supports. http://codex.wordpress.org/Post_Thumbnails
49 add_theme_support('post-thumbnails');
50 // set_post_thumbnail_size(150, 150, false);
51 add_image_size('fd-lrg', 1024, 99999);
52 add_image_size('fd-med', 768, 99999);
53 add_image_size('fd-sm', 320, 9999);
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
54
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
55 // rss thingy
56 add_theme_support('automatic-feed-links');
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
57
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
58 // Add post formats support. http://codex.wordpress.org/Post_Formats
59 add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
60
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
61 // Add menu support. http://codex.wordpress.org/Function_Reference/register_nav_menus
62 add_theme_support('menus');
63 register_nav_menus(array(
64 'primary' => __('Primary Navigation', 'reverie'),
65 'additional' => __('Additional Navigation', 'reverie'),
66 'utility' => __('Utility Navigation', 'reverie')
67 ));
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
68
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
69 // Add custom background support
70 add_theme_support( 'custom-background',
71 array(
72 'default-image' => '', // background image default
73 'default-color' => '', // background color default (dont add the #)
74 'wp-head-callback' => '_custom_background_cb',
75 'admin-head-callback' => '',
76 'admin-preview-callback' => ''
77 )
78 );
79 }
5050fda enqueue scripts & styles
flickapix authored
80 }
747e2c9 @milohuang Reverie 4
authored
81 add_action('after_setup_theme', 'reverie_theme_support'); /* end Reverie theme support */
5050fda enqueue scripts & styles
flickapix authored
82
3289973 @milohuang 1.0.0
authored
83 // create widget areas: sidebar, footer
84 $sidebars = array('Sidebar');
85 foreach ($sidebars as $sidebar) {
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
86 register_sidebar(array('name'=> $sidebar,
25c8089 @mcerrick Update functions.php
mcerrick authored
87 'id' => 'Sidebar',
7d3b3dc @milohuang Reverie 5
authored
88 'before_widget' => '<article id="%1$s" class="panel widget %2$s">',
89 'after_widget' => '</article>',
90 'before_title' => '<h4>',
91 'after_title' => '</h4>'
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
92 ));
3289973 @milohuang 1.0.0
authored
93 }
94 $sidebars = array('Footer');
95 foreach ($sidebars as $sidebar) {
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
96 register_sidebar(array('name'=> $sidebar,
c7737a3 @bybe Update functions.php
bybe authored
97 'id' => 'Footer',
7d3b3dc @milohuang Reverie 5
authored
98 'before_widget' => '<div class="large-3 columns"><article id="%1$s" class="panel widget %2$s">',
99 'after_widget' => '</article></div>',
100 'before_title' => '<h4>',
101 'after_title' => '</h4>'
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
102 ));
3289973 @milohuang 1.0.0
authored
103 }
104
f312d87 @milohuang Foundation 5.0.3 updates, better child theme support
authored
105 // return entry meta information for posts, used by multiple loops, you can override this function by defining them first in your child theme's functions.php file
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
106 if ( ! function_exists( 'reverie_entry_meta' ) ) {
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
107 function reverie_entry_meta() {
7d3b3dc @milohuang Reverie 5
authored
108 echo '<span class="byline author">'. __('Written by', 'reverie') .' <a href="'. get_author_posts_url(get_the_author_meta('ID')) .'" rel="author" class="fn">'. get_the_author() .', </a></span>';
109 echo '<time class="updated" datetime="'. get_the_time('c') .'" pubdate>'. get_the_time('F jS, Y') .'</time>';
9fa5647 @dangieschen Added changes to allow child theme to overwrite reverie_entry_meta an…
dangieschen authored
110 }
c481ec4 @pixleight Added checks to see if functions have already been declared; allows f…
pixleight authored
111 };
25c8089 @mcerrick Update functions.php
mcerrick authored
112 ?>
Something went wrong with that request. Please try again.