Making WordPress.org

Ticket #2693: 2693.diff

File 2693.diff, 2.7 KB (added by Ipstenu, 8 years ago)

Better messages

  • wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

     
    237237
    238238                switch ( $post->post_status ) {
    239239                        case 'draft':
     240                                $message = __( 'This plugin is newly requested and has not yet been reviewed.', 'wporg-plugins' );
     241                                $type    = 'notice-info';
     242                                break;
     243
    240244                        case 'pending':
    241                                 $message = __( 'This plugin is requested and not visible to the public yet.', 'wporg-plugins' );
    242                                 if ( ! $is_admin ) {
    243                                         $message .= ' ' . __( 'Please be patient as your plugin gets reviewed.', 'wporg-plugins' );
    244                                 }
     245                                $message = __( 'This plugin has been reviewed and is currently waiting on developer feedback.', 'wporg-plugins' );
     246                                $type    = 'notice-warning';
    245247                                break;
    246248
    247249                        case 'rejected':
    248                                 $message = __( 'This plugin is rejected and is not visible to the public.', 'wporg-plugins' );
    249                                 $type    = 'error';
     250                                $message = __( 'This plugin has been rejected and is not visible to the public.', 'wporg-plugins' );
     251                                $type    = 'notice-error';
    250252                                break;
    251253
    252254                        case 'approved':
    253                                 $message = __( 'This plugin is approved and awaiting data upload but not visible to the public yet.', 'wporg-plugins' );
    254                                 if ( ! $is_admin ) {
    255                                         $message .= ' ' . __( 'Once you make your first commit, the plugin will become public.', 'wporg-plugins' );
    256                                 }
     255                                $message = __( 'This plugin is approved and awaiting data upload. It is not yet visible to the public.', 'wporg-plugins' );
    257256                                break;
    258257
    259258                        case 'closed':
    260                                 $message = __( 'This plugin is closed and is not visible to the public.', 'wporg-plugins' );
    261                                 $type    = 'error';
     259                                $message = __( 'This plugin is closed and no longer available for use.', 'wporg-plugins' );
     260                                $type    = 'notice-error';
    262261                                break;
    263262
    264263                        case 'disabled':
    265                                 $message = __( 'This plugin is closed and is not visible to the public.', 'wporg-plugins' );
    266                                 $type    = 'error';
    267                                 if ( $is_admin ) {
    268                                         $message = __( 'This plugin is disabled (closed, but actively serving updates) and is not visible to the public.', 'wporg-plugins' );
    269                                 }
     264                                $message = __( 'This plugin is disabled (closed, but actively serving updates).', 'wporg-plugins' );
     265                                $type    = 'notice-warning';
    270266                                break;
    271267                }
    272268
    273269                if ( $message ) {
    274                         add_settings_error( 'wporg-plugins', 'status-notice', $message, $type );
     270                        printf( '<div class="notice %1$s"><p>%2$s</p></div>', esc_attr( $type ), esc_html( $message ) );
    275271                }
    276272        }
    277273