Repository navigation
Expand file tree
/
Copy pathcustomizer.php
More file actions
194 lines (182 loc) · 7 KB
/
Copy pathcustomizer.php
File metadata and controls
194 lines (182 loc) · 7 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
function tanx_customize(){
$font_primary = ot_get_option('primary_font', 'Open Sans');
if(!isset($font_primary[0]['family'])){
$font_primary = array(array('family'=>$font_primary));
}
$font_primary_name = str_replace(' ', '+',$font_primary[0]['family']);
wp_enqueue_style('tanx_primary_google_font', 'http://fonts.googleapis.com/css?family=' . $font_primary_name . ':400,100,900italic,900,700,500italic,500,700italic,400italic,300italic,300,100italic');
$font_secondary = ot_get_option('secondary_font' , 'Open Sans');
if(!isset($font_secondary[0]['family'])){
$font_secondary = array(array('family'=>$font_secondary));
}
$font_secondary_name = str_replace(' ', '+',$font_secondary[0]['family']);
wp_enqueue_style('tanx_secondary_google_font', 'http://fonts.googleapis.com/css?family=' . $font_secondary_name . ':400,100,900italic,900,700,500italic,500,700italic,400italic,300italic,300,100italic');
$custom_css = "
<style>
body {
font-size: " . ot_get_option('base_font_size') . "px;
}
nav.top-nav.nav-fixed {
background: " . ot_get_option('nav_background') . ";
}
h1, h2, h3, h4, h5, h6, .top-nav .menu li a, .type-post ul li .list-title, .type-page ul li .list-title, footer .copyright, a.back-to-top, .comment-form > p > label, .form-label, .wpcf7-form-control, ul#sidebar .widget ul li,ul#sidebar .widget ul li a, .portfolio-item-holder .overlay .project-details {
font-family: '" . $font_primary['0']['family'] . "';
}
body, .home-logo .website-description {
font-family: '" . $font_secondary['0']['family'] . "';
}
.sidebar.main-sidebar {
background: " . ot_get_option('sidebar_background') . ";
}
.sidebar::-webkit-scrollbar-thumb {
border-radius: 2px
-webkit-box-shadow:inset 0px 0px 0px 6px " . ot_get_option('sidebar_background') . ";
box-shadow:inset 0px 0px 0px 6px " . ot_get_option('sidebar_background') . ";
background: rgba(255,255,255,.1);
}
ul#sidebar .widget ul li,
ul#sidebar .widget ul li a {
color: " . ot_get_option('sidebar_link_color') . ";
}
.sidebar .social a {
color: " . ot_get_option('sidebar_link_color') . ";
border-color: " . ot_get_option('sidebar_link_color') . ";
}
ul#sidebar ul li a:hover,
ul#sidebar .widget ul li a:hover {
color: " . ot_get_option('sidebar_link_hover_color') . ";
}
.sidebar .social a:hover {
color: " . ot_get_option('sidebar_link_hover_color') . ";
border-color: " . ot_get_option('sidebar_link_hover_color') . ";
}
.sidebar,
ul#sidebar .widget .widgettitle,
ul#sidebar .widget ul li .comment-author-link {
color: " . ot_get_option('sidebar_text_color') . ";
}
.sidebar .close-menu span {
background: " . ot_get_option('sidebar_text_color') . ";
}
.top-nav .menu li.active a,
.top-nav .menu li a:hover,
.top-nav .search-toggle.active,
.top-nav .searchform .close-search:hover,
.format-gallery .post-header .navigation a:hover,
footer .social a:hover,
.social .ssba-wrap a:hover,
nav .expand-top-menu.active,
footer .social a:hover,
.comment-respond .comment-reply-title #cancel-comment-reply-link {
color: " . ot_get_option('site_accent_color') . ";
}
.underline_accent,
.post .more-link,
input:focus,
.wpcf7-form-control:focus,
.wpcf7-form-control[type='submit']:hover,
.load-more-ajax,
.type-post a:hover,
.type-page a:hover,
.comment .comment-content .edit-reply a:hover,
.post-bottom .categories a:hover,
.post-navigation .prev-post a:hover,
.post-navigation .next-post a:hover,
.comment-form-comment textarea#comment:focus,
.form-submit input.submit:hover,
#sidebar-404 ul li a:hover,
#sidebar-404 .tagcloud > a:hover {
border-color: " . ot_get_option('site_accent_color') . ";
}
.post.format-quote .author:before,
.content-quote .quote-author:before,
.sidebar-toggle:hover .sidebar-icon,
.portfolio-item-holder .overlay .project-details:after {
background: " . ot_get_option('site_accent_color') . ";
}
body,
.current-query,
.underline_accent,
.post .more-link,
.post .post-title,
.type-post a:hover,
.type-page a:hover,
.post.format-quote .heading-quote,
.post.format-quote .author,
.content-quote .quote-content,
.content-quote .quote-author,
footer .copyright a,
a.back-to-top,
.comment-form > p > label,
.wpcf7-form-control[type='submit'],
.form-label,
.comment .content p.text,
.comment .comment-content .edit-reply a,
.post-bottom .share-story,
.post-navigation .prev-post a,
.post-navigation .next-post a,
.form-submit input.submit,
.load-more-ajax,
.load-more-ajax.done,
.wpcf7-form-control,
#sidebar-404 .widgettitle,
#sidebar-404 ul li a:hover,
#sidebar-404 .tagcloud > a:hover,
.portfolio-item-holder .overlay .project-details,
.comment-respond .comment-reply-title {
color: " . ot_get_option('title_color') . ";
}
p,
.dropdown_button,
.top-nav .menu li a,
.home-logo .website-description,
.type-post p,
.type-page p,
.type-portfolio p
.post-content ul li,
.type-post a,
.type-page a,
.comment .comment-content .comment-meta,
.comment .comment-content .comment-meta .date,
#sidebar-404 ul li a,
#sidebar-404 .tagcloud > a {
color: " . ot_get_option('body_text_color') . ";
}
.light-text,
nav .expand-top-menu,
.top-nav .search-toggle,
.top-nav .searchform .close-search,
.page-info .page-subtitle,
.post-info .post-subtitle,
.post .post-date,
.format-gallery .post-header .navigation a,
footer .copyright p,
footer .social a,
.social .ssba-wrap a {
color: " . ot_get_option('light_text_color') . ";
}
.sidebar-toggle .sidebar-icon {
background: " . ot_get_option('light_text_color') . ";
}
p {
font-weight: " . ot_get_option('paragraph_font_weight') . ";
}
.bottom-overlay {
background: -moz-linear-gradient(top, " . ot_get_option("overlay_primary_color") . " 0%, " . ot_get_option("overlay_secondary_color") . " 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%," . ot_get_option("overlay_primary_color") . "), color-stop(100%," . ot_get_option("overlay_secondary_color") . "));
background: -webkit-linear-gradient(top, " . ot_get_option("overlay_primary_color") . " 0%," . ot_get_option("overlay_secondary_color") . " 100%);
background: -o-linear-gradient(top, " . ot_get_option("overlay_primary_color") . " 0%," . ot_get_option("overlay_secondary_color") . " 100%);
background: -ms-linear-gradient(top, " . ot_get_option("overlay_primary_color") . " 0%," . ot_get_option("overlay_secondary_color") . " 100%);
background: linear-gradient(to bottom, " . ot_get_option("overlay_primary_color") . " 0%, " . ot_get_option("overlay_secondary_color") . " 100%);
}
</style>";
wp_add_inline_style('main', $custom_css);
}
add_action('wp_head', 'tanx_customize');
function fonthelp() {
if (!(defined('DOING_AJAX') && DOING_AJAX)) {
}
}
add_action('admin_init', 'fonthelp');
?>