Theme Check - Version 20140929.1

Version Description

  • Added new checks and updates from Frank Klein at Automattic. Thanks Frank!
  • Updated deprecated function listings
  • Customizer check: All add_settings must use sanitization callbacks, for security
  • Plugin territory checks: Themes must not register post types or taxonomies or add shortcodes for post content
  • Widgets: Calls to register_sidebar must be called from the widgets_init action hook
  • Title: tags must exist and not have anything in them other than a call to wp_title()
  • CDN: Checks for use of common CDNs (recommended only)
  • Note: Changed plugin and author URIs due to old URIs being invalid. These may change again in the future, the URIs to my own site are temporarily only.
Download this release

Release Info

Developer Otto42
Plugin Icon 128x128 Theme Check
Version 20140929.1
Comparing to
See all releases

Version 20140929.1

assets/gray-grad.png ADDED
Binary file
assets/style.css ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .tc-box {
2
+ padding:20px 0;
3
+ border-top:1px solid #dfdfdf;
4
+ }
5
+ .tc-warning, .tc-required, .tc-fail {
6
+ color:red;
7
+ }
8
+ .tc-recommended, .tc-pass {
9
+ color: green;
10
+ }
11
+ .tc-info {
12
+ color: blue;
13
+ }
14
+ .tc-grep span {
15
+ background: yellow;
16
+ }
17
+ pre {
18
+ white-space: pre-wrap;
19
+ }
20
+ .tc-success {
21
+ margin:0 20px 20px 20px;
22
+ background:#e6ffe2;
23
+ border:1px solid #d1eecc;
24
+ }
25
+ form {
26
+ margin:20px auto;
27
+ }
28
+ .theme-check {
29
+ margin:20px auto;
30
+ border:1px solid #dfdfdf;
31
+ -moz-border-radius:5px;
32
+ -khtml-border-radius:5px;
33
+ -webkit-border-radius:5px;
34
+ border-radius:5px;
35
+ }
36
+ .theme-check h2 {
37
+ margin:0 0 20px 0;
38
+ padding:0 20px;
39
+ background:#dfdfdf url("gray-grad.png") repeat-x left top;
40
+ font-size:20px;
41
+ border-bottom:1px solid #ccc;
42
+ }
43
+ .theme-check p {
44
+ padding:5px 20px;
45
+ }
46
+ .theme-check form {
47
+ margin-left:20px;
48
+ }
49
+ .theme-check ul {
50
+ margin-left:20px;
51
+ }
52
+ .theme-check h3 {
53
+ margin:0 0 10px 20px;
54
+ padding:0;
55
+ }
56
+ .theme-check ul {
57
+ margin-bottom:10px;
58
+ }
59
+ .theme-info {
60
+ padding:10px;
61
+ border:1px solid #dfdfdf;
62
+ margin:10px 20px 0 20px;
63
+ }
64
+ .theme-info p {
65
+ padding:0;
66
+ margin-bottom:10px;
67
+ }
68
+ .theme-info label {
69
+ float:left;
70
+ width:100px;
71
+ font-weight:bold;
72
+ display:block;
73
+ }
74
+ .theme-info span.info {
75
+ margin-left:100px;
76
+ display:block;
77
+ }
checkbase.php ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // main global to hold our checks
3
+ global $themechecks;
4
+ $themechecks = array();
5
+
6
+ // counter for the checks
7
+ global $checkcount;
8
+ $checkcount = 0;
9
+
10
+ // interface that all checks should implement
11
+ interface themecheck
12
+ {
13
+ // should return true for good/okay/acceptable, false for bad/not-okay/unacceptable
14
+ public function check( $php_files, $css_files, $other_files );
15
+
16
+ // should return an array of strings explaining any problems found
17
+ public function getError();
18
+ }
19
+
20
+ // load all the checks in the checks directory
21
+ $dir = 'checks';
22
+ foreach (glob(dirname(__FILE__). "/{$dir}/*.php") as $file) {
23
+ include $file;
24
+ }
25
+
26
+ do_action('themecheck_checks_loaded');
27
+
28
+ function run_themechecks($php, $css, $other) {
29
+ global $themechecks;
30
+ $pass = true;
31
+ foreach($themechecks as $check) {
32
+ if ($check instanceof themecheck) {
33
+ $pass = $pass & $check->check($php, $css, $other);
34
+ }
35
+ }
36
+ return $pass;
37
+ }
38
+
39
+ function display_themechecks() {
40
+ $results = '';
41
+ global $themechecks;
42
+ $errors = array();
43
+ foreach ($themechecks as $check) {
44
+ if ($check instanceof themecheck) {
45
+ $error = $check->getError();
46
+ $error = (array) $error;
47
+ if (!empty($error)) {
48
+ $errors = array_unique( array_merge( $error, $errors ) );
49
+ }
50
+ }
51
+ }
52
+ if (!empty($errors)) {
53
+ rsort($errors);
54
+ foreach ($errors as $e) {
55
+
56
+ if ( defined( 'TC_TRAC' ) ) {
57
+ $results .= ( isset( $_POST['s_info'] ) && preg_match( '/INFO/', $e ) ) ? '' : '* ' . tc_trac( $e ) . "\r\n";
58
+ } else {
59
+ $results .= ( isset( $_POST['s_info'] ) && preg_match( '/INFO/', $e ) ) ? '' : '<li>' . tc_trac( $e ) . '</li>';
60
+ }
61
+ }
62
+ }
63
+
64
+ if ( defined( 'TC_TRAC' ) ) {
65
+
66
+ if ( defined( 'TC_PRE' ) ) $results = TC_PRE . $results;
67
+ $results = '<textarea cols=140 rows=20>' . strip_tags( $results );
68
+ if ( defined( 'TC_POST' ) ) $results = $results . TC_POST;
69
+ $results .= '</textarea>';
70
+ }
71
+ return $results;
72
+ }
73
+
74
+ function checkcount() {
75
+ global $checkcount;
76
+ $checkcount++;
77
+ }
78
+
79
+ // some functions theme checks use
80
+ function tc_grep( $error, $file ) {
81
+ $lines = file( $file, FILE_IGNORE_NEW_LINES ); // Read the theme file into an array
82
+ $line_index = 0;
83
+ $bad_lines = '';
84
+ foreach( $lines as $this_line ) {
85
+ if ( stristr ( $this_line, $error ) ) {
86
+ $error = str_replace( '"', "'", $error );
87
+ $this_line = str_replace( '"', "'", $this_line );
88
+ $error = ltrim( $error );
89
+ $pre = ( FALSE !== ( $pos = strpos( $this_line, $error ) ) ? substr( $this_line, 0, $pos ) : FALSE );
90
+ $pre = ltrim( htmlspecialchars( $pre ) );
91
+ $bad_lines .= "<pre class='tc-grep'>". __("Line ", "theme-check") . ( $line_index+1 ) . ": " . $pre . htmlspecialchars( substr( stristr( $this_line, $error ), 0, 75 ) ) . "</pre>";
92
+ }
93
+ $line_index++;
94
+ }
95
+ return str_replace( $error, '<span class="tc-grep">' . $error . '</span>', $bad_lines );
96
+ }
97
+
98
+ function tc_preg( $preg, $file ) {
99
+ $lines = file( $file, FILE_IGNORE_NEW_LINES ); // Read the theme file into an array
100
+ $line_index = 0;
101
+ $bad_lines = '';
102
+ $error = '';
103
+ foreach( $lines as $this_line ) {
104
+ if ( preg_match( $preg, $this_line, $matches ) ) {
105
+ $error = $matches[0];
106
+ $this_line = str_replace( '"', "'", $this_line );
107
+ $error = ltrim( $error );
108
+ $pre = ( FALSE !== ( $pos = strpos( $this_line, $error ) ) ? substr( $this_line, 0, $pos ) : FALSE );
109
+ $pre = ltrim( htmlspecialchars( $pre ) );
110
+ $bad_lines .= "<pre class='tc-grep'>" . __("Line ", "theme-check") . ( $line_index+1 ) . ": " . $pre . htmlspecialchars( substr( stristr( $this_line, $error ), 0, 75 ) ) . "</pre>";
111
+ }
112
+ $line_index++;
113
+
114
+ }
115
+ return str_replace( $error, '<span class="tc-grep">' . $error . '</span>', $bad_lines );
116
+ }
117
+
118
+ function tc_strxchr($haystack, $needle, $l_inclusive = 0, $r_inclusive = 0){
119
+ if(strrpos($haystack, $needle)){
120
+ //Everything before last $needle in $haystack.
121
+ $left = substr($haystack, 0, strrpos($haystack, $needle) + $l_inclusive);
122
+ //Switch value of $r_inclusive from 0 to 1 and viceversa.
123
+ $r_inclusive = ($r_inclusive == 0) ? 1 : 0;
124
+ //Everything after last $needle in $haystack.
125
+ $right = substr(strrchr($haystack, $needle), $r_inclusive);
126
+ //Return $left and $right into an array.
127
+ return array($left, $right);
128
+ } else {
129
+ if(strrchr($haystack, $needle)) return array('', substr(strrchr($haystack, $needle), $r_inclusive));
130
+ else return false;
131
+ }
132
+ }
133
+
134
+ function tc_filename( $file ) {
135
+ $filename = ( preg_match( '/themes\/[a-z0-9]*\/(.*)/', $file, $out ) ) ? $out[1] : basename( $file );
136
+ return $filename;
137
+ }
138
+
139
+ function tc_trac( $e ) {
140
+ $trac_left = array( '<strong>', '</strong>' );
141
+ $trac_right= array( "'''", "'''" );
142
+ $html_link = '/<a\s?href\s?=\s?[\'|"]([^"|\']*)[\'|"]>([^<]*)<\/a>/i';
143
+ $html_new = '[$1 $2]';
144
+ if ( defined( 'TC_TRAC' ) ) {
145
+ $e = preg_replace( $html_link, $html_new, $e );
146
+ $e = str_replace( $trac_left, $trac_right, $e );
147
+ $e = preg_replace( '/<pre.*?>/', "\r\n{{{\r\n", $e );
148
+ $e = str_replace( '</pre>', "\r\n}}}\r\n", $e );
149
+ }
150
+ return $e;
151
+ }
152
+
153
+ function listdir( $dir ) {
154
+ $files = array();
155
+ $dir_iterator = new RecursiveDirectoryIterator( $dir );
156
+ $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST);
157
+
158
+ foreach ($iterator as $file) {
159
+ array_push( $files, $file->getPathname() );
160
+ }
161
+ return $files;
162
+ }
163
+
164
+ function old_listdir( $start_dir='.' ) {
165
+ $files = array();
166
+ if ( is_dir( $start_dir ) ) {
167
+ $fh = opendir( $start_dir );
168
+ while ( ( $file = readdir( $fh ) ) !== false ) {
169
+ # loop through the files, skipping . and .., and recursing if necessary
170
+ if ( strcmp( $file, '.' )==0 || strcmp( $file, '..' )==0 ) continue;
171
+ $filepath = $start_dir . '/' . $file;
172
+ if ( is_dir( $filepath ) )
173
+ $files = array_merge( $files, listdir( $filepath ) );
174
+ else
175
+ array_push( $files, $filepath );
176
+ }
177
+ closedir( $fh );
178
+
179
+ } else {
180
+
181
+ # false if the function was called with an invalid non-directory argument
182
+ $files = false;
183
+ }
184
+ return $files;
185
+ }
186
+
187
+ function tc_print_r( $data ) {
188
+ $out = "\n<pre class='html-print-r'";
189
+ $out .= " style='border: 1px solid #ccc; padding: 7px;'>\n";
190
+ $out .= esc_html( print_r( $data, TRUE ) );
191
+ $out .= "\n</pre>\n";
192
+ echo $out;
193
+ }
194
+
195
+ function get_theme_data_from_contents( $theme_data ) {
196
+ $themes_allowed_tags = array(
197
+ 'a' => array(
198
+ 'href' => array(),'title' => array()
199
+ ),
200
+ 'abbr' => array(
201
+ 'title' => array()
202
+ ),
203
+ 'acronym' => array(
204
+ 'title' => array()
205
+ ),
206
+ 'code' => array(),
207
+ 'em' => array(),
208
+ 'strong' => array()
209
+ );
210
+
211
+ $theme_data = str_replace ( '\r', '\n', $theme_data );
212
+ preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name );
213
+ preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri );
214
+ preg_match( '|Description:(.*)$|mi', $theme_data, $description );
215
+
216
+ if ( preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ) )
217
+ $author_uri = esc_url( trim( $author_uri[1]) );
218
+ else
219
+ $author_uri = '';
220
+
221
+ if ( preg_match( '|Template:(.*)$|mi', $theme_data, $template ) )
222
+ $template = wp_kses( trim( $template[1] ), $themes_allowed_tags );
223
+ else
224
+ $template = '';
225
+
226
+ if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) )
227
+ $version = wp_kses( trim( $version[1] ), $themes_allowed_tags );
228
+ else
229
+ $version = '';
230
+
231
+ if ( preg_match('|Status:(.*)|i', $theme_data, $status) )
232
+ $status = wp_kses( trim( $status[1] ), $themes_allowed_tags );
233
+ else
234
+ $status = 'publish';
235
+
236
+ if ( preg_match('|Tags:(.*)|i', $theme_data, $tags) )
237
+ $tags = array_map( 'trim', explode( ',', wp_kses( trim( $tags[1] ), array() ) ) );
238
+ else
239
+ $tags = array();
240
+
241
+ $theme = ( isset( $theme_name[1] ) ) ? wp_kses( trim( $theme_name[1] ), $themes_allowed_tags ) : '';
242
+
243
+ $theme_uri = ( isset( $theme_uri[1] ) ) ? esc_url( trim( $theme_uri[1] ) ) : '';
244
+
245
+ $description = ( isset( $description[1] ) ) ? wp_kses( trim( $description[1] ), $themes_allowed_tags ) : '';
246
+
247
+ if ( preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ) ) {
248
+ if ( empty( $author_uri ) ) {
249
+ $author = wp_kses( trim( $author_name[1] ), $themes_allowed_tags );
250
+ } else {
251
+ $author = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $author_uri, __( 'Visit author homepage' ), wp_kses( trim( $author_name[1] ), $themes_allowed_tags ) );
252
+ }
253
+ } else {
254
+ $author = __('Anonymous');
255
+ }
256
+
257
+ return array( 'Name' => $theme, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Author_URI' => $author_uri, 'Version' => $version, 'Template' => $template, 'Status' => $status, 'Tags' => $tags );
258
+ }
259
+
260
+ /*
261
+ * 3.3/3.4 compat
262
+ *
263
+ */
264
+ function tc_get_themes() {
265
+
266
+ if ( ! class_exists( 'WP_Theme' ) )
267
+ return get_themes();
268
+
269
+ global $wp_themes;
270
+ if ( isset( $wp_themes ) )
271
+ return $wp_themes;
272
+
273
+ $themes = wp_get_themes();
274
+ $wp_themes = array();
275
+
276
+ foreach ( $themes as $theme ) {
277
+ $name = $theme->get('Name');
278
+ if ( isset( $wp_themes[ $name ] ) )
279
+ $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
280
+ else
281
+ $wp_themes[ $name ] = $theme;
282
+ }
283
+
284
+ return $wp_themes;
285
+ }
286
+
287
+ function tc_get_theme_data( $theme_file ) {
288
+
289
+ if ( ! class_exists( 'WP_Theme' ) )
290
+ return get_theme_data( $theme_file );
291
+
292
+ $theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
293
+
294
+ $theme_data = array(
295
+ 'Name' => $theme->get('Name'),
296
+ 'URI' => $theme->display('ThemeURI', true, false),
297
+ 'Description' => $theme->display('Description', true, false),
298
+ 'Author' => $theme->display('Author', true, false),
299
+ 'AuthorURI' => $theme->display('AuthorURI', true, false),
300
+ 'Version' => $theme->get('Version'),
301
+ 'Template' => $theme->get('Template'),
302
+ 'Status' => $theme->get('Status'),
303
+ 'Tags' => $theme->get('Tags'),
304
+ 'Title' => $theme->get('Name'),
305
+ 'AuthorName' => $theme->display('Author', false, false),
306
+ 'License' => $theme->display( 'License', false, false),
307
+ 'License URI' => $theme->display( 'License URI', false, false),
308
+ 'Template Version' => $theme->display( 'Template Version', false, false)
309
+ );
310
+ return $theme_data;
311
+ }
checks/admin_menu.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class AdminMenu implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files) {
6
+
7
+ $ret = true;
8
+
9
+
10
+ //check for levels deprecated in 2.0 in creating menus.
11
+
12
+ $checks = array(
13
+ '/([^_](add_(admin|submenu|menu|dashboard|posts|media|links|pages|comments|theme|plugins|users|management|options)_page)\s?\([^,]*,[^,]*,\s[\'|"]?(level_[0-9]|[0-9])[^;|\r|\r\n]*)/' => __( 'User levels were deprecated in <strong>2.0</strong>. Please see <a href="http://codex.wordpress.org/Roles_and_Capabilities">Roles_and_Capabilities</a>', 'theme-check' ),
14
+ '/[^a-z0-9](current_user_can\s?\(\s?[\'\"]level_[0-9][\'\"]\s?\))[^\r|\r\n]*/' => __( 'User levels were deprecated in <strong>2.0</strong>. Please see <a href="http://codex.wordpress.org/Roles_and_Capabilities">Roles_and_Capabilities</a>', 'theme-check' )
15
+ );
16
+
17
+ foreach ( $php_files as $php_key => $phpfile ) {
18
+ foreach ( $checks as $key => $check ) {
19
+ checkcount();
20
+ if ( preg_match( $key, $phpfile, $matches ) ) {
21
+ $filename = tc_filename( $php_key );
22
+ $grep = ( isset( $matches[2] ) ) ? tc_grep( $matches[2], $php_key ) : tc_grep( $matches[1], $php_key );
23
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__( 'WARNING', 'theme-check' ) . '</span>: <strong>%1$s</strong>. %2$s%3$s', $filename, $check, $grep );
24
+ $ret = false;
25
+ }
26
+ }
27
+ }
28
+
29
+
30
+ //check for add_admin_page
31
+
32
+ $checks = array(
33
+ '/([^_]add_(admin|submenu|menu|dashboard|posts|media|links|pages|comments|plugins|users|management|options)_page\()/' => __( 'Themes should use <strong>add_theme_page()</strong> for adding admin pages.', 'theme-check' )
34
+ );
35
+
36
+
37
+ foreach ( $php_files as $php_key => $phpfile ) {
38
+ foreach ( $checks as $key => $check ) {
39
+ checkcount();
40
+ if ( preg_match( $key, $phpfile, $matches ) ) {
41
+ $filename = tc_filename( $php_key );
42
+ $error = ltrim( rtrim( $matches[0], '(' ) );
43
+ $grep = tc_grep( $error, $php_key );
44
+ $this->error[] = sprintf('<span class="tc-lead tc-required">'.__( 'REQUIRED', 'theme-check' ) .'</span>: <strong>%1$s</strong>. %2$s%3$s', $filename, $check, $grep);
45
+ $ret = false;
46
+ }
47
+ }
48
+ }
49
+
50
+ return $ret;
51
+ }
52
+
53
+ function getError() { return $this->error; }
54
+ }
55
+
56
+ $themechecks[] = new AdminMenu;
checks/artisteer.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ArtisteerCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files) {
7
+
8
+ // combine all the php files into one string to make it easier to search
9
+ $php = implode( ' ', $php_files );
10
+
11
+ checkcount();
12
+
13
+ $ret = true;
14
+ if (
15
+ strpos( $php, 'art_normalize_widget_style_tokens' ) !== false
16
+ || strpos( $php, 'art_include_lib' ) !== false
17
+ || strpos( $php, '_remove_last_slash($url) {' ) !== false
18
+ || strpos( $php, 'adi_normalize_widget_style_tokens' ) !== false
19
+ || strpos( $php, 'm_normalize_widget_style_tokens' ) !== false
20
+ || strpos ( $php, "bw = '<!--- BEGIN Widget --->';" ) !== false
21
+ || strpos ( $php, "ew = '<!-- end_widget -->';" ) !== false
22
+ || strpos ( $php, "end_widget' => '<!-- end_widget -->'") !== false
23
+ ) {
24
+ $this->error[] = "<span class='tc-lead tc-warning'>" . __('WARNING', 'theme-check' ). "</span>: " . __( 'This theme appears to have been auto-generated. Generated themes are not allowed in the themes directory.', 'theme-check' );
25
+ $ret = false;
26
+ }
27
+
28
+ return $ret;
29
+ }
30
+
31
+ function getError() { return $this->error; }
32
+ }
33
+ $themechecks[] = new ArtisteerCheck;
checks/badthings.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Bad_Checks implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+ $ret = true;
7
+
8
+ $checks = array(
9
+ '/(?<![_|a-z0-9|\.])eval\s?\(/i' => __( 'eval() is not allowed.', 'theme-check' ),
10
+ '/[^a-z0-9](?<!_)(popen|proc_open|[^_]exec|shell_exec|system|passthru)\(/' => __( 'PHP system calls are often disabled by server admins and should not be in themes', 'theme-check' ),
11
+ '/\s?ini_set\(/' => __( 'Themes should not change server PHP settings', 'theme-check' ),
12
+ '/base64_decode/' => __( 'base64_decode() is not allowed', 'theme-check' ),
13
+ '/base64_encode/' => __( 'base64_encode() is not allowed', 'theme-check' ),
14
+ '/uudecode/ims' => __( 'uudecode() is not allowed', 'theme-check' ),
15
+ '/str_rot13/ims' => __( 'str_rot13() is not allowed', 'theme-check' ),
16
+ '/cx=[0-9]{21}:[a-z0-9]{10}/' => __( 'Google search code detected', 'theme-check' ),
17
+ '/pub-[0-9]{16}/i' => __( 'Google advertising code detected', 'theme-check' )
18
+ );
19
+
20
+ $grep = '';
21
+
22
+ foreach ( $php_files as $php_key => $phpfile ) {
23
+ foreach ( $checks as $key => $check ) {
24
+ checkcount();
25
+ if ( preg_match( $key, $phpfile, $matches ) ) {
26
+ $filename = tc_filename( $php_key );
27
+ $error = ltrim( trim( $matches[0], '(' ) );
28
+ $grep = tc_grep( $error, $php_key );
29
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'. __( 'WARNING', 'theme-check' ) . '</span>: Found <strong>%1$s</strong> in the file <strong>%2$s</strong>. %3$s. %4$s', $error, $filename, $check, $grep );
30
+ $ret = false;
31
+ }
32
+ }
33
+ }
34
+
35
+
36
+ $checks = array(
37
+ '/cx=[0-9]{21}:[a-z0-9]{10}/' => __( 'Google search code detected', 'theme-check' ),
38
+ '/pub-[0-9]{16}/' => __( 'Google advertising code detected', 'theme-check' )
39
+ );
40
+
41
+ foreach ( $other_files as $php_key => $phpfile ) {
42
+ foreach ( $checks as $key => $check ) {
43
+ checkcount();
44
+ if ( preg_match( $key, $phpfile, $matches ) ) {
45
+ $filename = tc_filename( $php_key );
46
+ $error = ltrim( rtrim( $matches[0],'(' ) );
47
+ $grep = tc_grep( $error, $php_key );
48
+ $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Found <strong>%1$s</strong> in the file <strong>%2$s</strong>. %3$s.%4$s', 'theme-check'), $error, $filename, $check, $grep);
49
+ $ret = false;
50
+ }
51
+ }
52
+ }
53
+ return $ret;
54
+ }
55
+ function getError() { return $this->error; }
56
+ }
57
+ $themechecks[] = new Bad_Checks;
checks/basic.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // do some basic checks for strings
4
+ class Basic_Checks implements themecheck {
5
+ protected $error = array();
6
+
7
+ function check( $php_files, $css_files, $other_files) {
8
+
9
+ $php = implode( ' ', $php_files );
10
+ $grep = '';
11
+ $ret = true;
12
+
13
+ $checks = array(
14
+ 'DOCTYPE' => __( 'See: <a href="http://codex.wordpress.org/HTML_to_XHTML">http://codex.wordpress.org/HTML_to_XHTML</a><pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br />"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"?&gt;</pre>', 'theme-check' ),
15
+ 'wp_footer\(' => __( 'See: <a href="http://codex.wordpress.org/Function_Reference/wp_footer">wp_footer</a><pre> &lt;?php wp_footer(); ?&gt;</pre>', 'theme-check' ),
16
+ 'wp_head\(' => __( 'See: <a href="http://codex.wordpress.org/Function_Reference/wp_head">wp_head</a><pre> &lt;?php wp_head(); ?&gt;</pre>', 'theme-check' ),
17
+ 'language_attributes' => __( 'See: <a href="http://codex.wordpress.org/Function_Reference/language_attributes">language_attributes</a><pre>&lt;html &lt;?php language_attributes(); ?&gt;</pre>', 'theme-check' ),
18
+ 'charset' => __( 'There must be a charset defined in the Content-Type or the meta charset tag in the head.', 'theme-check' ),
19
+ 'add_theme_support\(\s?("|\')automatic-feed-links("|\')\s?\)' => __( 'See: <a href="http://codex.wordpress.org/Function_Reference/add_theme_support">add_theme_support</a><pre> &lt;?php add_theme_support( $feature ); ?&gt;</pre>', 'theme-check' ),
20
+ 'comments_template\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/comments_template">comments_template</a><pre> &lt;?php comments_template( $file, $separate_comments ); ?&gt;</pre>', 'theme-check' ),
21
+ 'wp_list_comments\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/wp_list_comments">wp_list_comments</a><pre> &lt;?php wp_list_comments( $args ); ?&gt;</pre>', 'theme-check' ),
22
+ 'comment_form\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/comment_form">comment_form</a><pre> &lt;?php comment_form(); ?&gt;</pre>', 'theme-check' ),
23
+ 'body_class' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/body_class">body_class</a><pre> &lt;?php body_class( $class ); ?&gt;</pre>', 'theme-check' ),
24
+ 'wp_link_pages\(' => __( 'See: <a href="http://codex.wordpress.org/Function_Reference/wp_link_pages">wp_link_pages</a><pre> &lt;?php wp_link_pages( $args ); ?&gt;</pre>', 'theme-check' ),
25
+ 'post_class\(' => __( 'See: <a href="http://codex.wordpress.org/Template_Tags/post_class">post_class</a><pre> &lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;</pre>', 'theme-check' )
26
+ );
27
+
28
+ foreach ($checks as $key => $check) {
29
+ checkcount();
30
+ if ( !preg_match( '/' . $key . '/i', $php ) ) {
31
+ if ( $key === 'add_theme_support\(\s?("|\')automatic-feed-links("|\')\s?\)' ) $key = __( 'add_theme_support( \'automatic-feed-links\' )', 'theme-check');
32
+ if ( $key === 'wp_enqueue_script\(\s?("|\')comment-reply("|\')' ) $key = __( 'wp_enqueue_script( \'comment-reply\' )', 'theme-check');
33
+ if ( $key === 'body_class' ) $key = __( 'body_class call in body tag', 'theme-check');
34
+ if ( $key === 'register_sidebar[s]?\(' ) $key = __( 'register_sidebar() or register_sidebars()', 'theme-check');
35
+ $key = ltrim( trim ( trim( $key, '(' ), '\\' ) );
36
+ $this->error[] = sprintf( '<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('Could not find <strong>%1$s</strong>. %2$s', 'theme-check' ), $key, $check );
37
+ $ret = false;
38
+ }
39
+ }
40
+
41
+ return $ret;
42
+ }
43
+
44
+ function getError() { return $this->error; }
45
+ }
46
+
47
+ $themechecks[] = new Basic_Checks;
checks/cdn.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Checks for resources being loaded from CDNs.
5
+ */
6
+
7
+ class CDNCheck implements themecheck {
8
+ protected $error = array();
9
+
10
+ function check( $php_files, $css_files, $other_files) {
11
+
12
+ $ret = true;
13
+ $php_code = implode( ' ', $php_files );
14
+
15
+ checkcount();
16
+
17
+ $cdn_list = array(
18
+ 'bootstrap-maxcdn' => 'maxcdn.bootstrapcdn.com/bootstrap',
19
+ 'bootstrap-netdna' => 'netdna.bootstrapcdn.com/bootstrap',
20
+ 'bootswatch-maxcdn' => 'maxcdn.bootstrapcdn.com/bootswatch',
21
+ 'bootswatch-netdna' => 'netdna.bootstrapcdn.com/bootswatch',
22
+ 'font-awesome-maxcdn' => 'maxcdn.bootstrapcdn.com/font-awesome',
23
+ 'font-awesome-netdna' => 'netdna.bootstrapcdn.com/font-awesome',
24
+ 'html5shiv-google' => 'html5shiv.googlecode.com/svn/trunk/html5.js',
25
+ 'html5shiv-maxcdn' => 'oss.maxcdn.com/libs/html5shiv',
26
+ 'jquery' => 'code.jquery.com/jquery-',
27
+ 'respond-js' => 'oss.maxcdn.com/libs/respond.js',
28
+ );
29
+
30
+ foreach( $cdn_list as $cdn_slug => $cdn_url ) {
31
+ if ( false !== strpos( $php_code, $cdn_url ) ) {
32
+ $this->error[] = '<span class="tc-lead tc-recommended">' . __('RECOMMENDED','theme-check') . '</span>: ' . sprintf( __( 'Found the URL of a CDN in the code: %s. You should not load CSS or Javascript resources from a CDN, please bundle them with the theme.', 'theme-check' ), '<code>' . esc_html( $cdn_url ) . '</code>' );
33
+ //$ret = false;
34
+ }
35
+ }
36
+
37
+ return $ret;
38
+ }
39
+
40
+ function getError() { return $this->error; }
41
+ }
42
+ $themechecks[] = new CDNCheck;
checks/comment_reply.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Comment_Reply implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files) {
6
+
7
+ $php = implode( ' ', $php_files );
8
+ $ret = true;
9
+
10
+ checkcount();
11
+
12
+ if ( ! preg_match( '/wp_enqueue_script\(\s?("|\')comment-reply("|\')/i', $php ) ) {
13
+ if ( ! preg_match( '/comment-reply/', $php ) ) {
14
+ $check = __( 'See: <a href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display">Migrating Plugins and Themes to 2.7/Enhanced Comment Display</a><pre> &lt;?php if ( is_singular() ) wp_enqueue_script( "comment-reply" ); ?&gt;</pre>', 'theme-check' );
15
+ $this->error[] = sprintf('<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('Could not find the <strong>comment-reply</strong> script enqueued. %1$s', 'theme-check'), $check);
16
+ $ret = false;
17
+ } else {
18
+ $this->error[] = '<span class="tc-lead tc-info">'.__('INFO','theme-check').'</span>: '.__('Could not find the <strong>comment-reply</strong> script enqueued, however a reference to \'comment-reply\' was found. Make sure that the comment-reply script is being enqueued properly on singular pages.', 'theme-check');
19
+ }
20
+ }
21
+ return $ret;
22
+ }
23
+
24
+ function getError() { return $this->error; }
25
+ }
26
+
27
+ $themechecks[] = new Comment_Reply;
checks/commpage.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CommentPaginationCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+ $ret = true;
8
+
9
+ // combine all the php files into one string to make it easier to search
10
+ $php = implode( ' ', $php_files );
11
+ checkcount();
12
+ if (strpos( $php, 'paginate_comments_links' ) === false &&
13
+ (strpos( $php, 'next_comments_link' ) === false && strpos( $php, 'previous_comments_link' ) === false ) ) {
14
+
15
+ $this->error[] = '<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('The theme doesn\'t have comment pagination code in it. Use <strong>paginate_comments_links()</strong> or <strong>next_comments_link()</strong> and <strong>previous_comments_link()</strong> to add comment pagination.', 'theme-check' );
16
+ $ret = false;
17
+ }
18
+
19
+ return $ret;
20
+ }
21
+
22
+ function getError() { return $this->error; }
23
+ }
24
+ $themechecks[] = new CommentPaginationCheck;
checks/constants.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Constants implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ $checks = array(
11
+ 'STYLESHEETPATH' => 'get_stylesheet_directory()',
12
+ 'TEMPLATEPATH' => 'get_template_directory()',
13
+ 'PLUGINDIR' => 'WP_PLUGIN_DIR',
14
+ 'MUPLUGINDIR' => 'WPMU_PLUGIN_DIR'
15
+ );
16
+
17
+ foreach ( $php_files as $php_key => $phpfile ) {
18
+ foreach ( $checks as $key => $check ) {
19
+ checkcount();
20
+ if ( preg_match( '/[\s|]' . $key . '/', $phpfile, $matches ) ) {
21
+ $filename = tc_filename( $php_key );
22
+ $error = ltrim( rtrim( $matches[0], '(' ) );
23
+ $grep = tc_grep( $error, $php_key );
24
+ $this->error[] = sprintf('<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'theme-check'), $error, $filename, $check, $grep );
25
+ }
26
+ }
27
+ }
28
+ return $ret;
29
+ }
30
+
31
+ function getError() { return $this->error; }
32
+ }
33
+ $themechecks[] = new Constants;
checks/content-width.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ContentWidthCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ // combine all the php files into one string to make it easier to search
11
+ $php = implode( ' ', $php_files );
12
+ checkcount();
13
+ if ( strpos( $php, '$content_width' ) === false && !preg_match( '/add_filter\(\s?("|\')embed_defaults/', $php ) && !preg_match( '/add_filter\(\s?("|\')content_width/', $php ) ) {
14
+ $this->error[] = '<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('No content width has been defined. Example: <pre>if ( ! isset( $content_width ) ) $content_width = 900;</pre>', 'theme-check' );
15
+ $ret = false;
16
+ }
17
+
18
+ return $ret;
19
+ }
20
+
21
+ function getError() { return $this->error; }
22
+ }
23
+ $themechecks[] = new ContentWidthCheck;
checks/customizer.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Checks for the Customizer.
5
+ */
6
+
7
+ class CustomizerCheck implements themecheck {
8
+ protected $error = array();
9
+
10
+ function check( $php_files, $css_files, $other_files) {
11
+
12
+ $ret = true;
13
+
14
+ checkcount();
15
+
16
+ /**
17
+ * Check whether every Customizer setting has a sanitization callback set.
18
+ */
19
+ foreach ( $php_files as $file_path => $file_content ) {
20
+ // Get the arguments passed to the add_setting method
21
+ if ( preg_match_all( '/\$wp_customize->add_setting\(([^;]+)/', $file_content, $matches ) ) {
22
+ // The full match is in [0], the match group in [1]
23
+ foreach ( $matches[1] as $match ) {
24
+ // Check if we have sanitize_callback or sanitize_js_callback
25
+ if ( false === strpos( $match, 'sanitize_callback' ) && false === strpos( $match, 'sanitize_js_callback' ) ) {
26
+ $this->error[] = '<span class="tc-lead tc-required">' . __('REQUIRED','theme-check') . '</span>: ' . __( 'Found a Customizer setting that did not have a sanitization callback function. Every call to the <strong>add_setting()</strong> method needs to have a sanitization callback function passed.', 'theme-check' );
27
+ $ret = false;
28
+ } else {
29
+ // There's a callback, check that no empty parameter is passed.
30
+ if ( preg_match( '/[\'"](?:sanitize_callback|sanitize_js_callback)[\'"]\s*=>\s*[\'"]\s*[\'"]/', $match ) ) {
31
+ $this->error[] = '<span class="tc-lead tc-required">' . __('REQUIRED','theme-check') . '</span>: ' . __( 'Found a Customizer setting that had an empty value passed as sanitization callback. You need to pass a function name as sanitization callback.', 'theme-check' );
32
+ $ret = false;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ return $ret;
40
+ }
41
+
42
+ function getError() { return $this->error; }
43
+ }
44
+ $themechecks[] = new CustomizerCheck;
checks/customs.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class CustomCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files) {
7
+
8
+ $ret = true;
9
+ $php = implode( ' ', $php_files );
10
+
11
+ checkcount();
12
+
13
+ if ( ! preg_match( '#add_theme_support\s?\(\s?[\'|"]custom-header#', $php ) ) {
14
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('No reference to <strong>add_theme_support( "custom-header", $args )</strong> was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.', 'theme-check' );
15
+ }
16
+
17
+ if ( ! preg_match( '#add_theme_support\s?\(\s?[\'|"]custom-background#', $php ) ) {
18
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('No reference to <strong>add_theme_support( "custom-background", $args )</strong> was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.', 'theme-check' );
19
+ }
20
+
21
+ return $ret;
22
+ }
23
+
24
+ function getError() { return $this->error; }
25
+ }
26
+ $themechecks[] = new CustomCheck;
checks/dep_recommend.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // recommended deprecations checks... After some time, these will move into deprecated.php and become required.
3
+ class Deprecated_Recommended implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+ $grep = '';
8
+
9
+ $ret = true;
10
+
11
+ $checks = array(
12
+ array( 'rich_edit_exists' => '', '3.9'),
13
+ array( 'default_topic_count_text' => '', '3.9'),
14
+ array( 'format_to_post' => '', '3.9'),
15
+ array( 'get_current_site_name' => 'get_current_site()', '3.9'),
16
+ array( 'wpmu_current_site' => '', '3.9'),
17
+ array( 'get_all_category_ids' => 'get_terms()', '4.0' ),
18
+ array( 'like_escape' => 'wpdb::esc_like()', '4.0' ),
19
+ array( 'url_is_accessable_via_ssl' => '', '4.0' ),
20
+ );
21
+
22
+ foreach ( $php_files as $php_key => $phpfile ) {
23
+ foreach ( $checks as $alt => $check ) {
24
+ checkcount();
25
+ $version = $check;
26
+ $key = key( $check );
27
+ $alt = $check[ $key ];
28
+ if ( preg_match( '/[\s?]' . $key . '\(/', $phpfile, $matches ) ) {
29
+ $filename = tc_filename( $php_key );
30
+ $error = ltrim( rtrim( $matches[0], '(' ) );
31
+ $version = $check[0];
32
+ $grep = tc_grep( $error, $php_key );
33
+
34
+ // Point out the deprecated function.
35
+ $error_msg = sprintf(
36
+ __( '%1$s found in the file %2$s. Deprecated since version %3$s.', 'theme-check' ),
37
+ '<strong>' . $error . '()</strong>',
38
+ '<strong>' . $filename . '</strong>',
39
+ '<strong>' . $version . '</strong>'
40
+ );
41
+
42
+ // Add alternative function when available.
43
+ if ( $alt ) {
44
+ $error_msg .= ' ' . sprintf( __( 'Use %s instead.', 'theme-check' ), '<strong>' . $alt . '</strong>' );
45
+ }
46
+
47
+ // Add the precise code match that was found.
48
+ $error_msg .= $grep;
49
+
50
+ // Add the finalized error message.
51
+ $this->error[] = '<span class="tc-lead tc-recommended">' . __('RECOMMENDED','theme-check') . '</span>: ' . $error_msg;
52
+ }
53
+ }
54
+ }
55
+ return $ret;
56
+ }
57
+
58
+ function getError() { return $this->error; }
59
+ }
60
+ $themechecks[] = new Deprecated_Recommended;
checks/deprecated.php ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Deprecated implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+ $grep = '';
8
+
9
+ $ret = true;
10
+
11
+ $checks = array(
12
+ // start wp-includes deprecated
13
+ array( 'get_postdata' => 'get_post()', '1.5.1' ),
14
+ array( 'start_wp' => 'the Loop', '1.5' ),
15
+ array( 'the_category_id' => 'get_the_category()', '0.71' ),
16
+ array( 'the_category_head' => 'get_the_category_by_ID()', '0.71' ),
17
+ array( 'previous_post' => 'previous_post_link()', '2.0' ),
18
+ array( 'next_post' => 'next_post_link()', '2.0' ),
19
+ array( 'user_can_create_post' => 'current_user_can()', '2.0' ),
20
+ array( 'user_can_create_draft' => 'current_user_can()', '2.0' ),
21
+ array( 'user_can_edit_post' => 'current_user_can()', '2.0' ),
22
+ array( 'user_can_delete_post' => 'current_user_can()', '2.0' ),
23
+ array( 'user_can_set_post_date' => 'current_user_can()', '2.0' ),
24
+ array( 'user_can_edit_post_comments' => 'current_user_can()', '2.0' ),
25
+ array( 'user_can_delete_post_comments' => 'current_user_can()', '2.0' ),
26
+ array( 'user_can_edit_user' => 'current_user_can()', '2.0' ),
27
+ array( 'get_linksbyname' => 'get_bookmarks()', '2.1' ),
28
+ array( 'wp_get_linksbyname' => 'wp_list_bookmarks()', '2.1' ),
29
+ array( 'get_linkobjectsbyname' => 'get_bookmarks()', '2.1' ),
30
+ array( 'get_linkobjects' => 'get_bookmarks()', '2.1' ),
31
+ array( 'get_linksbyname_withrating' => 'get_bookmarks()', '2.1' ),
32
+ array( 'get_links_withrating' => 'get_bookmarks()', '2.1' ),
33
+ array( 'get_autotoggle' => '', '2.1' ),
34
+ array( 'list_cats' => 'wp_list_categories', '2.1' ),
35
+ array( 'wp_list_cats' => 'wp_list_categories', '2.1' ),
36
+ array( 'dropdown_cats' => 'wp_dropdown_categories()', '2.1' ),
37
+ array( 'list_authors' => 'wp_list_authors()', '2.1' ),
38
+ array( 'wp_get_post_cats' => 'wp_get_post_categories()', '2.1' ),
39
+ array( 'wp_set_post_cats' => 'wp_set_post_categories()', '2.1' ),
40
+ array( 'get_archives' => 'wp_get_archives', '2.1' ),
41
+ array( 'get_author_link' => 'get_author_posts_url()', '2.1' ),
42
+ array( 'link_pages' => 'wp_link_pages()', '2.1' ),
43
+ array( 'get_settings' => 'get_option()', '2.1' ),
44
+ array( 'permalink_link' => 'the_permalink()', '1.2' ),
45
+ array( 'permalink_single_rss' => 'permalink_rss()', '2.3' ),
46
+ array( 'wp_get_links' => 'wp_list_bookmarks()', '2.1' ),
47
+ array( 'get_links' => 'get_bookmarks()', '2.1' ),
48
+ array( 'get_links_list' => 'wp_list_bookmarks()', '2.1' ),
49
+ array( 'links_popup_script' => '', '2.1' ),
50
+ array( 'get_linkrating' => 'sanitize_bookmark_field()', '2.1' ),
51
+ array( 'get_linkcatname' => 'get_category()', '2.1' ),
52
+ array( 'comments_rss_link' => 'post_comments_feed_link()', '2.5' ),
53
+ array( 'get_category_rss_link' => 'get_category_feed_link()'. '2.5' ),
54
+ array( 'get_author_rss_link' => 'get_author_feed_link()', '2.5' ),
55
+ array( 'comments_rss' => 'get_post_comments_feed_link()', '2.2' ),
56
+ array( 'create_user' => 'wp_create_user()', '2.0' ),
57
+ array( 'gzip_compression' => '', '2.5' ),
58
+ array( 'get_commentdata' => 'get_comment()', '2.7' ),
59
+ array( 'get_catname' => 'get_cat_name()', '2.8' ),
60
+ array( 'get_category_children' => 'get_term_children', '2.8' ),
61
+ array( 'get_the_author_description' => 'get_the_author_meta(\'description\')', '2.8' ),
62
+ array( 'the_author_description' => 'the_author_meta(\'description\')', '2.8' ),
63
+ array( 'get_the_author_login' => 'the_author_meta(\'login\')', '2.8' ),
64
+ array( 'get_the_author_firstname' => 'get_the_author_meta(\'first_name\')', '2.8' ),
65
+ array( 'the_author_firstname' => 'the_author_meta(\'first_name\')', '2.8' ),
66
+ array( 'get_the_author_lastname' => 'get_the_author_meta(\'last_name\')', '2.8' ),
67
+ array( 'the_author_lastname' => 'the_author_meta(\'last_name\')', '2.8' ),
68
+ array( 'get_the_author_nickname' => 'get_the_author_meta(\'nickname\')', '2.8' ),
69
+ array( 'the_author_nickname' => 'the_author_meta(\'nickname\')', '2.8' ),
70
+ array( 'get_the_author_email' => 'get_the_author_meta(\'email\')', '2.8' ),
71
+ array( 'the_author_email' => 'the_author_meta(\'email\')', '2.8' ),
72
+ array( 'get_the_author_icq' => 'get_the_author_meta(\'icq\')', '2.8' ),
73
+ array( 'the_author_icq' => 'the_author_meta(\'icq\')', '2.8' ),
74
+ array( 'get_the_author_yim' => 'get_the_author_meta(\'yim\')', '2.8' ),
75
+ array( 'the_author_yim' => 'the_author_meta(\'yim\')', '2.8' ),
76
+ array( 'get_the_author_msn' => 'get_the_author_meta(\'msn\')', '2.8' ),
77
+ array( 'the_author_msn' => 'the_author_meta(\'msn\')', '2.8' ),
78
+ array( 'get_the_author_aim' => 'get_the_author_meta(\'aim\')', '2.8' ),
79
+ array( 'the_author_aim' => 'the_author_meta(\'aim\')', '2.8' ),
80
+ array( 'get_author_name' => 'get_the_author_meta(\'display_name\')', '2.8' ),
81
+ array( 'get_the_author_url' => 'get_the_author_meta(\'url\')', '2.8' ),
82
+ array( 'the_author_url' => 'the_author_meta(\'url\')', '2.8' ),
83
+ array( 'get_the_author_ID' => 'get_the_author_meta(\'ID\')', '2.8' ),
84
+ array( 'the_author_ID' => 'the_author_meta(\'ID\')', '2.8' ),
85
+ array( 'the_content_rss' => 'the_content_feed()', '2.9' ),
86
+ array( 'make_url_footnote' => '', '2.9' ),
87
+ array( '_c' => '_x()', '2.9' ),
88
+ array( 'translate_with_context' => '_x()', '3.0' ),
89
+ array( 'nc' => 'nx()', '3.0' ),
90
+ array( '__ngettext' => '_n_noop()', '2.8' ),
91
+ array( '__ngettext_noop' => '_n_noop()', '2.8' ),
92
+ array( 'get_alloptions' => 'wp_load_alloptions()', '3.0' ),
93
+ array( 'get_the_attachment_link' => 'wp_get_attachment_link()', '2.5' ),
94
+ array( 'get_attachment_icon_src' => 'wp_get_attachment_image_src()', '2.5' ),
95
+ array( 'get_attachment_icon' => 'wp_get_attachment_image()', '2.5' ),
96
+ array( 'get_attachment_innerhtml' => 'wp_get_attachment_image()', '2.5' ),
97
+ array( 'get_link' => 'get_bookmark()', '2.1' ),
98
+ array( 'sanitize_url' => 'esc_url()', '2.8' ),
99
+ array( 'clean_url' => 'esc_url()', '3.0' ),
100
+ array( 'js_escape' => 'esc_js()', '2.8' ),
101
+ array( 'wp_specialchars' => 'esc_html()', '2.8' ),
102
+ array( 'attribute_escape' => 'esc_attr()', '2.8' ),
103
+ array( 'register_sidebar_widget' => 'wp_register_sidebar_widget()', '2.8' ),
104
+ array( 'unregister_sidebar_widget' => 'wp_unregister_sidebar_widget()', '2.8' ),
105
+ array( 'register_widget_control' => 'wp_register_widget_control()', '2.8' ),
106
+ array( 'unregister_widget_control' => 'wp_unregister_widget_control()', '2.8' ),
107
+ array( 'delete_usermeta' => 'delete_user_meta()', '3.0' ),
108
+ array( 'get_usermeta' => 'get_user_meta()', '3.0' ),
109
+ array( 'update_usermeta' => 'update_user_meta()', '3.0' ),
110
+ array( 'automatic_feed_links' => 'add_theme_support( \'automatic-feed-links\' )', '3.0' ),
111
+ array( 'get_profile' => 'get_the_author_meta()', '3.0' ),
112
+ array( 'get_usernumposts' => 'count_user_posts()', '3.0' ),
113
+ array( 'funky_javascript_callback' => '', '3.0' ),
114
+ array( 'funky_javascript_fix' => '', '3.0' ),
115
+ array( 'is_taxonomy' => 'taxonomy_exists()', '3.0' ),
116
+ array( 'is_term' => 'term_exists()', '3.0' ),
117
+ array( 'is_plugin_page' => '$plugin_page and/or get_plugin_page_hookname() hooks', '3.1' ),
118
+ array( 'update_category_cache' => 'No alternatives', '3.1' ),
119
+ array( 'get_users_of_blog' => 'get_users()', '3.1' ),
120
+ array( 'wp_timezone_supported' => '', '3.2' ),
121
+ array( 'the_editor' => 'wp_editor', '3.3' ),
122
+ array( 'get_user_metavalues' => '', '3.3' ),
123
+ array( 'sanitize_user_object' => '', '3.3' ),
124
+ array( 'get_boundary_post_rel_link' => '', '3.3' ),
125
+ array( 'start_post_rel_link' => 'none available ', '3.3' ),
126
+ array( 'get_index_rel_link' => '', '3.3' ),
127
+ array( 'index_rel_link' => '', '3.3' ),
128
+ array( 'get_parent_post_rel_link' => '', '3.3' ),
129
+ array( 'parent_post_rel_link' => '', '3.3' ),
130
+ array( 'wp_admin_bar_dashboard_view_site_menu' => '', '3.3' ),
131
+ array( 'is_blog_user' => 'is_member_of_blog()', '3.3' ),
132
+ array( 'debug_fopen' => 'error_log()', '3.3' ),
133
+ array( 'debug_fwrite' => 'error_log()', '3.3' ),
134
+ array( 'debug_fclose' => 'error_log()', '3.3' ),
135
+ array( 'get_themes' => 'wp_get_themes()', '3.4' ),
136
+ array( 'get_theme' => 'wp_get_theme()', '3.4' ),
137
+ array( 'get_current_theme' => 'wp_get_theme()', '3.4' ),
138
+ array( 'clean_pre' => '', '3.4' ),
139
+ array( 'add_custom_image_header' => 'add_theme_support( \'custom-header\', $args )', '3.4' ),
140
+ array( 'remove_custom_image_header' => 'remove_theme_support( \'custom-header\' )', '3.4' ),
141
+ array( 'add_custom_background' => 'add_theme_support( \'custom-background\', $args )', '3.4' ),
142
+ array( 'remove_custom_background' => 'remove_theme_support( \'custom-background\' )', '3.4' ),
143
+ array( 'get_theme_data' => 'wp_get_theme()', '3.4' ),
144
+ array( 'update_page_cache' => 'update_post_cache()', '3.4' ),
145
+ array( 'clean_page_cache' => 'clean_post_cache()', '3.4' ),
146
+ array( 'wp_explain_nonce' => 'wp_nonce_ays', '3.4.1' ),
147
+ array( 'sticky_class' => 'post_class()', '3.5' ),
148
+ array( '_get_post_ancestors' => '', '3.5' ),
149
+ array( 'wp_load_image' => 'wp_get_image_editor()', '3.5' ),
150
+ array( 'image_resize' => 'wp_get_image_editor()', '3.5' ),
151
+ array( 'wp_get_single_post' => 'get_post()', '3.5' ),
152
+ array( 'user_pass_ok' => 'wp_authenticate()', '3.5' ),
153
+ array( '_save_post_hook' => '', '3.5' ),
154
+ array( 'gd_edit_image_support' => 'wp_image_editor_supports', '3.5' ),
155
+ array( 'get_user_id_from_string' => 'get_user_by()', '3.6' ),
156
+ array( 'wp_convert_bytes_to_hr' => 'size_format()', '3.6' ),
157
+ array('_search_terms_tidy' => '', '3.7' ),
158
+ array( 'get_blogaddress_by_domain' => '', '3.7' ),
159
+ // end wp-includes deprecated
160
+
161
+ // start wp-admin deprecated
162
+ array( 'tinymce_include' => 'wp_tiny_mce()', '2.1' ),
163
+ array( 'documentation_link' => '', '2.5' ),
164
+ array( 'wp_shrink_dimensions' => 'wp_constrain_dimensions()','3.0' ),
165
+ array( 'dropdown_categories' => 'wp_category_checklist()','2.6' ),
166
+ array( 'dropdown_link_categories' => 'wp_link_category_checklist()','2.6' ),
167
+ array( 'wp_dropdown_cats' => 'wp_dropdown_categories()','3.0' ),
168
+ array( 'add_option_update_handler' => 'register_setting()','3.0' ),
169
+ array( 'remove_option_update_handler' => 'unregister_setting()','3.0' ),
170
+ array( 'codepress_get_lang' => '','3.0' ),
171
+ array( 'codepress_footer_js' => '','3.0' ),
172
+ array( 'use_codepress' => '','3.0' ),
173
+ array( 'get_author_user_ids' => '','3.1' ),
174
+ array( 'get_editable_authors' => '','3.1' ),
175
+ array( 'get_editable_user_ids' => '','3.1' ),
176
+ array( 'get_nonauthor_user_ids' => '','3.1' ),
177
+ array( 'WP_User_Search' => 'WP_User_Query','3.1' ),
178
+ array( 'get_others_unpublished_posts' => '','3.1' ),
179
+ array( 'get_others_drafts' => '','3.1' ),
180
+ array( 'get_others_pending' => '', '3.1' ),
181
+ array( 'wp_dashboard_quick_press()' => '', '3.2' ),
182
+ array( 'wp_tiny_mce' => 'wp_editor', '3.2' ),
183
+ array( 'wp_preload_dialogs' => 'wp_editor()', '3.2' ),
184
+ array( 'wp_print_editor_js' => 'wp_editor()', '3.2' ),
185
+ array( 'wp_quicktags' => 'wp_editor()', '3.2' ),
186
+ array( 'favorite_actions' => 'WP_Admin_Bar', '3.2' ),
187
+ array( 'screen_layout' => '$current_screen->render_screen_layout()', '3.3' ),
188
+ array( 'screen_options' => '$current_screen->render_per_page_options()', '3.3' ),
189
+ array( 'screen_meta' => ' $current_screen->render_screen_meta()', '3.3' ),
190
+ array( 'media_upload_image' => 'wp_media_upload_handler()', '3.3' ),
191
+ array( 'media_upload_audio' => 'wp_media_upload_handler()', '3.3' ),
192
+ array( 'media_upload_video' => 'wp_media_upload_handler()', '3.3' ),
193
+ array( 'media_upload_file' => 'wp_media_upload_handler()', '3.3' ),
194
+ array( 'type_url_form_image' => 'wp_media_insert_url_form( \'image\' )', '3.3' ),
195
+ array( 'type_url_form_audio' => 'wp_media_insert_url_form( \'audio\' )', '3.3' ),
196
+ array( 'type_url_form_video' => 'wp_media_insert_url_form( \'video\' )', '3.3' ),
197
+ array( 'type_url_form_file' => 'wp_media_insert_url_form( \'file\' )', '3.3' ),
198
+ array( 'add_contextual_help' => 'get_current_screen()->add_help_tab()', '3.3' ),
199
+ array( 'get_allowed_themes' => 'wp_get_themes( array( \'allowed\' => true ) )', '3.4' ),
200
+ array( 'get_broken_themes' => 'wp_get_themes( array( \'errors\' => true )', '3.4' ),
201
+ array( 'current_theme_info' => 'wp_get_theme()', '3.4' ),
202
+ array( '_insert_into_post_button' => '', '3.5' ),
203
+ array( '_media_button' => '', '3.5' ),
204
+ array( 'get_post_to_edit' => 'get_post()', '3.5' ),
205
+ array( 'get_default_page_to_edit' => 'get_default_post_to_edit()', '3.5' ),
206
+ array( 'wp_create_thumbnail' => 'image_resize()', '3.5' ),
207
+ array( 'wp_nav_menu_locations_meta_box' => '', '3.6' ),
208
+ array( 'the_attachment_links' => '', '3.7'),
209
+ array( 'wp_update_core' => 'new Core_Upgrader()', '3.7'),
210
+ array( 'wp_update_plugin' => 'new Plugin_Upgrader()', '3.7'),
211
+ array( 'wp_update_theme' => 'new Theme_Upgrader()', '3.7'),
212
+ array( 'get_screen_icon' => '', '3.8',),
213
+ array( 'screen_icon' => '', '3.8' ),
214
+ array( 'wp_dashboard_incoming_links' => '', '3.8',),
215
+ array( 'wp_dashboard_incoming_links_control' => '', '3.8',),
216
+ array( 'wp_dashboard_incoming_links_output' => '', '3.8',),
217
+ array( 'wp_dashboard_plugins' => '', '3.8',),
218
+ array( 'wp_dashboard_primary_control' => '', '3.8',),
219
+ array( 'wp_dashboard_recent_comments_control' => '', '3.8',),
220
+ array( 'wp_dashboard_secondary' => '', '3.8',),
221
+ array( 'wp_dashboard_secondary_control' => '', '3.8',),
222
+ array( 'wp_dashboard_secondary_output' => '', '3.8',),
223
+ // end wp-admin
224
+ );
225
+ foreach ( $php_files as $php_key => $phpfile ) {
226
+ foreach ( $checks as $alt => $check ) {
227
+ checkcount();
228
+ $key = key( $check );
229
+ $alt = $check[ $key ];
230
+ if ( preg_match( '/[\s?]' . $key . '\(/', $phpfile, $matches ) ) {
231
+ $filename = tc_filename( $php_key );
232
+ $error = ltrim( rtrim( $matches[0], '(' ) );
233
+ $version = $check[0];
234
+ $grep = tc_grep( $error, $php_key );
235
+
236
+ // Point out the deprecated function.
237
+ $error_msg = sprintf(
238
+ __( '%1$s found in the file %2$s. Deprecated since version %3$s.', 'theme-check' ),
239
+ '<strong>' . $error . '()</strong>',
240
+ '<strong>' . $filename . '</strong>',
241
+ '<strong>' . $version . '</strong>'
242
+ );
243
+
244
+ // Add alternative function when available.
245
+ if ( $alt ) {
246
+ $error_msg .= ' ' . sprintf( __( 'Use %s instead.', 'theme-check' ), '<strong>' . $alt . '</strong>' );
247
+ }
248
+
249
+ // Add the precise code match that was found.
250
+ $error_msg .= $grep;
251
+
252
+ // Add the finalized error message.
253
+ $this->error[] = '<span class="tc-lead tc-required">' . __('REQUIRED','theme-check') . '</span>: ' . $error_msg;
254
+
255
+ $ret = false;
256
+ }
257
+ }
258
+ }
259
+ return $ret;
260
+ }
261
+
262
+ function getError() { return $this->error; }
263
+ }
264
+ $themechecks[] = new Deprecated;
checks/directories.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DirectoriesCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+ $found = false;
10
+
11
+ foreach ( $php_files as $name => $file ) {
12
+ checkcount();
13
+ if ( strpos( $name, '.git' ) !== false || strpos( $name, '.svn' ) !== false ) $found = true;
14
+ }
15
+
16
+ foreach ( $css_files as $name => $file ) {
17
+ checkcount();
18
+ if ( strpos( $name, '.git' ) !== false || strpos( $name, '.svn' ) !== false || strpos( $name, '.hg' ) !== false || strpos( $name, '.bzr' ) !== false ) $found = true;
19
+ }
20
+
21
+ foreach ( $other_files as $name => $file ) {
22
+ checkcount();
23
+ if ( strpos( $name, '.git' ) !== false || strpos( $name, '.svn' ) !== false || strpos( $name, '.hg' ) !== false || strpos( $name, '.bzr' ) !== false ) $found = true;
24
+ }
25
+
26
+ if ($found) {
27
+ $this->error[] = sprintf('<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check' ) . '</span>: ' . __( 'Please remove any extraneous directories like .git or .svn from the ZIP file before uploading it.', 'theme-check') );
28
+ $ret = false;
29
+ }
30
+
31
+ return $ret;
32
+ }
33
+
34
+ function getError() { return $this->error; }
35
+ }
36
+ $themechecks[] = new DirectoriesCheck;
checks/editorstyle.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class EditorStyleCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+ checkcount();
8
+ $ret = true;
9
+
10
+ $php = implode( ' ', $php_files );
11
+
12
+ if ( strpos( $php, 'add_editor_style' ) === false ) {
13
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('No reference to <strong>add_editor_style()</strong> was found in the theme. It is recommended that the theme implement editor styling, so as to make the editor content match the resulting post output in the theme, for a better user experience.', 'theme-check' );
14
+ }
15
+
16
+ return $ret;
17
+ }
18
+
19
+ function getError() { return $this->error; }
20
+ }
21
+ $themechecks[] = new EditorStyleCheck;
checks/filenames.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class File_Checks implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $ret = true;
8
+
9
+ $filenames = array();
10
+
11
+ foreach ( $php_files as $php_key => $phpfile ) {
12
+ array_push( $filenames, strtolower( basename( $php_key ) ) );
13
+ }
14
+ foreach ( $other_files as $php_key => $phpfile ) {
15
+ array_push( $filenames, strtolower( basename( $php_key ) ) );
16
+ }
17
+ foreach ( $css_files as $php_key => $phpfile ) {
18
+ array_push( $filenames, strtolower( basename( $php_key ) ) );
19
+ }
20
+ $blacklist = array(
21
+ 'thumbs.db' => __( 'Windows thumbnail store', 'theme-check' ),
22
+ 'desktop.ini' => __( 'windows system file', 'theme-check' ),
23
+ 'project.properties' => __( 'NetBeans Project File', 'theme-check' ),
24
+ 'project.xml' => __( 'NetBeans Project File', 'theme-check' ),
25
+ '\.kpf' => __( 'Komodo Project File', 'theme-check' ),
26
+ '^\.+[a-zA-Z0-9]' => __( 'Hidden Files or Folders', 'theme-check' ),
27
+ 'php.ini' => __( 'PHP server settings file', 'theme-check' ),
28
+ 'dwsync.xml' => __( 'Dreamweaver project file', 'theme-check' ),
29
+ 'error_log' => __( 'PHP error log', 'theme-check' ),
30
+ 'web.config' => __( 'Server settings file', 'theme-check' ),
31
+ '\.sql' => __( 'SQL dump file', 'theme-check' ),
32
+ '__MACOSX' => __( 'OSX system file', 'theme-check' )
33
+ );
34
+
35
+ $musthave = array( 'index.php', 'comments.php', 'style.css' );
36
+ $rechave = array( 'readme.txt' => __( 'Please see <a href="http://codex.wordpress.org/Theme_Review#Theme_Documentation">Theme_Documentation</a> for more information.', 'theme-check' ) );
37
+
38
+ checkcount();
39
+
40
+ foreach( $blacklist as $file => $reason ) {
41
+ if ( $filename = preg_grep( '/' . $file . '/', $filenames ) ) {
42
+ $error = implode( array_unique( $filename ), ' ' );
43
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('<strong>%1$s</strong> %2$s found.', 'theme-check'), $error, $reason) ;
44
+ $ret = false;
45
+ }
46
+ }
47
+
48
+ foreach( $musthave as $file ) {
49
+ if ( !in_array( $file, $filenames ) ) {
50
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('could not find the file <strong>%1$s</strong> in the theme.', 'theme-check'), $file);
51
+ $ret = false;
52
+ }
53
+ }
54
+
55
+ foreach( $rechave as $file => $reason ) {
56
+ if ( !in_array( $file, $filenames ) ) {
57
+ $this->error[] = sprintf('<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('could not find the file <strong>%1$s</strong> in the theme. %2$s', 'theme-check'), $file, $reason );
58
+ }
59
+ }
60
+
61
+ return $ret;
62
+ }
63
+
64
+ function getError() { return $this->error; }
65
+ }
66
+ $themechecks[] = new File_Checks;
checks/gravatar.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class GravatarCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $php = implode( ' ', $php_files );
9
+
10
+ checkcount();
11
+
12
+ $ret = true;
13
+
14
+ if ( ( strpos( $php, 'get_avatar' ) === false ) && ( strpos( $php, 'wp_list_comments' ) === false ) ) {
15
+ $this->error[] = '<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__("This theme doesn't seem to support the standard avatar functions. Use <strong>get_avatar</strong> or <strong>wp_list_comments</strong> to add this support.", 'theme-check' );
16
+ $ret = false;
17
+ }
18
+
19
+ return $ret;
20
+ }
21
+
22
+ function getError() { return $this->error; }
23
+ }
24
+ $themechecks[] = new GravatarCheck;
checks/i18n.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // check for various I18N errors
4
+
5
+ class I18NCheck implements themecheck {
6
+ protected $error = array();
7
+
8
+ function check( $php_files, $css_files, $other_files ) {
9
+ $ret = true;
10
+ $error = '';
11
+ checkcount();
12
+
13
+ // make sure the tokenizer is available
14
+ if ( !function_exists( 'token_get_all' ) ) return true;
15
+
16
+ foreach ( $php_files as $php_key => $phpfile ) {
17
+ $error='';
18
+
19
+ $stmts = array();
20
+ foreach ( array('_e(', '__(', '_e (', '__ (') as $finder) {
21
+ $search = $phpfile;
22
+ while ( ( $pos = strpos($search, $finder) ) !== false ) {
23
+ $search = substr($search,$pos);
24
+ $open=1;
25
+ $i=strpos($search,'(')+1;
26
+ while( $open>0 ) {
27
+ switch($search[$i]) {
28
+ case '(':
29
+ $open++; break;
30
+ case ')':
31
+ $open--; break;
32
+ }
33
+ $i++;
34
+ }
35
+ $stmts[] = substr($search,0,$i);
36
+ $search = substr($search,$i);
37
+ }
38
+ }
39
+
40
+ foreach ( $stmts as $match ) {
41
+ $tokens = @token_get_all('<?php '.$match.';');
42
+ if (!empty($tokens)) {
43
+ foreach ($tokens as $token) {
44
+ if (is_array($token) && in_array( $token[0], array( T_VARIABLE ) ) ) {
45
+ $filename = tc_filename( $php_key );
46
+ $grep = tc_grep( ltrim( $match ), $php_key );
47
+ preg_match( '/[^\s]*\s[0-9]+/', $grep, $line);
48
+ $error = ( !strpos( $error, $line[0] ) ) ? $grep : '';
49
+ $this->error[] = sprintf('<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('Possible variable <strong>%1$s</strong> found in translation function in <strong>%2$s</strong>. Translation function calls must NOT contain PHP variables. %3$s','theme-check'),
50
+ $token[1], $filename, $error);
51
+ break; // stop looking at the tokens on this line once a variable is found
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+
58
+ }
59
+ return $ret;
60
+ }
61
+
62
+ function getError() { return $this->error; }
63
+ }
64
+ $themechecks[] = new I18NCheck;
checks/iframes.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class IframeCheck implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+ $ret = true;
7
+
8
+ $checks = array(
9
+ '/<(iframe)[^>]*>/' => __( 'iframes are sometimes used to load unwanted adverts and code on your site', 'theme-check' )
10
+ );
11
+
12
+ foreach ( $php_files as $php_key => $phpfile ) {
13
+ foreach ( $checks as $key => $check ) {
14
+ checkcount();
15
+ if ( preg_match( $key, $phpfile, $matches ) ) {
16
+ $filename = tc_filename( $php_key );
17
+ $error = ltrim( $matches[1], '(' );
18
+ $error = rtrim( $error, '(' );
19
+ $grep = tc_grep( $error, $php_key );
20
+ $this->error[] = sprintf('<span class="tc-lead tc-info">'.__('INFO','theme-check').'</span>: '.__('<strong>%1$s</strong> was found in the file <strong>%2$s</strong> %3$s.%4$s', 'theme-check'), $error, $filename, $check, $grep ) ;
21
+ }
22
+ }
23
+ }
24
+ return $ret;
25
+ }
26
+
27
+ function getError() { return $this->error; }
28
+ }
29
+ $themechecks[] = new IframeCheck;
checks/include.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class IncludeCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ $checks = array( '/(?<![a-z0-9_])(?:requir|includ)e(?:_once)?\s?\(/' => __( 'The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then <strong>get_template_part()</strong> should be used instead.', 'theme-check' ) );
11
+
12
+ foreach ( $php_files as $php_key => $phpfile ) {
13
+ foreach ( $checks as $key => $check ) {
14
+ checkcount();
15
+ if ( preg_match( $key, $phpfile, $matches ) ) {
16
+ $filename = tc_filename( $php_key );
17
+ $error = '/(?<![a-z0-9_])(?:requir|includ)e(?:_once)?\s?\(/';
18
+ $grep = tc_preg( $error, $php_key );
19
+ if ( basename($filename) !== 'functions.php' ) $this->error[] = sprintf ( '<span class="tc-lead tc-info">'.__('INFO','theme-check').'</span>: '.__('<strong>%1$s</strong> %2$s %3$s', 'theme-check' ), $filename, $check, $grep );
20
+ }
21
+ }
22
+
23
+ }
24
+ return $ret;
25
+ }
26
+
27
+ function getError() { return $this->error; }
28
+ }
29
+ $themechecks[] = new IncludeCheck;
checks/lineendings.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class LineEndingsCheck implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+ $ret = true;
7
+ foreach ( $php_files as $php_key => $phpfile ) {
8
+ if (preg_match("/\r\n/",$phpfile)) {
9
+ if (preg_match("/[^\r]\n/",$phpfile)) {
10
+ $filename = tc_filename( $php_key );
11
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.', 'theme-check'), $filename);
12
+ $ret = false;
13
+ }
14
+ }
15
+ }
16
+ foreach ( $css_files as $css_key => $cssfile ) {
17
+ if (preg_match("/\r\n/",$cssfile)) {
18
+ if (preg_match("/[^\r]\n/",$cssfile)) {
19
+ $filename = tc_filename( $css_key );
20
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.', 'theme-check'), $filename);
21
+ $ret = false;
22
+ }
23
+ }
24
+ }
25
+ foreach ( $other_files as $oth_key => $othfile ) {
26
+ $e = pathinfo($oth_key);
27
+ if ( isset( $e['extension'] ) && in_array( $e['extension'], array( 'txt','js' ) ) ) {
28
+ if (preg_match("/\r\n/",$othfile)) {
29
+ if (preg_match("/[^\r]\n/",$othfile)) {
30
+ $filename = tc_filename( $oth_key );
31
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings.', 'theme-check'), $filename);
32
+ $ret = false;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ return $ret;
38
+ }
39
+
40
+ function getError() { return $this->error; }
41
+ }
42
+
43
+ $themechecks[] = new LineEndingsCheck;
checks/links.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Check_Links implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $ret = true;
8
+ global $data;
9
+ foreach ( $php_files as $php_key => $phpfile ) {
10
+ checkcount();
11
+ $grep = '';
12
+ // regex borrowed from TAC
13
+ $url_re = '([[:alnum:]\-\.])+(\\.)([[:alnum:]]){2,4}([[:blank:][:alnum:]\/\+\=\%\&\_\\\.\~\?\-]*)';
14
+ $title_re = '[[:blank:][:alnum:][:punct:]]*'; // 0 or more: any num, letter(upper/lower) or any punc symbol
15
+ $space_re = '(\\s*)';
16
+ 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", $phpfile, $out, PREG_SET_ORDER ) ) {
17
+ $filename = tc_filename( $php_key );
18
+ foreach( $out as $key ) {
19
+ if ( preg_match( '/\<a\s?href\s?=\s?["|\'](.*?)[\'|"](.*?)\>(.*?)\<\/a\>/is', $key[0], $stripped ) ) {
20
+ if ( !empty( $data['AuthorURI'] ) && !empty( $data['URI'] ) && $stripped[1] && !strpos( $stripped[1], $data['URI'] ) && !strpos( $stripped[1], $data['AuthorURI'] ) && !strpos( $stripped[1], 'wordpress.' ) ) {
21
+ $grep .= tc_grep( $stripped[1], $php_key );
22
+ }
23
+ }
24
+ if ( $grep ) {
25
+ $this->error[] = sprintf('<span class="tc-lead tc-info">'.__('INFO','theme-check').'</span>: '.__('Possible hard-coded links were found in the file <strong>%1$s</strong>.%2$s', 'theme-check'), $filename, $grep);
26
+ }
27
+ }
28
+ }
29
+ }
30
+ return $ret;
31
+ }
32
+ function getError() { return $this->error; }
33
+ }
34
+ $themechecks[] = new Check_Links;
checks/malware.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MalwareCheck implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+ $ret = true;
7
+
8
+ $checks = array(
9
+ '/[^a-z0-9](?<!_)(file_get_contents|curl_exec|curl_init|readfile|fopen|fsockopen|pfsockopen|fclose|fread|fwrite|file_put_contents)\s?\(/' => __( 'File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls', 'theme-check' ),
10
+ );
11
+
12
+ foreach ( $php_files as $php_key => $phpfile ) {
13
+ foreach ( $checks as $key => $check ) {
14
+ checkcount();
15
+
16
+ if ( preg_match_all( $key, $phpfile, $matches ) ) {
17
+ $filename = tc_filename( $php_key );
18
+
19
+ foreach ($matches[1] as $match ) {
20
+ $error = ltrim( $match, '(' );
21
+ $error = rtrim( $error, '(' );
22
+ $grep = tc_grep( $error, $php_key );
23
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('<strong>%1$s</strong> was found in the file <strong>%2$s</strong> %3$s.%4$s', 'theme-check'), $error, $filename, $check, $grep );
24
+ $ret = false;
25
+ }
26
+ }
27
+ }
28
+ }
29
+ return $ret;
30
+ }
31
+
32
+ function getError() { return $this->error; }
33
+ }
34
+ $themechecks[] = new MalwareCheck;
checks/more_deprecated.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Checks for the use of deprecated function parameters.
5
+ */
6
+
7
+ class More_Deprecated implements themecheck {
8
+ protected $error = array();
9
+
10
+ function check( $php_files, $css_files, $other_files ) {
11
+
12
+ $ret = true;
13
+
14
+ $checks = array(
15
+ 'get_bloginfo' => array(
16
+ 'home' => 'home_url()',
17
+ 'url' => 'home_url()',
18
+ 'wpurl' => 'site_url()',
19
+ 'stylesheet_directory' => 'get_stylesheet_directory_uri()',
20
+ 'template_directory' => 'get_template_directory_uri()',
21
+ 'template_url' => 'get_template_directory_uri()',
22
+ 'text_direction' => 'is_rtl()',
23
+ 'feed_url' => "get_feed_link( 'feed' ), where feed is rss, rss2 or atom",
24
+ ),
25
+ 'bloginfo' => array(
26
+ 'home' => 'echo esc_url( home_url() )',
27
+ 'url' => 'echo esc_url( home_url() )',
28
+ 'wpurl' => 'echo esc_url( site_url() )',
29
+ 'stylesheet_directory' => 'echo esc_url( get_stylesheet_directory_uri() )',
30
+ 'template_directory' => 'echo esc_url( get_template_directory_uri() )',
31
+ 'template_url' => 'echo esc_url( get_template_directory_uri() )',
32
+ 'text_direction' => 'is_rtl()',
33
+ 'feed_url' => "echo esc_url( get_feed_link( 'feed' ) ), where feed is rss, rss2 or atom",
34
+ ),
35
+ 'get_option' => array(
36
+ 'home' => 'home_url()',
37
+ 'site_url' => 'site_url()',
38
+ )
39
+ );
40
+
41
+ foreach ( $php_files as $php_key => $php_file ) {
42
+ // Loop through all functions.
43
+ foreach ( $checks as $function => $data ) {
44
+ checkcount();
45
+
46
+ // Loop through the parameters and look for all function/parameter combinations.
47
+ foreach ( $data as $parameter => $replacement ) {
48
+ if ( preg_match( '/' . $function . '\(\s*("|\')' . $parameter . '("|\')\s*\)/', $php_file, $matches ) ) {
49
+ $filename = tc_filename( $php_key );
50
+ $error = ltrim( rtrim( $matches[0], '(' ) );
51
+ $grep = tc_grep( $error, $php_key );
52
+ $this->error[] = sprintf( '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check' ) . '</span>: ' . __( '<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'theme-check' ), $error, $filename, $replacement, $grep );
53
+ $ret = false;
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ return $ret;
60
+ }
61
+
62
+ function getError() { return $this->error; }
63
+ }
64
+ $themechecks[] = new More_Deprecated;
checks/navmenu.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class NavMenuCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ // combine all the php files into one string to make it easier to search
11
+ $php = implode( ' ', $php_files );
12
+ checkcount();
13
+ if ( strpos( $php, 'nav_menu' ) === false ) {
14
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__("No reference to nav_menu's was found in the theme. Note that if your theme has a menu bar, it is required to use the WordPress nav_menu functionality for it.", 'theme-check' );
15
+ }
16
+
17
+ return $ret;
18
+ }
19
+
20
+ function getError() { return $this->error; }
21
+ }
22
+
23
+ $themechecks[] = new NavMenuCheck;
checks/nonprintable.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class NonPrintableCheck implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+ $ret = true;
7
+
8
+ foreach ( $php_files as $name => $content ) {
9
+ checkcount();
10
+ // 09 = tab
11
+ // 0A = line feed
12
+ // 0D = new line
13
+ if ( preg_match('/[\x00-\x08\x0B-\x0C\x0E-\x1F\x80-\xFF]/', $content, $matches ) ) {
14
+ $filename = tc_filename( $name );
15
+ $non_print = tc_preg( '/[\x00-\x08\x0B-\x0C\x0E-\x1F\x80-\xFF]/', $name );
16
+ $this->error[] = sprintf('<span class="tc-lead tc-info">'.__('INFO','theme-check').'</span>: '.__('Non-printable characters were found in the <strong>%1$s</strong> file. You may want to check this file for errors.%2$s', 'theme-check'), $filename, $non_print);
17
+ }
18
+ }
19
+
20
+ // return the pass/fail
21
+ return $ret;
22
+ }
23
+
24
+ function getError() { return $this->error; }
25
+ }
26
+
27
+ $themechecks[] = new NonPrintableCheck;
checks/phpshort.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class PHPShortTagsCheck implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $ret = true;
8
+
9
+ foreach ( $php_files as $php_key => $phpfile ) {
10
+ checkcount();
11
+ if ( preg_match( '/<\?(\=?)(?!php|xml)/', $phpfile ) ) {
12
+ $filename = tc_filename( $php_key );
13
+ $grep = tc_preg( '/<\?(\=?)(?!php|xml)/', $php_key );
14
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('Found PHP short tags in file <strong>%1$s</strong>.%2$s', 'theme-check'), $filename, $grep);
15
+ $ret = false;
16
+ }
17
+ }
18
+
19
+ return $ret;
20
+ }
21
+
22
+ function getError() { return $this->error; }
23
+ }
24
+
25
+ $themechecks[] = new PHPShortTagsCheck;
checks/plugin-territory.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checks for Plugin Territory Guidelines.
4
+ *
5
+ * See http://make.wordpress.org/themes/guidelines/guidelines-plugin-territory/
6
+ */
7
+
8
+ class Plugin_Territory implements themecheck {
9
+ protected $error = array();
10
+
11
+ function check( $php_files, $css_files, $other_files ) {
12
+ $ret = true;
13
+ $php = implode( ' ', $php_files );
14
+
15
+ // Functions that are required to be removed from the theme.
16
+ $forbidden_functions = array(
17
+ 'register_post_type',
18
+ 'register_taxonomy',
19
+ );
20
+
21
+ foreach ( $forbidden_functions as $function ) {
22
+ checkcount();
23
+ if ( false !== strpos( $php, $function ) ) {
24
+ $this->error[] = '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check').'</span>: ' . sprintf( __( 'The theme uses the %s function, which is plugin-territory functionality.', 'theme-check' ), '<strong>' . esc_html( $function ) . '()</strong>' ) ;
25
+ $ret = false;
26
+ }
27
+ }
28
+
29
+ // Shortcodes can't be used in the post content, so warn about them.
30
+ if ( false !== strpos( $php, 'add_shortcode' ) ) {
31
+ checkcount();
32
+ $this->error[] = '<span class="tc-lead tc-warning">' . __( 'WARNING', 'theme-check').'</span>: ' . sprintf( __( 'The theme uses the %s function. Custom post-content shortcodes are plugin-territory functionality.', 'theme-check' ), '<strong>add_shortcode()</strong>' ) ;
33
+ $ret = false;
34
+ }
35
+
36
+ return $ret;
37
+ }
38
+
39
+ function getError() { return $this->error; }
40
+ }
41
+ $themechecks[] = new Plugin_Territory;
checks/post-formats.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class PostFormatCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+ $ret = true;
8
+
9
+ $php = implode( ' ', $php_files );
10
+ $css = implode( ' ', $css_files );
11
+
12
+ checkcount();
13
+
14
+ $checks = array(
15
+ '/add_theme_support\(\s?("|\')post-formats("|\')/m'
16
+ );
17
+
18
+ foreach ( $php_files as $php_key => $phpfile ) {
19
+ foreach ( $checks as $check ) {
20
+ checkcount();
21
+ if ( preg_match( $check, $phpfile, $matches ) ) {
22
+ if ( !strpos( $php, 'get_post_format' ) && !strpos( $php, 'has_post_format' ) && !strpos( $css, '.format' ) ) {
23
+ $filename = tc_filename( $php_key );
24
+ $matches[0] = str_replace(array('"',"'"),'', $matches[0]);
25
+ $error = esc_html( rtrim($matches[0], '(' ) );
26
+ $grep = tc_grep( rtrim($matches[0], '(' ), $php_key);
27
+ $this->error[] = sprintf('<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. However get_post_format and/or has_post_format were not found, and no use of formats in the CSS was detected.', 'theme-check'), $error, $filename);
28
+ $ret = false;
29
+ }
30
+ }
31
+ }
32
+ }
33
+ return $ret;
34
+ }
35
+
36
+ function getError() { return $this->error; }
37
+ }
38
+ $themechecks[] = new PostFormatCheck;
checks/postsnav.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class PostPaginationCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ // combine all the php files into one string to make it easier to search
11
+ $php = implode( ' ', $php_files );
12
+ checkcount();
13
+ if ( strpos( $php, 'posts_nav_link' ) === false && strpos( $php, 'paginate_links' ) === false &&
14
+ ( strpos( $php, 'previous_posts_link' ) === false && strpos( $php, 'next_posts_link' ) === false )
15
+ ) {
16
+ $this->error[] = '<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__("The theme doesn't have post pagination code in it. Use <strong>posts_nav_link()</strong> or <strong>paginate_links()</strong> or <strong>next_posts_link()</strong> and <strong>previous_posts_link()</strong> to add post pagination.", 'theme-check' );
17
+ $ret = false;
18
+ }
19
+
20
+ return $ret;
21
+ }
22
+
23
+ function getError() { return $this->error; }
24
+ }
25
+ $themechecks[] = new PostPaginationCheck;
checks/postthumb.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class PostThumbnailCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ // combine all the php files into one string to make it easier to search
11
+ $php = implode( ' ', $php_files );
12
+ checkcount();
13
+
14
+ if ( strpos( $php, 'the_post_thumbnail' ) === false ) {
15
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('No reference to <strong>the_post_thumbnail()</strong> was found in the theme. It is recommended that the theme implement this functionality instead of using custom fields for thumbnails.', 'theme-check' );
16
+ }
17
+
18
+ if ( strpos( $php, 'post-thumbnails' ) === false ) {
19
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('No reference to post-thumbnails was found in the theme. If the theme has a thumbnail like functionality, it should be implemented with <strong>add_theme_support( "post-thumbnails" )</strong>in the functions.php file.', 'theme-check' );
20
+ }
21
+
22
+ return $ret;
23
+ }
24
+
25
+ function getError() { return $this->error; }
26
+ }
27
+ $themechecks[] = new PostThumbnailCheck;
checks/required.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Required implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+ $checks = array(
10
+ '/\s?get_option\(\s?("|\')home("|\')\s?\)/' => 'home_url()',
11
+ '/\s?get_option\(\s?("|\')site_url("|\')\s?\)/' => 'site_url()',
12
+ );
13
+
14
+ foreach ( $php_files as $php_key => $phpfile ) {
15
+ foreach ( $checks as $key => $check ) {
16
+ checkcount();
17
+ if ( preg_match( $key, $phpfile, $matches ) ) {
18
+ $filename = tc_filename( $php_key );
19
+ $matches[0] = str_replace(array('"',"'"),'', $matches[0]);
20
+ $error = esc_html( rtrim($matches[0], '(' ) );
21
+ $grep = tc_grep( rtrim($matches[0], '(' ), $php_key );
22
+ $this->error[] = sprintf('<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'theme-check'), $error, $filename, $check, $grep);
23
+ $ret = false;
24
+ }
25
+ }
26
+ }
27
+ return $ret;
28
+ }
29
+ function getError() { return $this->error; }
30
+ }
31
+ $themechecks[] = new Required;
checks/screenshot.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Screenshot_Checks implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $ret = true;
8
+ $filenames = array();
9
+
10
+ foreach ( $other_files as $other_key => $otherfile ) {
11
+ array_push( $filenames, strtolower( basename( $other_key ) ) );
12
+ }
13
+
14
+ checkcount();
15
+
16
+ if ( in_array( 'screenshot.png', $filenames ) || in_array( 'screenshot.jpg', $filenames ) ) {
17
+
18
+ foreach ( $other_files as $other_key => $otherfile ) {
19
+
20
+ if ( ( basename( $other_key ) === 'screenshot.png' || basename( $other_key ) === 'screenshot.jpg' ) && preg_match( '/.*themes\/[^\/]*\/screenshot\.(png|jpg)/', $other_key ) ) {
21
+ // we have or screenshot!
22
+ $image = getimagesize( $other_key );
23
+ if ( $image[0] > 880 || $image[1] > 660 ) {
24
+ $this->error[] = sprintf('<span class="tc-lead tc-recommended">'. __( 'RECOMMENDED','theme-check' ) . '</span>: ' . __( 'Screenshot is wrong size! Detected: <strong>%1$sx%2$spx</strong>. Maximum allowed size is 880x660px.', 'theme-check' ), $image[0], $image[1]);
25
+ }
26
+ if ( $image[1] / $image[0] != 0.75 ) {
27
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('Screenshot dimensions are wrong! Ratio of width to height should be 4:3.', 'theme-check');
28
+ }
29
+ if ( $image[0] != 880 || $image[1] != 660 ) {
30
+ $this->error[] = '<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('Screenshot size should be 880x660, to account for HiDPI displays. Any 4:3 image size is acceptable, but 880x660 is preferred.', 'theme-check');
31
+ }
32
+ }
33
+ }
34
+ } else {
35
+ $this->error[] = '<span class="tc-lead tc-warning">'.__('WARNING','theme-check').'</span>: '.__('No screenshot detected! Please include a screenshot.png or screenshot.jpg.', 'theme-check' );
36
+ $ret = false;
37
+ }
38
+ return $ret;
39
+ }
40
+
41
+ function getError() { return $this->error; }
42
+ }
43
+ $themechecks[] = new Screenshot_Checks;
checks/searchform.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SearchFormCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+ $checks = array( '/(include\s?\(\s?TEMPLATEPATH\s?\.?\s?["|\']\/searchform.php["|\']\s?\))/' => __( 'Please use <strong>get_search_form()</strong> instead of including searchform.php directly.', 'theme-check' ) );
10
+ foreach ( $php_files as $php_key => $phpfile ) {
11
+ foreach ($checks as $key => $check) {
12
+ checkcount();
13
+ if ( preg_match( $key, $phpfile, $out ) ) {
14
+ $grep = tc_preg( $key, $php_key );
15
+ $filename = tc_filename( $php_key );
16
+ $this->error[] = sprintf('<span class="tc-lead tc-required">'.__('REQUIRED','theme-check').'</span>: '.__('<strong>%1$s</strong> %2$s%3$s', 'theme-check'), $filename, $check, $grep);
17
+ $ret = false;
18
+ }
19
+ }
20
+ }
21
+ return $ret;
22
+ }
23
+
24
+ function getError() { return $this->error; }
25
+ }
26
+ $themechecks[] = new SearchFormCheck;
checks/style_needed.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Style_Needed implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $css = implode( ' ', $css_files );
8
+ $ret = true;
9
+
10
+ $checks = array(
11
+ '[ \t\/*#]*Theme Name:' => __( '<strong>Theme name:</strong> is missing from your style.css header.', 'theme-check' ),
12
+ '[ \t\/*#]*Description:' => __( '<strong>Description:</strong> is missing from your style.css header.', 'theme-check' ),
13
+ '[ \t\/*#]*Author:' => __( '<strong>Author:</strong> is missing from your style.css header.', 'theme-check' ),
14
+ '[ \t\/*#]*Version' => __( '<strong>Version:</strong> is missing from your style.css header.', 'theme-check' ),
15
+ '[ \t\/*#]*License:' => __( '<strong>License:</strong> is missing from your style.css header.', 'theme-check' ),
16
+ '[ \t\/*#]*License URI:' => __( '<strong>License URI:</strong> is missing from your style.css header.', 'theme-check' ),
17
+ '\.sticky' => __( '<strong>.sticky</strong> css class is needed in your theme css.', 'theme-check' ),
18
+ '\.bypostauthor' => __( '<strong>.bypostauthor</strong> css class is needed in your theme css.', 'theme-check' ),
19
+ '\.alignleft' => __( '<strong>.alignleft</strong> css class is needed in your theme css.', 'theme-check' ),
20
+ '\.alignright' => __( '<strong>.alignright</strong> css class is needed in your theme css.', 'theme-check' ),
21
+ '\.aligncenter' => __( '<strong>.aligncenter</strong> css class is needed in your theme css.', 'theme-check' ),
22
+ '\.wp-caption' => __( '<strong>.wp-caption</strong> css class is needed in your theme css.', 'theme-check' ),
23
+ '\.wp-caption-text' => __( '<strong>.wp-caption-text</strong> css class is needed in your theme css.', 'theme-check' ),
24
+ '\.gallery-caption' => __( '<strong>.gallery-caption</strong> css class is needed in your theme css.', 'theme-check' )
25
+ );
26
+
27
+ foreach ($checks as $key => $check) {
28
+ checkcount();
29
+ if ( !preg_match( '/' . $key . '/i', $css, $matches ) ) {
30
+ $this->error[] = "<span class='tc-lead tc-required'>" . __('REQUIRED', 'theme-check' ) . "</span>:" . $check;
31
+ $ret = false;
32
+ }
33
+ }
34
+
35
+ return $ret;
36
+ }
37
+ function getError() { return $this->error; }
38
+ }
39
+ $themechecks[] = new Style_Needed;
checks/style_suggested.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Style_Suggested implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ // combine all the css files into one string to make it easier to search
8
+ $css = implode( ' ', $css_files );
9
+
10
+ checkcount();
11
+ $ret = true;
12
+
13
+ $checks = array(
14
+ '[ \t\/*#]*Theme URI:' => 'Theme URI:',
15
+ '[ \t\/*#]*Author URI:' => 'Author URI:',
16
+ );
17
+
18
+ foreach ($checks as $key => $check) {
19
+ if ( !preg_match( '/' . $key . '/i', $css, $matches ) ) {
20
+ $this->error[] = sprintf('<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('<strong>%1$s</strong> is missing from your style.css header.', 'theme-check'), $check);
21
+ }
22
+ }
23
+
24
+ return $ret;
25
+ }
26
+
27
+ function getError() { return $this->error; }
28
+ }
29
+ $themechecks[] = new Style_Suggested;
checks/style_tags.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Style_Tags implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ checkcount();
8
+ $ret = true;
9
+ $filenames = array();
10
+
11
+ foreach( $css_files as $cssfile => $content ) {
12
+ if ( basename( $cssfile ) === 'style.css' ) $data = get_theme_data_from_contents( $content );
13
+ }
14
+
15
+ if ( !$data[ 'Tags' ] ) {
16
+ $this->error[] = '<span class="tc-lead tc-recommended">' . __('RECOMMENDED','theme-check') . '</span>: ' . __( '<strong>Tags:</strong> is either empty or missing in style.css header.', 'theme-check' );
17
+ return $ret;
18
+ }
19
+
20
+ $allowed_tags = array("black","blue","brown","gray","green","orange","pink","purple","red","silver","tan","white","yellow","dark","light","one-column","two-columns","three-columns","four-columns","left-sidebar","right-sidebar","fixed-layout","fluid-layout","responsive-layout","flexible-header","accessibility-ready","blavatar","buddypress","custom-background","custom-colors","custom-header","custom-menu","editor-style","featured-image-header","featured-images","front-page-post-form","full-width-template","microformats","post-formats","rtl-language-support","sticky-post","theme-options","threaded-comments","translation-ready","holiday","photoblogging","seasonal");
21
+
22
+ foreach( $data[ 'Tags' ] as $tag ) {
23
+ if ( !in_array( strtolower( $tag ), $allowed_tags ) ) {
24
+ if ( in_array( strtolower( $tag ), array("flexible-width","fixed-width") ) ) {
25
+ $this->error[] = '<span class="tc-lead tc-warning">'. __('WARNING','theme-check'). '</span>: ' . __( 'The flexible-width and fixed-width tags changed to fluid-layout and fixed-layout tags in WordPress 3.8. Additionally, the responsive-layout tag was added. Please change to using one of the new tags.', 'theme-check' );
26
+ } else {
27
+ $this->error[] = '<span class="tc-lead tc-warning">'. __('WARNING','theme-check'). '</span>: ' . sprintf(__('Found wrong tag, remove <strong>%1$s</strong> from your style.css header.', 'theme-check'), $tag);
28
+ $ret = false;
29
+ }
30
+ }
31
+ }
32
+
33
+ return $ret;
34
+ }
35
+
36
+ function getError() { return $this->error; }
37
+ }
38
+ $themechecks[] = new Style_Tags;
checks/suggested.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Suggested implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $ret = true;
8
+
9
+ $checks = array(
10
+ '/[\s|]get_bloginfo\(\s?("|\')url("|\')\s?\)/' => 'home_url()',
11
+ '/[\s|]get_bloginfo\(\s?("|\')wpurl("|\')\s?\)/' => 'site_url()',
12
+ '/[\s|]get_bloginfo\(\s?("|\')stylesheet_directory("|\')\s?\)/' => 'get_stylesheet_directory_uri()',
13
+ '/[\s|]get_bloginfo\(\s?("|\')template_directory("|\')\s?\)/' => 'get_template_directory_uri()',
14
+ '/[\s|]get_bloginfo\(\s?("|\')template_url("|\')\s?\)/' => 'get_template_directory_uri()',
15
+ '/[\s|]get_bloginfo\(\s?("|\')text_direction("|\')\s?\)/' => 'is_rtl()',
16
+ '/[\s|]get_bloginfo\(\s?("|\')feed_url("|\')\s?\)/' => 'get_feed_link( \'feed\' ) (feed = rss, rss2, atom)',
17
+ '/[\s|]bloginfo\(\s?("|\')url("|\')\s?\)/' => 'echo home_url()',
18
+ '/[\s|]bloginfo\(\s?("|\')wpurl("|\')\s?\)/' => 'echo site_url()',
19
+ '/[\s|]bloginfo\(\s?("|\')stylesheet_directory("|\')\s?\)/' => 'get_stylesheet_directory_uri()',
20
+ '/[\s|]bloginfo\(\s?("|\')template_directory("|\')\s?\)/' => 'get_template_directory_uri()',
21
+ '/[\s|]bloginfo\(\s?("|\')template_url("|\')\s?\)/' => 'get_template_directory_uri()',
22
+ '/[\s|]bloginfo\(\s?("|\')text_direction("|\')\s?\)/' => 'is_rtl()',
23
+ '/[\s|]bloginfo\(\s?("|\')feed_url("|\')\s?\)/' => 'get_feed_link( \'feed\' ) (feed = rss, rss2, atom)',
24
+ );
25
+
26
+ foreach ( $php_files as $php_key => $phpfile ) {
27
+ foreach ( $checks as $key => $check ) {
28
+ checkcount();
29
+ if ( preg_match( $key, $phpfile, $matches ) ) {
30
+ $filename = tc_filename( $php_key );
31
+ $matches[0] = str_replace(array('"',"'"),'', $matches[0]);
32
+ $error = trim( esc_html( rtrim($matches[0], '(' ) ) );
33
+ $grep = tc_grep( rtrim( $matches[0], '(' ), $php_key );
34
+ $this->error[] = sprintf('<span class="tc-lead tc-recommended">' . __( 'RECOMMENDED', 'theme-check' ) . '</span>: '. __( '<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s', 'theme-check'), $error, $filename, $check, $grep);
35
+ }
36
+ }
37
+ }
38
+ return $ret;
39
+ }
40
+
41
+ function getError() { return $this->error; }
42
+ }
43
+ $themechecks[] = new Suggested;
checks/tags.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class TagCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ // combine all the php files into one string to make it easier to search
9
+ $php = implode( ' ', $php_files );
10
+ checkcount();
11
+ $ret = true;
12
+ if ( strpos( $php, 'the_tags' ) === false && strpos( $php, 'get_the_tag_list' ) === false && strpos( $php, 'get_the_term_list' ) === false ) {
13
+ $this->error[] = "<span class='tc-lead tc-required'>" . __( 'REQUIRED', 'theme-check' ) . '</span>: '. __( "This theme doesn't seem to display tags. Modify it to display tags in appropriate locations.", "theme-check" );
14
+ $ret = false;
15
+ }
16
+
17
+ return $ret;
18
+ }
19
+
20
+ function getError() { return $this->error; }
21
+ }
22
+ $themechecks[] = new TagCheck;
checks/textdomain.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class TextDomainCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+ global $data, $themename;
8
+ $ret = true;
9
+ $error = '';
10
+ checkcount();
11
+ if ( $data['Name'] === 'Twenty Ten' || $data['Name'] === 'Twenty Eleven')
12
+ return $ret;
13
+
14
+ $checks = array(
15
+ '/[\s|\(|;]_[e|_]\s?\(\s?[\'|"][^\'|"]*[\'|"]\s?\)/' => __( 'You have not included a text domain!', 'theme-check' )
16
+ );
17
+
18
+ foreach ( $php_files as $php_key => $phpfile ) {
19
+ $error = '';
20
+ foreach ( $checks as $key => $check ) {
21
+ checkcount();
22
+ if ( preg_match_all( $key, $phpfile, $matches ) || preg_match_all( '/[\s|\(]_x\s?\(\s?[\'|"][^\'|"]*[\'|"]\s?,\s?[\'|"][^\'|"]*[\'|"]\s?\)/', $phpfile, $matches )) {
23
+
24
+ $filename = tc_filename( $php_key );
25
+ foreach ($matches[0] as $match ) {
26
+ $grep = tc_grep( ltrim( $match ), $php_key );
27
+ preg_match( '/[^\s]*\s[0-9]+/', $grep, $line);
28
+ $error .= ( !strpos( $error, $line[0] ) ) ? $grep : '';
29
+ }
30
+ $this->error[] = sprintf( "<span class='tc-lead tc-recommended'>" . __( 'RECOMMENDED', 'theme-check' ) . '</span>: ' .
31
+ /* translators: 1: filename 2: error message 3: grep results */
32
+ __( 'Text domain problems in <strong>%1$s</strong>. %2$s %3$s ', 'theme-check' ), $filename, $check, $error );
33
+ }
34
+ }
35
+ }
36
+
37
+ $checks = array(
38
+ '/[\s|\(]_[e|_]\s?\([^,|;]*\s?,\s?[\'|"]([^\'|"]*)[\'|"]\s?\)/' => sprintf(__('Text domain should match theme slug: <strong>%1$s</strong>', 'theme-check'), $themename ),
39
+ '/[\s|\(]_x\s?\([^,]*\s?,\s[^\'|"]*[\'|"][^\'|"]*[\'|"],\s?[\'|"]([^\'|"]*)[\'|"]\s?\)/' => sprintf(__('Text domain should match theme slug: <strong>%1$s</strong>', 'theme-check'), $themename )
40
+ );
41
+ foreach ( $php_files as $php_key => $phpfile ) {
42
+ foreach ( $checks as $key => $check ) {
43
+ checkcount();
44
+ if ( preg_match_all( $key, $phpfile, $matches ) ) {
45
+ foreach ($matches[0] as $count => $domaincheck) {
46
+ if ( preg_match( '/[\s|\(]_[e|_]\s?\(\s?[\'|"][^\'|"]*[\'|"]\s?\)/', $domaincheck ) )
47
+ unset( $matches[1][$count] ); //filter out false positives
48
+ }
49
+ $filename = tc_filename( $php_key );
50
+ $count = 0;
51
+ while ( isset( $matches[1][$count] ) ) {
52
+ if ( $matches[1][$count] !== $themename ) {
53
+ $error = tc_grep( $matches[0][$count], $php_key );
54
+ if ( $matches[1][$count] === 'twentyten' || $matches[1][$count] === 'twentyeleven' ):
55
+ $this->error[] = sprintf( '<span class=\'tc-lead tc-recommended\'>' . __( 'RECOMMENDED', 'theme-check' ) . '</span>: '. __( 'Text domain problems in <strong>%1$s</strong>. The %2s text domain is being used!%3$s', 'theme-check' ), $filename, $matches[1][$count], $error );
56
+ else:
57
+ if ( defined( 'TC_TEST' ) && strpos( strtolower( $themename ), $matches[1][$count] ) === false ) {
58
+ $error = tc_grep( $matches[0][$count], $php_key );
59
+ $this->error[] = sprintf( '<span class=\'tc-lead tc-recommended\'>' . __( 'RECOMMENDED', 'theme-check' ) . '</span>: '. __( 'Text domain problems in <strong>%1$s</strong>. %2$s You are using: <strong>%3s</strong>%4$s', 'theme-check' ), $filename, $check, $matches[1][$count], $error );
60
+ }
61
+ endif;
62
+ }
63
+ $count++;
64
+ } //end while
65
+ }
66
+ }
67
+ }
68
+ return $ret;
69
+ }
70
+
71
+ function getError() { return $this->error; }
72
+ }
73
+ $themechecks[] = new TextDomainCheck;
checks/time_date.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Time_Date implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+
7
+ $ret = true;
8
+
9
+ $checks = array(
10
+ '/\sdate_i18n\(\s?["|\'][A-Za-z\s]+\s?["|\']\)/' => 'date_i18n( get_option( \'date_format\' ) )',
11
+ '/[^get_]the_date\(\s?["|\'][A-Za-z\s]+\s?["|\']\)/' => 'the_date( get_option( \'date_format\' ) )',
12
+ '/[^get_]the_time\(\s?["|\'][A-Za-z\s]+\s?["|\']\)/' => 'the_time( get_option( \'date_format\' ) )'
13
+ );
14
+
15
+ foreach ( $php_files as $php_key => $phpfile ) {
16
+ foreach ( $checks as $key => $check ) {
17
+ checkcount();
18
+ if ( preg_match( $key, $phpfile, $matches ) ) {
19
+ $filename = tc_filename( $php_key );
20
+ $matches[0] = str_replace(array('"',"'"),'', $matches[0]);
21
+ $error = trim( esc_html( rtrim( $matches[0], '(' ) ) );
22
+ $this->error[] = sprintf( '<span class="tc-lead tc-info">' . __( 'INFO', 'theme-check' ) . '</span>: ' . __( "At least one hard coded date was found in the file <strong>%s</strong>. Consider get_option( 'date_format' ) instead.", 'theme-check' ), $filename );
23
+ }
24
+ }
25
+ }
26
+ return $ret;
27
+ }
28
+
29
+ function getError() { return $this->error; }
30
+ }
31
+ $themechecks[] = new Time_Date;
checks/title.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checks for the title:
4
+ * Are there <title> and </title> tags?
5
+ * Is there a call to wp_title()?
6
+ * There can't be any hardcoded text in the <title> tag.
7
+ *
8
+ * See: http://make.wordpress.org/themes/guidelines/guidelines-theme-check/
9
+ */
10
+ class Title_Checks implements themecheck {
11
+ protected $error = array();
12
+
13
+ function check( $php_files, $css_files, $other_files ) {
14
+ $ret = true;
15
+ $php = implode( ' ', $php_files );
16
+
17
+ /**
18
+ * Look for <title> and </title> tags.
19
+ */
20
+ checkcount();
21
+ if ( false === strpos( $php, '<title>' ) || false === strpos( $php, '</title>' ) ) {
22
+ $this->error[] = '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check').'</span>: ' . __( 'The theme needs to have <strong>&lt;title&gt;</strong> tags, ideally in the <strong>header.php</strong> file.', 'theme-check' );
23
+ $ret = false;
24
+ }
25
+
26
+ /**
27
+ * Check whether there is a call to wp_title().
28
+ */
29
+ checkcount();
30
+ if ( false === strpos( $php, 'wp_title(' ) ) {
31
+ $this->error[] = '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check').'</span>: ' . __( 'The theme needs to have a call to <strong>wp_title()</strong>, ideally in the <strong>header.php</strong> file.', 'theme-check' );
32
+ $ret = false;
33
+ }
34
+
35
+ /**
36
+ * Check whether the the <title> tag contains something besides a call to wp_title().
37
+ */
38
+ checkcount();
39
+
40
+ foreach ( $php_files as $file_path => $file_content ) {
41
+ /**
42
+ * First looks ahead to see of there's <title>...</title>
43
+ * Then performs a negative look ahead for <title><?php wp_title(...); ?></title>
44
+ */
45
+ if ( preg_match( '/(?=<title>(.*)<\/title>)(?!<title>\s*<\?php\s*wp_title\([^\)]*\);\s*\?>\s*<\/title>)/s', $file_content ) ) {
46
+ $this->error[] = '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check').'</span>: ' . __( 'The <strong>&lt;title&gt;</strong> tags can only contain a call to <strong>wp_title()</strong>. Use the <strong>wp_title filter</strong> to modify the output', 'theme-check' );
47
+ $ret = false;
48
+ }
49
+ }
50
+
51
+ return $ret;
52
+ }
53
+
54
+ function getError() { return $this->error; }
55
+ }
56
+
57
+ $themechecks[] = new Title_Checks;
checks/widgets.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WidgetsCheck implements themecheck {
4
+ protected $error = array();
5
+
6
+ function check( $php_files, $css_files, $other_files ) {
7
+
8
+ $ret = true;
9
+
10
+ // combine all the php files into one string to make it easier to search
11
+ $php = implode( ' ', $php_files );
12
+ checkcount();
13
+
14
+ // no widgets registered or used...
15
+ if ( strpos( $php, 'register_sidebar' ) === false && strpos( $php, 'dynamic_sidebar' ) === false ) {
16
+ $this->error[] = "<span class='tc-lead tc-recommended'>" . __( "RECOMMENDED", 'theme-check') . '</span>: '. __( "This theme contains no sidebars/widget areas. See <a href='http://codex.wordpress.org/Widgets_API'>Widgets API</a>", "theme-check" );
17
+ $ret = true;
18
+ }
19
+
20
+ if ( strpos( $php, 'register_sidebar' ) !== false && strpos( $php, 'dynamic_sidebar' ) === false ) {
21
+ $this->error[] = "<span class='tc-lead tc-required'>" . __( "REQUIRED", 'theme-check') . '</span>: '. __( "The theme appears to use <strong>register_sidebar()</strong> but no <strong>dynamic_sidebar()</strong> was found. See: <a href='http://codex.wordpress.org/Function_Reference/dynamic_sidebar'>dynamic_sidebar</a><pre> &lt;?php dynamic_sidebar( \$index ); ?&gt;</pre>", "theme-check" );
22
+ $ret = false;
23
+ }
24
+
25
+ if ( strpos( $php, 'register_sidebar' ) === false && strpos( $php, 'dynamic_sidebar' ) !== false ) {
26
+ $this->error[] = "<span class='tc-lead tc-required'>" . __( "REQUIRED", 'theme-check') . '</span>: '. __( "The theme appears to use <strong>dynamic_sidebars()</strong> but no <strong>register_sidebar()</strong> was found. See: <a href='http://codex.wordpress.org/Function_Reference/register_sidebar'>register_sidebar</a><pre> &lt;?php register_sidebar( \$args ); ?&gt;</pre>", "theme-check" );
27
+ $ret = false;
28
+ }
29
+
30
+ /**
31
+ * There are widgets registered, is the widgets_init action present?
32
+ */
33
+ if ( strpos( $php, 'register_sidebar' ) !== false && preg_match( '/add_action\(\s*("|\')widgets_init("|\')\s*,/', $php ) == false ) {
34
+ $this->error[] = "<span class='tc-lead tc-required'>" . __( "REQUIRED", 'theme-check') . '</span>: '. sprintf( __( "Sidebars need to be registered in a custom function hooked to the <strong>widgets_init</strong> action. See: %s.", "theme-check" ), '<a href="http://codex.wordpress.org/Function_Reference/register_sidebar">register_sidebar()</a>' );
35
+ $ret = false;
36
+ }
37
+ return $ret;
38
+ }
39
+
40
+ function getError() { return $this->error; }
41
+ }
42
+ $themechecks[] = new WidgetsCheck;
checks/worms.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class WormCheck implements themecheck {
3
+ protected $error = array();
4
+
5
+ function check( $php_files, $css_files, $other_files ) {
6
+ $ret = true;
7
+ $php_files = array_merge( $php_files, $other_files );
8
+ $checks = array(
9
+ '/wshell\.php/'=> __( 'This may be a script used by hackers to get control of your server!', 'theme-check' ),
10
+ '/ShellBOT/' => __( 'This may be a script used by hackers to get control of your server', 'theme-check' ),
11
+ '/uname -a/' => __( 'Tells a hacker what operating system your server is running', 'theme-check' ),
12
+ '/YW55cmVzdWx0cy5uZXQ=/' => __( 'base64 encoded text found in Search Engine Redirect hack <a href="http://blogbuildingu.com/wordpress/wordpress-search-engine-redirect-hack">[1]</a>', 'theme-check' ),
13
+ '/\$_COOKIE\[\'yahg\'\]/' => __( 'YAHG Googlerank.info exploit code <a href="http://creativebriefing.com/wordpress-hacked-googlerankinfo/">[1]</a>', 'theme-check' ),
14
+ '/ekibastos/' => __( 'Possible Ekibastos attack <a href="http://ocaoimh.ie/did-your-wordpress-site-get-hacked/">[1]</a>', 'theme-check' ),
15
+ '/<script>\/\*(GNU GPL|LGPL)\*\/ try\{window.onload.+catch\(e\) \{\}<\/script>/' => __( 'Possible "Gumblar" JavaScript attack <a href="http://threatinfo.trendmicro.com/vinfo/articles/securityarticles.asp?xmlfile=042710-GUMBLAR.xml">[1]</a> <a href="http://justcoded.com/article/gumblar-family-virus-removal-tool/">[2]</a>', 'theme-check' ),
16
+ '/php \$[a-zA-Z]*=\'as\';/' => __( 'Symptom of the "Pharma Hack" <a href="http://blog.sucuri.net/2010/07/understanding-and-cleaning-the-pharma-hack-on-wordpress.html">[1]</a>', 'theme-check' ),
17
+ '/defined?\(\'wp_class_support/' => __( 'Symptom of the "Pharma Hack" <a href="http://blog.sucuri.net/2010/07/understanding-and-cleaning-the-pharma-hack-on-wordpress.html">[1]</a>', 'theme-check' ),
18
+ '/AGiT3NiT3NiT3fUQKxJvI/' => __( 'Malicious footer code injection detected!', 'theme-check' )
19
+ );
20
+
21
+ foreach ( $php_files as $php_key => $phpfile ) {
22
+ foreach ( $checks as $key => $check ) {
23
+ checkcount();
24
+ if ( preg_match( $key, $phpfile, $matches ) ) {
25
+ $filename = tc_filename( $php_key );
26
+ $error = $matches[0];
27
+ $grep = tc_grep( $error, $php_key );
28
+ $this->error[] = sprintf('<span class="tc-lead tc-warning">'. __( 'WARNING', 'theme-check') . '</span>: <strong>%1$s</strong> %2$s%3$s', $filename, $check, $grep );
29
+ $ret = false;
30
+ }
31
+ }
32
+ }
33
+ return $ret;
34
+ }
35
+
36
+ function getError() { return $this->error; }
37
+ }
38
+ $themechecks[] = new WormCheck;
lang/theme-check-nl_NL.mo ADDED
Binary file
lang/theme-check-nl_NL.po ADDED
@@ -0,0 +1,744 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Theme Check
2
+ # This file is distributed under the same license as the Theme Check package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Theme Check 20131212.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/theme-check\n"
7
+ "POT-Creation-Date: 2013-12-12 17:58:21+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-12-12 22:23+0100\n"
12
+ "Last-Translator: Bass Jobsen <bass@w3masters.nl>\n"
13
+ "Language-Team: \n"
14
+
15
+ #: checkbase.php:91
16
+ #: checkbase.php:110
17
+ msgid "Line "
18
+ msgstr "Regel"
19
+
20
+ #: checkbase.php:252
21
+ msgid "Visit author homepage"
22
+ msgstr "Bezoek de website van de maker"
23
+
24
+ #: checkbase.php:255
25
+ msgid "Anonymous"
26
+ msgstr "Anoniem"
27
+
28
+ #: checks/admin_menu.php:13
29
+ #: checks/admin_menu.php:14
30
+ msgid "User levels were deprecated in <strong>2.0</strong>. Please see <a href=\"http://codex.wordpress.org/Roles_and_Capabilities\">Roles_and_Capabilities</a>"
31
+ msgstr "Gebruikersniveaus zijn nite meer toestaan sinds <strong>2.0</strong>. Zie ook: <a href=\"http://codex.wordpress.org/Roles_and_Capabilities\">Roles_and_Capabilities</a> (Engels)"
32
+
33
+ #: checks/admin_menu.php:23
34
+ #: checks/artisteer.php:24
35
+ #: checks/badthings.php:29
36
+ #: checks/filenames.php:43
37
+ #: checks/filenames.php:50
38
+ #: checks/lineendings.php:11
39
+ #: checks/lineendings.php:20
40
+ #: checks/lineendings.php:31
41
+ #: checks/malware.php:23
42
+ #: checks/phpshort.php:14
43
+ #: checks/screenshot.php:32
44
+ #: checks/style_tags.php:25
45
+ #: checks/style_tags.php:27
46
+ #: checks/worms.php:28
47
+ #: main.php:86
48
+ msgid "WARNING"
49
+ msgstr "WAARSCHUWING"
50
+
51
+ #: checks/admin_menu.php:33
52
+ msgid "Themes should use <strong>add_theme_page()</strong> for adding admin pages."
53
+ msgstr "Thema's moeten gebruik maken van <strong>add_theme_page()</strong> om een admin pagina toe te voegen."
54
+
55
+ #: checks/admin_menu.php:44
56
+ #: checks/basic.php:36
57
+ #: checks/comment_reply.php:15
58
+ #: checks/commpage.php:15
59
+ #: checks/content-width.php:14
60
+ #: checks/deprecated.php:189
61
+ #: checks/directories.php:27
62
+ #: checks/gravatar.php:15
63
+ #: checks/more_deprecated.php:22
64
+ #: checks/post-formats.php:27
65
+ #: checks/postsnav.php:16
66
+ #: checks/required.php:22
67
+ #: checks/searchform.php:16
68
+ #: checks/style_needed.php:30
69
+ #: checks/tags.php:13
70
+ #: checks/widgets.php:21
71
+ #: checks/widgets.php:26
72
+ msgid "REQUIRED"
73
+ msgstr "VERPLICHT"
74
+
75
+ #: checks/artisteer.php:24
76
+ msgid "This theme appears to have been auto-generated. Generated themes are not allowed in the themes directory."
77
+ msgstr "Dit thema lijkt automatisch gegenereerd te zijn. Automatisch gegenereerde thema's zijn niet toegestaan in de thema directorie."
78
+
79
+ #: checks/badthings.php:9
80
+ msgid "eval() is not allowed."
81
+ msgstr "eval() is niet toegestaan."
82
+
83
+ #: checks/badthings.php:10
84
+ msgid "PHP system calls are often disabled by server admins and should not be in themes"
85
+ msgstr "PHP systeem aanroepen zijn vaak buiten werking gesteld door serverbeheerders en daarom niet toegestaan in thema's."
86
+
87
+ #: checks/badthings.php:11
88
+ msgid "Themes should not change server PHP settings"
89
+ msgstr "Thema's mogen de PHP instellingen niet aanpassen."
90
+
91
+ #: checks/badthings.php:12
92
+ msgid "base64_decode() is not allowed"
93
+ msgstr "base64_decode() is niet toegestaan"
94
+
95
+ #: checks/badthings.php:13
96
+ msgid "base64_encode() is not allowed"
97
+ msgstr "base64_encode() is niet toegestaan"
98
+
99
+ #: checks/badthings.php:14
100
+ msgid "uudecode() is not allowed"
101
+ msgstr "uudecode() is niet toegestaan"
102
+
103
+ #: checks/badthings.php:15
104
+ msgid "str_rot13() is not allowed"
105
+ msgstr "str_rot13() is niet toegestaan"
106
+
107
+ #: checks/badthings.php:16
108
+ #: checks/badthings.php:37
109
+ msgid "Google search code detected"
110
+ msgstr "Google search code gevonden"
111
+
112
+ #: checks/badthings.php:17
113
+ #: checks/badthings.php:38
114
+ msgid "Google advertising code detected"
115
+ msgstr "Google adsense code gevonden"
116
+
117
+ #: checks/badthings.php:48
118
+ msgid "<span class=\"tc-lead tc-warning\">WARNING</span>: Found <strong>%1$s</strong> in the file <strong>%2$s</strong>. %3$s.%4$s"
119
+ msgstr "<span class=\"tc-lead tc-warning\">WAARSCHUWING</span>: Gevonden <strong>%1$s</strong> in het bestand <strong>%2$s</strong>. %3$s.%4$s"
120
+
121
+ #: checks/basic.php:14
122
+ msgid "See: <a href=\"http://codex.wordpress.org/HTML_to_XHTML\">http://codex.wordpress.org/HTML_to_XHTML</a><pre>&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"<br />\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"?&gt;</pre>"
123
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/HTML_to_XHTML\">http://codex.wordpress.org/HTML_to_XHTML</a><pre>&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"<br />\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"?&gt;</pre>"
124
+
125
+ #: checks/basic.php:15
126
+ msgid "See: <a href=\"http://codex.wordpress.org/Function_Reference/wp_footer\">wp_footer</a><pre> &lt;?php wp_footer(); ?&gt;</pre>"
127
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Function_Reference/wp_footer\">wp_footer</a><pre> &lt;?php wp_footer(); ?&gt;</pre>"
128
+
129
+ #: checks/basic.php:16
130
+ msgid "See: <a href=\"http://codex.wordpress.org/Function_Reference/wp_head\">wp_head</a><pre> &lt;?php wp_head(); ?&gt;</pre>"
131
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Function_Reference/wp_head\">wp_head</a><pre> &lt;?php wp_head(); ?&gt;</pre>"
132
+
133
+ #: checks/basic.php:17
134
+ msgid "See: <a href=\"http://codex.wordpress.org/Function_Reference/language_attributes\">language_attributes</a><pre>&lt;html &lt;?php language_attributes(); ?&gt;</pre>"
135
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Function_Reference/language_attributes\">language_attributes</a><pre>&lt;html &lt;?php language_attributes(); ?&gt;</pre>"
136
+
137
+ #: checks/basic.php:18
138
+ msgid "There must be a charset defined in the Content-Type or the meta charset tag in the head."
139
+ msgstr "Het is verpicht een charset te definiëren in de Content-Type of meta charset tag in de head sectie."
140
+
141
+ #: checks/basic.php:19
142
+ msgid "See: <a href=\"http://codex.wordpress.org/Function_Reference/add_theme_support\">add_theme_support</a><pre> &lt;?php add_theme_support( $feature ); ?&gt;</pre>"
143
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Function_Reference/add_theme_support\">add_theme_support</a><pre> &lt;?php add_theme_support( $feature ); ?&gt;</pre>"
144
+
145
+ #: checks/basic.php:20
146
+ msgid "See: <a href=\"http://codex.wordpress.org/Template_Tags/comments_template\">comments_template</a><pre> &lt;?php comments_template( $file, $separate_comments ); ?&gt;</pre>"
147
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Template_Tags/comments_template\">comments_template</a><pre> &lt;?php comments_template( $file, $separate_comments ); ?&gt;</pre>"
148
+
149
+ #: checks/basic.php:21
150
+ msgid "See: <a href=\"http://codex.wordpress.org/Template_Tags/wp_list_comments\">wp_list_comments</a><pre> &lt;?php wp_list_comments( $args ); ?&gt;</pre>"
151
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Template_Tags/wp_list_comments\">wp_list_comments</a><pre> &lt;?php wp_list_comments( $args ); ?&gt;</pre>"
152
+
153
+ #: checks/basic.php:22
154
+ msgid "See: <a href=\"http://codex.wordpress.org/Template_Tags/comment_form\">comment_form</a><pre> &lt;?php comment_form(); ?&gt;</pre>"
155
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Template_Tags/comment_form\">comment_form</a><pre> &lt;?php comment_form(); ?&gt;</pre>"
156
+
157
+ #: checks/basic.php:23
158
+ msgid "See: <a href=\"http://codex.wordpress.org/Template_Tags/body_class\">body_class</a><pre> &lt;?php body_class( $class ); ?&gt;</pre>"
159
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Template_Tags/body_class\">body_class</a><pre> &lt;?php body_class( $class ); ?&gt;</pre>"
160
+
161
+ #: checks/basic.php:24
162
+ msgid "See: <a href=\"http://codex.wordpress.org/Function_Reference/wp_link_pages\">wp_link_pages</a><pre> &lt;?php wp_link_pages( $args ); ?&gt;</pre>"
163
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Function_Reference/wp_link_pages\">wp_link_pages</a><pre> &lt;?php wp_link_pages( $args ); ?&gt;</pre>"
164
+
165
+ #: checks/basic.php:25
166
+ msgid "See: <a href=\"http://codex.wordpress.org/Template_Tags/post_class\">post_class</a><pre> &lt;div id=\"post-&lt;?php the_ID(); ?&gt;\" &lt;?php post_class(); ?&gt;&gt;</pre>"
167
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Template_Tags/post_class\">post_class</a><pre> &lt;div id=\"post-&lt;?php the_ID(); ?&gt;\" &lt;?php post_class(); ?&gt;&gt;</pre>"
168
+
169
+ #: checks/basic.php:31
170
+ msgid "add_theme_support( 'automatic-feed-links' )"
171
+ msgstr "add_theme_support( 'automatic-feed-links' )"
172
+
173
+ #: checks/basic.php:32
174
+ msgid "wp_enqueue_script( 'comment-reply' )"
175
+ msgstr "wp_enqueue_script( 'comment-reply' )"
176
+
177
+ #: checks/basic.php:33
178
+ msgid "body_class call in body tag"
179
+ msgstr "body_class aangeroepen in de body tag"
180
+
181
+ #: checks/basic.php:34
182
+ msgid "register_sidebar() or register_sidebars()"
183
+ msgstr "register_sidebar() of register_sidebars()"
184
+
185
+ #: checks/basic.php:36
186
+ msgid "Could not find <strong>%1$s</strong>. %2$s"
187
+ msgstr "Niet gevonden <strong>%1$s</strong>. %2$s"
188
+
189
+ #: checks/comment_reply.php:14
190
+ msgid "See: <a href=\"http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display\">Migrating Plugins and Themes to 2.7/Enhanced Comment Display</a><pre> &lt;?php if ( is_singular() ) wp_enqueue_script( \"comment-reply\" ); ?&gt;</pre>"
191
+ msgstr "Zie: <a href=\"http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display\">Migrating Plugins and Themes to 2.7/Enhanced Comment Display</a><pre> &lt;?php if ( is_singular() ) wp_enqueue_script( \"comment-reply\" ); ?&gt;</pre>"
192
+
193
+ #: checks/comment_reply.php:15
194
+ msgid "Could not find the <strong>comment-reply</strong> script enqueued. %1$s"
195
+ msgstr "De aanroep (enqueue) van het <strong>comment-reply</strong> kon niet gevonden worden. %1$s"
196
+
197
+ #: checks/comment_reply.php:18
198
+ #: checks/iframes.php:20
199
+ #: checks/include.php:19
200
+ #: checks/links.php:25
201
+ #: checks/nonprintable.php:16
202
+ #: checks/time_date.php:22
203
+ msgid "INFO"
204
+ msgstr "INFO"
205
+
206
+ #: checks/comment_reply.php:18
207
+ msgid "Could not find the <strong>comment-reply</strong> script enqueued, however a reference to 'comment-reply' was found. Make sure that the comment-reply script is being enqueued properly on singular pages."
208
+ msgstr "De aanroep (enqueue) van het <strong>comment-reply</strong> kon niet gevonden worden, terwijl er wel een verwijzing naar 'comment-reply' werd gevonden. Verzeker u ervan dat het comment-reply script op de juiste 'enqueued' is op losstaande pagina's."
209
+
210
+ #: checks/commpage.php:15
211
+ msgid "The theme doesn't have comment pagination code in it. Use <strong>paginate_comments_links()</strong> or <strong>next_comments_link()</strong> and <strong>previous_comments_link()</strong> to add comment pagination."
212
+ msgstr "In het thema ontbreekt de paginering van de reacties (comments). Gebruik <strong>paginate_comments_links()</strong> of <strong>next_comments_link()</strong> en <strong>previous_comments_link()</strong> op de paginering toe te voegen aan de reacties."
213
+
214
+ #. translators: 1: error 2: filename 3: version 4: alt 5: grep
215
+ #: checks/constants.php:24
216
+ #: checks/customs.php:14
217
+ #: checks/customs.php:18
218
+ #: checks/dep_recommend.php:60
219
+ #: checks/editorstyle.php:13
220
+ #: checks/filenames.php:57
221
+ #: checks/i18n.php:49
222
+ #: checks/navmenu.php:14
223
+ #: checks/postthumb.php:15
224
+ #: checks/postthumb.php:19
225
+ #: checks/screenshot.php:21
226
+ #: checks/screenshot.php:24
227
+ #: checks/screenshot.php:27
228
+ #: checks/style_suggested.php:20
229
+ #: checks/style_tags.php:16
230
+ #: checks/suggested.php:34
231
+ #: checks/textdomain.php:30
232
+ #: checks/textdomain.php:55
233
+ #: checks/textdomain.php:59
234
+ #: checks/widgets.php:16
235
+ msgid "RECOMMENDED"
236
+ msgstr "AANBEVOLEN"
237
+
238
+ #: checks/constants.php:24
239
+ #: checks/more_deprecated.php:22
240
+ #: checks/required.php:22
241
+ #: checks/suggested.php:34
242
+ msgid "<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use <strong>%3$s</strong> instead.%4$s"
243
+ msgstr "<strong>%1$s</strong> werd aangetroffen in het bestand <strong>%2$s</strong>. Gebruik daarvoor in de plaats <strong>%3$s</strong>.%4$s"
244
+
245
+ #: checks/content-width.php:14
246
+ msgid "No content width has been defined. Example: <pre>if ( ! isset( $content_width ) ) $content_width = 900;</pre>"
247
+ msgstr "No content width has been defined. Example: <pre>if ( ! isset( $content_width ) ) $content_width = 900;</pre>"
248
+
249
+ #: checks/customs.php:14
250
+ msgid "No reference to <strong>add_theme_support( \"custom-header\", $args )</strong> was found in the theme. It is recommended that the theme implement this functionality if using an image for the header."
251
+ msgstr "In het thema werd geen verwijzing naar <strong>add_theme_support( \"custom-header\", $args )</strong> gevonden. Als het thema een afbeelding in de header plaats is het aanbevolen deze functie wel te gebruiken."
252
+
253
+ #: checks/customs.php:18
254
+ msgid "No reference to <strong>add_theme_support( \"custom-background\", $args )</strong> was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality."
255
+ msgstr "In het thema werd geen verwijzing naar <strong>add_theme_support( \"custom-header\", $args )</strong> gevonden. Als het thema een afbeelding in de header plaats is het aanbevolen deze functie wel te gebruiken."
256
+
257
+ #: checks/dep_recommend.php:60
258
+ #: checks/deprecated.php:189
259
+ msgid "<strong>%1$s</strong> found in the file <strong>%2$s</strong>. Deprecated since version <strong>%3$s</strong>. Use <strong>%4$s</strong> instead.%5$s"
260
+ msgstr "<strong>%1$s</strong> gevonden in het bestand <strong>%2$s</strong>. Niet meer ingebruik sinds <strong>%3$s</strong>. Gebruik hiervoor in de plaats <strong>%4$s</strong>.%5$s"
261
+
262
+ #: checks/directories.php:27
263
+ msgid "Please remove any extraneous directories like .git or .svn from the ZIP file before uploading it."
264
+ msgstr "Verwijder voor het uploaden onnodige directories zoals .git of .svn uit de zip-file."
265
+
266
+ #: checks/editorstyle.php:13
267
+ msgid "No reference to <strong>add_editor_style()</strong> was found in the theme. It is recommended that the theme implement editor styling, so as to make the editor content match the resulting post output in the theme, for a better user experience."
268
+ msgstr "Er werd geen verwijzing naar <strong>add_editor_style()</strong> gevonden in het thema. Er wordt aanbevolen dit wel te implementeren om er voor te zorgen dat de content in de editor gelijk is aan de content van de betreffende post, dit zal de gebruikerservaring ten goede komen.It is recommended that the theme implement editor styling, so as to make the editor content match the resulting post output in the theme, for a better user experience."
269
+
270
+ #: checks/filenames.php:21
271
+ msgid "Windows thumbnail store"
272
+ msgstr "Windows thumbnail store"
273
+
274
+ #: checks/filenames.php:22
275
+ msgid "windows system file"
276
+ msgstr "windows systeem bestand"
277
+
278
+ #: checks/filenames.php:23
279
+ #: checks/filenames.php:24
280
+ msgid "NetBeans Project File"
281
+ msgstr "NetBeans project bestand"
282
+
283
+ #: checks/filenames.php:25
284
+ msgid "Komodo Project File"
285
+ msgstr "Komodo Project Bestand"
286
+
287
+ #: checks/filenames.php:26
288
+ msgid "Hidden Files or Folders"
289
+ msgstr "Verborgen bestanden en mappen"
290
+
291
+ #: checks/filenames.php:27
292
+ msgid "PHP server settings file"
293
+ msgstr "Bestand met PHP server instellingen"
294
+
295
+ #: checks/filenames.php:28
296
+ msgid "Dreamweaver project file"
297
+ msgstr "Dreamweaver project bestand"
298
+
299
+ #: checks/filenames.php:29
300
+ msgid "PHP error log"
301
+ msgstr "PHP error log"
302
+
303
+ #: checks/filenames.php:30
304
+ msgid "Server settings file"
305
+ msgstr "Bestand met server instellingen"
306
+
307
+ #: checks/filenames.php:31
308
+ msgid "SQL dump file"
309
+ msgstr "SQL dump bestand"
310
+
311
+ #: checks/filenames.php:32
312
+ msgid "OSX system file"
313
+ msgstr "OSX systeem bestand"
314
+
315
+ #: checks/filenames.php:36
316
+ msgid "Please see <a href=\"http://codex.wordpress.org/Theme_Review#Theme_Documentation\">Theme_Documentation</a> for more information."
317
+ msgstr "Zie ook <a href=\"http://codex.wordpress.org/Theme_Review#Theme_Documentation\">Theme_Documentation</a> voor meer informatie."
318
+
319
+ #: checks/filenames.php:43
320
+ msgid "<strong>%1$s</strong> %2$s found."
321
+ msgstr "<strong>%1$s</strong> %2$s gevonden."
322
+
323
+ #: checks/filenames.php:50
324
+ msgid "could not find the file <strong>%1$s</strong> in the theme."
325
+ msgstr "Het bestand werd niet gevonden <strong>%1$s</strong> in het thema."
326
+
327
+ #: checks/filenames.php:57
328
+ msgid "could not find the file <strong>%1$s</strong> in the theme. %2$s"
329
+ msgstr "Het bestand werd niet gevonden <strong>%1$s</strong> in het thema. %2$s"
330
+
331
+ #: checks/gravatar.php:15
332
+ msgid "This theme doesn't seem to support the standard avatar functions. Use <strong>get_avatar</strong> or <strong>wp_list_comments</strong> to add this support."
333
+ msgstr "dIt thema biedt geen ondersteuning voor de standaard avatar functies Gebruik <strong>get_avatar</strong> of <strong>wp_list_comments</strong> om deze ondersteuning toe te voegen."
334
+
335
+ #: checks/i18n.php:49
336
+ msgid "Possible variable <strong>%1$s</strong> found in translation function in <strong>%2$s</strong>. Translation function calls must NOT contain PHP variables. %3$s"
337
+ msgstr "Waarschijnlijk is er een variabele <strong>%1$s</strong> gevonden in de vertaalfunctie <strong>%2$s</strong>. Vertaalfuncties mogen geen PHP variabelen bevatten. %3$s"
338
+
339
+ #: checks/iframes.php:9
340
+ msgid "iframes are sometimes used to load unwanted adverts and code on your site"
341
+ msgstr "iframes worden some gebruikt om ongewenste advertenties of andere code in uw website te laden"
342
+
343
+ #: checks/iframes.php:20
344
+ #: checks/malware.php:23
345
+ msgid "<strong>%1$s</strong> was found in the file <strong>%2$s</strong> %3$s.%4$s"
346
+ msgstr "<strong>%1$s</strong> werd aangetroffen in het bestand <strong>%2$s</strong> %3$s.%4$s"
347
+
348
+ #: checks/include.php:10
349
+ msgid "The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then <strong>get_template_part()</strong> should be used instead."
350
+ msgstr "In het thema is het gebruk van include of require aangetroffen. Als deze zijn gebruik om losse delen van een template te laden uit andere bestanden, dan zou hier <strong>get_template_part()</strong> gebruikt moeten worden."
351
+
352
+ #: checks/include.php:19
353
+ msgid "<strong>%1$s</strong> %2$s %3$s"
354
+ msgstr "<strong>%1$s</strong> %2$s %3$s"
355
+
356
+ #: checks/lineendings.php:11
357
+ #: checks/lineendings.php:20
358
+ #: checks/lineendings.php:31
359
+ msgid "Both DOS and UNIX style line endings were found in the file <strong>%1$s</strong>. This causes a problem with SVN repositories and must be corrected before the theme can be accepted. Please change the file to use only one style of line endings."
360
+ msgstr "In bestand <strong>%1$s</strong> staan zowel regeleinden zoals gebruikt in DOS en UNIX. Dit geeft problemen met SVN repositories en moet worden aangepast voordat het theme geaccepteerd kan worden. Pas het bestand aan zodat regeleinden zijn gemaakt volgens de DOS of UNIX stijl."
361
+
362
+ #: checks/links.php:25
363
+ msgid "Possible hard-coded links were found in the file <strong>%1$s</strong>.%2$s"
364
+ msgstr "Er staan hard-coded links in het bestand <strong>%1$s</strong>.%2$s"
365
+
366
+ #: checks/malware.php:9
367
+ msgid "File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls"
368
+ msgstr "Er mogen geen bestanden naar de server geschreven worden met PHP bestandsfuncties, hiervoor moet het de WP_Filesystem API gebruikt worden."
369
+
370
+ #: checks/navmenu.php:14
371
+ msgid "No reference to nav_menu's was found in the theme. Note that if your theme has a menu bar, it is required to use the WordPress nav_menu functionality for it."
372
+ msgstr "In het thema zijn geen verwijzing naar nav_menu's gevonden. Als uw thema een menubalk heeft moet deze worden implmenteerd met de nav_menu functionaliteit van WordPress."
373
+
374
+ #: checks/nonprintable.php:16
375
+ msgid "Non-printable characters were found in the <strong>%1$s</strong> file. You may want to check this file for errors.%2$s"
376
+ msgstr "Het bestand <strong>%1$s</strong> bevat onafdrukbare tekens. Controleer dit bestand op fouten."
377
+
378
+ #: checks/phpshort.php:14
379
+ msgid "Found PHP short tags in file <strong>%1$s</strong>.%2$s"
380
+ msgstr "PHP short tags ('<?' i.p.v. '<?php') gevonden in bestand <strong>%1$s</strong>.%2$s"
381
+
382
+ #: checks/post-formats.php:27
383
+ msgid "<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. However get_post_format and/or has_post_format were not found, and no use of formats in the CSS was detected."
384
+ msgstr "<strong>%1$s</strong> werd aangetroffen in het bestand <strong>%2$s</strong>. Hoewel get_post_format en/of has_post_format niet gevonden werd, en er is ook geen formatering in CSS gevonden."
385
+
386
+ #: checks/postsnav.php:16
387
+ msgid "The theme doesn't have post pagination code in it. Use <strong>posts_nav_link()</strong> or <strong>paginate_links()</strong> or <strong>next_posts_link()</strong> and <strong>previous_posts_link()</strong> to add post pagination."
388
+ msgstr "The thema ontbreekt de paginering van berichten. Gebruik <strong>posts_nav_link()</strong> of <strong>paginate_links()</strong> of <strong>next_posts_link()</strong> en <strong>previous_posts_link()</strong> om dit toe te voegen."
389
+
390
+ #: checks/postthumb.php:15
391
+ msgid "No reference to <strong>the_post_thumbnail()</strong> was found in the theme. It is recommended that the theme implement this functionality instead of using custom fields for thumbnails."
392
+ msgstr "In het thema is geen verwijzing naar <strong>the_post_thumbnail()</strong> gevonden. Het aan te raden dit wel te doen en geen gebruik te maken van custom fields voor thumbnails."
393
+
394
+ #: checks/postthumb.php:19
395
+ msgid "No reference to post-thumbnails was found in the theme. If the theme has a thumbnail like functionality, it should be implemented with <strong>add_theme_support( \"post-thumbnails\" )</strong>in the functions.php file."
396
+ msgstr "In het thema is geen verwijzing naar post-thumbnails gevonden. Als het thema gebruik maakt een thumbnail-achtige functionaliteit moet <strong>add_theme_support( \"post-thumbnails\" )</strong> toegevoegd worden aan functions.php."
397
+
398
+ #: checks/screenshot.php:21
399
+ msgid "Screenshot is wrong size! Detected: <strong>%1$sx%2$spx</strong>. Maximum allowed size is 880x660px."
400
+ msgstr "De schermafbeelding heeft de verkeerde afmetingen. Gevonden: <strong>%1$sx%2$spx</strong>. De maximaal toegstane afmetingen zijn 880x660px."
401
+
402
+ #: checks/screenshot.php:24
403
+ msgid "Screenshot dimensions are wrong! Ratio of width to height should be 4:3."
404
+ msgstr "De schermafbeelding heeft de verkeerde verhoudingen. De ratio tussen hoogte en breedte moet 4:3 zijn."
405
+
406
+ #: checks/screenshot.php:27
407
+ msgid "Screenshot size should be 880x660, to account for HiDPI displays. Any 4:3 image size is acceptable, but 880x660 is preferred."
408
+ msgstr "Schermafbeelding zijn bij voorkeur 880x660px groot, dan kan er rekeing gehouden worden met HiDPI schermen. Elke afbeelding met een ratio van 4:3 kan worden geaccepteerd, maar 800x660 heeft de voorkeur."
409
+
410
+ #: checks/screenshot.php:32
411
+ msgid "No screenshot detected! Please include a screenshot.png."
412
+ msgstr "Geen schermafbeelding gevonden. Voeg deze toe met de naam screenshot.png"
413
+
414
+ #: checks/searchform.php:9
415
+ msgid "Please use <strong>get_search_form()</strong> instead of including searchform.php directly."
416
+ msgstr "Maak gebruik van <strong>get_search_form()</strong> en voeg searchform.php niet direct in."
417
+
418
+ #: checks/searchform.php:16
419
+ msgid "<strong>%1$s</strong> %2$s%3$s"
420
+ msgstr "<strong>%1$s</strong> %2$s%3$s"
421
+
422
+ #: checks/style_needed.php:11
423
+ msgid "<strong>Theme name:</strong> is missing from your style.css header."
424
+ msgstr "<strong>Theme name:</strong> ontbreekt in de header van uw style.css bestand."
425
+
426
+ #: checks/style_needed.php:12
427
+ msgid "<strong>Description:</strong> is missing from your style.css header."
428
+ msgstr "<strong>Description:</strong> ontbreekt in de header van uw style.css bestand."
429
+
430
+ #: checks/style_needed.php:13
431
+ msgid "<strong>Author:</strong> is missing from your style.css header."
432
+ msgstr "<strong>Author:</strong> ontbreekt in de header van uw style.css bestand."
433
+
434
+ #: checks/style_needed.php:14
435
+ msgid "<strong>Version:</strong> is missing from your style.css header."
436
+ msgstr "<strong>Version:</strong> ontbreekt in de header van uw style.css bestand."
437
+
438
+ #: checks/style_needed.php:15
439
+ msgid "<strong>License:</strong> is missing from your style.css header."
440
+ msgstr "<strong>License:</strong> ontbreekt in de header van uw style.css bestand."
441
+
442
+ #: checks/style_needed.php:16
443
+ msgid "<strong>License URI:</strong> is missing from your style.css header."
444
+ msgstr "<strong>License URI:</strong> ontbreekt in de header van uw style.css bestand."
445
+
446
+ #: checks/style_needed.php:17
447
+ msgid "<strong>.sticky</strong> css class is needed in your theme css."
448
+ msgstr "<strong>.sticky</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
449
+
450
+ #: checks/style_needed.php:18
451
+ msgid "<strong>.bypostauthor</strong> css class is needed in your theme css."
452
+ msgstr "<strong>.bypostauthor</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
453
+
454
+ #: checks/style_needed.php:19
455
+ msgid "<strong>.alignleft</strong> css class is needed in your theme css."
456
+ msgstr "<strong>.alignleft</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
457
+
458
+ #: checks/style_needed.php:20
459
+ msgid "<strong>.alignright</strong> css class is needed in your theme css."
460
+ msgstr "<strong>.alignright</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
461
+
462
+ #: checks/style_needed.php:21
463
+ msgid "<strong>.aligncenter</strong> css class is needed in your theme css."
464
+ msgstr "<strong>.aligncenter</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
465
+
466
+ #: checks/style_needed.php:22
467
+ msgid "<strong>.wp-caption</strong> css class is needed in your theme css."
468
+ msgstr "<strong>.wp-caption</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
469
+
470
+ #: checks/style_needed.php:23
471
+ msgid "<strong>.wp-caption-text</strong> css class is needed in your theme css."
472
+ msgstr "<strong>.wp-caption-text</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
473
+
474
+ #: checks/style_needed.php:24
475
+ msgid "<strong>.gallery-caption</strong> css class is needed in your theme css."
476
+ msgstr "<strong>.gallery-caption</strong> css class moet verplicht aangemaakt zijn in de css van het thema."
477
+
478
+ #: checks/style_suggested.php:20
479
+ msgid "<strong>%1$s</strong> is missing from your style.css header."
480
+ msgstr "<strong>%1$s</strong> is missing from your style.css header."
481
+
482
+ #: checks/style_tags.php:16
483
+ msgid "<strong>Tags:</strong> is either empty or missing in style.css header."
484
+ msgstr "<strong>Tags:</strong> is leeg of ontbreekt in de header van uw style.css bestand."
485
+
486
+ #: checks/style_tags.php:25
487
+ msgid "The flexible-width and fixed-width tags changed to fluid-layout and fixed-layout tags in WordPress 3.8. Additionally, the responsive-layout tag was added. Please change to using one of the new tags."
488
+ msgstr "De flexible-width en fixed-width tags zijn aangepast naar fluid-layout en fixed-layout tags in WordPress 3.8. Ook werd de responsive-layout tag extra toegevoegd. Pas uw tags aan door een nieuwe tag toe te voegen."
489
+
490
+ #: checks/style_tags.php:27
491
+ msgid "Found wrong tag, remove <strong>%1$s</strong> from your style.css header."
492
+ msgstr "Foutieve tag aanetroffen, verwijder <strong>%1$s</strong> uit de header van uw style.css bestand."
493
+
494
+ #: checks/tags.php:13
495
+ msgid "This theme doesn't seem to display tags. Modify it to display tags in appropriate locations."
496
+ msgstr "Het thema lijkt geen tags te tonen. Pas het thema aan zodat er tags worden getoond op daarvoor geschikte plaatsen."
497
+
498
+ #: checks/textdomain.php:15
499
+ msgid "You have not included a text domain!"
500
+ msgstr "Uw heeft geen text domain voor vertalingen toegevoegd aan uw thema."
501
+
502
+ #. translators: 1: filename 2: error message 3: grep results
503
+ #: checks/textdomain.php:32
504
+ msgid "Text domain problems in <strong>%1$s</strong>. %2$s %3$s "
505
+ msgstr "Problemen met het text domain <strong>%1$s</strong>. %2$s %3$s "
506
+
507
+ #: checks/textdomain.php:38
508
+ #: checks/textdomain.php:39
509
+ msgid "Text domain should match theme slug: <strong>%1$s</strong>"
510
+ msgstr "Het text domain moet overeenkomen met de thema slug: <strong>%1$s</strong>"
511
+
512
+ #: checks/textdomain.php:55
513
+ msgid "Text domain problems in <strong>%1$s</strong>. The %2s text domain is being used!%3$s"
514
+ msgstr "Problemen met het text domain in <strong>%1$s</strong>. Het %2s text domain wordt gebruikt!%3$s"
515
+
516
+ #: checks/textdomain.php:59
517
+ msgid "Text domain problems in <strong>%1$s</strong>. %2$s You are using: <strong>%3s</strong>%4$s"
518
+ msgstr "Problemen met het text domain in <strong>%1$s</strong>. %2$s U gebruikt: <strong>%3s</strong>%4$s"
519
+
520
+ #: checks/time_date.php:22
521
+ msgid "At least one hard coded date was found in the file <strong>%s</strong>. Consider get_option( 'date_format' ) instead."
522
+ msgstr "Minimaal een hard coded datum werd aangetroffen in het bestand <strong>%s</strong>. Bekijk of u niet beter gebruik kunt maken van get_option( 'date_format' )."
523
+
524
+ #: checks/widgets.php:16
525
+ msgid "This theme contains no sidebars/widget areas. See <a href='http://codex.wordpress.org/Widgets_API'>Widgets API</a>"
526
+ msgstr "Het thema bevat geen zijbalken of gebieden om widgets te kunnen plaatsen. Zie <a href='http://codex.wordpress.org/Widgets_API'>Widgets API</a>"
527
+
528
+ #: checks/widgets.php:21
529
+ msgid "The theme appears to use <strong>register_sidebar()</strong> but no <strong>dynamic_sidebar()</strong> was found. See: <a href='http://codex.wordpress.org/Function_Reference/dynamic_sidebar'>dynamic_sidebar</a><pre> &lt;?php dynamic_sidebar( $index ); ?&gt;</pre>"
530
+ msgstr "Het thema maakt gebruikt van <strong>register_sidebar()</strong> terwijl geen verwijzing naar <strong>dynamic_sidebar()</strong> gevonden werd. Zie: <a href='http://codex.wordpress.org/Function_Reference/dynamic_sidebar'>dynamic_sidebar</a><pre> &lt;?php dynamic_sidebar( $index ); ?&gt;</pre>"
531
+
532
+ #: checks/widgets.php:26
533
+ msgid "The theme appears to use <strong>dynamic_sidebars()</strong> but no <strong>register_sidebar()</strong> was found. See: <a href='http://codex.wordpress.org/Function_Reference/register_sidebar'>register_sidebar</a><pre> &lt;?php register_sidebar( $args ); ?&gt;</pre>"
534
+ msgstr "Het thema maakt gebruik van <strong>dynamic_sidebars()</strong> maar <strong>register_sidebar()</strong> werd niet aangetroffen. Zie: <a href='http://codex.wordpress.org/Function_Reference/register_sidebar'>register_sidebar</a><pre> &lt;?php register_sidebar( $args ); ?&gt;</pre>"
535
+
536
+ #: checks/worms.php:9
537
+ msgid "This may be a script used by hackers to get control of your server!"
538
+ msgstr "Dit lijkt een script te zijn dat gevoelig voor hackers is, zij kunnen hiermee de controle van uw server overnemen!"
539
+
540
+ #: checks/worms.php:10
541
+ msgid "This may be a script used by hackers to get control of your server"
542
+ msgstr "Dit lijkt een script te zijn dat gevoelig voor hackers is, zij kunnen hiermee de controle van uw server overnemen!"
543
+
544
+ #: checks/worms.php:11
545
+ msgid "Tells a hacker what operating system your server is running"
546
+ msgstr "Dit laat potentiele hackers weten op welk besturingsysteem uw server draait."
547
+
548
+ #: checks/worms.php:12
549
+ msgid "base64 encoded text found in Search Engine Redirect hack <a href=\"http://blogbuildingu.com/wordpress/wordpress-search-engine-redirect-hack\">[1]</a>"
550
+ msgstr "base64 gecodeerde tekst gevonden in Search Engine Redirect hack <a href=\"http://blogbuildingu.com/wordpress/wordpress-search-engine-redirect-hack\">[1]</a>"
551
+
552
+ #: checks/worms.php:13
553
+ msgid "YAHG Googlerank.info exploit code <a href=\"http://creativebriefing.com/wordpress-hacked-googlerankinfo/\">[1]</a>"
554
+ msgstr "YAHG Googlerank.info misbruik code aangetroffen <a href=\"http://creativebriefing.com/wordpress-hacked-googlerankinfo/\">[1]</a>"
555
+
556
+ #: checks/worms.php:14
557
+ msgid "Possible Ekibastos attack <a href=\"http://ocaoimh.ie/did-your-wordpress-site-get-hacked/\">[1]</a>"
558
+ msgstr "Mogelijke Ekibastos aanval <a href=\"http://ocaoimh.ie/did-your-wordpress-site-get-hacked/\">[1]</a>"
559
+
560
+ #: checks/worms.php:15
561
+ msgid "Possible \"Gumblar\" JavaScript attack <a href=\"http://threatinfo.trendmicro.com/vinfo/articles/securityarticles.asp?xmlfile=042710-GUMBLAR.xml\">[1]</a> <a href=\"http://justcoded.com/article/gumblar-family-virus-removal-tool/\">[2]</a>"
562
+ msgstr "Mogelijke \"Gumblar\" JavaScript aanval <a href=\"http://threatinfo.trendmicro.com/vinfo/articles/securityarticles.asp?xmlfile=042710-GUMBLAR.xml\">[1]</a> <a href=\"http://justcoded.com/article/gumblar-family-virus-removal-tool/\">[2]</a>"
563
+
564
+ #: checks/worms.php:16
565
+ #: checks/worms.php:17
566
+ msgid "Symptom of the \"Pharma Hack\" <a href=\"http://blog.sucuri.net/2010/07/understanding-and-cleaning-the-pharma-hack-on-wordpress.html\">[1]</a>"
567
+ msgstr "Aaanwijzingen voor de \"Pharma Hack\" aangetroffen <a href=\"http://blog.sucuri.net/2010/07/understanding-and-cleaning-the-pharma-hack-on-wordpress.html\">[1]</a>"
568
+
569
+ #: checks/worms.php:18
570
+ msgid "Malicious footer code injection detected!"
571
+ msgstr "Kwaadaardig code kan aan de footer worden toegevoegd!"
572
+
573
+ #: main.php:12
574
+ msgid "Parent theme <strong>%1$s</strong> not found! You have to have parent AND child-theme installed!"
575
+ msgstr "Parent thema<strong>%1$s</strong> niet gevonden! U moet zowel het parent thema als het child thema installeren!"
576
+
577
+ #: main.php:39
578
+ msgid "Theme Info"
579
+ msgstr "Thema info"
580
+
581
+ #: main.php:50
582
+ msgid "Title"
583
+ msgstr "Titel"
584
+
585
+ #: main.php:51
586
+ msgid "Version"
587
+ msgstr "Versie"
588
+
589
+ #: main.php:52
590
+ msgid "Author"
591
+ msgstr "Maker"
592
+
593
+ #: main.php:53
594
+ msgid "Author URI"
595
+ msgstr "URI van de maker"
596
+
597
+ #: main.php:54
598
+ msgid "Theme URI"
599
+ msgstr "URI van het thema"
600
+
601
+ #: main.php:55
602
+ msgid "License"
603
+ msgstr "Licentie"
604
+
605
+ #: main.php:56
606
+ msgid "LicenseURI"
607
+ msgstr "URI van de licentie"
608
+
609
+ #: main.php:57
610
+ msgid "Tags"
611
+ msgstr "Tags"
612
+
613
+ #: main.php:58
614
+ msgid "Description"
615
+ msgstr "Beschrijving"
616
+
617
+ #: main.php:62
618
+ msgid "This child theme requires at least version <strong>%1$s</strong> of theme <strong>%2$s</strong> to be installed. You only have <strong>%3$s</strong> please update the parent theme."
619
+ msgstr "Voor child thema moet minimaal versie <strong>%1$s</strong> van <strong>%2$s</strong> geinstalleerd zijn. U gebruikt nu <strong>%3$s</strong> update het parent thema."
620
+
621
+ #: main.php:64
622
+ msgid "This is a child theme. The parent theme is: <strong>%1$s</strong>. These files have been included automatically!"
623
+ msgstr "Dit is een child thema. Het parent thema is <strong>%1$s</strong>. Deze bestanden zijn automatisch ingevoegd!"
624
+
625
+ #: main.php:66
626
+ msgid "Child theme does not have the <strong>Template Version</strong> tag in style.css."
627
+ msgstr "Het child thema heeft geen <strong>Template Version</strong> tag in style.css."
628
+
629
+ #: main.php:68
630
+ msgid "Child theme is only tested up to version %1$s of %2$s breakage may occur! %3$s installed version is %4$s"
631
+ msgstr "Het child thema is alleen getest voor %1$s van %2$s dit kan problemen geven. %3$s geinstalleerde versie is %4$s"
632
+
633
+ #: main.php:75
634
+ msgid " Running <strong>%1$s</strong> tests against <strong>%2$s</strong> using Guidelines Version: <strong>%3$s</strong> Plugin revision: <strong>%4$s</strong>"
635
+ msgstr "Doorloopt <strong>%1$s</strong> testen op <strong>%2$s</strong> gebruik makend van Guidelines Version: <strong>%3$s</strong> Plugin revisie: <strong>%4$s</strong>"
636
+
637
+ #: main.php:81
638
+ msgid "One or more errors were found for %1$s."
639
+ msgstr "Een of meer fouten zijn aangetroffen voor %1$s."
640
+
641
+ #: main.php:83
642
+ msgid "%1$s passed the tests"
643
+ msgstr "%1$s kwamen door de testen"
644
+
645
+ #: main.php:86
646
+ msgid "<strong>WP_DEBUG is not enabled!</strong> Please test your theme with <a href=\"http://codex.wordpress.org/Editing_wp-config.php\">debug enabled</a> before you upload!"
647
+ msgstr "<strong>WP_DEBUG is niet ingeschakeld!</strong> Test uw thema voor u gaat uploaden met <a href=\"http://codex.wordpress.org/Editing_wp-config.php\">debug inegschakeld</a>!"
648
+
649
+ #: main.php:97
650
+ msgid "About"
651
+ msgstr "Over"
652
+
653
+ #: main.php:98
654
+ msgid "The theme check plugin is an easy way to test your theme and make sure it's up to spec with the latest theme review standards. With it, you can run all the same automated testing tools on your theme that WordPress.org uses for theme submissions."
655
+ msgstr "The theme check plugin gemakkelijke manier om te testen of uw thema voldoet aan de eisen die worden gesteld in een review voor opname in de WordPress.org directorie. Deze plugin stelt u in staat dezelfde gautomatiseerde testen uit te voeren die ook worden uitgevoerd als u uw thema upload naar WordPress.org."
656
+
657
+ #: main.php:99
658
+ msgid "Contact"
659
+ msgstr "Contact"
660
+
661
+ #: main.php:100
662
+ msgid "Theme-Check is maintained by %1s and %2s."
663
+ msgstr "Theme-Check wordt onderhouden door %1s and %2s."
664
+
665
+ #: main.php:104
666
+ msgid "If you have found a bug or would like to make a suggestion or contribution why not join the <a href=\"http://wordpress.org/extend/themes/contact/\">theme-reviewers mailing list</a> or leave a post on the <a href=\"http://wordpress.org/tags/theme-check?forum_id=10\">WordPress forums</a>."
667
+ msgstr "Mocht u een bug vinden of een suggestie hebben om de plugin te verbeteren en . of willen bij dragen, dan kunt u zich in de eerste plaats aanmelden voor <a href=\"http://wordpress.org/extend/themes/contact/\">theme-reviewers mailing list</a> of anders een bericht achterlaten op <a href=\"http://wordpress.org/tags/theme-check?forum_id=10\">WordPress forums</a>."
668
+
669
+ #: main.php:105
670
+ msgid "Contributors"
671
+ msgstr "Medewerkers"
672
+
673
+ #: main.php:106
674
+ msgid "Localization"
675
+ msgstr "Vertalingen"
676
+
677
+ #: main.php:111
678
+ msgid "Testers"
679
+ msgstr "Testers"
680
+
681
+ #: main.php:112
682
+ msgid "The WordPress Theme Review Team"
683
+ msgstr "The WordPress Theme Review Team"
684
+
685
+ #: main.php:118
686
+ msgid "Now your theme has passed the basic tests you need to check it properly using the test data before you upload to the WordPress Themes Directory."
687
+ msgstr "Uw thema heeft de basis testen doorstaan. Voor u uw thema gaat uploaden moet u het eerst nog testen met test data."
688
+
689
+ #: main.php:119
690
+ msgid "Make sure to review the guidelines at <a href=\"http://codex.wordpress.org/Theme_Review\">Theme Review</a> before uploading a Theme."
691
+ msgstr "Lees voordat u uw thema upload eerst de richtlijnen voor <a href=\"http://codex.wordpress.org/Theme_Review\">Theme Review</a>."
692
+
693
+ #: main.php:120
694
+ msgid "Codex Links"
695
+ msgstr "Codex Links"
696
+
697
+ #: main.php:122
698
+ msgid "Theme Development"
699
+ msgstr "Theme Development"
700
+
701
+ #: main.php:123
702
+ msgid "Themes and Templates forum"
703
+ msgstr "Themes and Templates forum"
704
+
705
+ #: main.php:124
706
+ msgid "Theme Unit Tests"
707
+ msgstr "Theme Unit Tests"
708
+
709
+ #: main.php:143
710
+ msgid "Check it!"
711
+ msgstr "Controleer!"
712
+
713
+ #: main.php:144
714
+ msgid "Output in Trac format."
715
+ msgstr "Uitvoer in Trac formaat."
716
+
717
+ #: main.php:145
718
+ msgid "Suppress INFO."
719
+ msgstr "Onderdruk INFO"
720
+
721
+ #: theme-check.php:35
722
+ msgid "You do not have sufficient permissions to access this page."
723
+ msgstr "U heeft onvoldoende rechten om deze pagina te bezoeken."
724
+
725
+ #. Plugin Name of the plugin/theme
726
+ msgid "Theme Check"
727
+ msgstr "Theme Check"
728
+
729
+ #. Plugin URI of the plugin/theme
730
+ msgid "http://pross.org.uk/plugins"
731
+ msgstr "http://pross.org.uk/plugins"
732
+
733
+ #. Description of the plugin/theme
734
+ msgid "A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!"
735
+ msgstr "Een simpele en gemakkelijke manier om uw thema te testen volgens de laatste normen en maatstaven van WordPress. Een fantastische tool voor thema ontwikkelaars."
736
+
737
+ #. Author of the plugin/theme
738
+ msgid "Pross, Otto42"
739
+ msgstr "Pross, Otto42"
740
+
741
+ #. Author URI of the plugin/theme
742
+ msgid "http://pross.org.uk"
743
+ msgstr "http://pross.org.uk"
744
+
lang/theme-check.pot ADDED
@@ -0,0 +1,938 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014 Theme Check
2
+ # This file is distributed under the same license as the Theme Check package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Theme Check 20140929.1\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/theme-check\n"
7
+ "POT-Creation-Date: 2014-09-29 21:22:59+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: checkbase.php:91 checkbase.php:110
16
+ msgid "Line "
17
+ msgstr ""
18
+
19
+ #: checkbase.php:251
20
+ msgid "Visit author homepage"
21
+ msgstr ""
22
+
23
+ #: checkbase.php:254
24
+ msgid "Anonymous"
25
+ msgstr ""
26
+
27
+ #: checks/admin_menu.php:13 checks/admin_menu.php:14
28
+ msgid ""
29
+ "User levels were deprecated in <strong>2.0</strong>. Please see <a href="
30
+ "\"http://codex.wordpress.org/Roles_and_Capabilities"
31
+ "\">Roles_and_Capabilities</a>"
32
+ msgstr ""
33
+
34
+ #: checks/admin_menu.php:23 checks/artisteer.php:24 checks/badthings.php:29
35
+ #: checks/filenames.php:43 checks/filenames.php:50 checks/lineendings.php:11
36
+ #: checks/lineendings.php:20 checks/lineendings.php:31 checks/malware.php:23
37
+ #: checks/phpshort.php:14 checks/plugin-territory.php:32
38
+ #: checks/screenshot.php:35 checks/style_tags.php:25 checks/style_tags.php:27
39
+ #: checks/worms.php:28 main.php:80
40
+ msgid "WARNING"
41
+ msgstr ""
42
+
43
+ #: checks/admin_menu.php:33
44
+ msgid ""
45
+ "Themes should use <strong>add_theme_page()</strong> for adding admin pages."
46
+ msgstr ""
47
+
48
+ #: checks/admin_menu.php:44 checks/basic.php:36 checks/comment_reply.php:15
49
+ #: checks/commpage.php:15 checks/content-width.php:14 checks/customizer.php:26
50
+ #: checks/customizer.php:31 checks/deprecated.php:253
51
+ #: checks/directories.php:27 checks/gravatar.php:15
52
+ #: checks/more_deprecated.php:52 checks/plugin-territory.php:24
53
+ #: checks/post-formats.php:27 checks/postsnav.php:16 checks/required.php:22
54
+ #: checks/searchform.php:16 checks/style_needed.php:30 checks/tags.php:13
55
+ #: checks/title.php:22 checks/title.php:31 checks/title.php:46
56
+ #: checks/widgets.php:21 checks/widgets.php:26 checks/widgets.php:34
57
+ msgid "REQUIRED"
58
+ msgstr ""
59
+
60
+ #: checks/artisteer.php:24
61
+ msgid ""
62
+ "This theme appears to have been auto-generated. Generated themes are not "
63
+ "allowed in the themes directory."
64
+ msgstr ""
65
+
66
+ #: checks/badthings.php:9
67
+ msgid "eval() is not allowed."
68
+ msgstr ""
69
+
70
+ #: checks/badthings.php:10
71
+ msgid ""
72
+ "PHP system calls are often disabled by server admins and should not be in "
73
+ "themes"
74
+ msgstr ""
75
+
76
+ #: checks/badthings.php:11
77
+ msgid "Themes should not change server PHP settings"
78
+ msgstr ""
79
+
80
+ #: checks/badthings.php:12
81
+ msgid "base64_decode() is not allowed"
82
+ msgstr ""
83
+
84
+ #: checks/badthings.php:13
85
+ msgid "base64_encode() is not allowed"
86
+ msgstr ""
87
+
88
+ #: checks/badthings.php:14
89
+ msgid "uudecode() is not allowed"
90
+ msgstr ""
91
+
92
+ #: checks/badthings.php:15
93
+ msgid "str_rot13() is not allowed"
94
+ msgstr ""
95
+
96
+ #: checks/badthings.php:16 checks/badthings.php:37
97
+ msgid "Google search code detected"
98
+ msgstr ""
99
+
100
+ #: checks/badthings.php:17 checks/badthings.php:38
101
+ msgid "Google advertising code detected"
102
+ msgstr ""
103
+
104
+ #: checks/badthings.php:48
105
+ msgid ""
106
+ "<span class=\"tc-lead tc-warning\">WARNING</span>: Found <strong>%1$s</"
107
+ "strong> in the file <strong>%2$s</strong>. %3$s.%4$s"
108
+ msgstr ""
109
+
110
+ #: checks/basic.php:14
111
+ msgid ""
112
+ "See: <a href=\"http://codex.wordpress.org/HTML_to_XHTML\">http://codex."
113
+ "wordpress.org/HTML_to_XHTML</a><pre>&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD "
114
+ "XHTML 1.0 Strict//EN\"<br />\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict."
115
+ "dtd\"?&gt;</pre>"
116
+ msgstr ""
117
+
118
+ #: checks/basic.php:15
119
+ msgid ""
120
+ "See: <a href=\"http://codex.wordpress.org/Function_Reference/wp_footer"
121
+ "\">wp_footer</a><pre> &lt;?php wp_footer(); ?&gt;</pre>"
122
+ msgstr ""
123
+
124
+ #: checks/basic.php:16
125
+ msgid ""
126
+ "See: <a href=\"http://codex.wordpress.org/Function_Reference/wp_head"
127
+ "\">wp_head</a><pre> &lt;?php wp_head(); ?&gt;</pre>"
128
+ msgstr ""
129
+
130
+ #: checks/basic.php:17
131
+ msgid ""
132
+ "See: <a href=\"http://codex.wordpress.org/Function_Reference/"
133
+ "language_attributes\">language_attributes</a><pre>&lt;html &lt;?php "
134
+ "language_attributes(); ?&gt;</pre>"
135
+ msgstr ""
136
+
137
+ #: checks/basic.php:18
138
+ msgid ""
139
+ "There must be a charset defined in the Content-Type or the meta charset tag "
140
+ "in the head."
141
+ msgstr ""
142
+
143
+ #: checks/basic.php:19
144
+ msgid ""
145
+ "See: <a href=\"http://codex.wordpress.org/Function_Reference/"
146
+ "add_theme_support\">add_theme_support</a><pre> &lt;?php add_theme_support"
147
+ "( $feature ); ?&gt;</pre>"
148
+ msgstr ""
149
+
150
+ #: checks/basic.php:20
151
+ msgid ""
152
+ "See: <a href=\"http://codex.wordpress.org/Template_Tags/comments_template"
153
+ "\">comments_template</a><pre> &lt;?php comments_template( $file, "
154
+ "$separate_comments ); ?&gt;</pre>"
155
+ msgstr ""
156
+
157
+ #: checks/basic.php:21
158
+ msgid ""
159
+ "See: <a href=\"http://codex.wordpress.org/Template_Tags/wp_list_comments"
160
+ "\">wp_list_comments</a><pre> &lt;?php wp_list_comments( $args ); ?&gt;</pre>"
161
+ msgstr ""
162
+
163
+ #: checks/basic.php:22
164
+ msgid ""
165
+ "See: <a href=\"http://codex.wordpress.org/Template_Tags/comment_form"
166
+ "\">comment_form</a><pre> &lt;?php comment_form(); ?&gt;</pre>"
167
+ msgstr ""
168
+
169
+ #: checks/basic.php:23
170
+ msgid ""
171
+ "See: <a href=\"http://codex.wordpress.org/Template_Tags/body_class"
172
+ "\">body_class</a><pre> &lt;?php body_class( $class ); ?&gt;</pre>"
173
+ msgstr ""
174
+
175
+ #: checks/basic.php:24
176
+ msgid ""
177
+ "See: <a href=\"http://codex.wordpress.org/Function_Reference/wp_link_pages"
178
+ "\">wp_link_pages</a><pre> &lt;?php wp_link_pages( $args ); ?&gt;</pre>"
179
+ msgstr ""
180
+
181
+ #: checks/basic.php:25
182
+ msgid ""
183
+ "See: <a href=\"http://codex.wordpress.org/Template_Tags/post_class"
184
+ "\">post_class</a><pre> &lt;div id=\"post-&lt;?php the_ID(); ?&gt;\" &lt;?php "
185
+ "post_class(); ?&gt;&gt;</pre>"
186
+ msgstr ""
187
+
188
+ #: checks/basic.php:31
189
+ msgid "add_theme_support( 'automatic-feed-links' )"
190
+ msgstr ""
191
+
192
+ #: checks/basic.php:32
193
+ msgid "wp_enqueue_script( 'comment-reply' )"
194
+ msgstr ""
195
+
196
+ #: checks/basic.php:33
197
+ msgid "body_class call in body tag"
198
+ msgstr ""
199
+
200
+ #: checks/basic.php:34
201
+ msgid "register_sidebar() or register_sidebars()"
202
+ msgstr ""
203
+
204
+ #: checks/basic.php:36
205
+ msgid "Could not find <strong>%1$s</strong>. %2$s"
206
+ msgstr ""
207
+
208
+ #: checks/cdn.php:32 checks/constants.php:24 checks/customs.php:14
209
+ #: checks/customs.php:18 checks/dep_recommend.php:51 checks/editorstyle.php:13
210
+ #: checks/filenames.php:57 checks/i18n.php:49 checks/navmenu.php:14
211
+ #: checks/postthumb.php:15 checks/postthumb.php:19 checks/screenshot.php:24
212
+ #: checks/screenshot.php:27 checks/screenshot.php:30
213
+ #: checks/style_suggested.php:20 checks/style_tags.php:16
214
+ #: checks/suggested.php:34 checks/textdomain.php:30 checks/textdomain.php:55
215
+ #: checks/textdomain.php:59 checks/widgets.php:16
216
+ msgid "RECOMMENDED"
217
+ msgstr ""
218
+
219
+ #: checks/cdn.php:32
220
+ msgid ""
221
+ "Found the URL of a CDN in the code: %s. You should not load CSS or "
222
+ "Javascript resources from a CDN, please bundle them with the theme."
223
+ msgstr ""
224
+
225
+ #: checks/comment_reply.php:14
226
+ msgid ""
227
+ "See: <a href=\"http://codex.wordpress.org/"
228
+ "Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display\">Migrating "
229
+ "Plugins and Themes to 2.7/Enhanced Comment Display</a><pre> &lt;?php if "
230
+ "( is_singular() ) wp_enqueue_script( \"comment-reply\" ); ?&gt;</pre>"
231
+ msgstr ""
232
+
233
+ #: checks/comment_reply.php:15
234
+ msgid "Could not find the <strong>comment-reply</strong> script enqueued. %1$s"
235
+ msgstr ""
236
+
237
+ #: checks/comment_reply.php:18 checks/iframes.php:20 checks/include.php:19
238
+ #: checks/links.php:25 checks/nonprintable.php:16 checks/time_date.php:22
239
+ msgid "INFO"
240
+ msgstr ""
241
+
242
+ #: checks/comment_reply.php:18
243
+ msgid ""
244
+ "Could not find the <strong>comment-reply</strong> script enqueued, however a "
245
+ "reference to 'comment-reply' was found. Make sure that the comment-reply "
246
+ "script is being enqueued properly on singular pages."
247
+ msgstr ""
248
+
249
+ #: checks/commpage.php:15
250
+ msgid ""
251
+ "The theme doesn't have comment pagination code in it. Use "
252
+ "<strong>paginate_comments_links()</strong> or <strong>next_comments_link()</"
253
+ "strong> and <strong>previous_comments_link()</strong> to add comment "
254
+ "pagination."
255
+ msgstr ""
256
+
257
+ #: checks/constants.php:24 checks/more_deprecated.php:52
258
+ #: checks/required.php:22 checks/suggested.php:34
259
+ msgid ""
260
+ "<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. Use "
261
+ "<strong>%3$s</strong> instead.%4$s"
262
+ msgstr ""
263
+
264
+ #: checks/content-width.php:14
265
+ msgid ""
266
+ "No content width has been defined. Example: <pre>if ( ! isset"
267
+ "( $content_width ) ) $content_width = 900;</pre>"
268
+ msgstr ""
269
+
270
+ #: checks/customizer.php:26
271
+ msgid ""
272
+ "Found a Customizer setting that did not have a sanitization callback "
273
+ "function. Every call to the <strong>add_setting()</strong> method needs to "
274
+ "have a sanitization callback function passed."
275
+ msgstr ""
276
+
277
+ #: checks/customizer.php:31
278
+ msgid ""
279
+ "Found a Customizer setting that had an empty value passed as sanitization "
280
+ "callback. You need to pass a function name as sanitization callback."
281
+ msgstr ""
282
+
283
+ #: checks/customs.php:14
284
+ msgid ""
285
+ "No reference to <strong>add_theme_support( \"custom-header\", $args )</"
286
+ "strong> was found in the theme. It is recommended that the theme implement "
287
+ "this functionality if using an image for the header."
288
+ msgstr ""
289
+
290
+ #: checks/customs.php:18
291
+ msgid ""
292
+ "No reference to <strong>add_theme_support( \"custom-background\", $args )</"
293
+ "strong> was found in the theme. If the theme uses background images or solid "
294
+ "colors for the background, then it is recommended that the theme implement "
295
+ "this functionality."
296
+ msgstr ""
297
+
298
+ #: checks/dep_recommend.php:36 checks/deprecated.php:238
299
+ msgid "%1$s found in the file %2$s. Deprecated since version %3$s."
300
+ msgstr ""
301
+
302
+ #: checks/dep_recommend.php:44 checks/deprecated.php:246
303
+ msgid "Use %s instead."
304
+ msgstr ""
305
+
306
+ #: checks/directories.php:27
307
+ msgid ""
308
+ "Please remove any extraneous directories like .git or .svn from the ZIP file "
309
+ "before uploading it."
310
+ msgstr ""
311
+
312
+ #: checks/editorstyle.php:13
313
+ msgid ""
314
+ "No reference to <strong>add_editor_style()</strong> was found in the theme. "
315
+ "It is recommended that the theme implement editor styling, so as to make the "
316
+ "editor content match the resulting post output in the theme, for a better "
317
+ "user experience."
318
+ msgstr ""
319
+
320
+ #: checks/filenames.php:21
321
+ msgid "Windows thumbnail store"
322
+ msgstr ""
323
+
324
+ #: checks/filenames.php:22
325
+ msgid "windows system file"
326
+ msgstr ""
327
+
328
+ #: checks/filenames.php:23 checks/filenames.php:24
329
+ msgid "NetBeans Project File"
330
+ msgstr ""
331
+
332
+ #: checks/filenames.php:25
333
+ msgid "Komodo Project File"
334
+ msgstr ""
335
+
336
+ #: checks/filenames.php:26
337
+ msgid "Hidden Files or Folders"
338
+ msgstr ""
339
+
340
+ #: checks/filenames.php:27
341
+ msgid "PHP server settings file"
342
+ msgstr ""
343
+
344
+ #: checks/filenames.php:28
345
+ msgid "Dreamweaver project file"
346
+ msgstr ""
347
+
348
+ #: checks/filenames.php:29
349
+ msgid "PHP error log"
350
+ msgstr ""
351
+
352
+ #: checks/filenames.php:30
353
+ msgid "Server settings file"
354
+ msgstr ""
355
+
356
+ #: checks/filenames.php:31
357
+ msgid "SQL dump file"
358
+ msgstr ""
359
+
360
+ #: checks/filenames.php:32
361
+ msgid "OSX system file"
362
+ msgstr ""
363
+
364
+ #: checks/filenames.php:36
365
+ msgid ""
366
+ "Please see <a href=\"http://codex.wordpress.org/"
367
+ "Theme_Review#Theme_Documentation\">Theme_Documentation</a> for more "
368
+ "information."
369
+ msgstr ""
370
+
371
+ #: checks/filenames.php:43
372
+ msgid "<strong>%1$s</strong> %2$s found."
373
+ msgstr ""
374
+
375
+ #: checks/filenames.php:50
376
+ msgid "could not find the file <strong>%1$s</strong> in the theme."
377
+ msgstr ""
378
+
379
+ #: checks/filenames.php:57
380
+ msgid "could not find the file <strong>%1$s</strong> in the theme. %2$s"
381
+ msgstr ""
382
+
383
+ #: checks/gravatar.php:15
384
+ msgid ""
385
+ "This theme doesn't seem to support the standard avatar functions. Use "
386
+ "<strong>get_avatar</strong> or <strong>wp_list_comments</strong> to add this "
387
+ "support."
388
+ msgstr ""
389
+
390
+ #: checks/i18n.php:49
391
+ msgid ""
392
+ "Possible variable <strong>%1$s</strong> found in translation function in "
393
+ "<strong>%2$s</strong>. Translation function calls must NOT contain PHP "
394
+ "variables. %3$s"
395
+ msgstr ""
396
+
397
+ #: checks/iframes.php:9
398
+ msgid ""
399
+ "iframes are sometimes used to load unwanted adverts and code on your site"
400
+ msgstr ""
401
+
402
+ #: checks/iframes.php:20 checks/malware.php:23
403
+ msgid ""
404
+ "<strong>%1$s</strong> was found in the file <strong>%2$s</strong> %3$s.%4$s"
405
+ msgstr ""
406
+
407
+ #: checks/include.php:10
408
+ msgid ""
409
+ "The theme appears to use include or require. If these are being used to "
410
+ "include separate sections of a template from independent files, then "
411
+ "<strong>get_template_part()</strong> should be used instead."
412
+ msgstr ""
413
+
414
+ #: checks/include.php:19
415
+ msgid "<strong>%1$s</strong> %2$s %3$s"
416
+ msgstr ""
417
+
418
+ #: checks/lineendings.php:11 checks/lineendings.php:20
419
+ #: checks/lineendings.php:31
420
+ msgid ""
421
+ "Both DOS and UNIX style line endings were found in the file <strong>%1$s</"
422
+ "strong>. This causes a problem with SVN repositories and must be corrected "
423
+ "before the theme can be accepted. Please change the file to use only one "
424
+ "style of line endings."
425
+ msgstr ""
426
+
427
+ #: checks/links.php:25
428
+ msgid ""
429
+ "Possible hard-coded links were found in the file <strong>%1$s</strong>.%2$s"
430
+ msgstr ""
431
+
432
+ #: checks/malware.php:9
433
+ msgid ""
434
+ "File operations should use the WP_Filesystem methods instead of direct PHP "
435
+ "filesystem calls"
436
+ msgstr ""
437
+
438
+ #: checks/navmenu.php:14
439
+ msgid ""
440
+ "No reference to nav_menu's was found in the theme. Note that if your theme "
441
+ "has a menu bar, it is required to use the WordPress nav_menu functionality "
442
+ "for it."
443
+ msgstr ""
444
+
445
+ #: checks/nonprintable.php:16
446
+ msgid ""
447
+ "Non-printable characters were found in the <strong>%1$s</strong> file. You "
448
+ "may want to check this file for errors.%2$s"
449
+ msgstr ""
450
+
451
+ #: checks/phpshort.php:14
452
+ msgid "Found PHP short tags in file <strong>%1$s</strong>.%2$s"
453
+ msgstr ""
454
+
455
+ #: checks/plugin-territory.php:24
456
+ msgid ""
457
+ "The theme uses the %s function, which is plugin-territory functionality."
458
+ msgstr ""
459
+
460
+ #: checks/plugin-territory.php:32
461
+ msgid ""
462
+ "The theme uses the %s function. Custom post-content shortcodes are plugin-"
463
+ "territory functionality."
464
+ msgstr ""
465
+
466
+ #: checks/post-formats.php:27
467
+ msgid ""
468
+ "<strong>%1$s</strong> was found in the file <strong>%2$s</strong>. However "
469
+ "get_post_format and/or has_post_format were not found, and no use of formats "
470
+ "in the CSS was detected."
471
+ msgstr ""
472
+
473
+ #: checks/postsnav.php:16
474
+ msgid ""
475
+ "The theme doesn't have post pagination code in it. Use <strong>posts_nav_link"
476
+ "()</strong> or <strong>paginate_links()</strong> or <strong>next_posts_link()"
477
+ "</strong> and <strong>previous_posts_link()</strong> to add post pagination."
478
+ msgstr ""
479
+
480
+ #: checks/postthumb.php:15
481
+ msgid ""
482
+ "No reference to <strong>the_post_thumbnail()</strong> was found in the "
483
+ "theme. It is recommended that the theme implement this functionality instead "
484
+ "of using custom fields for thumbnails."
485
+ msgstr ""
486
+
487
+ #: checks/postthumb.php:19
488
+ msgid ""
489
+ "No reference to post-thumbnails was found in the theme. If the theme has a "
490
+ "thumbnail like functionality, it should be implemented with "
491
+ "<strong>add_theme_support( \"post-thumbnails\" )</strong>in the functions."
492
+ "php file."
493
+ msgstr ""
494
+
495
+ #: checks/screenshot.php:24
496
+ msgid ""
497
+ "Screenshot is wrong size! Detected: <strong>%1$sx%2$spx</strong>. Maximum "
498
+ "allowed size is 880x660px."
499
+ msgstr ""
500
+
501
+ #: checks/screenshot.php:27
502
+ msgid ""
503
+ "Screenshot dimensions are wrong! Ratio of width to height should be 4:3."
504
+ msgstr ""
505
+
506
+ #: checks/screenshot.php:30
507
+ msgid ""
508
+ "Screenshot size should be 880x660, to account for HiDPI displays. Any 4:3 "
509
+ "image size is acceptable, but 880x660 is preferred."
510
+ msgstr ""
511
+
512
+ #: checks/screenshot.php:35
513
+ msgid ""
514
+ "No screenshot detected! Please include a screenshot.png or screenshot.jpg."
515
+ msgstr ""
516
+
517
+ #: checks/searchform.php:9
518
+ msgid ""
519
+ "Please use <strong>get_search_form()</strong> instead of including "
520
+ "searchform.php directly."
521
+ msgstr ""
522
+
523
+ #: checks/searchform.php:16
524
+ msgid "<strong>%1$s</strong> %2$s%3$s"
525
+ msgstr ""
526
+
527
+ #: checks/style_needed.php:11
528
+ msgid "<strong>Theme name:</strong> is missing from your style.css header."
529
+ msgstr ""
530
+
531
+ #: checks/style_needed.php:12
532
+ msgid "<strong>Description:</strong> is missing from your style.css header."
533
+ msgstr ""
534
+
535
+ #: checks/style_needed.php:13
536
+ msgid "<strong>Author:</strong> is missing from your style.css header."
537
+ msgstr ""
538
+
539
+ #: checks/style_needed.php:14
540
+ msgid "<strong>Version:</strong> is missing from your style.css header."
541
+ msgstr ""
542
+
543
+ #: checks/style_needed.php:15
544
+ msgid "<strong>License:</strong> is missing from your style.css header."
545
+ msgstr ""
546
+
547
+ #: checks/style_needed.php:16
548
+ msgid "<strong>License URI:</strong> is missing from your style.css header."
549
+ msgstr ""
550
+
551
+ #: checks/style_needed.php:17
552
+ msgid "<strong>.sticky</strong> css class is needed in your theme css."
553
+ msgstr ""
554
+
555
+ #: checks/style_needed.php:18
556
+ msgid "<strong>.bypostauthor</strong> css class is needed in your theme css."
557
+ msgstr ""
558
+
559
+ #: checks/style_needed.php:19
560
+ msgid "<strong>.alignleft</strong> css class is needed in your theme css."
561
+ msgstr ""
562
+
563
+ #: checks/style_needed.php:20
564
+ msgid "<strong>.alignright</strong> css class is needed in your theme css."
565
+ msgstr ""
566
+
567
+ #: checks/style_needed.php:21
568
+ msgid "<strong>.aligncenter</strong> css class is needed in your theme css."
569
+ msgstr ""
570
+
571
+ #: checks/style_needed.php:22
572
+ msgid "<strong>.wp-caption</strong> css class is needed in your theme css."
573
+ msgstr ""
574
+
575
+ #: checks/style_needed.php:23
576
+ msgid ""
577
+ "<strong>.wp-caption-text</strong> css class is needed in your theme css."
578
+ msgstr ""
579
+
580
+ #: checks/style_needed.php:24
581
+ msgid ""
582
+ "<strong>.gallery-caption</strong> css class is needed in your theme css."
583
+ msgstr ""
584
+
585
+ #: checks/style_suggested.php:20
586
+ msgid "<strong>%1$s</strong> is missing from your style.css header."
587
+ msgstr ""
588
+
589
+ #: checks/style_tags.php:16
590
+ msgid "<strong>Tags:</strong> is either empty or missing in style.css header."
591
+ msgstr ""
592
+
593
+ #: checks/style_tags.php:25
594
+ msgid ""
595
+ "The flexible-width and fixed-width tags changed to fluid-layout and fixed-"
596
+ "layout tags in WordPress 3.8. Additionally, the responsive-layout tag was "
597
+ "added. Please change to using one of the new tags."
598
+ msgstr ""
599
+
600
+ #: checks/style_tags.php:27
601
+ msgid ""
602
+ "Found wrong tag, remove <strong>%1$s</strong> from your style.css header."
603
+ msgstr ""
604
+
605
+ #: checks/tags.php:13
606
+ msgid ""
607
+ "This theme doesn't seem to display tags. Modify it to display tags in "
608
+ "appropriate locations."
609
+ msgstr ""
610
+
611
+ #: checks/textdomain.php:15
612
+ msgid "You have not included a text domain!"
613
+ msgstr ""
614
+
615
+ #. translators: 1: filename 2: error message 3: grep results
616
+ #: checks/textdomain.php:32
617
+ msgid "Text domain problems in <strong>%1$s</strong>. %2$s %3$s "
618
+ msgstr ""
619
+
620
+ #: checks/textdomain.php:38 checks/textdomain.php:39
621
+ msgid "Text domain should match theme slug: <strong>%1$s</strong>"
622
+ msgstr ""
623
+
624
+ #: checks/textdomain.php:55
625
+ msgid ""
626
+ "Text domain problems in <strong>%1$s</strong>. The %2s text domain is being "
627
+ "used!%3$s"
628
+ msgstr ""
629
+
630
+ #: checks/textdomain.php:59
631
+ msgid ""
632
+ "Text domain problems in <strong>%1$s</strong>. %2$s You are using: <strong>%"
633
+ "3s</strong>%4$s"
634
+ msgstr ""
635
+
636
+ #: checks/time_date.php:22
637
+ msgid ""
638
+ "At least one hard coded date was found in the file <strong>%s</strong>. "
639
+ "Consider get_option( 'date_format' ) instead."
640
+ msgstr ""
641
+
642
+ #: checks/title.php:22
643
+ msgid ""
644
+ "The theme needs to have <strong>&lt;title&gt;</strong> tags, ideally in the "
645
+ "<strong>header.php</strong> file."
646
+ msgstr ""
647
+
648
+ #: checks/title.php:31
649
+ msgid ""
650
+ "The theme needs to have a call to <strong>wp_title()</strong>, ideally in "
651
+ "the <strong>header.php</strong> file."
652
+ msgstr ""
653
+
654
+ #: checks/title.php:46
655
+ msgid ""
656
+ "The <strong>&lt;title&gt;</strong> tags can only contain a call to "
657
+ "<strong>wp_title()</strong>. Use the <strong>wp_title filter</strong> to "
658
+ "modify the output"
659
+ msgstr ""
660
+
661
+ #: checks/widgets.php:16
662
+ msgid ""
663
+ "This theme contains no sidebars/widget areas. See <a href='http://codex."
664
+ "wordpress.org/Widgets_API'>Widgets API</a>"
665
+ msgstr ""
666
+
667
+ #: checks/widgets.php:21
668
+ msgid ""
669
+ "The theme appears to use <strong>register_sidebar()</strong> but no "
670
+ "<strong>dynamic_sidebar()</strong> was found. See: <a href='http://codex."
671
+ "wordpress.org/Function_Reference/dynamic_sidebar'>dynamic_sidebar</a><pre> "
672
+ "&lt;?php dynamic_sidebar( $index ); ?&gt;</pre>"
673
+ msgstr ""
674
+
675
+ #: checks/widgets.php:26
676
+ msgid ""
677
+ "The theme appears to use <strong>dynamic_sidebars()</strong> but no "
678
+ "<strong>register_sidebar()</strong> was found. See: <a href='http://codex."
679
+ "wordpress.org/Function_Reference/register_sidebar'>register_sidebar</a><pre> "
680
+ "&lt;?php register_sidebar( $args ); ?&gt;</pre>"
681
+ msgstr ""
682
+
683
+ #: checks/widgets.php:34
684
+ msgid ""
685
+ "Sidebars need to be registered in a custom function hooked to the "
686
+ "<strong>widgets_init</strong> action. See: %s."
687
+ msgstr ""
688
+
689
+ #: checks/worms.php:9
690
+ msgid "This may be a script used by hackers to get control of your server!"
691
+ msgstr ""
692
+
693
+ #: checks/worms.php:10
694
+ msgid "This may be a script used by hackers to get control of your server"
695
+ msgstr ""
696
+
697
+ #: checks/worms.php:11
698
+ msgid "Tells a hacker what operating system your server is running"
699
+ msgstr ""
700
+
701
+ #: checks/worms.php:12
702
+ msgid ""
703
+ "base64 encoded text found in Search Engine Redirect hack <a href=\"http://"
704
+ "blogbuildingu.com/wordpress/wordpress-search-engine-redirect-hack\">[1]</a>"
705
+ msgstr ""
706
+
707
+ #: checks/worms.php:13
708
+ msgid ""
709
+ "YAHG Googlerank.info exploit code <a href=\"http://creativebriefing.com/"
710
+ "wordpress-hacked-googlerankinfo/\">[1]</a>"
711
+ msgstr ""
712
+
713
+ #: checks/worms.php:14
714
+ msgid ""
715
+ "Possible Ekibastos attack <a href=\"http://ocaoimh.ie/did-your-wordpress-"
716
+ "site-get-hacked/\">[1]</a>"
717
+ msgstr ""
718
+
719
+ #: checks/worms.php:15
720
+ msgid ""
721
+ "Possible \"Gumblar\" JavaScript attack <a href=\"http://threatinfo."
722
+ "trendmicro.com/vinfo/articles/securityarticles.asp?xmlfile=042710-GUMBLAR.xml"
723
+ "\">[1]</a> <a href=\"http://justcoded.com/article/gumblar-family-virus-"
724
+ "removal-tool/\">[2]</a>"
725
+ msgstr ""
726
+
727
+ #: checks/worms.php:16 checks/worms.php:17
728
+ msgid ""
729
+ "Symptom of the \"Pharma Hack\" <a href=\"http://blog.sucuri.net/2010/07/"
730
+ "understanding-and-cleaning-the-pharma-hack-on-wordpress.html\">[1]</a>"
731
+ msgstr ""
732
+
733
+ #: checks/worms.php:18
734
+ msgid "Malicious footer code injection detected!"
735
+ msgstr ""
736
+
737
+ #: main.php:12
738
+ msgid ""
739
+ "Parent theme <strong>%1$s</strong> not found! You have to have parent AND "
740
+ "child-theme installed!"
741
+ msgstr ""
742
+
743
+ #: main.php:39
744
+ msgid "Theme Info"
745
+ msgstr ""
746
+
747
+ #: main.php:47
748
+ msgid "Title"
749
+ msgstr ""
750
+
751
+ #: main.php:48
752
+ msgid "Version"
753
+ msgstr ""
754
+
755
+ #: main.php:49
756
+ msgid "Author"
757
+ msgstr ""
758
+
759
+ #: main.php:50
760
+ msgid "Author URI"
761
+ msgstr ""
762
+
763
+ #: main.php:51
764
+ msgid "Theme URI"
765
+ msgstr ""
766
+
767
+ #: main.php:52
768
+ msgid "License"
769
+ msgstr ""
770
+
771
+ #: main.php:53
772
+ msgid "LicenseURI"
773
+ msgstr ""
774
+
775
+ #: main.php:54
776
+ msgid "Tags"
777
+ msgstr ""
778
+
779
+ #: main.php:55
780
+ msgid "Description"
781
+ msgstr ""
782
+
783
+ #: main.php:59
784
+ msgid ""
785
+ "This child theme requires at least version <strong>%1$s</strong> of theme "
786
+ "<strong>%2$s</strong> to be installed. You only have <strong>%3$s</strong> "
787
+ "please update the parent theme."
788
+ msgstr ""
789
+
790
+ #: main.php:61
791
+ msgid ""
792
+ "This is a child theme. The parent theme is: <strong>%1$s</strong>. These "
793
+ "files have been included automatically!"
794
+ msgstr ""
795
+
796
+ #: main.php:63
797
+ msgid ""
798
+ "Child theme does not have the <strong>Template Version</strong> tag in style."
799
+ "css."
800
+ msgstr ""
801
+
802
+ #: main.php:65
803
+ msgid ""
804
+ "Child theme is only tested up to version %1$s of %2$s breakage may occur! %3"
805
+ "$s installed version is %4$s"
806
+ msgstr ""
807
+
808
+ #: main.php:72
809
+ msgid ""
810
+ " Running <strong>%1$s</strong> tests against <strong>%2$s</strong> using "
811
+ "Guidelines Version: <strong>%3$s</strong> Plugin revision: <strong>%4$s</"
812
+ "strong>"
813
+ msgstr ""
814
+
815
+ #: main.php:75
816
+ msgid "One or more errors were found for %1$s."
817
+ msgstr ""
818
+
819
+ #: main.php:77
820
+ msgid "%1$s passed the tests"
821
+ msgstr ""
822
+
823
+ #: main.php:80
824
+ msgid ""
825
+ "<strong>WP_DEBUG is not enabled!</strong> Please test your theme with <a "
826
+ "href=\"http://codex.wordpress.org/Editing_wp-config.php\">debug enabled</a> "
827
+ "before you upload!"
828
+ msgstr ""
829
+
830
+ #: main.php:91
831
+ msgid "About"
832
+ msgstr ""
833
+
834
+ #: main.php:92
835
+ msgid ""
836
+ "The theme check plugin is an easy way to test your theme and make sure it's "
837
+ "up to spec with the latest theme review standards. With it, you can run all "
838
+ "the same automated testing tools on your theme that WordPress.org uses for "
839
+ "theme submissions."
840
+ msgstr ""
841
+
842
+ #: main.php:93
843
+ msgid "Contact"
844
+ msgstr ""
845
+
846
+ #: main.php:94
847
+ msgid "Theme-Check is maintained by %1s and %2s."
848
+ msgstr ""
849
+
850
+ #: main.php:98
851
+ msgid ""
852
+ "If you have found a bug or would like to make a suggestion or contribution "
853
+ "why not join the <a href=\"http://wordpress.org/extend/themes/contact/"
854
+ "\">theme-reviewers mailing list</a> or leave a post on the <a href=\"http://"
855
+ "wordpress.org/tags/theme-check?forum_id=10\">WordPress forums</a>."
856
+ msgstr ""
857
+
858
+ #: main.php:99
859
+ msgid "Contributors"
860
+ msgstr ""
861
+
862
+ #: main.php:100
863
+ msgid "Localization"
864
+ msgstr ""
865
+
866
+ #: main.php:105
867
+ msgid "Testers"
868
+ msgstr ""
869
+
870
+ #: main.php:106
871
+ msgid "The WordPress Theme Review Team"
872
+ msgstr ""
873
+
874
+ #: main.php:112
875
+ msgid ""
876
+ "Now your theme has passed the basic tests you need to check it properly "
877
+ "using the test data before you upload to the WordPress Themes Directory."
878
+ msgstr ""
879
+
880
+ #: main.php:113
881
+ msgid ""
882
+ "Make sure to review the guidelines at <a href=\"http://codex.wordpress.org/"
883
+ "Theme_Review\">Theme Review</a> before uploading a Theme."
884
+ msgstr ""
885
+
886
+ #: main.php:114
887
+ msgid "Codex Links"
888
+ msgstr ""
889
+
890
+ #: main.php:116
891
+ msgid "Theme Development"
892
+ msgstr ""
893
+
894
+ #: main.php:117
895
+ msgid "Themes and Templates forum"
896
+ msgstr ""
897
+
898
+ #: main.php:118
899
+ msgid "Theme Unit Tests"
900
+ msgstr ""
901
+
902
+ #: main.php:137
903
+ msgid "Check it!"
904
+ msgstr ""
905
+
906
+ #: main.php:138
907
+ msgid "Output in Trac format."
908
+ msgstr ""
909
+
910
+ #: main.php:139
911
+ msgid "Suppress INFO."
912
+ msgstr ""
913
+
914
+ #: theme-check.php:38
915
+ msgid "You do not have sufficient permissions to access this page."
916
+ msgstr ""
917
+
918
+ #. Plugin Name of the plugin/theme
919
+ msgid "Theme Check"
920
+ msgstr ""
921
+
922
+ #. Plugin URI of the plugin/theme
923
+ msgid "http://ottopress.com/wordpress-plugins/theme-check/"
924
+ msgstr ""
925
+
926
+ #. Description of the plugin/theme
927
+ msgid ""
928
+ "A simple and easy way to test your theme for all the latest WordPress "
929
+ "standards and practices. A great theme development tool!"
930
+ msgstr ""
931
+
932
+ #. Author of the plugin/theme
933
+ msgid "Pross, Otto42"
934
+ msgstr ""
935
+
936
+ #. Author URI of the plugin/theme
937
+ msgid "http://ottopress.com"
938
+ msgstr ""
main.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function check_main( $theme ) {
3
+ global $themechecks, $data, $themename;
4
+ $themename = $theme;
5
+ $theme = get_theme_root( $theme ) . "/$theme";
6
+ $files = listdir( $theme );
7
+ $data = tc_get_theme_data( $theme . '/style.css' );
8
+ if ( $data[ 'Template' ] ) {
9
+ // This is a child theme, so we need to pull files from the parent, which HAS to be installed.
10
+ $parent = get_theme_root( $data[ 'Template' ] ) . '/' . $data['Template'];
11
+ if ( ! tc_get_theme_data( $parent . '/style.css' ) ) { // This should never happen but we will check while were here!
12
+ echo '<h2>' . sprintf(__('Parent theme <strong>%1$s</strong> not found! You have to have parent AND child-theme installed!', 'theme-check'), $data[ 'Template' ] ) . '</h2>';
13
+ return;
14
+ }
15
+ $parent_data = tc_get_theme_data( $parent . '/style.css' );
16
+ $themename = basename( $parent );
17
+ $files = array_merge( listdir( $parent ), $files );
18
+ }
19
+
20
+ if ( $files ) {
21
+ foreach( $files as $key => $filename ) {
22
+ if ( substr( $filename, -4 ) == '.php' ) {
23
+ $php[$filename] = php_strip_whitespace( $filename );
24
+ }
25
+ else if ( substr( $filename, -4 ) == '.css' ) {
26
+ $css[$filename] = file_get_contents( $filename );
27
+ }
28
+ else {
29
+ $other[$filename] = ( ! is_dir($filename) ) ? file_get_contents( $filename ) : '';
30
+ }
31
+ }
32
+
33
+ // run the checks
34
+ $success = run_themechecks($php, $css, $other);
35
+
36
+ global $checkcount;
37
+
38
+ // second loop, to display the errors
39
+ echo '<h2>' . __( 'Theme Info', 'theme-check' ) . ': </h2>';
40
+ echo '<div class="theme-info">';
41
+ if (file_exists( trailingslashit( WP_CONTENT_DIR . '/themes' ) . trailingslashit( basename( $theme ) ) . 'screenshot.png' ) ) {
42
+ $image = getimagesize( $theme . '/screenshot.png' );
43
+ echo '<div style="float:right" class="theme-info"><img style="max-height:180px;" src="' . trailingslashit( WP_CONTENT_URL . '/themes' ) . trailingslashit( basename( $theme ) ) . 'screenshot.png" />';
44
+ echo '<br /><div style="text-align:center">' . $image[0] . 'x' . $image[1] . ' ' . round( filesize( $theme . '/screenshot.png' )/1024 ) . 'k</div></div>';
45
+ }
46
+
47
+ echo ( !empty( $data[ 'Title' ] ) ) ? '<p><label>' . __( 'Title', 'theme-check' ) . '</label><span class="info">' . $data[ 'Title' ] . '</span></p>' : '';
48
+ echo ( !empty( $data[ 'Version' ] ) ) ? '<p><label>' . __( 'Version', 'theme-check' ) . '</label><span class="info">' . $data[ 'Version' ] . '</span></p>' : '';
49
+ echo ( !empty( $data[ 'AuthorName' ] ) ) ? '<p><label>' . __( 'Author', 'theme-check' ) . '</label><span class="info">' . $data[ 'AuthorName' ] . '</span></p>' : '';
50
+ echo ( !empty( $data[ 'AuthorURI' ] ) ) ? '<p><label>' . __( 'Author URI', 'theme-check' ) . '</label><span class="info"><a href="' . $data[ 'AuthorURI' ] . '">' . $data[ 'AuthorURI' ] . '</a>' . '</span></p>' : '';
51
+ echo ( !empty( $data[ 'URI' ] ) ) ? '<p><label>' . __( 'Theme URI', 'theme-check' ) . '</label><span class="info"><a href="' . $data[ 'URI' ] . '">' . $data[ 'URI' ] . '</a>' . '</span></p>' : '';
52
+ echo ( !empty( $data[ 'License' ] ) ) ? '<p><label>' . __( 'License', 'theme-check' ) . '</label><span class="info">' . $data[ 'License' ] . '</span></p>' : '';
53
+ echo ( !empty( $data[ 'License URI' ] ) ) ? '<p><label>' . __( 'LicenseURI', 'theme-check' ) . '</label><span class="info">' . $data[ 'License URI' ] . '</span></p>' : '';
54
+ echo ( !empty( $data[ 'Tags' ] ) ) ? '<p><label>' . __( 'Tags', 'theme-check' ) . '</label><span class="info">' . implode( $data[ 'Tags' ], ', ') . '</span></p>' : '';
55
+ echo ( !empty( $data[ 'Description' ] ) ) ? '<p><label>' . __( 'Description', 'theme-check' ) . '</label><span class="info">' . $data[ 'Description' ] . '</span></p>' : '';
56
+
57
+ if ( $data[ 'Template' ] ) {
58
+ if ( $data['Template Version'] > $parent_data['Version'] ) {
59
+ echo '<p>' . sprintf(__('This child theme requires at least version <strong>%1$s</strong> of theme <strong>%2$s</strong> to be installed. You only have <strong>%3$s</strong> please update the parent theme.', 'theme-check'), $data['Template Version'], $parent_data['Title'], $parent_data['Version'] ) . '</p>';
60
+ }
61
+ echo '<p>' . sprintf(__( 'This is a child theme. The parent theme is: <strong>%1$s</strong>. These files have been included automatically!', 'theme-check'), $data[ 'Template' ] ) . '</p>';
62
+ if ( empty( $data['Template Version'] ) ) {
63
+ echo '<p>' . __('Child theme does not have the <strong>Template Version</strong> tag in style.css.', 'theme-check') . '</p>';
64
+ } else {
65
+ echo ( $data['Template Version'] < $parent_data['Version'] ) ? '<p>' . sprintf(__('Child theme is only tested up to version %1$s of %2$s breakage may occur! %3$s installed version is %4$s', 'theme-check'), $data['Template Version'], $parent_data['Title'], $parent_data['Title'], $parent_data['Version'] ) . '</p>' : '';
66
+ }
67
+ }
68
+ echo '</div><!-- .theme-info-->';
69
+
70
+ $plugins = get_plugins( '/theme-check' );
71
+ $version = explode( '.', $plugins['theme-check.php']['Version'] );
72
+ echo '<p>' . sprintf(__(' Running <strong>%1$s</strong> tests against <strong>%2$s</strong> using Guidelines Version: <strong>%3$s</strong> Plugin revision: <strong>%4$s</strong>', 'theme-check'), $checkcount, $data[ 'Title' ], $version[0], $version[1] ) . '</p>';
73
+ $results = display_themechecks();
74
+ if ( !$success ) {
75
+ echo '<h2>' . sprintf(__('One or more errors were found for %1$s.', 'theme-check'), $data[ 'Title' ] ) . '</h2>';
76
+ } else {
77
+ echo '<h2>' . sprintf(__('%1$s passed the tests', 'theme-check'), $data[ 'Title' ] ) . '</h2>';
78
+ tc_success();
79
+ }
80
+ if ( !defined( 'WP_DEBUG' ) || WP_DEBUG == false ) echo '<div class="updated"><span class="tc-fail">' . __('WARNING','theme-check') . '</span> ' . __( '<strong>WP_DEBUG is not enabled!</strong> Please test your theme with <a href="http://codex.wordpress.org/Editing_wp-config.php">debug enabled</a> before you upload!', 'theme-check' ) . '</div>';
81
+ echo '<div class="tc-box">';
82
+ echo '<ul class="tc-result">';
83
+ echo $results;
84
+ echo '</ul></div>';
85
+ }
86
+ }
87
+
88
+
89
+ function tc_intro() {
90
+ ?>
91
+ <h2><?php _e( 'About', 'theme-check' ); ?></h2>
92
+ <p><?php _e( "The theme check plugin is an easy way to test your theme and make sure it's up to spec with the latest theme review standards. With it, you can run all the same automated testing tools on your theme that WordPress.org uses for theme submissions.", 'theme-check' ); ?></p>
93
+ <h2><?php _e( 'Contact', 'theme-check' ); ?></h2>
94
+ <p><?php printf( __( 'Theme-Check is maintained by %1s and %2s.', 'theme-check' ),
95
+ '<a href="http://profiles.wordpress.org/users/pross/">Pross</a>',
96
+ '<a href="http://profiles.wordpress.org/users/otto42/">Otto42</a>'
97
+ ); ?></p>
98
+ <p><?php _e( 'If you have found a bug or would like to make a suggestion or contribution why not join the <a href="http://wordpress.org/extend/themes/contact/">theme-reviewers mailing list</a> or leave a post on the <a href="http://wordpress.org/tags/theme-check?forum_id=10">WordPress forums</a>.', 'theme-check' ); ?></p>
99
+ <h2><?php _e( 'Contributors', 'theme-check' ); ?></h2>
100
+ <h3><?php _e( 'Localization', 'theme-check' ); ?></h3>
101
+ <ul>
102
+ <li><a href="http://www.onedesigns.com/">Daniel Tara</a></li>
103
+ <li><a href="http://index56.com/">Emil Uzelac</a></li>
104
+ </ul>
105
+ <h3><?php _e( 'Testers', 'theme-check' ); ?></h3>
106
+ <p><a href="http://make.wordpress.org/themes/"><?php _e( 'The WordPress Theme Review Team', 'theme-check' ); ?></a></p>
107
+ <?php
108
+ }
109
+
110
+ function tc_success() {
111
+ ?>
112
+ <div class="tc-success"><p><?php _e( 'Now your theme has passed the basic tests you need to check it properly using the test data before you upload to the WordPress Themes Directory.', 'theme-check' ); ?></p>
113
+ <p><?php _e( 'Make sure to review the guidelines at <a href="http://codex.wordpress.org/Theme_Review">Theme Review</a> before uploading a Theme.', 'theme-check' ); ?></p>
114
+ <h3><?php _e( 'Codex Links', 'theme-check' ); ?></h3>
115
+ <ul>
116
+ <li><a href="http://codex.wordpress.org/Theme_Development"><?php _e('Theme Development', 'theme-check' ); ?></a></li>
117
+ <li><a href="http://wordpress.org/support/forum/5"><?php _e('Themes and Templates forum', 'theme-check' ); ?></a></li>
118
+ <li><a href="http://codex.wordpress.org/Theme_Unit_Test"><?php _e('Theme Unit Tests', 'theme-check' ); ?></a></li>
119
+ </ul></div>
120
+ <?php
121
+ }
122
+
123
+ function tc_form() {
124
+ $themes = tc_get_themes();
125
+ echo '<form action="themes.php?page=themecheck" method="post">';
126
+ echo '<select name="themename">';
127
+ foreach( $themes as $name => $location ) {
128
+ echo '<option ';
129
+ if ( isset( $_POST['themename'] ) ) {
130
+ echo ( $location['Stylesheet'] === $_POST['themename'] ) ? 'selected="selected" ' : '';
131
+ } else {
132
+ echo ( basename( STYLESHEETPATH ) === $location['Stylesheet'] ) ? 'selected="selected" ' : '';
133
+ }
134
+ echo ( basename( STYLESHEETPATH ) === $location['Stylesheet'] ) ? 'value="' . $location['Stylesheet'] . '" style="font-weight:bold;">' . $name . '</option>' : 'value="' . $location['Stylesheet'] . '">' . $name . '</option>';
135
+ }
136
+ echo '</select>';
137
+ echo '<input class="button" type="submit" value="' . __( 'Check it!', 'theme-check' ) . '" />';
138
+ if ( defined( 'TC_PRE' ) || defined( 'TC_POST' ) ) echo ' <input name="trac" type="checkbox" /> ' . __( 'Output in Trac format.', 'theme-check' );
139
+ echo ' <input name="s_info" type="checkbox" /> ' . __( 'Suppress INFO.', 'theme-check' );
140
+ echo '</form>';
141
+ }
readme.txt ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Theme Check ===
2
+ Contributors: Otto42, pross
3
+ Author URI: http://ottopress.com/
4
+ Plugin URL: http://ottopress.com/wordpress-plugins/theme-check/
5
+ Requires at Least: 3.0
6
+ Tested Up To: 4.0
7
+ Tags: template, theme, check, checker, tool, wordpress, wordpress.org, upload, uploader, test, guideline, review
8
+ Stable tag: 20140929.1
9
+
10
+ A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!
11
+
12
+ == Description ==
13
+
14
+ The theme check plugin is an easy way to test your theme and make sure it's up to spec with the latest [theme review](http://codex.wordpress.org/Theme_Review) standards. With it, you can run all the same automated testing tools on your theme that WordPress.org uses for theme submissions.
15
+
16
+ The tests are run through a simple admin menu and all results are displayed at once. This is very handy for theme developers, or anybody looking to make sure that their theme supports the latest WordPress theme standards and practices.
17
+
18
+ == Frequently Asked Questions ==
19
+
20
+ = What's with the version numbers? =
21
+
22
+ The version number is the date of the revision of the [guidelines](http://codex.wordpress.org/Theme_Review) used to create it.
23
+
24
+ = Why does it flag something as bad? =
25
+
26
+ It's not flagging "bad" things, as such. The theme check is designed to be a non-perfect way to test for compliance with the [Theme Review](http://codex.wordpress.org/Theme_Review) guidelines. Not all themes must adhere to these guidelines. The purpose of the checking tool is to ensure that themes uploaded to the central [WordPress.org theme repository](http://wordpress.org/extend/themes/) meet the latest standards of WordPress themes and will work on a wide variety of sites.
27
+
28
+ Many sites use customized themes, and that's perfectly okay. But themes that are intended for use on many different kinds of sites by the public need to have a certain minimum level of capabilities, in order to ensure proper functioning in many different environments. The Theme Review guidelines are created with that goal in mind.
29
+
30
+ This theme checker is not perfect, and never will be. It is only a tool to help theme authors, or anybody else who wants to make their theme more capable. All themes submitted to WordPress.org are hand-reviewed by a team of experts. The automated theme checker is meant to be a useful tool only, not an absolute system of measurement.
31
+
32
+ This plugin does not decide the guidelines used. Any issues with particular theme review guidelines should be discussed on the [Theme Reviewers mailing list](http://lists.wordpress.org/mailman/listinfo/theme-reviewers).
33
+
34
+ == Other Notes ==
35
+
36
+ = How to enable trac formatting =
37
+
38
+ The Theme Review team use this plugin while reviewing themes and copy/paste the output into trac tickets, the trac system has its own markup language.
39
+ To enable trac formatting in Theme-Check you need to define a couple of variables in wp-config.php:
40
+ *TC_PRE* and *TC_POST* are used as a ticket header and footer.
41
+ Examples:
42
+ `define( 'TC_PRE', 'Theme Review:[[br]]
43
+ - Themes should be reviewed using "define(\'WP_DEBUG\', true);" in wp-config.php[[br]]
44
+ - Themes should be reviewed using the test data from the Theme Checklists (TC)
45
+ -----
46
+ ' );`
47
+
48
+ `define( 'TC_POST', 'Feel free to make use of the contact details below if you have any questions,
49
+ comments, or feedback:[[br]]
50
+ [[br]]
51
+ * Leave a comment on this ticket[[br]]
52
+ * Send an email to the Theme Review email list[[br]]
53
+ * Use the #wordpress-themes IRC channel on Freenode.' );`
54
+ If **either** of these two vars are defined a new trac tickbox will appear next to the *Check it!* button.
55
+
56
+ == Changelog ==
57
+ = 20140929.1 =
58
+ * Added new checks and updates from Frank Klein at Automattic. Thanks Frank!
59
+ * Updated deprecated function listings
60
+ * Customizer check: All add_settings must use sanitization callbacks, for security
61
+ * Plugin territory checks: Themes must not register post types or taxonomies or add shortcodes for post content
62
+ * Widgets: Calls to register_sidebar must be called from the widgets_init action hook
63
+ * Title: <title> tags must exist and not have anything in them other than a call to wp_title()
64
+ * CDN: Checks for use of common CDNs (recommended only)
65
+ * Note: Changed plugin and author URIs due to old URIs being invalid. These may change again in the future, the URIs to my own site are temporarily only.
66
+
67
+ = 20131213.1 =
68
+ * Corrected errors not being displayed by the plugin and it incorrectly giving a "pass" result to everything.
69
+
70
+ = 20131212.1 =
71
+ * Updated for 3.8
72
+ * Most files have changed for better I18N support, so the language files were removed temporarily until translation can be redone.
73
+
74
+ = 20121211.1 =
75
+ * Updated for 3.5
76
+ * Remove Paypal button.
77
+
78
+ = 20110805.1 =
79
+ * TimThumb checks removed.
80
+ * Proper i18n loading. Fixes http://bit.ly/ouD5Ke.
81
+ * Screenshot now previewed in results, with filesize and dimensions.
82
+
83
+ = 20110602.2 =
84
+ * New file list functions hidden folders now detectable.
85
+ * Better fopen checks.
86
+ * TimThumb version bump
87
+
88
+ = 20110602.1 =
89
+ * DOS/UNIX line ending style checks are now a requirement for proper theme uploading.
90
+ * Timthumb version bump
91
+ * Several fixes reported by GaryJ
92
+ * 3.2 deprecated functions added
93
+
94
+ = 20110412.1 =
95
+ * Fix regex's
96
+ * Added check for latest footer injection hack.
97
+ * Fix tags check to use new content function correctly
98
+ * Sync of all changes made for wporg uploader theme-check.
99
+ * Updated checks post 3.1. added screenshot check to svn.
100
+ * Fix links check to not return a false failure in some cases
101
+ * rm one of the checks that causes problems on wporg uploader (and which is also unnecessary)
102
+ * Move unneeded functions out of checkbase into main.php.
103
+ * Minor formatting changes only (spacing and such)
104
+ * Add check for wp_link_pages() + fix eval() check
105
+
106
+ = 20110219.2 =
107
+ * Merged new UI props Gua Bob [1](http://guabob.com/)
108
+ * Last tested theme is always pre-selected in the themes list.
109
+ * Fixed php error in admin_menu.php
110
+
111
+ = 20110219.1 =
112
+ * See [commit log](https://github.com/Pross/theme-check/commits/) for changes.
113
+
114
+ = 20110201.2 =
115
+ * UI bug fixes [forum post](http://bit.ly/ff7amN) props Mamaduka.
116
+ * Textdomain checks for twentyten and no domain.
117
+ * Fix div not closing props Mamaduka.
118
+
119
+ = 20110201.1 =
120
+ * i18n working
121
+ * sr_RS de_DE ro_RO langs props Daniel Tara and Emil Uzelac.
122
+ * Child theme support added, checks made against parent AND child at runtime.
123
+ * Trac formatting button added for reviewers.
124
+
125
+ = 20101228.3 =
126
+ * Last revision for 3.1 (hopefully)
127
+ * Chips suggestion of checking for inclusion of searchform.php ( not
128
+ perfect yet, need more examples to look for ).
129
+ * add_theme_page is required, all others flagged and displayed with line
130
+ numbers.
131
+ * <?= detected properly, short tags outputted with line umbers.
132
+ * Mostly internationalized, needs translations now.
133
+ * Bug fixes.
134
+
135
+ = 20101228.2 =
136
+ * Added menu checking.
137
+ * ThemeURI AuthourURI added to results.
138
+ * Lots of small fixes.
139
+ * Started translation.
140
+
141
+ = 20101228.1 =
142
+ * Fix embed_defaults filter check and stylesheet file data check.
143
+
144
+ = 20101226.1 =
145
+ * Whole system redesign to allow easier synching with WordPress.org uploader. Many other additions/subtractions/changes as well.
146
+ * WordPress 3.1 guidelines added, to help theme authors ensure compatibility for upcoming release.
147
+
148
+ = 20101110.7 =
149
+ * Re-added malware.php checks for fopen and file_get_contents (INFO)
150
+ * fixed a couple of undefined index errors.
151
+
152
+ = 20101110.4_r2 =
153
+ * Fixed Warning: Wrong parameter count for stristr()
154
+
155
+ = 20101110.4_r1 =
156
+ * Added `echo` to suggested.php
157
+
158
+ = 20101110.4 =
159
+ * Fixed deprecated function call to get_plugins()
160
+
161
+ = 20101110.3 =
162
+ * Fixed undefined index.
163
+
164
+ = 20101110.2 =
165
+ * Missing `<` in main.php
166
+ * Added conditional checks for licence.txt OR Licence tags in style.css
167
+ * UI improvements.
168
+
169
+ = 20101110.1 =
170
+ * Date fix!
171
+
172
+ = 10112010_r1 =
173
+ * Fixed hardcoded links check. Added FAQ
174
+
175
+ = 10112010 =
176
+ * First release.
theme-check.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Theme Check
4
+ Plugin URI: http://ottopress.com/wordpress-plugins/theme-check/
5
+ Description: A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!
6
+ Author: Pross, Otto42
7
+ Author URI: http://ottopress.com
8
+ Version: 20140929.1
9
+ Text Domain: theme-check
10
+ */
11
+
12
+ class ThemeCheckMain {
13
+ function __construct() {
14
+ add_action( 'admin_init', array( $this, 'tc_i18n' ) );
15
+ add_action( 'admin_menu', array( $this, 'themecheck_add_page' ) );
16
+ }
17
+
18
+ function tc_i18n() {
19
+ load_plugin_textdomain( 'theme-check', false, 'theme-check/lang' );
20
+ }
21
+
22
+ function load_styles() {
23
+ wp_enqueue_style('style', plugins_url( 'assets/style.css', __FILE__ ), null, null, 'screen');
24
+ }
25
+
26
+ function themecheck_add_page() {
27
+ $page = add_theme_page( 'Theme Check', 'Theme Check', 'manage_options', 'themecheck', array( $this, 'themecheck_do_page' ) );
28
+ add_action('admin_print_styles-' . $page, array( $this, 'load_styles' ) );
29
+ }
30
+
31
+ function tc_add_headers( $extra_headers ) {
32
+ $extra_headers = array( 'License', 'License URI', 'Template Version' );
33
+ return $extra_headers;
34
+ }
35
+
36
+ function themecheck_do_page() {
37
+ if ( !current_user_can( 'manage_options' ) ) {
38
+ wp_die( __( 'You do not have sufficient permissions to access this page.', 'theme-check' ) );
39
+ }
40
+
41
+ add_filter( 'extra_theme_headers', array( $this, 'tc_add_headers' ) );
42
+
43
+ include 'checkbase.php';
44
+ include 'main.php';
45
+
46
+ echo '<div id="theme-check" class="wrap">';
47
+ echo '<div id="icon-themes" class="icon32"><br /></div><h2>Theme-Check</h2>';
48
+ echo '<div class="theme-check">';
49
+ tc_form();
50
+ if ( !isset( $_POST[ 'themename' ] ) ) {
51
+ tc_intro();
52
+
53
+ }
54
+
55
+ if ( isset( $_POST[ 'themename' ] ) ) {
56
+ if ( isset( $_POST[ 'trac' ] ) ) define( 'TC_TRAC', true );
57
+ check_main( $_POST[ 'themename' ] );
58
+ }
59
+ echo '</div> <!-- .theme-check-->';
60
+ echo '</div>';
61
+ }
62
+ }
63
+ new ThemeCheckMain;