WordPress.org

Make WordPress Core

Ticket #17609: 17609-new-strings.diff

File 17609-new-strings.diff, 1.2 KB (added by mfields, 7 years ago)
  • wp-admin/edit-form-advanced.php

     
    6565        $_GET['message'] = absint( $_GET['message'] );
    6666        if ( isset($messages[$post_type][$_GET['message']]) )
    6767                $message = $messages[$post_type][$_GET['message']];
    68         elseif ( !isset($messages[$post_type]) && isset($messages['post'][$_GET['message']]) )
     68        elseif ( ! isset( $messages[$post_type] ) && isset( $messages['post'][$_GET['message']] ) ) {
     69                $post_type_object = get_post_type_object( $post_type );
     70                if ( ! $post_type_object->publicly_queryable ) {
     71                        $messages['post'][1] = __( 'Post updated.' );
     72                        $messages['post'][6] = __( 'Post published.' );
     73                        $messages['post'][8] = __( 'Post submitted.' );
     74                        $messages['post'][9] = sprintf( __( 'Post scheduled for: <strong>%1$s</strong>.' ),
     75                                // translators: Publish box date format, see http://php.net/date
     76                                date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ) );
     77                        $messages['post'][10] = __( 'Post draft updated.' );
     78                }
    6979                $message = $messages['post'][$_GET['message']];
     80        }
    7081}
    7182
    7283$notice = false;