forked from thomaspark/snowball
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnowball-template.php
More file actions
35 lines (30 loc) · 836 Bytes
/
snowball-template.php
File metadata and controls
35 lines (30 loc) · 836 Bytes
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
<?php
global $article;
global $post;
global $option;
setup_postdata($post);
$snowball = array(
'adminUrl' => admin_url(),
'blogname' => get_bloginfo(),
'blogurl' => get_site_url(),
'date' => get_the_date(),
'excerpt' => get_the_excerpt(),
'includesUrl' => includes_url(),
'pluginsUrl' => plugins_url('', __FILE__),
'title' => get_the_title(),
'url' => get_permalink()
);
$article = snowball_get_article($post->ID, $preview);
$option = $article["theme_option"];
if($option == 1) {
require_once("inc/snowball-template-default.php");
} else {
$upload_dir = wp_upload_dir();
$file = $upload_dir['basedir'] . "/snowball/snowball-template-theme.php";
if (file_exists($file)) {
require_once($file);
} else {
require_once("inc/snowball-template-theme.php");
}
}
?>