Content Attachments
v1.1.0Themecraft Studio · 2017年4月24日 上架
Wrap non-image post attachments in handy tags that allow easy styling with CSS.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 1,977
- 最近更新
- 2019年10月27日
需要 WordPress 4.4.0+已测试到 5.3.0PHP 7.0.0+
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]