Making WordPress.org

Changeset 5268


Ignore:
Timestamp:
04/06/2017 07:42:01 AM (7 years ago)
Author:
tellyworth
Message:

Plugin directory admin: better colors for notices. Props @ipstenu.

Fixes #2676

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

    r5037 r5268  
    232232
    233233        $message  = '';
     234        $type     = 'updated';
    234235        $post     = get_post();
    235236        $is_admin = current_user_can( 'plugin_approve' );
     
    246247            case 'rejected':
    247248                $message = __( 'This plugin is rejected and is not visible to the public.', 'wporg-plugins' );
     249                $type    = 'error';
    248250                break;
    249251
     
    257259            case 'closed':
    258260                $message = __( 'This plugin is closed and is not visible to the public.', 'wporg-plugins' );
     261                $type    = 'error';
    259262                break;
    260263
    261264            case 'disabled':
    262265                $message = __( 'This plugin is closed and is not visible to the public.', 'wporg-plugins' );
     266                $type    = 'error';
    263267                if ( $is_admin ) {
    264268                    $message = __( 'This plugin is disabled (closed, but actively serving updates) and is not visible to the public.', 'wporg-plugins' );
     
    268272
    269273        if ( $message ) {
    270             add_settings_error( 'wporg-plugins', 'status-notice', $message, 'updated' );
     274            add_settings_error( 'wporg-plugins', 'status-notice', $message, $type );
    271275        }
    272276    }
Note: See TracChangeset for help on using the changeset viewer.