国产高潮流白浆喷水视频A片 ,欧美丰满熟妇bbbbbb百度,美女视频黄A片免费观看软件,麻豆国产精品无码人妻无码

專業(yè)WORDPRESS主題設(shè)計制作

wp_get_theme()函數(shù)(wpf theme)

發(fā)布于: 2022-08-19

wp_get_theme()函數(shù)主要作用是用來獲得WordPress主題的相關(guān)信息。
語法

<?php wp_get_theme($stylesheet, $theme_root) ?>

參數(shù)

參數(shù)1:內(nèi)容為查詢的主題名,可選。默認值:null

參數(shù)2:主題根要查看的絕對路徑。可選。如果沒有指定,get_raw_theme_root()用于計算主題根為樣式表提供(或當前主題)。默認值:null

實例

wp_get_theme()函數(shù)
<?php
$theme = wp_get_theme();
echo $theme->get( 'Name' ); //主題名
echo $theme->get( ThemeURI' ); //主題 URL
echo $theme->get( Description' ); //主題描述
echo $theme->get( Author' ); //作者名
?>

wp_get_theme()函數(shù)詳細參數(shù):

  1. Name:主題名
  2. ThemeURI:主題 URL
  3. Description:主題描述
  4. Author:作者名
  5. AuthorURI:作者 URL
  6. Version:主題版本號
  7. Template:父主題的文件夾名稱,子主題中使用
  8. Status:主題狀態(tài),如果發(fā)布的話
  9. Tags:標簽
  10. TextDomain:主題中用于翻譯目的的文本域
  11. DomainPath:主題翻譯文件路徑

當然啦,wp_get_theme()函數(shù)還可以指定主題名來獲取指定主題的其它信息,如下:

<?php
$theme = wp_get_theme( 'Viti' );
if ( $theme->exists() )
echo $theme;
?>
WP技術(shù)資料 wordpress模板制作、wordpress主題開發(fā)相關(guān)知識常見問題總結(jié)
服務(wù)電話:
0533-2765967

微信 13280692153