Title: Content Attachments
Author: Themecraft Studio
Published: <strong>2017 年 4 月 24 日</strong>
Last modified: 2019 年 10 月 27 日

---

搜索插件

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

![](https://ps.w.org/content-attachments/assets/icon-128x128.jpg?rev=1646043)

# Content Attachments

 作者：[Themecraft Studio](https://profiles.wordpress.org/themecraft/)

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

 * [详情](https://cn.wordpress.org/plugins/content-attachments/#description)
 * [评价](https://cn.wordpress.org/plugins/content-attachments/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/content-attachments/#developers)

 [支持](https://wordpress.org/support/plugin/content-attachments/)

## 描述

Wraps post attachments that are not images in handy tags that allow easy styling
with CSS. It also adds a class to the attachment containing the mime type.

Use `add_filter('content-attachments/template/paragraph', $html)` to customized 
the HTML markup to render the attachment. Defaults to:

    ```
    <a class="{{classes}}" type="{{mime-type}}" href="{{url}}" {{extra_attrs}}>
        <span class="content-attachment-text">{{text}}</span>
        <span><i class="content-attachment-icon"></i></span>
    </a>
    ```

For this plugin to work properly, “wpautop” (i.e. automatic wrapping in `<p>` tags
of lines written in WYSIWYG editors) must be enabled on WYSIWYG content editors 
of both WordPress and ACF. This is the default behavior.

Please report issues or ask questions on (GitHub)[https://github.com/themecraftstudio/
wordpress-content-attachments]

## 常见问题

  Where should I report issues or get help?

**GitHub** Please report problems directly on the plugin’s [main development repository](https://github.com/themecraftstudio/wordpress-content-attachments)

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ Themecraft Studio ](https://profiles.wordpress.org/themecraft/)

[帮助将「Content Attachments」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/content-attachments)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.1.0

_Release Date – 27 October 2019_

 * Fix – Disabled libxml warnings to hide warnings when the markup contains custom
   elements

#### 1.0.0

_Release Date – 31 January 2019_

 * New – {{extra_attrs}} placeholder to include all other attributes present in 
   the anchor
 * Deprecated – {{class}} in favor of {{classes}}

#### 0.3.1

_Release Date – 31 August 2018_

 * Fix – load HTML content as UTF-8

#### 0.3.0

 * New – filter ‘content-attachments/template/paragraph’
 * Deprecated – filter ‘content-attachments_template’

#### 0.0.1

_Release Date – 21 April 2017_

 * Initial release

## 额外信息

 *  版本 **1.1.0**
 *  最后更新：**7 年前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 4.4.0 或更高版本 **
 *  已测试的最高版本为 **5.3.0**
 *  PHP 版本 ** 7.0.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/content-attachments/)
 *  [高级视图](https://cn.wordpress.org/plugins/content-attachments/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ Themecraft Studio ](https://profiles.wordpress.org/themecraft/)

## 支持

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

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