Open
Conversation
- Update term name to user display name when creating terms - Sync term name when user display name is updated - Add tests
b104705 to
81852d8
Compare
Contributor
Author
|
Friendly bump :) I love the plugin but it really needs an update on various sides (react, php, etc.). I can contribute but need some maintainers review/merges 🙏 |
Member
|
I'm hoping to be able to arrange some time for someone to work on Authorship soon |
Contributor
|
Would be a breaking change without #139, both the name and slug are the same currently. The change should be treated as breaking regardless I think so would make part of a 0.3.0 release rather than 0.2.x. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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->nameinauthorshiptaxonomy. 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
nameANDslug), It's quite hard to make it index the author (display) name. With$term->namestoring author display name, just mark theauthorshiptaxonomy 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_namesavoiding 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.57and will raise more potential problems :)