| 开发者 | Milmor |
|---|---|
| 更新时间 | 2026年9月1日 04:40 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Open the Media Attachments metabox while editing and switch off Display attachments in frontend, at the bottom left. The files stay attached, they are simply not listed on the site. You can also set the default for a whole post type under Settings → WP Attachments → Post Type Permissions.
Do not insert the link manually. A file uploaded from the editor is attached to the content automatically and listed by WP Attachments, so you can simply close the media popup after uploading.
Three ways, all of which save straight away:
The Files column in the post and page lists shows how many files each one has. Click the number to open the Media Library filtered to just those files.
Yes, under Settings → WP Attachments → Date Format. It accepts the standard PHP date characters and applies to the %DATE% tag. Leave it empty to follow Settings → General → Date Format.
No. It skips browser prefetch requests and known crawlers, and it ignores repeat hits from the same visitor on the same file for a few minutes. Those requests still receive the file, they just do not move the number.
Images, video, audio, PDF and plain text open in a preview dialog. Any other format shows its icon and a download link.
$html)$html)$html)$mime)$seconds, $attachment_id)$countable)function my_custom_function( $html ) { // Alter the final HTML return $new_html; } add_filter( 'wpatt_list_html', 'my_custom_function' );
function my_pdf_only( $mime ) { // Only show PDFs in the list return $mime === 'application/pdf'; } add_filter( 'wpatt_accepted_formats', 'my_pdf_only' );
// Count each visitor at most once per hour add_filter( 'wpatt_download_throttle', function () { return HOUR_IN_SECONDS; } );
There is also wpatt_get_attachments_html( $parent_id ), which returns the list for any parent ID without going through the the_content filter.
Settings > General > Date Format) for better localization and consistency.