Use GMT for fictioneer_chapters_added
This commit is contained in:
parent
baeda70b26
commit
b4c32b535c
@ -372,7 +372,7 @@ function fictioneer_chapter_future_to_publish( $new_status, $old_status, $post )
|
||||
$story_id = get_post_meta( $post->ID, 'fictioneer_chapter_story', true );
|
||||
|
||||
if ( $story_id ) {
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_added', $post->post_date );
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_added', $post->post_date_gmt );
|
||||
}
|
||||
}
|
||||
add_action( 'transition_post_status', 'fictioneer_chapter_future_to_publish', 10, 3 );
|
||||
|
@ -2413,7 +2413,7 @@ function fictioneer_save_story_metaboxes( $post_id ) {
|
||||
}
|
||||
|
||||
if ( count( $previous_chapter_ids ) < count( $chapter_ids ) ) {
|
||||
update_post_meta( $post_id, 'fictioneer_chapters_added', current_time( 'mysql' ) );
|
||||
update_post_meta( $post_id, 'fictioneer_chapters_added', current_time( 'mysql', true ) );
|
||||
}
|
||||
|
||||
// Log changes
|
||||
|
@ -1278,7 +1278,7 @@ function fictioneer_append_chapter_to_story( $post_id, $story_id, $force = false
|
||||
|
||||
// Remember when chapter list has been last updated
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_modified', current_time( 'mysql' ) );
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql' ) );
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql', true ) );
|
||||
|
||||
// Log changes
|
||||
fictioneer_log_story_chapter_changes( $story_id, $story_chapters, $previous_chapters );
|
||||
|
@ -1601,7 +1601,7 @@ function fictioneer_tools_append_chapters() {
|
||||
|
||||
// Remember when chapter list has been last updated
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_modified', current_time( 'mysql' ) );
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql' ) );
|
||||
update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql', true ) );
|
||||
|
||||
// Clear meta caches to ensure they get refreshed
|
||||
delete_post_meta( $story_id, 'fictioneer_story_data_collection' );
|
||||
|
Loading…
x
Reference in New Issue
Block a user