Title: hCard ShortCode
Author: Comparto Web
Published: <strong>2012 年 4 月 11 日</strong>
Last modified: 2015 年 12 月 29 日

---

搜索插件

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

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

# hCard ShortCode

 作者：[Comparto Web](https://profiles.wordpress.org/comparto-web/)

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

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

 [支持](https://wordpress.org/support/plugin/hcard-shortcode/)

## 描述

hCard ShortCode translates vCard to hCard and let’s you display them using a simple[
hcard] shortcode.

### How it works:

 1. install the plugin
 2. upload the vCards in the Media section
 3. choose a **no-space only-alphanumeric lowercase** Title for the vCards
 4. use the [hcard vcard=’vcard title’ only=’optional comma separated vcard fields 
    to display’] shortcode
 5. style the resulting hCard using CSS

### Which fields are supported?

hCard ShortCode supports the following vCard fields:

 * `N` given name and family name;
 * one `EMAIL` optionally use `TYPE` to specify a label to use in the <a> link;
 * one `TITLE`
 * one `ORG`
 * one `PHOTO` with `TYPE=URL`
 * one or more `URL`, optionally use `TYPE` to specify a label to use in the <a>
   link;
 * one `ADR`

### Can you give me a sample vCard?

Sure, here it is:

    ```
    BEGIN:VCARD
    N:Paganotti;Sandro;;;
    EMAIL;TYPE=Email:sandro.paganotti@compartoweb.com
    TITLE:Software Architect
    ORG:Comparto Web
    PHOTO;VALUE=URL;TYPE=PNG:/wp-content/uploads/2012/04/official_me-43x43.png
    URL;TYPE=Twitter:https://twitter.com/#!/sandropaganotti
    URL;TYPE=LinkedIn:http://www.linkedin.com/in/sandropaganotti
    ADR;INTL;PARCEL;WORK:;;Via Cipro 66;Brescia;Brescia;25100;Italia
    END:VCARD<h3>How can use the 'only' option?</h3>the `only` option can be used to limit the fields printed on the hCard, you
    ```

can declare a comma-separated list of the fields you want to be displayed, here’s
the
 keyword:

 * `name` for given name and family name
 * `email` for the `EMAIL`
 * `org:title` for the `TITLE`
 * `org:name` for the `ORG`
 * `url` for the `URL`s
 * `photo` for the `PHOTO`
 * `location` for thr `ADR`

### An example:

Here’s a shortcode example:

    ```
    [hcard vcard="sandropaganotti" only="name,email,org:title,photo,url"]<h3>Kudos and acknowledgements:</h3>This plugin uses the cool Contact_Vcard_Parse class from Paul M. Jones <pjones@ciaweb.net> and a modified version of the phpMicroformats class from Tobias Kluge (enarion.net). Thank you!
    ```

## 安装

 1. install the plugin (copy in wp-content/plugins and activate)
 2. upload the vCards in the Media section
 3. choose a **no-space only-alphanumeric lowercase** Title for the vCards
 4. use the [hcard vcard=’vcard title’ only=’optional comma separated vcard fields 
    to display’] shortcode
 5. style the resulting hCard using CSS

## 常见问题

  Can I use it in text widgets?

Sure! just add `add_filter('widget_text', 'do_shortcode');` to your `functions.php`.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ Comparto Web ](https://profiles.wordpress.org/comparto-web/)
 *   [ sandropaganotti ](https://profiles.wordpress.org/sandropaganotti/)

[帮助将「hCard ShortCode」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/hcard-shortcode)

### 对开发感兴趣吗?

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

## 更新日志

#### Trunk

 * tested with WordPress 4.4
 * inititial release

## 额外信息

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

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ Comparto Web ](https://profiles.wordpress.org/comparto-web/)
 *   [ sandropaganotti ](https://profiles.wordpress.org/sandropaganotti/)

## 支持

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

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