Making WordPress.org

Changeset 4988


Ignore:
Timestamp:
02/22/2017 08:15:20 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Add moderator's username to the notice displayed for archived and pending posts.

Fixes #2474.

File:
1 edited

Legend:

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

    r4973 r4988  
    252252                        }
    253253                } elseif ( 'archived' === $post_status ) {
    254                         $notice = __( 'This post is currently archived.', 'wporg-forums' );
     254                        $moderator = get_post_meta( get_the_ID(), '_wporg_bbp_moderator', true );
     255
     256                        if ( $moderator ) {
     257                                /* translators: %s: moderator's username */
     258                                $notice = sprintf( __( 'This post has been archived by %s.', 'wporg-forums' ), $moderator );
     259                        } else {
     260                                $notice = __( 'This post is currently archived.', 'wporg-forums' );
     261                        }
    255262                } else {
    256                         $notice = __( 'This post is currently pending.', 'wporg-forums' );
     263                        $moderator = get_post_meta( get_the_ID(), '_wporg_bbp_moderator', true );
     264
     265                        if ( $moderator ) {
     266                                /* translators: %s: moderator's username */
     267                                $notice = sprintf( __( 'This post has been unapproved by %s.', 'wporg-forums' ), $moderator );
     268                        } else {
     269                                $notice = __( 'This post is currently pending.', 'wporg-forums' );
     270                        }
    257271                }
    258272
Note: See TracChangeset for help on using the changeset viewer.