Automattic / Automattic/co-authors-plus

Prevent Infinite Loops

Open
#64 1 comment 0 reactions 0 assignees View on GitHub
status: awaiting reporter feedback
Dominant language
PHP
Stars
322
Forks
216
Avg merge
7h 50m
Merged PRs (30d)
65

Description

The following results in an infinite loop because coauthors_posts_links relies on `get_the_author` to output the user's name. We should prevent this from happening.

`
function my_guest_author($author){
if ( function_exists( 'coauthors_posts_links' ) )
$author = coauthors_posts_links();
return $author;
}
add_filter('the_author', 'my_guest_author');
`

Contributor guide

Open the contributing guide

Research direction

Start by tracing the the_author filter callback and the coauthors_posts_links/get_the_author interaction shown in the report. Reproduce the recursive call, then verify that author output no longer loops while coauthor links still render.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.