humanmade / authorship

A modern approach to author attribution in WordPress.
GNU General Public License v3.0
66 stars 7 forks source link

Publishpress Authors to Authorship WP CLI command #101

Closed tomjn closed 2 years ago

tomjn commented 2 years ago

Adds an initial WP CLI command and a subcommand for migrating from PPA to Authorship

Closes #100

tomjn commented 2 years ago

Things that I think should happen:

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

tomjn commented 2 years ago

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

tomjn commented 2 years ago

@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?

shadyvb commented 2 years ago

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.