Skip to content

Commit

Permalink
Merge pull request #21 from jeremyfelt/fix/generate-post-titles-for-s…
Browse files Browse the repository at this point in the history
…cheduled-notes

Generate post titles for scheduled notes
  • Loading branch information
jeremyfelt authored Nov 27, 2022
2 parents 892c028 + 87a4412 commit 1745afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/post-type-note.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function filter_wp_insert_post_data( $post_data ) {
$post_data['post_name'] = substr( wp_generate_uuid4(), 0, 4 ) . time();
}

if ( 'publish' === $post_data['post_status'] ) {
if ( in_array( $post_data['post_status'], [ 'publish', 'future' ], true ) ) {
$post_data['post_title'] = get_formatted_title( $post_data );
}

Expand Down

0 comments on commit 1745afb

Please sign in to comment.