Changeset 12274 for sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/helpers/helper-translation-discussion.php
- Timestamp:
- 11/23/2022 06:22:00 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/helpers/helper-translation-discussion.php
r12205 r12274 267 267 } 268 268 269 // phpcs:ignore WordPress.Security.NonceVerification.Missing 270 $locale_exists = isset( $_POST['meta']['locale'] ) && ! empty( $this->sanitize_comment_locale( $_POST['meta']['locale'] ) ); 271 272 // phpcs:ignore WordPress.Security.NonceVerification.Missing 273 $locale_slug = $locale_exists ? $_POST['meta']['locale'] : null; 274 275 $set_slug = $locale_exists ? 'default' : null; 276 269 277 // We were able to gather all information, let's put it in the cache. 270 $cache[ $post->ID ] = GP_Route_Translation_Helpers::get_permalink( $project->path, $original_id );278 $cache[ $post->ID ] = GP_Route_Translation_Helpers::get_permalink( $project->path, $original_id, $set_slug, $locale_slug ); 271 279 272 280 return $cache[ $post->ID ]; … … 562 570 remove_action( 'comment_form_top', 'rosetta_comment_form_support_hint' ); 563 571 564 $post = self::maybe_get_temporary_post( self::get_shadow_post_id( $this->data['original_id'] ) ); 572 $post = self::maybe_get_temporary_post( self::get_shadow_post_id( $this->data['original_id'] ) ); 573 $mentions_list = apply_filters( 'gp_mentions_list', array(), $comments, $this->data['locale_slug'], $this->data['original_id'] ); 574 565 575 $output = gp_tmpl_get_output( 566 576 'translation-discussion-comments', … … 574 584 'project' => $this->data['project'], 575 585 'translation_set_slug' => $this->data['translation_set_slug'], 586 'mentions_list' => $mentions_list, 587 576 588 ), 577 589 $this->assets_dir . 'templates'
Note: See TracChangeset
for help on using the changeset viewer.