Ticket #2705: 2705.patch
File 2705.patch, 1.2 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-readme-validator.php
52 52 return; 53 53 } 54 54 55 $error_count = 0; 55 56 $error_types = array( 56 57 'errors' => __( 'Fatal Errors:', 'wporg-plugins' ), 57 58 'warnings' => __( 'Warnings:', 'wporg-plugins' ), 58 59 'notes' => __( 'Notes:', 'wporg-plugins' ) 59 60 ); 61 60 62 foreach ( $error_types as $field => $warning_label ) { 61 63 if ( !empty( $errors[ $field ] ) ) { 62 64 echo "{$warning_label}\n<ul class='{$field} error'>\n"; … … 64 66 echo "<li>{$notice}</li>\n"; 65 67 } 66 68 echo "</ul>\n"; 69 $error_count++; 67 70 } 68 71 } 72 73 if ( ! $error_count ) { 74 echo '<div class="notice notice-success notice-alt">'; 75 echo '<p>' . __( 'Congratulations! No errors found.', 'wporg-plugins' ) . '</p>'; 76 echo '</div>'; 77 } 69 78 } 70 79 }