get_path() ) { load_textdomain( $this->textdomain, $this->get_path() ); } load_plugin_textdomain( $this->textdomain, false, Kirki::$path . '/languages' ); } /** * Gets the path to a translation file. * * @access protected * @return string Absolute path to the translation file. */ protected function get_path() { $path_found = false; $found_path = null; foreach ( $this->get_paths() as $path ) { if ( $path_found ) { continue; } $path = wp_normalize_path( $path ); if ( file_exists( $path ) ) { $path_found = true; $found_path = $path; } } return $found_path; } /** * Returns an array of paths where translation files may be located. * * @access protected * @return array */ protected function get_paths() { return array( WP_LANG_DIR . '/' . $this->textdomain . '-' . get_locale() . '.mo', Kirki::$path . '/languages/' . $this->textdomain . '-' . get_locale() . '.mo', ); } }