Changeset 9920 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-readme-validator.php
- Timestamp:
- 05/25/2020 06:21:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-readme-validator.php
r6842 r9920 12 12 ?> 13 13 <div class="wrap"> 14 <h2><?php _e( 'WordPress Plugin readme.txt Validator', 'wporg-plugins' ); ?></h2>15 16 14 <?php 17 15 if ( $_POST ) { … … 77 75 foreach ( $error_types as $field => $warning_label ) { 78 76 if ( ! empty( $errors[ $field ] ) ) { 79 $output .= "{$warning_label}\n<ul class='{$field} error'>\n"; 77 if ( 'errors' === $field ) { 78 $class = 'error'; 79 } elseif ( 'warnings' === $field ) { 80 $class = 'warning'; 81 } else { 82 $class = 'info'; 83 } 84 85 $output .= "<h3>{$warning_label}</h3>\n"; 86 $output .= "<div class='notice notice-{$class} notice-alt'>\n"; 87 $output .= "<ul class='{$field}'>\n"; 80 88 foreach ( $errors[ $field ] as $notice ) { 81 89 $output .= "<li>{$notice}</li>\n"; 82 90 } 83 91 $output .= "</ul>\n"; 92 $output .= "</div>\n"; 84 93 } 85 94 }
Note: See TracChangeset
for help on using the changeset viewer.