Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter to get_coauthors #646

Merged

Conversation

jasonbahl
Copy link
Contributor

@jasonbahl jasonbahl commented Feb 9, 2019

I had a previous PR for this but for whatever reason I couldn't get .git to recognize the merge conflict fix, so here's another PR with the merge conflict resolved.

Original PR: #366

Adds a filter to get_coauthors to allow hooking in and providing coauthor objects that might not exist in the db. Use case: we have several places in our site where we output authors based on get_coauthors (templates, some custom POST requests we send out to some API's, etc). We have the need to "fake" some coauthors in some instances, and want to be able to dynamically insert them in when a post meets certain criteria. Being able to filter the data that gets returned when calling get_coauthors will allow us to take advantage of all existing code where we use get_coauthors, but will allow us to dynamically inject "fake" authors when needed.
…l-filter-get_coauthors-1

# Conflicts:
#	template-tags.php
@rebeccahum rebeccahum merged commit a944ef5 into Automattic:master Feb 12, 2019
rebeccahum added a commit that referenced this pull request Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants