WordPress.org

Plugin Directory

Changeset 413393


Ignore:
Timestamp:
07/21/11 17:57:32 (3 years ago)
Author:
pross
Message:

Fix textdomain check for Mel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • theme-check/trunk/checks/textdomain.php

    r346568 r413393  
    77        global $data, $themename; 
    88        $ret = true; 
     9        $error = ''; 
    910        checkcount(); 
    1011        if ( $data['Name'] === 'Twenty Ten' ) return $ret; 
     
    1617        foreach ( $checks as $key => $check ) { 
    1718        checkcount(); 
    18             if ( preg_match( $key, $phpfile, $matches ) ) { 
    19                 $filename = tc_filename( $php_key ); 
    20                 $error = tc_grep( $matches[0], $php_key ); 
    21                 $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: Text domain problems in <strong>{$filename}</strong>. {$check}{$error}", "themecheck" ); 
     19            if ( preg_match_all( $key, $phpfile, $matches ) ) { 
     20                 
     21                    $filename = tc_filename( $php_key ); 
     22                     
     23                    foreach ($matches[0] as $match ) {           
     24                        $error .= tc_grep( $match, $php_key ); 
     25                    } 
     26                    $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: Text domain problems in <strong>{$filename}</strong>. {$check}{$error}", "themecheck" ); 
    2227                } 
    2328            } 
Note: See TracChangeset for help on using the changeset viewer.