Changeset 3450
- Timestamp:
- 06/19/2016 08:52:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-readme-validator.php
r3448 r3450 37 37 <div class="wrap"> 38 38 <h2><?php _e( 'WordPress Plugin readme.txt Validator', 'wporg-plugins' ); ?></h2> 39 <?php settings_errors( 'wporg-plugins-readme' ); ?> 39 40 <form method="post" action="<?php echo esc_url( add_query_arg( array( 'post_type' => 'plugin', 'page' => 'readme_validator' ), admin_url( 'edit.php' ) ) ); ?>"> 40 41 <?php … … 75 76 $warnings = array(); 76 77 $notes = array(); 77 78 78 if ( ! empty( $_REQUEST['readme_url'] ) ) { 79 79 $url = esc_url_raw( $_REQUEST['readme_url'] ); … … 81 81 if ( strtolower( substr( $url, -10 ) ) != 'readme.txt' ) { 82 82 /* Translators: File name; */ 83 add_settings_error( 'wporg-plugins ', 'readme-validator', sprintf( __( 'URL must end in %s!', 'wporg-plugins' ), '<code>readme.txt</code>' ) );83 add_settings_error( 'wporg-plugins-readme', 'readme-validator', sprintf( __( 'URL must end in %s!', 'wporg-plugins' ), '<code>readme.txt</code>' ) ); 84 84 return; 85 85 } 86 86 87 87 if ( ! $readme = @file_get_contents( $url ) ) { 88 add_settings_error( 'wporg-plugins ', 'readme-validator', __( 'Invalid readme.txt URL.', 'wporg-plugins' ) );88 add_settings_error( 'wporg-plugins-readme', 'readme-validator', __( 'Invalid readme.txt URL.', 'wporg-plugins' ) ); 89 89 return; 90 90 } … … 104 104 if ( empty( $readme->name ) ) { 105 105 /* Translators: Plugin header tag; */ 106 add_settings_error( 'wporg-plugins ', 'readme-validator', sprintf( __( "Fatal Error:\nNo plugin name detected. Plugin names look like: %s", 'wporg-plugins' ), '<code>=== Plugin Name ===</code>' ) );106 add_settings_error( 'wporg-plugins-readme', 'readme-validator', sprintf( __( "Fatal Error:\nNo plugin name detected. Plugin names look like: %s", 'wporg-plugins' ), '<code>=== Plugin Name ===</code>' ) ); 107 107 return; 108 108 } … … 144 144 $message .= "</ul>\n</div>"; 145 145 146 add_settings_error( 'wporg-plugins ', 'readme-validator', $message, 'notice-warning' );146 add_settings_error( 'wporg-plugins-readme', 'readme-validator', $message, 'notice-warning' ); 147 147 return; 148 148 } … … 184 184 $message .= "</ul>\n</div>"; 185 185 186 add_settings_error( 'wporg-plugins ', 'readme-validator', $message, 'notice-info' );186 add_settings_error( 'wporg-plugins-readme', 'readme-validator', $message, 'notice-info' ); 187 187 return; 188 188 } 189 189 190 190 /* Translators: File name; */ 191 add_settings_error( 'wporg-plugins ', 'readme-validator', sprintf( __( 'Your %s rocks. Seriously. Flying colors.', 'wporg-plugins' ), '<code>readme.txt</code>' ), 'updated' );191 add_settings_error( 'wporg-plugins-readme', 'readme-validator', sprintf( __( 'Your %s rocks. Seriously. Flying colors.', 'wporg-plugins' ), '<code>readme.txt</code>' ), 'updated' ); 192 192 } 193 193
Note: See TracChangeset
for help on using the changeset viewer.