开发者 | Milmor |
---|---|
更新时间 | 2025年5月26日 00:49 |
捐献地址: | 去捐款 |
PHP版本: | 4.4 及以上 |
WordPress版本: | 6.9 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
In the edit screen, use the plugin’s metabox to disable the automatic listing by checking Disable at the bottom right.
You don’t need to insert file links manually. When you upload a file, it’s automatically assigned to the content and displayed by WP Attachments. Just close the media popup after uploading.
Drag and drop attachments in the WP Attachments metabox or Media Popup while editing.
WP Attachments includes many filters for developers:
$html
)$html
)$html
)$mime
)php
function my_custom_function( $html ) {
// Alter final HTML
return $new_html;
}
add_filter( 'wpatt_list_html', 'my_custom_function' );
php
function my_custom_function( $mime ) {
// Only show PDFs in the list
return $mime == 'application/pdf';
}
add_filter( 'wpatt_accepted_formats', 'my_custom_function' );
Settings > General > Date Format
) for better localization and consistency.