Update FILTERS.md

This commit is contained in:
Tetrakern 2025-01-04 17:01:13 +01:00
parent 0f65c9f3d6
commit 37561eb521

View File

@ -1095,7 +1095,11 @@ Filters the intermediate output HTML of the chapter list title row before it is
**Example:**
```php
function child_display_pw_expiration_date_in_chapter_lists( $output, $chapter_id ) {
function child_display_pw_expiration_date_in_chapter_lists( $output, $chapter_id, $prefix, $has_password ) {
if ( ! $has_password ) {
return $output;
}
$password_expiration_date_utc = get_post_meta( $chapter_id, 'fictioneer_post_password_expiration_date', true );
if ( empty( $password_expiration_date_utc ) ) {
@ -1107,7 +1111,7 @@ function child_display_pw_expiration_date_in_chapter_lists( $output, $chapter_id
return "[{$formatted_datetime}] {$output}";
}
add_filter( 'fictioneer_filter_list_chapter_title_row', 'child_display_pw_expiration_date_in_chapter_lists', 10, 2 );
add_filter( 'fictioneer_filter_list_chapter_title_row', 'child_display_pw_expiration_date_in_chapter_lists', 10, 4 );
```
---