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

Allow coauthors_wp_list_authors to only query authors with posts #496

Merged
merged 4 commits into from Nov 6, 2018

Conversation

pyronaur
Copy link
Member

@pyronaur pyronaur commented Mar 29, 2018

Fixes #193 by introducing authors_with_posts_only argument.

The $term_args has been querying taxonomies with hide_empty => 0 for the past years, ignoring the value of $args['hide_empty'] that was passed to the coauthors_wp_list_authors function.

A simple fix would have been to just let the coauthors_wp_list_authors use the value of $args['hide_empty'] but it defaults to true, and historically the term args defaulted to false, which is an inconsistency that's bound to cause trouble.

In the future, maybe this function could be deprecated and a new function used instead with better defaults.

TL;DR: I decided to introduce authors_with_posts_only for backward compatibility of the hide_empty argument.

@rebeccahum rebeccahum merged commit d27d326 into Automattic:master Nov 6, 2018
rebeccahum added a commit that referenced this pull request Mar 26, 2019
Allow `coauthors_wp_list_authors` to only query authors with posts
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.

Recommended method to get list of all co-authors with posts
2 participants