クラス WP_Theme::offsetGet()
2014/12/17
WP_Theme::offsetGet()
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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | public function offsetGet( $offset ) { switch ( $offset ) { case 'Name' : case 'Title' : // See note above about using translated data. get() is not ideal. // It is only for backwards compatibility. Use display(). return $this->get('Name'); case 'Author' : return $this->display( 'Author'); case 'Author Name' : return $this->display( 'Author', false); case 'Author URI' : return $this->display('AuthorURI'); case 'Description' : return $this->display( 'Description'); case 'Version' : case 'Status' : return $this->get( $offset ); case 'Template' : return $this->get_template(); case 'Stylesheet' : return $this->get_stylesheet(); case 'Template Files' : return $this->get_files( 'php', 1, true ); case 'Stylesheet Files' : return $this->get_files( 'css', 0, false ); case 'Template Dir' : return $this->get_template_directory(); case 'Stylesheet Dir' : return $this->get_stylesheet_directory(); case 'Screenshot' : return $this->get_screenshot( 'relative' ); case 'Tags' : return $this->get('Tags'); case 'Theme Root' : return $this->get_theme_root(); case 'Theme Root URI' : return $this->get_theme_root_uri(); case 'Parent Theme' : return $this->parent() ? $this->parent()->get('Name') : ''; default : return null; } } |