Making WordPress.org


Ignore:
Timestamp:
10/11/2020 03:40:09 PM (4 years ago)
Author:
ocean90
Message:

Translate: Don't show suggestions if user cannot add/edit translations.

See #5471.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/translation-row-editor.php

    r9814 r10357  
    206206                                </div>
    207207                            <?php elseif ( is_user_logged_in() ) : ?>
    208                                 You are not allowed to edit this translation.
     208                                <?php echo apply_filters( 'wporg_translate_cannot_edit_translation_hint', '<p class="info">Sorry, you are not allowed to edit this translation.</p>', $translation ); ?>
    209209                            <?php else : ?>
    210210                                <p class="info">
     
    221221
    222222                    <?php
    223                     if ( has_action( 'wporg_translate_suggestions' ) ) {
     223                    if ( $can_edit && has_action( 'wporg_translate_suggestions' ) ) {
    224224                        ?>
    225225                        <div class="suggestions-wrapper">
Note: See TracChangeset for help on using the changeset viewer.