Skip to content

Commit

Permalink
Show expired dates as red in admin.
Browse files Browse the repository at this point in the history
  • Loading branch information
benhuson committed May 14, 2014
1 parent 6ffe667 commit b3400e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin/expire-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function manage_users_custom_column( $value, $column_name, $user_id ) {
$value = date( get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ), $expire_date );
if ( $expired == 'Y' ) {
$value = date( get_option( 'date_format' ), $expire_date );
$value = '<strong>' . $value . '</strong> <em>' . __( '(expired)', 'expire-users' ) . '</em>';
$value = '<span class="expire-user-expired"><strong>' . $value . '</strong> <em>' . __( '(expired)', 'expire-users' ) . '</em></span>';
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
width: 40px;
}

.expire-user-expired {
color: #a00;
}

/**
* Expire Notifications Table
Expand Down
2 changes: 1 addition & 1 deletion includes/expire-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function get_expire_date_display( $args = null ) {
$args = wp_parse_args( $args, array(
'date_format' => _x( get_option( 'date_format' ) . ' @ ' . get_option( 'time_format' ), 'display date format', 'expire-users' ),
'expires_format' => __( 'Expires: <strong>%s</strong>', 'expire-users' ),
'expired_format' => __( 'Expired: <strong>%s</strong>', 'expire-users' ),
'expired_format' => __( 'Expired: <strong class="expire-user-expired">%s</strong>', 'expire-users' ),
'never_expire' => __( 'Expire: <strong>Never</strong>', 'expire-users' ),
) );
$date = '';
Expand Down

0 comments on commit b3400e1

Please sign in to comment.