
网络开发中的Git:了解一个项目的典型工作流程
get_theme ( $theme )
get_theme: 这个函数用来获取当前的主题对象。它可以接受一个字符串参数作为主题名称或主题目录路径。如果没有提供参数,该函数将返回基于当前使用的模板的当前主题对象。
检索主题数据。
function get_theme( $theme ) { _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' ); $themes = get_themes(); if ( is_array( $themes ) && array_key_exists( $theme, $themes ) ) return $themes[ $theme ]; return null; }