/
functions.php
97 lines (90 loc) · 3.27 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
<?php
/**
* @package WordPress
* @subpackage Tarski
*/
/**
* Tarski's constants.
*
* These mostly provide convenient aliases for filesystem paths. Tarski's many
* files live in a number of directories (the main ones being /app and
* /library), so keeping includes simple is greatly helped by a sane set of
* path constants. The one exception is TARSKIVERSIONFILE, which defines the
* URL of the update notifier.
*
* @see TarskiVersion
* @link http://tarskitheme.com/help/updates/notifier/
*/
define('TARSKICLASSES', TEMPLATEPATH . '/library/classes');
define('TARSKIHELPERS', TEMPLATEPATH . '/library/helpers');
define('TARSKIDISPLAY', TEMPLATEPATH . '/app/templates');
if (!defined('TARSKICACHE'))
define('TARSKICACHE', WP_CONTENT_DIR . '/tarski');
if (!defined('TARSKIVERSIONFILE'))
define('TARSKIVERSIONFILE', 'http://tarskitheme.com/version.atom');
/**
* Core library files.
*
* These files will be loaded whenever WordPress is. They include a few key
* functions, and the core classes that Tarski requires to load its options,
* add dependencies to document heads, and output comments.
*
* @see Options
* @see Asset
* @see TarskiCommentWalker
*/
require_once(TEMPLATEPATH . '/library/core.php');
require_once(TARSKICLASSES . '/options.php');
require_once(TARSKICLASSES . '/asset.php');
require_once(TARSKICLASSES . '/comment_walker.php');
/**
* Admin library files.
*
* These library files are required for Tarski's administrative functions:
* notifying the user about updates, selecting pages to add to the navbar,
* defining the options page parameters, and so on. They are loaded only on
* when a WordPress admin page is accessed, so as to reduce the load on the
* server.
*
* @see TarskiVersion
* @see WalkerPageSelect
*/
if (is_admin()) {
require_once(TARSKICLASSES . '/version.php');
require_once(TARSKICLASSES . '/page_select.php');
require_once(TARSKIHELPERS . '/admin_helper.php');
}
/**
* Templating libraries.
*
* As a theme, particularly given its complexity and multiplicity of options,
* Tarski needs a lot of templating functions. There is an ongoing effort to
* split functions up into logical groups spread across more and smaller files,
* so that each grouping remains comprehensible and each function easy to find.
*/
require_once(TARSKIHELPERS . '/template_helper.php');
require_once(TARSKIHELPERS . '/content_helper.php');
require_once(TARSKIHELPERS . '/comments_helper.php');
require_once(TARSKIHELPERS . '/author_helper.php');
require_once(TARSKIHELPERS . '/tag_helper.php');
require_once(TARSKIHELPERS . '/widgets.php');
/**
* API files.
*
* Tarski's API is actually spread across much of the library files required
* above, but certain pieces of functionality such as generic template hooks,
* legacy API handlers, and deprecated functions, all live in specialised API
* files where they can be easily found and documented.
*/
require_once(TEMPLATEPATH . '/app/api/hooks.php');
include_once(TEMPLATEPATH . '/app/api/deprecated.php');
/**
* Launcher.
*
* The launcher file makes an inital round of function calls, loading any
* available localisation files, defining several constants which WordPress
* requires, registering widget sidebars, and adding numerous actions and
* filters.
*/
require_once(TEMPLATEPATH . '/app/launcher.php');
?>