Comments (1)
I've digging into this issue and I was wrong. The duplicate_post_copydate
is correctly set to false
, so duplicated post has the correct created date in case you want to save it as new.
But the problem remains when merging back to original post. I think something like this change in DuplicatePost->duplicate_post_create_duplicate()
method would fix this problem:
if($this->get_option('duplicate_post_copydate') == 1 && empty( $to_post_id ) ){
$new_post['post_date'] = $new_post_date = $post_to_dup->post_date ;
$new_post['post_date_gmt'] = get_gmt_from_date($new_post_date);
} else if( ! empty( $to_post_id ) ) {
// We are merging back, do not override publish date
$new_post['post_date'] = $new_post_date = $to_post->post_date ;
$new_post['post_date_gmt'] = get_gmt_from_date($new_post_date);
}
What do you think? I can fill a pull request if you agree. Or do you think it is not a problem at all to override original post published date when merging back?
from duplicate-and-merge-posts.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duplicate-and-merge-posts.