クラス WP_Theme::load_textdomain()
2014/12/17
WP_Theme::load_textdomain()
WP_Theme::定義ファイル : /blog/wp-includes/class-wp-theme.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | public function load_textdomain() { if ( isset( $this->textdomain_loaded ) ) return $this->textdomain_loaded; $textdomain = $this->get('TextDomain'); if ( ! $textdomain ) { $this->textdomain_loaded = false; return false; } if ( is_textdomain_loaded( $textdomain ) ) { $this->textdomain_loaded = true; return true; } $path = $this->get_stylesheet_directory(); if ( $domainpath = $this->get('DomainPath') ) $path .= $domainpath; else $path .= '/languages'; $this->textdomain_loaded = load_theme_textdomain( $textdomain, $path ); return $this->textdomain_loaded; } |