Ticket #21442: theme-check.21442.diff
| File theme-check.21442.diff, 2.9 KB (added by , 12 years ago) |
|---|
-
checks/style_tags.php
13 13 } 14 14 15 15 if ( !$data[ 'Tags' ] ) { 16 $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: <strong>Tags:</strong> is either empty or missing in style.css header.", "theme-check");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 17 return $ret; 18 18 } 19 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- width","flexible-width","flexible-header", "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");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","flexible-layout","responsive-layout","flexible-header", "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 21 22 22 foreach( $data[ 'Tags' ] as $tag ) { 23 23 if ( !in_array( strtolower( $tag ), $allowed_tags ) ) { 24 $this->error[] = sprintf(__('<span class="tc-lead tc-warning">WARNING</span>: Found wrong tag, remove <strong>%1$s</strong> from your style.css header.', 'theme-check'), $tag); 25 $ret = false; 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 flexible-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 } 26 30 } 27 31 } 28 32