Content Attachments

Wrap non-image post attachments in handy tags that allow easy styling with CSS.

Author:Themecraft Studio (profile at wordpress.org)
WordPress version required:4.4.0
WordPress version tested:5.3.0
Plugin version:1.1.0
Added to WordPress repository:24-04-2017
Last updated:27-10-2019
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:https://wordpress.org/plugins/content-attachm...
Total downloads:997
plugin download
Click to start download

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]


FAQ
ChangeLog