Title: HTML Helpers
Author: karevn
Published: <strong>2011 年 5 月 15 日</strong>
Last modified: 2011 年 6 月 16 日

---

搜索插件

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

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

# HTML Helpers

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

[下载](https://downloads.wordpress.org/plugin/html-helpers.0.2.3.zip)

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

 [支持](https://wordpress.org/support/plugin/html-helpers/)

## 描述

This plugin adds simple HTML tag generation API to WordPress, like these examples:

generates and prints `<img src="/wp-content/<your-theme>/images/wordpress.png" alt
="Wordpress" />`. ‘my-image’)) ?> generates and returns almost the same tag, just
with absolute url, id and alt attributes set manually. term_id) ?> generates select
tag with options taken from WP ‘category’ taxonomy and sets $term as selected item
rails-like “cycle” that returns “odd” on first call, “even” on second, “odd” on 
third call, so on. reset_cycle resets the cycle. shortcut for echo(get_post_meta(
$id, ‘meta_name’, true))

Form field generators for `text`, `checkbox`, `hidden` input types, `textarea`, 
and more tags. More docs coming soon, you can read the code to figure out other 
features for now.

## 安装

This section describes how to install the plugin and get it working.

 1. Upload `html-helpers` directory to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use html-helpers API in your plugins and themes.

OR

 1. Put html-helpers.php to your plugin or theme folder
 2. `require` it
 3. Use html-helpers API in your plugins and themes.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

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

[帮助将「HTML Helpers」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/html-helpers)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.2.3

 * Removed unecessary closing tags for img, input
 * _img and img support image names without an extension
 * smarter ‘alt’ attribute handling for img

#### 0.2.2

 * Fixed endless recursion for img function

#### 0.2.1

 * Added `cycle,`reset_cycle`and`_cycle` functions to support rails-style cycles
 * Added “multiple” option support for `select` tag.

#### 0.2

 * Initial public release

## 额外信息

 *  版本 **0.2.3**
 *  最后更新：**15 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 1.5 或更高版本 **
 *  已测试的最高版本为 **3.1.4**
 *  语言
 * [English (US)](https://wordpress.org/plugins/html-helpers/)
 * 标签
 * [api](https://cn.wordpress.org/plugins/tags/api/)[code](https://cn.wordpress.org/plugins/tags/code/)
   [html](https://cn.wordpress.org/plugins/tags/html/)[php](https://cn.wordpress.org/plugins/tags/php/)
 *  [高级视图](https://cn.wordpress.org/plugins/html-helpers/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

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

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](https://cn.wordpress.org/plugins/html-helpers/karev.n@gmail.com?output_format=md)