Making WordPress.org


Ignore:
Timestamp:
02/20/2023 02:50:11 PM (4 years ago)
Author:
amieiro
Message:

Translate: Sync gp-translation-helpers with GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-wporg-customizations.php

    r12274 r12405  
    4545                        );
    4646
     47                        add_filter(
     48                                'gp_custom_reasons',
     49                                function ( $default_reasons, $locale ) {
     50                                        return array_merge( $default_reasons, GP_Custom_Locale_Reasons::get_custom_reasons( $locale ) );
     51                                },
     52                                10,
     53                                2
     54                        );
     55
    4756                        add_filter( 'jetpack_mentions_should_load_ui', '__return_true' );
    4857                        add_filter(
    … …  
    5463                        );
    5564
     65                        add_filter(
     66                                'gp_validators_involved',
     67                                function ( $gtes_involved, $locale_slug, $original_id, $comment_authors ) {
     68                                        $gte_emails   = WPorg_GlotPress_Notifications::get_gte_email_addresses( $locale_slug );
     69                                        $pte_emails   = WPorg_GlotPress_Notifications::get_pte_email_addresses_by_project_and_locale( $original_id, $locale_slug );
     70                                        $clpte_emails = WPorg_GlotPress_Notifications::get_clpte_email_addresses_by_project( $original_id );
     71                                        return array_intersect( array_merge( $gte_emails, $pte_emails, $clpte_emails ), $comment_authors );
     72
     73                                },
     74                                10,
     75                                4
     76                        );
     77
     78                        add_filter(
     79                                'gp_involved_table_heading',
     80                                function () {
     81                                        return __( 'GTEs/PTEs/CLPTEs Involved' );
     82                                }
     83                        );
    5684                }
    5785        }
Note: See TracChangeset for help on using the changeset viewer.