Making WordPress.org


Ignore:
Timestamp:
08/15/2023 02:30:49 AM (3 years ago)
Author:
dd32
Message:

HelpScout: Display the close reason in the plugin widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/helpscout/plugins-themes.php

    r12651 r12844  
    157157                        case 'closed':
    158158                        case 'disabled':
    159                                 $post_status = '(' . ucwords( $post->post_status ) . ')';
     159                                $post_status = ucwords( $post->post_status );
     160                                // This is not perfect, but close enough.
     161                                if ( $post->_close_reason ) {
     162                                        $post_status .= ': ' . ucwords( str_replace( '-', ' ', $post->_close_reason ) );
     163                                }
     164                                $post_status = "({$post_status})";
    160165                                $style       = 'color: red;';
    161166                                break;
Note: See TracChangeset for help on using the changeset viewer.