Title: 主题预览
Author: Dougal Campbell
Published: <strong>2007 年 10 月 26 日</strong>
Last modified: 2016 年 2 月 17 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/theme-preview.svg)

# 主题预览

 作者：[Dougal Campbell](https://profiles.wordpress.org/dougal/)

[下载](https://downloads.wordpress.org/plugin/theme-preview.1.4.zip)

 * [详情](https://cn.wordpress.org/plugins/theme-preview/#description)
 * [评价](https://cn.wordpress.org/plugins/theme-preview/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/theme-preview/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/theme-preview/#developers)

 [支持](https://wordpress.org/support/plugin/theme-preview/)

## 描述

By default, the only way to see how a new theme looks on your site is to
 activate
it, making it visible to everyone who visits. With this plugin, it is possible to
view how a new theme looks without activating it.

### TODO

Possible future enhancements:

 * Add an options screen.
 * Allow choice of theme to preview from a known list of installed themes.
 * Provide persistent previews by setting a cookie.
 * Restrict preview ability by user Roles/Capabilities.
 * Child-theme friendliness.

### 笔记

May not work properly with child themes. This is because it will not be able
 to
inherit from the parent theme as it normally would.

## 安装

 1. Upload the `theme-preview` folder and its contents to your `wp-contents/plugins`
    directory.
 2. Activate in the `Plugins` menu.
 3. Visit your site with a special parameter added to the URL

Add query variables `preview_theme` and/or `preview_css` to your query
 string. 
For example, if you have a theme named “My Theme”, which is installed in your `wp-
content/themes/my-theme` directory, add the theme’s directory name to your URL like
this:

    ```
    http://example.com/index.php?preview_theme=my-theme
    ```

Sometimes, you create a new look for your site by just making new CSS, but
 you 
keep the existing PHP files intact. In that case, you con use the preview_css variable
instead of `preview_theme`, or use them both together, like this:

    ```
    http://example.com/index.php?preview_theme=default&preview_css=my-theme
    ```

## 评价

此插件暂无评价。

## 贡献者及开发者

「主题预览」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Dougal Campbell ](https://profiles.wordpress.org/dougal/)

[帮助将「主题预览」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/theme-preview)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/theme-preview/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/theme-preview/)，或通过[RSS](https://plugins.trac.wordpress.org/log/theme-preview/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/theme-preview/)。

## 更新日志

#### 1.4 2016-02-17

 * SECURITY: Eliminate directory traversal, limit themes to registered directories.

#### 1.3 2015-08-26

 * Fixed to work with newer versions of WordPress.

#### 1.2 2010-01-14

 * Tested with WordPress 3.0-alpha

## 额外信息

 *  版本 **1.4**
 *  最后更新：**10 年前**
 *  活跃安装数量 **300+**
 *  WordPress 版本 ** 2.6.0 或更高版本 **
 *  已测试的最高版本为 **4.4.34**
 *  语言
 * [English (US)](https://wordpress.org/plugins/theme-preview/)
 * 标签
 * [css](https://cn.wordpress.org/plugins/tags/css/)[presentation](https://cn.wordpress.org/plugins/tags/presentation/)
   [preview](https://cn.wordpress.org/plugins/tags/preview/)[testing](https://cn.wordpress.org/plugins/tags/testing/)
   [themes](https://cn.wordpress.org/plugins/tags/themes/)
 *  [高级视图](https://cn.wordpress.org/plugins/theme-preview/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/theme-preview/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/theme-preview/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/theme-preview/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/theme-preview/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/theme-preview/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/theme-preview/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/theme-preview/reviews/)

## 贡献者

 *   [ Dougal Campbell ](https://profiles.wordpress.org/dougal/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/theme-preview/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://dougal.gunters.org/donate)