Repository navigation
Support importing posts - #88
Conversation
This function name is more descriptive.
Currently, this doesn't properly handle revision and commit authors.
Some of these changes are simple code style changes, but a bunch of them are changes to the way we do the translation strings, subbing in `sprintf` instead of just concatenating strings.
And validate we actually have an integer for the user.
Export object keeps track of all the posts updated + added. For each of these IDs, the controller will set the proper author for the latest revision as well as new posts.
c14038f to
3e52210
Compare
|
I don't know what's going on with Travis, but I've got this working locally. There are definitely some things I'd like to modify about the way this deals with the authors, as well as add unit tests, but this could use a lookover + some testing. |
The covers documentation for the new importing feature.
f305b4d to
b834a58
Compare
|
I think this is ready to go. Planning on merging and deploying this weekend. |
This provides flexibility to the user in how the revision and imported post users get set.
e0ab1d1 to
3c43588
Compare
|
Updated the way we're handling authors now. The user can set a default user that WPGHS falls back to when searching for a user fails. Updated the documentation to reflect this change. |
|
how to remove sync for old posts in the repo when first time configure. Which hook need to remove ? |
|
@sivyel This should match up posts with their post IDs, if they're aligned between what's in the repo & in the database. |
|
@mAAdhaTTah Actually i'm not using sync process one time push from git to wordpress is enough. If you can help me to sync only one post what we commit from git. Don't sync other existing files from git. Can you help me in that? |
|
It won't import anything that doesn't have a post front matter, so the rest of the files shouldn't interfere. |
|
@mAAdhaTTah Rest of the files also have frontmatter format only |
|
Not entirely sure this is possible, tbh. I'd have to dig into it. |
|
@mAAdhaTTah can you help on this, only commit which i did need to sync other than existing don't consider |
|
Unfortunately, no, I don't really have the time generally and have moved on to other open source projects. |
Fixes #61. Fixes #4.
This works, so far, but handling the issues raised by #4 continues to be an issue. Generally speaking, I'm not loving the way we're handling authors overall. I'm wondering if maybe we should add a settings for a "default author" to be used in case the author isn't found. Overall, this may require some additional refactoring; I may push some things down from the main plugin class into the controller, and have the controller decide whether to fire the additional export.