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

Guest author links should be filterable #204

Closed
wants to merge 2 commits into from
Closed

Guest author links should be filterable #204

wants to merge 2 commits into from

Conversation

thebrandonallen
Copy link

With two small, but significant, exceptions, the code in CoAuthors_Guest_Authors:filter_author_link() is the same as the function it's trying to filter, get_author_posts_url().

The first difference, is where the user_nicename is set for guest authors. Without it, guest author links aren't appropriately created.

The other difference, is the lack of the author_link filter. Anyone trying to manipulate links returned by get_author_posts_url() or use a non-standard rewrite tag in WP_Rewrite::author_base, will find that they're filters fail. Found this while try to track down an issue a user was having with my Edit Author Slug plugin.

This pull request keeps us DRY, and maintains the author_link filter on guest authors.

thebrandonallen added a commit to thebrandonallen/edit-author-slug that referenced this pull request Jun 13, 2014
Loading our filter at a later time allows any links where the author actually exists in the users table to be filtered.

Guest author links will remain unfiltered, i.e. - broken, until a solution is added in Co-Authors Plus.

See [Automattic/Co-Authors-Plus#204] for the proposed fix.
thebrandonallen added a commit to thebrandonallen/edit-author-slug that referenced this pull request Aug 13, 2014
Due to the way Co-Authors Plus filters 'author_link', a later filter priority is needed to still get our filters to work... at least partially. As long as the author link being generated is that of a legitimate WP user, one listed in the users table, we will still be able to successfully filter. However, guest authors will not have their links filtered until a fix upstream is applied.

See Co-Authors-Plus PR #204 [Automattic/Co-Authors-Plus#204] for the proposed fix.
@thebrandonallen
Copy link
Author

Closed in favor of #258

@thebrandonallen thebrandonallen deleted the fix-author-link-filtering branch March 19, 2015 21:55
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.

1 participant