Making WordPress.org


Ignore:
Timestamp:
07/22/2022 02:09:19 PM (4 years ago)
Author:
amieiro
Message:

Sync the gp-translation-helpers with GitHub, main branch

File:
1 edited

Legend:

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

    r11921 r11992  
    7373                add_filter( 'gp_translation_row_template_more_links', array( $this, 'translation_row_template_more_links' ), 10, 5 );
    7474                add_filter( 'preprocess_comment', array( $this, 'preprocess_comment' ) );
     75                add_filter(
     76                        'gp_tmpl_load_locations',
     77                        function( $locations, $template, $args, $template_path ) {
     78                                if ( 'translation-row-editor-meta-status' === $template ) {
     79                                        array_unshift( $locations, dirname( dirname( __FILE__ ) ) . '/templates/gp-templates-overrides/' );
     80                                } else {
     81                                        $locations[] = dirname( dirname( __FILE__ ) ) . '/templates/';
     82                                }
     83
     84                                return $locations;
     85                        },
     86                        60,
     87                        4
     88                );
    7589
    7690                $this->helpers = self::load_helpers();
    … …  
    276290                );
    277291
    278                 gp_tmpl_load( 'translation-helpers', array( 'sections' => $sections ), dirname( __FILE__ ) . '/templates/' );
     292                gp_tmpl_load( 'translation-helpers', array( 'sections' => $sections ) );
    279293        }
    280294
Note: See TracChangeset for help on using the changeset viewer.