Plugin Directory


Ignore:
Timestamp:
12/22/2024 02:04:21 PM (15 months ago)
Author:
mihdan
Message:

Update to version 6.3.0 from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cyr2lat/trunk/src/php/ErrorHandler.php

    r3189796 r3211834  
    3939            add_action( 'doing_it_wrong_run', [ $this, 'action_doing_it_wrong_run' ], 20, 3 );
    4040            add_filter( 'doing_it_wrong_trigger_error', [ $this, 'filter_doing_it_wrong_trigger_error' ], 10, 4 );
    41         }
    42 
    43         // Fix WP 6.5+ translation error.
    44         if ( version_compare( $GLOBALS['wp_version'], '6.5', '>=' ) ) {
    45             add_filter( 'gettext', [ $this, 'filter_gettext' ], 10, 3 );
    4641        }
    4742    }
     
    110105
    111106    /**
    112      * Filter for gettext.
    113      *
    114      * @param string|mixed $translation Translated text.
    115      * @param string|mixed $text        Text to translate.
    116      * @param string|mixed $domain      Text domain. Unique identifier for retrieving translated strings.
    117      *
    118      * @return string
    119      */
    120     public function filter_gettext( $translation, $text, $domain ): string {
    121 
    122         $translation = (string) $translation;
    123         $text        = (string) $text;
    124         $domain      = (string) $domain;
    125 
    126         if ( '' === $translation && 'cyr2lat' === $domain ) {
    127             $translation = $text;
    128         }
    129 
    130         return $translation;
    131     }
    132 
    133     /**
    134107     * Whether it is the just_in_time_error for plugin-related domain.
    135108     *
Note: See TracChangeset for help on using the changeset viewer.