Title: Image Placeholder
Author: DelPutnam
Published: <strong>2013 年 4 月 25 日</strong>
Last modified: 2013 年 4 月 25 日

---

搜索插件

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

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

# Image Placeholder

 作者：[DelPutnam](https://profiles.wordpress.org/delputnam/)

[下载](https://downloads.wordpress.org/plugin/image-placeholder.zip)

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

 [支持](https://wordpress.org/support/plugin/image-placeholder/)

## 描述

#### Using the Shortcode

Using the short code `[image-placeholder]` without any of the optional attributes
will generate a 300px wide by 200px high image using Holder’s ‘social’ theme which
defaults to a solid blue background with white text showing the size of the image(‘
300×200’).

#### Set the width and height

You can set the width and height (in pixels) of your placeholder image:

    ```
    [image-placeholder width="500" height="100"]
    ```

#### Change the colors

You can change the background and text colors:

    ```
    [image-placeholder colors="#000:#fff"]
    ```

This will create an image with a black background and white text.

#### Change the text

By default holder.js uses the size of the image for the text. You can change this:

    ```
    [image-placeholder text="Foo bar"]
    ```

#### Remove the height and width styles

By default, holder.js will add inline styles to specify the height and width of 
the image. You can remove these:

    ```
    [image-placeholder auto="true"]
    ```

#### Only return the URL

If you want to use the placeholder in your own `<img>` tag or as a background style,
for example:

    ```
    [image-placeholder url="true"]
    ```

#### Add a class

If you want to add a class to the `<img>` tag that it generated:

    ```
    [image-placeholder class="my-class"]
    ```

#### Change the theme

Holder currently provides three built-in themes: `gray`, `industrial`, and `social`.
You can use these in the short code like this:

    ```
    [image-placeholder theme="industrial"]
    ```

You can also create your own theme. Each theme defines the foreground color, the
background color, the font size and the font family. The easiest approach is to 
simply include a script tag:

    ```
    <script>Holder.add_theme("my-theme", { background: "#000", foreground: "#fff", size: 14 })</script>
    ```

There are a lot of [other options for customizing themes](https://github.com/imsky/holder/blob/master/README.md#customizing-themes).

### Credits

This plugin is merely a WordPress shortcode wrapper for the holder.js library built
by [Ivan Malopinsky](http://imsky.co).

## 安装

 1. Create a directory called `image-placeholder` in the `/wp-content/plugins/` directory.
 2. Upload `image-placeholder.php` to the `/wp-content/plugins/image-pladeholder` directory.
 3. Upload `holder.js` to the `/wp-content/plugins/image-pladeholder\js` subdirectory.
 4. Activate the plugin through the ‘Plugins’ menu in WordPress.
 5. Use the `[image-placeholder]` shortcode in your pages or posts.

## 常见问题

  What is this plugin good for?

I use it when I’m developing a new site or page that I don’t yet have actual images
for.

  Can you add a feature?

Maybe. Create a new issue on [Github](https://github.com/delputnam/image-placeholder/issues)
and I’ll take a look at it.

You can also feel free to download the code and modify it yourself.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Image Placeholder」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ DelPutnam ](https://profiles.wordpress.org/delputnam/)

[帮助将「Image Placeholder」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/image-placeholder)

### 对开发感兴趣吗?

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

## 额外信息

 *  版本 **1.0**
 *  最后更新：**13 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.3 或更高版本 **
 *  已测试的最高版本为 **3.5.2**
 *  语言
 * [English (US)](https://wordpress.org/plugins/image-placeholder/)
 * 标签
 * [image placeholder](https://cn.wordpress.org/plugins/tags/image-placeholder/)
 *  [高级视图](https://cn.wordpress.org/plugins/image-placeholder/advanced/)

## 评级

 4 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ DelPutnam ](https://profiles.wordpress.org/delputnam/)

## 支持

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

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