Skip to content

Commit 1745afb

Browse files
authored
Merge pull request #21 from jeremyfelt/fix/generate-post-titles-for-scheduled-notes
Generate post titles for scheduled notes
2 parents 892c028 + 87a4412 commit 1745afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/post-type-note.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function filter_wp_insert_post_data( $post_data ) {
288288
$post_data['post_name'] = substr( wp_generate_uuid4(), 0, 4 ) . time();
289289
}
290290

291-
if ( 'publish' === $post_data['post_status'] ) {
291+
if ( in_array( $post_data['post_status'], [ 'publish', 'future' ], true ) ) {
292292
$post_data['post_title'] = get_formatted_title( $post_data );
293293
}
294294

0 commit comments

Comments
 (0)