Changeset 12003
- Timestamp:
- 08/01/2022 10:47:56 AM (2 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/gp-translation-helpers.php
r11837 r12003 35 35 require_once __DIR__ . '/includes/class-gp-notifications.php'; 36 36 require_once __DIR__ . '/includes/class-wporg-notifications.php'; 37 37 38 38 39 add_action( 'gp_init', array( 'GP_Translation_Helpers', 'init' ) ); 39 40 add_action( 'gp_init', array( 'WPorg_GlotPress_Notifications', 'init' ) ); // todo: include this class in a different plugin. 41 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/helpers-assets/templates/translation-discussion-comments.php
r11999 r12003 60 60 </ul><!-- .discussion-list --> 61 61 <?php 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 62 83 add_action( 63 84 'comment_form_logged_in_after', 64 function () use ( $locale_slug ) { 65 $language_question = ''; 66 67 if ( $locale_slug ) { 68 $gp_locale = GP_Locales::by_slug( $locale_slug ); 69 if ( $gp_locale ) { 70 $language_question = '<option value="question">Question about translating to ' . esc_html( $gp_locale->english_name ) . '</option>'; 71 } 72 } 85 function () use ( $locale_slug, $options ) { 86 /** 87 * Filters the options. 88 * 89 * @param string $options The options for the select element. 90 * @param string $locale_slug The slug of the current locale. 91 * 92 *@since 0.0.2 93 */ 94 $options = apply_filters( 'gp_discussion_new_comment_options', $options, $locale_slug ); 73 95 74 96 echo '<p class="comment-form-topic"> 75 <label for="comment_topic">Topic <span class="required" aria-hidden="true">*</span> (required)</label> 76 <select required name="comment_topic" id="comment_topic"> 77 <option value="">Select topic</option> 78 <option value="typo">Typo in the English text</option> 79 <option value="context">Where does this string appear? (more context)</option>' . 80 wp_kses( $language_question, array( 'option' => array( 'value' => true ) ) ) . 81 '</select> 82 </p>'; 97 <label for="comment_topic">Topic <span class="required" aria-hidden="true">*</span> (required)</label> ' . 98 wp_kses( 99 $options, 100 array( 101 'select' => 102 array( 103 'required' => true, 104 'name' => true, 105 'id' => true, 106 ), 107 'optgroup' => 108 array( 109 'label' => true, 110 ), 111 'option' => 112 array( 113 'value' => true, 114 ), 115 ) 116 ) . 117 '</p>'; 83 118 }, 84 119 10, … … 104 139 'cancel_reply_link' => '<span></span>', 105 140 'format' => 'html5', 106 'class_submit' => 'button is-primary',141 'class_submit' => 'button is-primary', 107 142 'comment_notes_after' => implode( 108 143 "\n", -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/helpers/helper-translation-discussion.php
r11999 r12003 700 700 * Throws an exception with an error message if the original id is incorrect. 701 701 * 702 * Used as callback to validate the original_id passed on rejecting a string with feedback702 * Used as callback to validate the original_id passed on ting a string with feedback 703 703 * 704 704 * @since 0.0.2 705 705 * 706 * @param int|string $original_id The id of the original for the rejected translation.706 * @param int|string $original_id The id of the original for the ted translation. 707 707 * 708 708 * @return int|string … … 719 719 720 720 /** 721 * Return an array of allowed rejectionreasons and explanation of each reason.721 * Return an array of allowed reasons and explanation of each reason. 722 722 * 723 723 * @since 0.0.2 … … 725 725 * @return array 726 726 */ 727 public static function get_ reject_reasons(): array {727 public static function get_t_reasons(): array { 728 728 return array( 729 729 'style' => array( … … 824 824 $comment_translation_id = get_comment_meta( $comment->comment_ID, 'translation_id', true ); 825 825 826 $ reject_reason = get_comment_meta( $comment->comment_ID, 'reject_reason', true );826 $t_reason = get_comment_meta( $comment->comment_ID, 'reject_reason', true ); 827 827 828 828 $classes = array( 'comment-locale-' . $comment_locale ); 829 if ( ! empty( $ reject_reason ) ) {829 if ( ! empty( $t_reason ) ) { 830 830 $classes[] = 'rejection-feedback'; 831 831 $classes[] = 'rejection-feedback-' . $comment_locale; … … 876 876 } 877 877 878 if ( $ reject_reason ) :878 if ( $t_reason ) : 879 879 ?> 880 The translation <?php gth_print_translation( $comment_translation_id, $args ); ?> was rejected with <a href="<?php echo esc_url( $linked_comment ); ?>"><?php esc_html_e( 'a reason thatis being discussed here' ); ?></a>.880 The translation <?php gth_print_translation( $comment_translation_id, $args ); ?> is being discussed here' ); ?></a>. 881 881 <?php else : ?> 882 882 <a href="<?php echo esc_url( $linked_comment ); ?>"><?php esc_html_e( 'Please continue the discussion here' ); ?></a> … … 884 884 <?php else : ?> 885 885 <?php comment_text(); ?> 886 <?php if ( $ reject_reason ) : ?>886 <?php if ( $t_reason ) : ?> 887 887 <p> 888 <?php echo esc_html( _n( ' Rejection Reason: ', 'Rejection Reasons: ', count( $reject_reason ) ) ); ?>888 <?php echo esc_html( _n( 't_reason ) ) ); ?> 889 889 <?php 890 $number_of_items = count( $ reject_reason );890 $number_of_items = count( $t_reason ); 891 891 $counter = 0; 892 $ reject_reasons = Helper_Translation_Discussion::get_reject_reasons();893 foreach ( $ reject_reason as $reason ) {892 $t_reasons(); 893 foreach ( $t_reason as $reason ) { 894 894 echo wp_kses( 895 895 sprintf( 896 /* translators: 1: Title with the explanation of the reject reason , 2: The reject reason */896 /* translators: 1: Title with the explanation of the t reason */ 897 897 __( '<span title="%1$s" class="tooltip">%2$s</span> <span class="tooltip dashicons dashicons-info" title="%1$s"></span>', 'glotpress' ), 898 $ reject_reasons[ $reason ]['explanation'],899 $ reject_reasons[ $reason ]['name'],898 $t_reasons[ $reason ]['explanation'], 899 $t_reasons[ $reason ]['name'], 900 900 ), 901 901 array( … … 957 957 if ( ! $is_linking_comment ) : 958 958 if ( $comment_translation_id && $comment_translation_id !== $current_translation_id ) { 959 gth_print_translation( $comment_translation_id, $args, empty( $reject_reason ) ? 'Translation: ' : 'Translation (Rejected): ' );959 gth_print_translation( $comment_translation_id, $args, : ' ); 960 960 } 961 961 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-notifications.php
r11992 r12003 367 367 */ 368 368 public static function get_email_body( WP_Comment $comment, array $comment_meta ): string { 369 $post = get_post( $comment->comment_post_ID ); 370 $project = self::get_project_from_post( $post ); 371 $original = self::get_original( $comment ); 372 $output = ''; 369 $post = get_post( $comment->comment_post_ID ); 370 $project = self::get_project_from_post( $post ); 371 $original = self::get_original( $comment ); 372 $url = GP_Route_Translation_Helpers::get_permalink( $project->path, $original->id ); 373 $link_to_comment = $url . '#comment-' . $comment->comment_ID; 374 $output = ''; 373 375 /** 374 376 * Filters the content of the email at the beginning of the function that gets its content. … … 383 385 $output .= esc_html__( 'Hi there,', 'glotpress' ); 384 386 $output .= '<br><br>'; 385 $url = GP_Route_Translation_Helpers::get_permalink( $project->path, $original->id );386 387 $output .= wp_kses( 387 388 /* translators: The discussion URL where the user can find the comment. */ 388 sprintf( __( 'There is a new comment in a <a href="%1$s">GlotPress discussion</a> that may be of interest to you.', 'glotpress' ), $url),389 sprintf( __( 'There is a ), 389 390 array( 390 391 'a' => array( 'href' => array() ), -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-translation-helpers.php
r11999 r12003 61 61 add_action( 'rest_after_insert_comment', array( 'GP_Notifications', 'init' ), 10, 3 ); 62 62 add_action( 'transition_comment_status', array( 'GP_Notifications', 'on_comment_status_change' ), 10, 3 ); 63 add_action( 'gp_pre_tmpl_load', array( $this, 'register_ reject_feedback_js' ), 10, 2 );64 add_action( 'wp_ajax_ reject_with_feedback', array( $this, 'reject_with_feedback' ) );63 add_action( 'gp_pre_tmpl_load', array( $this, 'register_t_feedback_js' ), 10, 2 ); 64 add_action( 'wp_ajax_t_with_feedback' ) ); 65 65 add_action( 'wp_ajax_optout_discussion_notifications', array( $this, 'optout_discussion_notifications' ) ); 66 66 … … 358 358 * @return void 359 359 */ 360 public function register_ reject_feedback_js( $template, $translation_set ) {360 public function register_t_feedback_js( $template, $translation_set ) { 361 361 362 362 if ( 'translations' !== $template ) { … … 364 364 } 365 365 366 wp_register_script( 'gp- reject-feedback-js', plugins_url( '/../js/reject-feedback.js', __FILE__ ), array( 'jquery', 'gp-common', 'gp-editor', 'thickbox' ), '20220726' );367 gp_enqueue_script( 'gp- reject-feedback-js' );366 wp_register_script( 'gp-t-feedback-js', plugins_url( '/../js/reject-feedback.js', __FILE__ ), array( 'jquery', 'gp-common', 'gp-editor', 'thickbox' ), '20220726' ); 367 gp_enqueue_script( 'gp-t-feedback-js' ); 368 368 369 369 wp_localize_script( 370 'gp- reject-feedback-js',371 '$gp_ reject_feedback_settings',370 'gp-t-feedback-js', 371 '$gp_t_feedback_settings', 372 372 array( 373 'url' => admin_url( 'admin-ajax.php' ),374 'nonce' => wp_create_nonce( 'gp_reject_feedback' ),375 'locale_slug' => $translation_set['locale_slug'],376 ' reject_reasons' => Helper_Translation_Discussion::get_reject_reasons(),373 'url' => admin_url( 'admin-ajax.php' ), 374 'nonce' t_feedback' ), 375 'locale_slug' => $translation_set['locale_slug'], 376 't_reasons(), 377 377 ) 378 378 ); … … 380 380 381 381 /** 382 * Is called from the AJAX request in reject-feedback.js to submit a rejectionfeedback.382 * Is called from the AJAX request in reject-feedback.js to submit a feedback. 383 383 * 384 384 * @since 0.0.2 … … 386 386 * @return void 387 387 */ 388 public function reject_with_feedback() {389 check_ajax_referer( 'gp_ reject_feedback', 'nonce' );388 public function t_with_feedback() { 389 check_ajax_referer( 'gp_t_feedback', 'nonce' ); 390 390 391 391 $helper_discussion = new Helper_Translation_Discussion(); … … 393 393 $translation_id_array = ! empty( $_POST['data']['translation_id'] ) ? array_map( array( $helper_discussion, 'sanitize_translation_id' ), $_POST['data']['translation_id'] ) : null; 394 394 $original_id_array = ! empty( $_POST['data']['original_id'] ) ? array_map( array( $helper_discussion, 'sanitize_original_id' ), $_POST['data']['original_id'] ) : null; 395 $ reject_reason= ! empty( $_POST['data']['reason'] ) ? $_POST['data']['reason'] : array( 'other' );396 $all_ reject_reasons = array_keys( Helper_Translation_Discussion::get_reject_reasons() );397 $ reject_reason= array_filter(398 $ reject_reason,399 function( $reason ) use ( $all_ reject_reasons ) {400 return in_array( $reason, $all_ reject_reasons );401 } 402 ); 403 $ reject_comment= sanitize_text_field( $_POST['data']['comment'] );404 405 if ( ! $locale_slug || ! $translation_id_array || ! $original_id_array || ( ! $ reject_reason && ! $reject_comment ) ) {395 $ = ! empty( $_POST['data']['reason'] ) ? $_POST['data']['reason'] : array( 'other' ); 396 $all_t_reasons() ); 397 $ = array_filter( 398 $t_reason, 399 function( $reason ) use ( $all_t_reasons ) { 400 return in_array( $reason, $all_t_reasons ); 401 } 402 ); 403 $ = sanitize_text_field( $_POST['data']['comment'] ); 404 405 if ( ! $locale_slug || ! $translation_id_array || ! $original_id_array || ( ! $comment ) ) { 406 406 wp_send_json_error(); 407 407 } … … 412 412 413 413 // Post comment on discussion page for the first string 414 $first_comment_id = $this->insert_ reject_comment( $reject_comment, $first_original_id, $reject_reason, $first_translation_id, $locale_slug, $_SERVER );414 $first_comment_id = $this->insert_t_reason, $first_translation_id, $locale_slug, $_SERVER ); 415 415 416 416 if ( ! empty( $original_id_array ) && ! empty( $translation_id_array ) ) { 417 417 // For other strings post link to the comment. 418 $ reject_comment = get_comment_link( $first_comment_id );418 $comment = get_comment_link( $first_comment_id ); 419 419 foreach ( $original_id_array as $index => $single_original_id ) { 420 $comment_id = $this->insert_ reject_comment( $reject_comment, $single_original_id, $reject_reason, $translation_id_array[ $index ], $locale_slug, $_SERVER );420 $comment_id = $this->insert_t_reason, $translation_id_array[ $index ], $locale_slug, $_SERVER ); 421 421 $comment = get_comment( $comment_id ); 422 422 GP_Notifications::add_related_comment( $comment ); … … 464 464 465 465 /** 466 * Inserts rejection feedback as WordPress comment 467 * 466 * Inserts feedback as WordPress comment. 467 * 468 * @param string $comment Feedback entered by reviewer. 469 * @param int $original_id ID of the original where the comment will be added. 470 * @param array $reason Reason(s) for comment. 471 * @param string $translation_id ID of the commented translation. 472 * @param string $locale_slug Locale of the commented translation. 473 * @param array $server The $_SERVER array 474 * 475 * @return false|int 468 476 * @since 0.0.2 469 * 470 * @param string $reject_comment Feedback entered by reviewer. 471 * @param int $original_id ID of the original where the comment will be added. 472 * @param array $reject_reason Reason(s) for rejection. 473 * @param string $translation_id ID of the rejected translation. 474 * @param string $locale_slug Locale of the rejected translation. 475 * @param array $server The $_SERVER array 476 * 477 * @return false|int 478 */ 479 private function insert_reject_comment( $reject_comment, $original_id, $reject_reason, $translation_id, $locale_slug, $server ) { 477 */ 478 private function insert_comment( $comment, $original_id, $reason, $translation_id, $locale_slug, $server ) { 480 479 $post_id = Helper_Translation_Discussion::get_or_create_shadow_post_id( $original_id ); 481 480 $user = wp_get_current_user(); … … 487 486 'comment_author_url' => $user->user_url, 488 487 'comment_author_IP' => sanitize_text_field( $server['REMOTE_ADDR'] ), 489 'comment_content' => $ reject_comment,488 'comment_content' => $comment, 490 489 'comment_agent' => sanitize_text_field( $server['HTTP_USER_AGENT'] ), 491 490 'user_id' => $user->ID, 492 491 'comment_meta' => array( 493 'reject_reason' => $re ject_reason,492 'reject_reason' => $reason, 494 493 'translation_id' => $translation_id, 495 494 'locale' => $locale_slug, -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-wporg-notifications.php
r11921 r12003 298 298 */ 299 299 public static function get_email_body( WP_Comment $comment, ?array $comment_meta ): ?string { 300 $project = self::get_project_from_post_id( $comment->comment_post_ID ); 301 $original = self::get_original( $comment->comment_post_ID ); 302 $output = esc_html__( 'Hi:' ); 303 $output .= '<br><br>'; 304 $output .= esc_html__( 'There is a new comment in a discussion of the WordPress translation system that may be of interest to you.' ); 305 $output .= '<br>'; 306 $output .= esc_html__( 'It would be nice if you have some time to review this comment and reply to it if needed.' ); 307 $output .= '<br><br>'; 308 $url = GP_Route_Translation_Helpers::get_permalink( $project->path, $original->id ); 309 $output .= '- <strong>' . esc_html__( 'Discussion URL: ' ) . '</strong><a href="' . $url . '">' . $url . '</a><br>'; 300 $project = self::get_project_from_post_id( $comment->comment_post_ID ); 301 $original = self::get_original( $comment->comment_post_ID ); 302 $url = GP_Route_Translation_Helpers::get_permalink( $project->path, $original->id ); 303 $link_to_comment = $url . '#comment-' . $comment->comment_ID; 304 $output = esc_html__( 'Hi:' ); 305 $output .= '<br><br>'; 306 $output .= wp_kses( 307 /* translators: The comment URL where the user can find the comment. */ 308 sprintf( __( 'There is a <a href="%1$s">new comment in a discussion</a> of the WordPress translation system that may be of interest to you.', 'glotpress' ), $link_to_comment ), 309 array( 310 'a' => array( 'href' => array() ), 311 ) 312 ) . '<br>'; 313 $output .= esc_html__( 'It would be nice if you have some time to review this comment and reply to it if needed.' ); 314 $output .= '<br><br>'; 315 $output .= '- <strong>' . esc_html__( 'Discussion URL: ' ) . '</strong><a href="' . $url . '">' . $url . '</a><br>'; 310 316 if ( array_key_exists( 'locale', $comment_meta ) && ( ! empty( $comment_meta['locale'][0] ) ) ) { 311 317 $output .= '- <strong>' . esc_html__( 'Locale: ' ) . '</strong>' . esc_html( $comment_meta['locale'][0] ) . '<br>'; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/js/reject-feedback.js
r11999 r12003 1 /* global $gp, $gp_ reject_feedback_settings, document, tb_show */1 /* global $gp, $gp_t_feedback_settings, document, tb_show */ 2 2 ( function( $, $gp ) { 3 3 $( document ).ready( … … 59 59 $( 'body' ).on( 'click', '#modal-reject-btn', function( e ) { 60 60 var comment = ''; 61 var rejectReason = [];62 var rejectData = {};61 var tReason = []; 62 var tData = {}; 63 63 var form = $( this ).closest( 'form' ); 64 64 65 65 form.find( 'input[name="modal_feedback_reason"]:checked' ).each( 66 66 function() { 67 rejectReason.push( this.value );67 tReason.push( this.value ); 68 68 } 69 69 ); … … 71 71 comment = form.find( 'textarea[name="modal_feedback_comment"]' ).val(); 72 72 73 if ( ( ! comment.trim().length && ! rejectReason.length ) || ( ! translationIds.length || ! originalIds.length ) ) {73 if ( ( ! comment.trim().length && ! tReason.length ) || ( ! translationIds.length || ! originalIds.length ) ) { 74 74 $( 'form.filters-toolbar.bulk-actions, form#bulk-actions-toolbar-top' ).submit(); 75 75 } 76 76 77 rejectData.locale_slug = $gp_reject_feedback_settings.locale_slug;78 rejectData.reason = rejectReason;79 rejectData.comment = comment;80 rejectData.original_id = originalIds;81 rejectData.translation_id = translationIds;82 rejectData.is_bulk_reject = true;83 rejectWithFeedback( rejectData);77 t_feedback_settings.locale_slug; 78 tReason; 79 tData.comment = comment; 80 tData.original_id = originalIds; 81 tData.translation_id = translationIds; 82 tData.is_bulk_reject = true; 83 ); 84 84 e.preventDefault(); 85 85 } ); … … 91 91 ); 92 92 93 94 95 96 97 98 99 100 93 101 $gp.editor.hooks.set_status_rejected = function() { 94 var button = $( this ); 95 var rejectData = {}; 96 var rejectReason = []; 102 setStatus( $( this ), 'rejected' ); 103 }; 104 105 function setStatus( that, status ) { 106 var button = $( that ); 107 var feedbackData = {}; 108 var commentReason = []; 97 109 var comment = ''; 98 110 var div = button.closest( 'div.meta' ); … … 100 112 div.find( 'input[name="feedback_reason"]:checked' ).each( 101 113 function() { 102 rejectReason.push( this.value );114 tReason.push( this.value ); 103 115 } 104 116 ); … … 106 118 comment = div.find( 'textarea[name="feedback_comment"]' ).val(); 107 119 108 if ( ! comment.trim().length && ! rejectReason.length ) {109 $gp.editor.set_status( button, 'rejected');120 if ( ! comment.trim().length && ! tReason.length ) { 121 $gp.editor.set_status( button, ); 110 122 return; 111 123 } 112 124 113 rejectData.locale_slug = $gp_reject_feedback_settings.locale_slug;114 rejectData.reason = rejectReason;115 rejectData.comment = comment;116 rejectData.original_id = [ $gp.editor.current.original_id ];117 rejectData.translation_id = [ $gp.editor.current.translation_id ];125 t_feedback_settings.locale_slug; 126 tReason; 127 Data.comment = comment; 128 Data.original_id = [ $gp.editor.current.original_id ]; 129 Data.translation_id = [ $gp.editor.current.translation_id ]; 118 130 119 rejectWithFeedback( rejectData, button);120 } ;131 ); 132 } 121 133 122 function rejectWithFeedback( rejectData, button) {134 function ) { 123 135 var data = {}; 124 136 var div = {}; … … 128 140 129 141 data = { 130 action: ' reject_with_feedback',131 data: rejectData,142 action: 't_with_feedback', 143 data: Data, 132 144 133 _ajax_nonce: $gp_ reject_feedback_settings.nonce,145 _ajax_nonce: $gp_t_feedback_settings.nonce, 134 146 }; 135 147 … … 138 150 type: 'POST', 139 151 140 url: $gp_ reject_feedback_settings.url,152 url: $gp_t_feedback_settings.url, 141 153 data: data, 142 154 } 143 155 ).done( 144 156 function() { 145 if ( rejectData.is_bulk_reject ) {157 if ( Data.is_bulk_reject ) { 146 158 $( 'form.filters-toolbar.bulk-actions, form#bulk-actions-toolbar-top' ).submit(); 147 159 } else { 148 $gp.editor.set_status( button, 'rejected');160 $gp.editor.set_status( button, ); 149 161 div.find( 'input[name="feedback_reason"]' ).prop( 'checked', false ); 150 162 div.find( 'textarea[name="feedback_comment"]' ).val( '' ); … … 164 176 165 177 function getReasonList( ) { 166 var rejectReasons = $gp_reject_feedback_settings.reject_reasons;167 var rejectList = '';178 var t_reasons; 179 var tList = ''; 168 180 var prefix = ''; 169 181 var suffix = ''; … … 171 183 172 184 // eslint-disable-next-line vars-on-top 173 for ( var reason in rejectReasons ) {174 prefix = '<div class="modal-item"><label class="tooltip" title="' + rejectReasons[ reason ].explanation + '">';175 suffix = '</label> <span class="tooltip dashicons dashicons-info" title="' + rejectReasons[ reason ].explanation + '"></span></div>';185 for ( var reason in tReasons ) { 186 prefix = '<div class="modal-item"><label class="tooltip" title="' + tReasons[ reason ].explanation + '">'; 187 suffix = '</label> <span class="tooltip dashicons dashicons-info" title="' + tReasons[ reason ].explanation + '"></span></div>'; 176 188 inputName = 'modal_feedback_reason'; 177 rejectList += prefix + '<input type="checkbox" name="' + inputName + '" value="' + reason + '" /> ' + rejectReasons[ reason ].name + suffix;189 tReasons[ reason ].name + suffix; 178 190 } 179 return rejectList;191 return tList; 180 192 } 181 193 }( jQuery, $gp ) -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/templates/translation-row-editor-meta-feedback.php
r11999 r12003 8 8 <h3 class="feedback-reason-title"><?php esc_html_e( 'Type (Optional)', 'glotpress' ); ?></h3> 9 9 <ul class="feedback-reason-list"> 10 11 $ reject_reasons = Helper_Translation_Discussion::get_reject_reasons();12 foreach ( $reject_reasons as $key => $reason ) :13 10 <?php 11 $t_reasons(); 12 t_reasons as $key => $reason ) : 13 ?> 14 14 <li> 15 15 <label class="tooltip" title="<?php echo esc_attr( $reason['explanation'] ); ?>"><input type="checkbox" name="feedback_reason" value="<?php echo esc_attr( $key ); ?>" /><?php echo esc_html( $reason['name'] ); ?></label><span class="tooltip dashicons dashicons-info" title="<?php echo esc_attr( $reason['explanation'] ); ?>"></span>
Note: See TracChangeset
for help on using the changeset viewer.