WordPress.org

Making WordPress.org

Changeset 7129


Ignore:
Timestamp:
04/18/2018 04:31:36 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Support Theme: Make Slack URL and moderation timeframe in pending posts notice translatable.

Props felipeelia, tobifjellner.
Fixes #3583.

File:
1 edited

Legend:

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

    r7128 r7129  
    405405    elseif ( in_array( $post->post_status, array( 'pending', 'spam' ) ) ) :
    406406
     407        /* translators: Number of hours the user should wait for a pending post to get approved before contacting moderators. */
     408        $moderation_timeframe = (int) __( '96', 'wporg-forums' );
     409        if ( ! $moderation_timeframe ) {
     410            $moderation_timeframe = 96;
     411        }
     412
    407413        if ( $is_user_blocked ) {
    408414            // Blocked users get a generic message with no call to action or moderation timeframe.
    409415            $notices[] = __( 'This post has been held for moderation by our automated system.', 'wporg-forums' );
    410         } elseif ( $hours_passed > 96 ) {
     416        } elseif ( $hours_passed > $moderation_timeframe ) {
    411417            $notice_class = 'warning';
    412418            $notices[]    = sprintf(
    413                 /* translators: %s: https://make.wordpress.org/chat/ */
     419                /* translators: %s: WordPress Slack URL */
    414420                __( 'This post was held for moderation by our automated system but has taken longer than expected to get approved. Please come to the #forums channel on <a href="%s">WordPress Slack</a> and let us know. Provide a link to the post.', 'wporg-forums' ),
    415                 'https://make.wordpress.org/chat/'
     421                esc_url( __( 'https://make.wordpress.org/chat/', 'wporg-forums' ) )
    416422            );
    417423        } else {
Note: See TracChangeset for help on using the changeset viewer.