Content Attachments

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-atta

Version
Last updated
Active installations
WordPress Version
Tested up to
PHP Version
Rating
Total ratings
This plugin is outdated and might not be supported anymore.

Description

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]