Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Except in #139 (which is probably a typo/mistake), Authorship doesn't make use of
$term->name
inauthorship
taxonomy. This might be a good idea to store the user display name as term name and keep them in sync.This will intriduce some nice benefits almost without any tradefoffs (at least I couldn't see a case where names could be out of sync).
I'm first trying to push this to solve a problem I'm facing with Relevanssi but could apply to any indexing technology. Since Authorship only stores IDs in terms (in both
name
ANDslug
), It's quite hard to make it index the author (display) name. With$term->name
storing author display name, just mark theauthorship
taxonomy as "to be indexed" and you're done. Searches containing author display names will now show up in your post search results, just like it does with Co-Authors-Plus.It would also bring more performance to
get_author_names
avoiding the cost of querying user objects.Side note: it would be nice to bump your dev dependencies and drop fixed constraints, it does not play well recent PHP versions (8/8.1). PHPStan for example evolved a lot since
0.12.57
and will raise more potential problems :)