Version Description
Download this release
Release Info
Developer | builtBackwards |
Plugin | Theme Authenticity Checker (TAC) |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.4.1
- readme.txt +10 -5
- tac.php +305 -294
readme.txt
CHANGED
@@ -3,15 +3,15 @@ Contributors: builtBackwards
|
|
3 |
Donate link: http://builtbackwards.com/donate
|
4 |
Tags: themes, security, javascript, admin
|
5 |
Requires at least: 2.2
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.4
|
8 |
|
9 |
*Scan all of your theme files for potentially malicious or unwanted code.*
|
10 |
|
11 |
== Description ==
|
12 |
Scan all of your theme files for potentially malicious or unwanted code.
|
13 |
|
14 |
-
**
|
15 |
|
16 |
**What TAC Does**
|
17 |
|
@@ -39,6 +39,11 @@ After downloading and extracting the latest version of TAC:
|
|
39 |
|
40 |
== Changelog ==
|
41 |
|
|
|
|
|
|
|
|
|
|
|
42 |
**Version 1.4**
|
43 |
|
44 |
* Compatible with WordPress 2.8!
|
@@ -47,7 +52,7 @@ After downloading and extracting the latest version of TAC:
|
|
47 |
|
48 |
**Version 1.3 (Fixes + New Feature)**
|
49 |
|
50 |
-
* Changed title to
|
51 |
* Compatible with WordPress 2.2 - 2.6.1
|
52 |
* NEW! Checks for embedded Static Links
|
53 |
* NEW! Direct links for editing suspicious files in the WordPress Theme Editor
|
@@ -61,7 +66,7 @@ After downloading and extracting the latest version of TAC:
|
|
61 |
|
62 |
**Version 1.1 (Fixes)**
|
63 |
|
64 |
-
* Style sheet doesn
|
65 |
* Modified code snippet output to prevent interfering with page structure
|
66 |
* Improved styling for slightly more appealing output
|
67 |
|
3 |
Donate link: http://builtbackwards.com/donate
|
4 |
Tags: themes, security, javascript, admin
|
5 |
Requires at least: 2.2
|
6 |
+
Tested up to: 3.0.1
|
7 |
+
Stable tag: 1.4.1
|
8 |
|
9 |
*Scan all of your theme files for potentially malicious or unwanted code.*
|
10 |
|
11 |
== Description ==
|
12 |
Scan all of your theme files for potentially malicious or unwanted code.
|
13 |
|
14 |
+
**Updated for Wordpress 2.9**
|
15 |
|
16 |
**What TAC Does**
|
17 |
|
39 |
|
40 |
== Changelog ==
|
41 |
|
42 |
+
**Version 1.4.1**
|
43 |
+
|
44 |
+
* Compatible with WordPress 2.9
|
45 |
+
* Added alt tags to theme screenshots
|
46 |
+
|
47 |
**Version 1.4**
|
48 |
|
49 |
* Compatible with WordPress 2.8!
|
52 |
|
53 |
**Version 1.3 (Fixes + New Feature)**
|
54 |
|
55 |
+
* Changed title to �Theme Authenticity Checker�, same acronym, makes more sense
|
56 |
* Compatible with WordPress 2.2 - 2.6.1
|
57 |
* NEW! Checks for embedded Static Links
|
58 |
* NEW! Direct links for editing suspicious files in the WordPress Theme Editor
|
66 |
|
67 |
**Version 1.1 (Fixes)**
|
68 |
|
69 |
+
* Style sheet doesn�t explode any more when certain threats are detected
|
70 |
* Modified code snippet output to prevent interfering with page structure
|
71 |
* Improved styling for slightly more appealing output
|
72 |
|
tac.php
CHANGED
@@ -1,295 +1,306 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: TAC (Theme Authenticity Checker)
|
4 |
-
Plugin URI: http://builtbackwards.com/projects/tac/
|
5 |
-
Description: TAC scans all of your theme files for potentially malicious or unwanted code.
|
6 |
-
Author: builtBackwards
|
7 |
-
Version: 1.4
|
8 |
-
Author URI: http://builtbackwards.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
/* Copyright 2009 builtBackwards (William Langford and Sam Leavens) - (email : contact@builtbackwards.com)
|
12 |
-
|
13 |
-
This program is free software; you can redistribute it and/or modify
|
14 |
-
it under the terms of the GNU General Public License as published by
|
15 |
-
the Free Software Foundation; either version 2 of the License, or
|
16 |
-
(at your option) any later version.
|
17 |
-
|
18 |
-
This program is distributed in the hope that it will be useful,
|
19 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
-
GNU General Public License for more details.
|
22 |
-
|
23 |
-
You should have received a copy of the GNU General Public License
|
24 |
-
along with this program; if not, write to the Free Software
|
25 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
-
*/
|
27 |
-
|
28 |
-
function tac_check_theme($template_files, $theme_title) {
|
29 |
-
$static_count = 0;
|
30 |
-
foreach ($template_files as $tfile)
|
31 |
-
{
|
32 |
-
/*
|
33 |
-
* Check for base64 Encoding
|
34 |
-
* Here we check every line of the file for base64 functions.
|
35 |
-
*
|
36 |
-
*/
|
37 |
-
|
38 |
-
$lines = file($tfile, FILE_IGNORE_NEW_LINES); // Read the theme file into an array
|
39 |
-
|
40 |
-
$line_index = 0;
|
41 |
-
$is_first = true;
|
42 |
-
foreach($lines as $this_line)
|
43 |
-
{
|
44 |
-
if (stristr ($this_line, "base64")) // Check for any base64 functions
|
45 |
-
{
|
46 |
-
if ($is_first) {
|
47 |
-
$bad_lines .= tac_make_edit_link($tfile, $theme_title);
|
48 |
-
$is_first = false;
|
49 |
-
}
|
50 |
-
$bad_lines .= "<div class=\"tac-bad\"><strong>Line " . ($line_index+1) . ":</strong> \"" . trim(htmlspecialchars(substr(stristr($this_line, "base64"), 0, 45))) . "...\"</div>";
|
51 |
-
}
|
52 |
-
$line_index++;
|
53 |
-
}
|
54 |
-
|
55 |
-
/*
|
56 |
-
* Check for Static Links
|
57 |
-
* Here we utilize a regex to find HTML static links in the file.
|
58 |
-
*
|
59 |
-
*/
|
60 |
-
|
61 |
-
$file_string = file_get_contents($tfile);
|
62 |
-
|
63 |
-
$url_re='([[:alnum:]\-\.])+(\\.)([[:alnum:]]){2,4}([[:blank:][:alnum:]\/\+\=\%\&\_\\\.\~\?\-]*)';
|
64 |
-
$title_re='[[:blank:][:alnum:][:punct:]]*'; // 0 or more: any num, letter(upper/lower) or any punc symbol
|
65 |
-
$space_re='(\\s*)';
|
66 |
-
|
67 |
-
if (preg_match_all ("/(<a)(\\s+)(href".$space_re."=".$space_re."\"".$space_re."((http|https|ftp):\\/\\/)?)".$url_re."(\"".$space_re.$title_re.$space_re.">)".$title_re."(<\\/a>)/is", $file_string, $out, PREG_SET_ORDER))
|
68 |
-
{
|
69 |
-
$static_urls .= tac_make_edit_link($tfile, $theme_title);
|
70 |
-
|
71 |
-
foreach( $out as $key ) {
|
72 |
-
$static_urls .= "<div class=\"tac-ehh\">";
|
73 |
-
$static_urls .= htmlspecialchars($key[0]);
|
74 |
-
$static_urls .= "</div>";
|
75 |
-
$static_count++;
|
76 |
-
}
|
77 |
-
}
|
78 |
-
} // End for each file in template loop
|
79 |
-
|
80 |
-
// Assemble the HTML results for the completed scan of the current theme
|
81 |
-
if (!isset($bad_lines)) {
|
82 |
-
$summary = '<span class="tac-good-notice">Theme Ok!</span>';
|
83 |
-
} else {
|
84 |
-
$summary = '<span class="tac-bad-notice">Encrypted Code Found!</span>';
|
85 |
-
}
|
86 |
-
if(isset($static_urls)) {
|
87 |
-
$summary .= '<span class="tac-ehh-notice"><strong>'.$static_count.'</strong> Static Link(s) Found...</span>';
|
88 |
-
}
|
89 |
-
|
90 |
-
return array('summary' => $summary, 'bad_lines' => $bad_lines, 'static_urls' => $static_urls, 'static_count' => $static_count);
|
91 |
-
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
function tac_make_edit_link($tfile, $theme_title) {
|
96 |
-
// Assemble the HTML links for editing files with the built-in WP theme editor
|
97 |
-
|
98 |
-
if ($GLOBALS['wp_version'] >= "2.
|
99 |
-
return "<div class=\"file-path\"><a href=\"theme-editor.php?file=/" . substr(stristr($tfile, "themes"), 0) . "&theme=" . urlencode($theme_title) ."\">" . substr(stristr($tfile, "wp-content"), 0) . " [Edit]</a></div>";
|
100 |
-
}
|
101 |
-
return "<div class=\"file-path\"><a href=\"theme-editor.php?file
|
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 |
-
document.getElementById(divid).style.display = '
|
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 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
}
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
background:#
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
}
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: TAC (Theme Authenticity Checker)
|
4 |
+
Plugin URI: http://builtbackwards.com/projects/tac/
|
5 |
+
Description: TAC scans all of your theme files for potentially malicious or unwanted code.
|
6 |
+
Author: builtBackwards
|
7 |
+
Version: 1.4.1
|
8 |
+
Author URI: http://builtbackwards.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Copyright 2009 builtBackwards (William Langford and Sam Leavens) - (email : contact@builtbackwards.com)
|
12 |
+
|
13 |
+
This program is free software; you can redistribute it and/or modify
|
14 |
+
it under the terms of the GNU General Public License as published by
|
15 |
+
the Free Software Foundation; either version 2 of the License, or
|
16 |
+
(at your option) any later version.
|
17 |
+
|
18 |
+
This program is distributed in the hope that it will be useful,
|
19 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
GNU General Public License for more details.
|
22 |
+
|
23 |
+
You should have received a copy of the GNU General Public License
|
24 |
+
along with this program; if not, write to the Free Software
|
25 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
+
*/
|
27 |
+
|
28 |
+
function tac_check_theme($template_files, $theme_title) {
|
29 |
+
$static_count = 0;
|
30 |
+
foreach ($template_files as $tfile)
|
31 |
+
{
|
32 |
+
/*
|
33 |
+
* Check for base64 Encoding
|
34 |
+
* Here we check every line of the file for base64 functions.
|
35 |
+
*
|
36 |
+
*/
|
37 |
+
|
38 |
+
$lines = file($tfile, FILE_IGNORE_NEW_LINES); // Read the theme file into an array
|
39 |
+
|
40 |
+
$line_index = 0;
|
41 |
+
$is_first = true;
|
42 |
+
foreach($lines as $this_line)
|
43 |
+
{
|
44 |
+
if (stristr ($this_line, "base64")) // Check for any base64 functions
|
45 |
+
{
|
46 |
+
if ($is_first) {
|
47 |
+
$bad_lines .= tac_make_edit_link($tfile, $theme_title);
|
48 |
+
$is_first = false;
|
49 |
+
}
|
50 |
+
$bad_lines .= "<div class=\"tac-bad\"><strong>Line " . ($line_index+1) . ":</strong> \"" . trim(htmlspecialchars(substr(stristr($this_line, "base64"), 0, 45))) . "...\"</div>";
|
51 |
+
}
|
52 |
+
$line_index++;
|
53 |
+
}
|
54 |
+
|
55 |
+
/*
|
56 |
+
* Check for Static Links
|
57 |
+
* Here we utilize a regex to find HTML static links in the file.
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
|
61 |
+
$file_string = file_get_contents($tfile);
|
62 |
+
|
63 |
+
$url_re='([[:alnum:]\-\.])+(\\.)([[:alnum:]]){2,4}([[:blank:][:alnum:]\/\+\=\%\&\_\\\.\~\?\-]*)';
|
64 |
+
$title_re='[[:blank:][:alnum:][:punct:]]*'; // 0 or more: any num, letter(upper/lower) or any punc symbol
|
65 |
+
$space_re='(\\s*)';
|
66 |
+
|
67 |
+
if (preg_match_all ("/(<a)(\\s+)(href".$space_re."=".$space_re."\"".$space_re."((http|https|ftp):\\/\\/)?)".$url_re."(\"".$space_re.$title_re.$space_re.">)".$title_re."(<\\/a>)/is", $file_string, $out, PREG_SET_ORDER))
|
68 |
+
{
|
69 |
+
$static_urls .= tac_make_edit_link($tfile, $theme_title);
|
70 |
+
|
71 |
+
foreach( $out as $key ) {
|
72 |
+
$static_urls .= "<div class=\"tac-ehh\">";
|
73 |
+
$static_urls .= htmlspecialchars($key[0]);
|
74 |
+
$static_urls .= "</div>";
|
75 |
+
$static_count++;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
} // End for each file in template loop
|
79 |
+
|
80 |
+
// Assemble the HTML results for the completed scan of the current theme
|
81 |
+
if (!isset($bad_lines)) {
|
82 |
+
$summary = '<span class="tac-good-notice">Theme Ok!</span>';
|
83 |
+
} else {
|
84 |
+
$summary = '<span class="tac-bad-notice">Encrypted Code Found!</span>';
|
85 |
+
}
|
86 |
+
if(isset($static_urls)) {
|
87 |
+
$summary .= '<span class="tac-ehh-notice"><strong>'.$static_count.'</strong> Static Link(s) Found...</span>';
|
88 |
+
}
|
89 |
+
|
90 |
+
return array('summary' => $summary, 'bad_lines' => $bad_lines, 'static_urls' => $static_urls, 'static_count' => $static_count);
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
function tac_make_edit_link($tfile, $theme_title) {
|
96 |
+
// Assemble the HTML links for editing files with the built-in WP theme editor
|
97 |
+
|
98 |
+
if ($GLOBALS['wp_version'] >= "2.9") {
|
99 |
+
return "<div class=\"file-path\"><a href=\"theme-editor.php?file=/" . substr(stristr($tfile, "themes"), 0) . "&theme=" . urlencode($theme_title) ."&dir=theme\">" . substr(stristr($tfile, "wp-content"), 0) . " [Edit]</a></div>";
|
100 |
+
} elseif ($GLOBALS['wp_version'] >= "2.6") {
|
101 |
+
return "<div class=\"file-path\"><a href=\"theme-editor.php?file=/" . substr(stristr($tfile, "themes"), 0) . "&theme=" . urlencode($theme_title) ."\">" . substr(stristr($tfile, "wp-content"), 0) . " [Edit]</a></div>";
|
102 |
+
} else {
|
103 |
+
return "<div class=\"file-path\"><a href=\"theme-editor.php?file=" . substr(stristr($tfile, "wp-content"), 0) . "&theme=" . urlencode($theme_title) ."\">" . substr(stristr($tfile, "wp-content"), 0) ." [Edit]</a></div>";
|
104 |
+
}
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
function tac_get_template_files($template) {
|
109 |
+
// Scan through the template directory and add all php files to an array
|
110 |
+
|
111 |
+
$theme_root = get_theme_root();
|
112 |
+
|
113 |
+
$template_files = array();
|
114 |
+
$template_dir = @ dir("$theme_root/$template");
|
115 |
+
if ( $template_dir ) {
|
116 |
+
while(($file = $template_dir->read()) !== false) {
|
117 |
+
if ( !preg_match('|^\.+$|', $file) && preg_match('|\.php$|', $file) )
|
118 |
+
$template_files[] = "$theme_root/$template/$file";
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
return $template_files;
|
123 |
+
}
|
124 |
+
|
125 |
+
function tac_init() {
|
126 |
+
if ( function_exists('add_submenu_page') )
|
127 |
+
$page = add_submenu_page('themes.php',__('TAC'), __('TAC'), '10', 'tac.php', 'tac');
|
128 |
+
}
|
129 |
+
|
130 |
+
add_action('admin_menu', 'tac_init');
|
131 |
+
|
132 |
+
function tac() {
|
133 |
+
|
134 |
+
?>
|
135 |
+
<script type="text/javascript">
|
136 |
+
function toggleDiv(divid){
|
137 |
+
if(document.getElementById(divid).style.display == 'none'){
|
138 |
+
document.getElementById(divid).style.display = 'block';
|
139 |
+
}else{
|
140 |
+
document.getElementById(divid).style.display = 'none';
|
141 |
+
}
|
142 |
+
}
|
143 |
+
</script>
|
144 |
+
<h2>
|
145 |
+
<?php _e('TAC (Theme Authenticity Checker)'); ?>
|
146 |
+
</h2>
|
147 |
+
<div class="pinfo">
|
148 |
+
TAC checks themes for malicious or potentially unwanted code.<br/>
|
149 |
+
For more info please go to the plugin page: <a href="http://builtbackwards.com/projects/tac/">http://builtbackwards.com/projects/tac/</a><br/><br/>
|
150 |
+
To submit bugs, suggestions, or comments please post in the <a href="http://wordpress.org/tags/tac">WordPress.org Forum</a>.
|
151 |
+
</div>
|
152 |
+
<div id="wrap">
|
153 |
+
<?php
|
154 |
+
$themes = get_themes();
|
155 |
+
$theme_names = array_keys($themes);
|
156 |
+
natcasesort($theme_names);
|
157 |
+
foreach ($theme_names as $theme_name) {
|
158 |
+
$template_files = tac_get_template_files($themes[$theme_name]['Template']);
|
159 |
+
$title = $themes[$theme_name]['Title'];
|
160 |
+
$version = $themes[$theme_name]['Version'];
|
161 |
+
$author = $themes[$theme_name]['Author'];
|
162 |
+
$screenshot = $themes[$theme_name]['Screenshot'];
|
163 |
+
$stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
|
164 |
+
|
165 |
+
if ($GLOBALS['wp_version'] >= "2.9") {
|
166 |
+
$theme_root_uri = $themes[$theme_name]['Theme Root URI'];
|
167 |
+
$template = $themes[$theme_name]['Template'];
|
168 |
+
}
|
169 |
+
|
170 |
+
$results = tac_check_theme($template_files, $title);
|
171 |
+
?>
|
172 |
+
<div id="tacthemes">
|
173 |
+
<?php if ( $screenshot ) :
|
174 |
+
if ($GLOBALS['wp_version'] >= "2.9") : ?>
|
175 |
+
<img src="<?php echo $theme_root_uri.'/'.$template.'/'.$screenshot.'"'."alt=\"$title Screenshot\""; ?> />
|
176 |
+
<?php else : ?>
|
177 |
+
<img src="<?php echo get_option('siteurl') . '/wp-content' . str_replace('wp-content', '', $stylesheet_dir) . '/' . $screenshot.'"'."alt=\"$title Screenshot\""; ?> />
|
178 |
+
<?php endif; ?>
|
179 |
+
<?php else : ?>
|
180 |
+
<div class="tacnoimg">No Screenshot Found</div>
|
181 |
+
<?php endif; ?>
|
182 |
+
|
183 |
+
<?php echo '<div class="t-info">'."<strong>$title</strong> $version by $author"; ?>
|
184 |
+
|
185 |
+
<?php if ($results['bad_lines'] != '' || $results['static_urls'] != '') : ?>
|
186 |
+
<input type="button" value="Details" class="button-primary" id="details" name="details" onmousedown="toggleDiv('<?php echo $title; ?>');" href="javascript:;"/>
|
187 |
+
<?php endif; ?>
|
188 |
+
</div>
|
189 |
+
|
190 |
+
<?php echo $results['summary']; ?>
|
191 |
+
|
192 |
+
<div class="tacresults" id="<?php echo $title; ?>" style="display:none;">
|
193 |
+
<?php echo $results['bad_lines'].$results['static_urls']; ?>
|
194 |
+
</div>
|
195 |
+
|
196 |
+
</div>
|
197 |
+
|
198 |
+
<?php
|
199 |
+
}
|
200 |
+
echo '</div>';
|
201 |
+
}
|
202 |
+
|
203 |
+
// CSS to format results of themes check
|
204 |
+
function tac_css() {
|
205 |
+
echo '
|
206 |
+
<style type="text/css">
|
207 |
+
<!--
|
208 |
+
|
209 |
+
#wrap {
|
210 |
+
background-color:#FFF;
|
211 |
+
margin-right:5px;
|
212 |
+
}
|
213 |
+
|
214 |
+
.tac-bad,.tac-ehh {
|
215 |
+
border:1px inset #000;
|
216 |
+
font-family:"Courier New", Courier, monospace;
|
217 |
+
margin-bottom:10px;
|
218 |
+
margin-left:10px;
|
219 |
+
padding:5px;
|
220 |
+
width:90%;
|
221 |
+
}
|
222 |
+
|
223 |
+
.tac-bad {
|
224 |
+
background:#FFC0CB;
|
225 |
+
}
|
226 |
+
|
227 |
+
.tac-ehh {
|
228 |
+
background:#FFFEEB;
|
229 |
+
}
|
230 |
+
|
231 |
+
span.tac-good-notice, span.tac-bad-notice, span.tac-ehh-notice {
|
232 |
+
float:left;
|
233 |
+
font-size:120%;
|
234 |
+
margin: 25px 10px 0 0;
|
235 |
+
padding:10px;
|
236 |
+
}
|
237 |
+
|
238 |
+
span.tac-good-notice {
|
239 |
+
background:#3fc33f;
|
240 |
+
border:1px solid #000;
|
241 |
+
width:90px;
|
242 |
+
vertical-align: middle;
|
243 |
+
}
|
244 |
+
|
245 |
+
span.tac-bad-notice {
|
246 |
+
background:#FFC0CB;
|
247 |
+
border:1px solid #000;
|
248 |
+
width:195px;
|
249 |
+
}
|
250 |
+
|
251 |
+
span.tac-ehh-notice {
|
252 |
+
background:#FFFEEB;
|
253 |
+
border:1px solid #ccc;
|
254 |
+
width:210px;
|
255 |
+
}
|
256 |
+
|
257 |
+
.file-path {
|
258 |
+
color:#666;
|
259 |
+
font-size:12px;
|
260 |
+
padding-bottom:1px;
|
261 |
+
padding-top:5px;
|
262 |
+
text-align:right;
|
263 |
+
width:92%;
|
264 |
+
}
|
265 |
+
|
266 |
+
.file-path a {
|
267 |
+
text-decoration:none;
|
268 |
+
}
|
269 |
+
|
270 |
+
.pinfo {
|
271 |
+
background:#DCDCDC;
|
272 |
+
margin:5px 5px 40px;
|
273 |
+
padding:5px;
|
274 |
+
}
|
275 |
+
|
276 |
+
#tacthemes {
|
277 |
+
border-top:1px solid #ccc;
|
278 |
+
margin:10px;
|
279 |
+
min-height:100px;
|
280 |
+
padding-bottom:20px;
|
281 |
+
padding-top:20px;
|
282 |
+
}
|
283 |
+
|
284 |
+
#tacthemes img,.tacnoimg {
|
285 |
+
border:1px solid #000;
|
286 |
+
color:#DCDCDC;
|
287 |
+
float:left;
|
288 |
+
font-size:16px;
|
289 |
+
height:75px;
|
290 |
+
margin:10px;
|
291 |
+
text-align:center;
|
292 |
+
width:100px;
|
293 |
+
}
|
294 |
+
|
295 |
+
.tacresults {
|
296 |
+
clear:left;
|
297 |
+
margin-left:130px;
|
298 |
+
|
299 |
+
}
|
300 |
+
-->
|
301 |
+
</style>
|
302 |
+
';
|
303 |
+
}
|
304 |
+
|
305 |
+
add_action('admin_head', 'tac_css');
|
306 |
?>
|