1 | <?php
|
---|
2 |
|
---|
3 | // This file is part of the Carrington Theme Framework for WordPress
|
---|
4 | // http://carringtontheme.com
|
---|
5 | //
|
---|
6 | // Copyright (c) 2008-2009 Crowd Favorite, Ltd. All rights reserved.
|
---|
7 | // http://crowdfavorite.com
|
---|
8 | //
|
---|
9 | // Released under the GPL license
|
---|
10 | // http://www.opensource.org/licenses/gpl-license.php
|
---|
11 | //
|
---|
12 | // **********************************************************************
|
---|
13 | // This program is distributed in the hope that it will be useful, but
|
---|
14 | // WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
---|
16 | // **********************************************************************
|
---|
17 |
|
---|
18 | if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
|
---|
19 |
|
---|
20 | function cfct_page($file = '') {
|
---|
21 | if (empty($file)) {
|
---|
22 | $file = cfct_default_file('pages');
|
---|
23 | }
|
---|
24 | cfct_template_file('pages', $file);
|
---|
25 | }
|
---|
26 |
|
---|
27 | function cfct_header() {
|
---|
28 | $file = cfct_choose_general_template('header');
|
---|
29 | cfct_template_file('header', $file);
|
---|
30 | }
|
---|
31 |
|
---|
32 | function cfct_footer() {
|
---|
33 | $file = cfct_choose_general_template('footer');
|
---|
34 | cfct_template_file('footer', $file);
|
---|
35 | }
|
---|
36 |
|
---|
37 | function cfct_sidebar() {
|
---|
38 | $file = cfct_choose_general_template('sidebar');
|
---|
39 | cfct_template_file('sidebar', $file);
|
---|
40 | }
|
---|
41 |
|
---|
42 | function cfct_posts() {
|
---|
43 | $file = cfct_choose_general_template('posts');
|
---|
44 | cfct_template_file('posts', $file);
|
---|
45 | }
|
---|
46 |
|
---|
47 | function cfct_single() {
|
---|
48 | $file = cfct_choose_general_template('single');
|
---|
49 | cfct_template_file('single', $file);
|
---|
50 | }
|
---|
51 |
|
---|
52 | function cfct_attachment() {
|
---|
53 | $file = cfct_choose_general_template('attachment');
|
---|
54 | cfct_template_file('attachment', $file);
|
---|
55 | }
|
---|
56 |
|
---|
57 | function cfct_loop() {
|
---|
58 | $file = cfct_choose_general_template('loop');
|
---|
59 | cfct_template_file('loop', $file);
|
---|
60 | }
|
---|
61 |
|
---|
62 | function cfct_content() {
|
---|
63 | $file = cfct_choose_content_template();
|
---|
64 | cfct_template_file('content', $file);
|
---|
65 | }
|
---|
66 |
|
---|
67 | function cfct_excerpt() {
|
---|
68 | $file = cfct_choose_content_template('excerpt');
|
---|
69 | cfct_template_file('excerpt', $file);
|
---|
70 | }
|
---|
71 |
|
---|
72 | function cfct_comments() {
|
---|
73 | $file = cfct_choose_general_template('comments');
|
---|
74 | cfct_template_file('comments', $file);
|
---|
75 | }
|
---|
76 |
|
---|
77 | function cfct_comment($data = null) {
|
---|
78 | $file = cfct_choose_comment_template();
|
---|
79 | cfct_template_file('comment', $file, $data);
|
---|
80 | }
|
---|
81 |
|
---|
82 | function cfct_threaded_comment($comment, $args = array(), $depth) {
|
---|
83 | $GLOBALS['comment'] = $comment;
|
---|
84 | $data = array(
|
---|
85 | 'args' => $args,
|
---|
86 | 'depth' => $depth,
|
---|
87 | );
|
---|
88 | cfct_template_file('comments', 'threaded', $data);
|
---|
89 | }
|
---|
90 |
|
---|
91 | function cfct_form($name = '') {
|
---|
92 | cfct_template_file('forms', $name);
|
---|
93 | }
|
---|
94 |
|
---|
95 | function cfct_misc($name = '') {
|
---|
96 | cfct_template_file('misc', $name);
|
---|
97 | }
|
---|
98 |
|
---|
99 | function cfct_error($name = '') {
|
---|
100 | cfct_template_file('error', $name);
|
---|
101 | }
|
---|
102 |
|
---|
103 |
|
---|
104 | ?> |
---|