Changeset 10357 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions/inc/class-plugin.php
- Timestamp:
- 10/11/2020 03:40:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.