| 开发者 | lukaszwarcholik |
|---|---|
| 更新时间 | 2026年10月29日 22:39 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
post_thumbnail_html).wp_get_attachment_image() - most themes, most custom loops.<img src="<?php echo $field['url']; ?>"> straight from an ACF field passes through no WordPress filter at all, so there is nothing to hook. Switch on Images the theme prints itself in the settings and the finished page is scanned instead.
It is not a general image parser: the plugin already knows which attachments you marked - usually a handful - so it builds a file-name list for those files only (original plus every registered size) and looks for exactly those names. No database query per image, and because the match is on the file name, a CDN or an offloaded upload path still matches. <picture> elements from WebP converters are handled as a whole.
If you would rather not have the page scanned, put the label in the template yourself:
<?php aidl_label( $attachment_id ); ?>
or in content: [aidl_disclosure id="123"]
Filters
aidl_label_text - ( $text, $attachment_id, $variant, $mode )aidl_badge_text - ( $text, $attachment_id, $mode )No, and on purpose. Detection is guesswork: run a generated image through an editor and every detector goes quiet. You know which of your images came out of a generator - the plugin makes marking them a checkbox.
That is a question for your lawyer, not for a plugin. The transparency duty in the AI Act is about the disclosure being clear to the person looking at the content; a line in the footer of a site is not attached to any particular image. Per-image labelling is the safer reading.
By default the plugin decides per image: a caption under large images, a compact badge on thumbnails - because a caption needs room to read and a thumbnail has none. You can override that and put it under the image everywhere, or in any of the four corners on it, with a plain, dark, white or translucent style.
One meta read per labelled image and a handful of inline CSS rules. No scripts on the front end.
Yes, with Images the theme prints itself switched on. Without it, the plugin reaches anything rendered through the standard WordPress image functions and core blocks, which covers most themes but not builders that output their own markup.
It is one pass over the output of a page you are already rendering, and it only runs when you have at least one marked image. The file-name list is cached for a day and rebuilt when you mark or unmark an image. If no image on your site needs it, leave the option off.
The settings go. The marks on your images stay, so deactivating the plugin for an afternoon does not mean re-marking three hundred images afterwards - reinstall it and everything is marked as before. If you would rather leave nothing behind, switch on Also delete the image marks when the plugin is deleted in the settings before you delete the plugin.
[aidl_disclosure]. The old [ai_disclosure] is gone - rename it in any content that used it.aidl_label_text and aidl_badge_text now receive the mode as their last argument.aidl-label--generated or aidl-label--modified class, so the two can be styled apart.<figure> for the featured image used to get the label below the caption, detached from the picture - and lost any styling written as .parent > figure.aidl_label() template function and [ai_disclosure] shortcode.