Changeset 10357
- Timestamp:
- 10/11/2020 03:40:09 PM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/translation-row-editor.php
r9814 r10357 206 206 </div> 207 207 <?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 ); ?> 209 209 <?php else : ?> 210 210 <p class="info"> … … 221 221 222 222 <?php 223 if ( has_action( 'wporg_translate_suggestions' ) ) {223 if ( $can_edit && has_action( 'wporg_translate_suggestions' ) ) { 224 224 ?> 225 225 <div class="suggestions-wrapper"> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions/inc/class-plugin.php
r9559 r10357 105 105 */ 106 106 public function pre_tmpl_load( $template, $args ) { 107 if ( 'translations' !== $template || ! is _user_logged_in() ) {107 if ( 'translations' !== $template || ! isset( $args['translation_set']->id ) || ! GP::$permission->current_user_can( 'edit', 'translation-set', $args['translation_set']->id ) ) { 108 108 return; 109 109 } … … 143 143 */ 144 144 public function extend_translation_suggestions( $entry ) { 145 if ( ! is _user_logged_in() ) {145 if ( ! isset( $entry->translation_set_id ) || ! GP::$permission->current_user_can( 'edit', 'translation-set', $entry->translation_set_id ) ) { 146 146 return; 147 147 }
Note: See TracChangeset
for help on using the changeset viewer.