Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #63944, comment 3


Ignore:
Timestamp:
09/08/2025 08:52:29 AM (13 months ago)
Author:
tusharbharti

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63944, comment 3

    initial v1  
    2626{{{#!php
    2727<?php
    28         global $wp_textdomain_registry;
    29         if ( isset( $wp_textdomain_registry ) ) {
    30                 $reg_path = $wp_textdomain_registry->get( $domain, $locale );
    31                 if ( $reg_path ) {
    32                         $reg_path = untrailingslashit( $reg_path );
     28global $wp_textdomain_registry;
     29$reg_path = $wp_textdomain_registry->get( $domain, $locale );
     30if ( $reg_path ) {
     31        $reg_path = untrailingslashit( $reg_path );
     32        $translations = load_script_translations( $reg_path . '/' . $md5_filename, $handle, $domain );
     33        if ( $translations ) {
     34                return $translations;
     35        }
     36}
    3337
    34                         $translations = load_script_translations( $reg_path . '/' . $md5_filename, $handle, $domain );
    35                         if ( $translations ) {
    36                                 return $translations;
    37                         }
    38                 }
    39         }
    4038}}}
    4139
    … …  
    4543
    4644cc: @swissspidy
     45
     46Edit: removed if check as it is not needed