Making WordPress.org

Changeset 4847


Ignore:
Timestamp:
01/31/2017 11:55:01 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Add reporter's username to "This post has been flagged as spam" notice.

Fixes #2379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/functions.php

    r4844 r4847  
    242242            if ( 'spam' === $post_status ) {
    243243                $notice_class = 'warning';
    244                 $notice = __( 'This post has been flagged as spam.', 'wporg-forums' );
     244
     245                $reporter = get_post_meta( get_the_ID(), '_bbp_akismet_user', true );
     246
     247                if ( $reporter ) {
     248                    /* translators: %s: reporter's username */
     249                    $notice = sprintf( __( 'This post has been flagged as spam by %s.', 'wporg-forums' ), $reporter );
     250                } else {
     251                    $notice = __( 'This post has been flagged as spam.', 'wporg-forums' );
     252                }
    245253            } else {
    246254                $notice = __( 'This post is currently pending.', 'wporg-forums' );
Note: See TracChangeset for help on using the changeset viewer.