public function loadTextdomainMofile( $mofile, $domain ) {

		// If the `$domain` is for the parent or child theme, search for
		// a `$domain-$locale.mo` file.
		if ( $domain == $this->parentTextdomain() || $domain == $this->childTextdomain() ) {

			// Get the locale.
			$locale = is_admin() ? get_user_locale() : get_locale();

			// Define locale functions files.
			$child_mofile = $this->childPath(  "{$domain}-{$locale}.mo" );
			$theme_mofile = $this->parentPath( "{$domain}-{$locale}.mo" );

			// Overwrite the mofile if it exists.
			if ( is_child_theme() && file_exists( $child_mofile ) ) {

				$mofile = $child_mofile;

			} elseif ( file_exists( $theme_mofile ) ) {

				$mofile = $theme_mofile;
			}
		}

		return $mofile;
	}
public function loadTextdomainMofile( $mofile, $domain ) {

		// If the `$domain` is for the parent or child theme, search for
		// a `$domain-$locale.mo` file.
		if ( $domain == $this->parentTextdomain() || $domain == $this->childTextdomain() ) {

			// Get the locale.
			$locale = is_admin() ? get_user_locale() : get_locale();

			// Define locale functions files.
			$child_mofile = $this->childPath(  "{$domain}-{$locale}.mo" );
			$theme_mofile = $this->parentPath( "{$domain}-{$locale}.mo" );

			// Overwrite the mofile if it exists.
			if ( is_child_theme() && file_exists( $child_mofile ) ) {

				$mofile = $child_mofile;

			} elseif ( file_exists( $theme_mofile ) ) {

				$mofile = $theme_mofile;
			}
		}

		return $mofile;
	}
public function loadTextdomainMofile ( $ mofile , $ domain ) { // If the `$domain` is for the parent or child theme, search for // a `$domain-$locale.mo` file. if ( $ domain == $ this -> parentTextdomain ( ) || $ domain == $ this -> childTextdomain ( ) ) { // Get the locale. $ locale = is_admin ( ) ? get_user_locale ( ) : get_locale ( ) ; // Define locale functions files. $ child_mofile = $ this -> childPath ( "{$domain}-{$locale}.mo" ) ; $ theme_mofile = $ this -> parentPath ( "{$domain}-{$locale}.mo" ) ; // Overwrite the mofile if it exists. if ( is_child_theme ( ) && file_exists ( $ child_mofile ) ) { $ mofile = $ child_mofile ; } elseif ( file_exists ( $ theme_mofile ) ) { $ mofile = $ theme_mofile ; } } return $ mofile ; }
Filters the `load_textdomain_mofile` filter hook so that we can
prepend the theme textdomain to the mofile filename. This also allows
child themes to house a copy of the parent theme translations so that
it doesn't get overwritten when a parent theme is updated.

@since  5.0.0
@access public
@param  string $mofile File name of the .mo file.
@param  string $domain The textdomain currently being filtered.
@return string
Filters the load_textdomain_mofile filter hook so that we can prepend the theme textdomain to the mofile filename . This also allows child themes to house a copy of the parent theme translations so that it doesn t get overwritten when a parent theme is updated .