Closed tomjn closed 2 years ago
Things that I think should happen:
get_posts
args ( perhaps this is how post types are supported )I don't expect all of these to happen here though, but I'm going to prioritise a code review and what I need for the specific use case at hand
Running time can be drastically improved if we did the filtering in the query rather than after. ( and even substantially faster if we went lower level as in the original command we used the last time we did this ).
@shadyvb party of the reason was to simplify things, as a one time operation this isn't something that would run at regular intervals so I prioritised legibility and simplicity. The original command did things that weren't clear, which left us in an awkward position when we had to fix it. I'd also like to avoid running post meta queries if possible, or the question of posts being missed. Registering a taxonomy with the same name is a good shout out though
@shadyvb I've added a tax_query
to filter to just posts with terms in the author
taxonomy, do you think that'll be enough?
That's good, but an additional filter for any arbitrary changes might also be useful, however not required, since people can still filter the query using native hooks anyways.
Happy for this to go as is.
Adds an initial WP CLI command and a subcommand for migrating from PPA to Authorship
Closes #100