Make WordPress Core

Ticket #21442: theme-check.21442.diff

File theme-check.21442.diff, 2.9 KB (added by Otto42, 10 years ago)

diff for theme-check trunk

  • checks/style_tags.php

     
    1313                }
    1414
    1515                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' );
    1717                        return $ret;
    1818                }
    1919
    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");
    2121
    2222                foreach( $data[ 'Tags' ] as $tag ) {
    2323                        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                                }
    2630                        }
    2731                }
    2832