forked from thisisangelng/shiftspace.org
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.php
113 lines (88 loc) · 3.36 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
//
// Custom Child Theme Functions for ShiftSpace.org
//
// I've included a "commented out" sample function below that'll add a home link to your menu
// More ideas can be found on "A Guide To Customizing The Thematic Theme Framework"
// http://themeshaper.com/thematic-for-wordpress/guide-customizing-thematic-theme-framework/
function add_blueprint() {
// Include main screen styles css
$content = "\t";
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_directory');
$content .= '/css/blueprint/screen.css';
$content .= "\" media=\"screen, projection\" />";
$content .= "\n";
// Include print css
$content .= "\t";
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_directory');
$content .= '/css/blueprint/print.css';
$content .= "\" media=\"print\" />";
$content .= "\n";
// Include IE-specific CSS fix
$content .= "\t";
$content .= "<!--[if lt IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_directory');
$content .= '/css/blueprint/ie.css';
$content .= "\" /><![endif]-->";
$content .= "\n";
// Include the original style.cc again so it overides the blueprint code
// ideally we would've also found a way to remove the first reference to styles.css, but I couldn't find how
$content .= "\t";
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_url');
$content .= "'\" media=\"screen, projection\" />";
$content .= "\n";
// Echo the whole thing
echo $content;
}
add_action ('wp_head', 'add_blueprint');
/*
// Adds a home link to your menu
// http://codex.wordpress.org/Template_Tags/wp_page_menu
function childtheme_menu_args($args) {
$args = array(
'show_home' => 'Home',
'sort_column' => 'menu_order',
'menu_class' => 'menu',
'echo' => true
);
return $args;
}
add_filter('wp_page_menu_args','childtheme_menu_args');
*/
// Add the WordPress 3.0 menu ----------------------------------------------
function remove_thematic_actions() {
remove_action('thematic_header','thematic_access',9);
}
add_action('init','remove_thematic_actions');
if ( function_exists( 'add_theme_support' ) ) {
// This theme uses wp_nav_menu()
add_theme_support( 'nav-menus' );
}
function childtheme_menu() { ?>
<div id="access">
<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>">
<?php _e('Skip to content', 'thematic'); ?></a></div>
<?php wp_nav_menu( 'sort_column=menu_order&container_class=menu&menu_class=sf-menu' ); ?>
<div id="install">
<a href="#" class="SSButtonMajor SSDeemphasized">Install § Plugin</a>
</div>
</div>
<!-- #access -->
<?php }
add_action('thematic_header','childtheme_menu',9);
// Main page shift box -----------------------------------------------------
function shiftspace_shiftbox(){
if (is_home()){
echo '<div id="shiftBox">
<label>Paste a url, to modify it with Shiftspace apps & share a link to your shift</label>
<div><input type="text" maxlength="2048" id="shiftInput" value="http://"></div>
<input type="submit" value="Shift" name="Shift" class="SSButtonMajor">
<a href="#video" id="hook">what is this?</a>
</div>';
}
}
add_action('thematic_belowheader','shiftspace_shiftbox');
?>