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

Author link override affects ActivityPub plugin #330

Open
raamdev opened this issue May 5, 2023 · 0 comments
Open

Author link override affects ActivityPub plugin #330

raamdev opened this issue May 5, 2023 · 0 comments
Labels
Milestone

Comments

@raamdev
Copy link
Owner

raamdev commented May 5, 2023

When Multi-Author Mode is disabled in the theme settings, the author_link is overwritten to use the home page instead of the /author/ page. This affects the ActivityPub plugin, which expects to find the /author/ link and results in the following error in Site Health:

Your author URL %s was replaced, this is often done by plugins.

We should reconsider overriding author_link altogether and instead allow this to be done in a Child Theme on a site-by-site basis.

The relevant code in the theme is here:

if ( ! function_exists( 'independent_publisher_single_author_link' ) ) :
/**
* Returns the author link; defaults to home page when not using multi-author mode
*/
function independent_publisher_single_author_link() {
return get_home_url();
}
endif;
/**
* Changes the link around the authors name to the home page when Multi Author Mode is disabled
*/
if ( ! independent_publisher_is_multi_author_mode() ) {
add_filter( 'author_link', 'independent_publisher_single_author_link', 10, 3 );
}

Here's a quick fix that can be applied in a Child Theme to get ActivityPub working again:

raamdev/independent-publisher-child@3996c63

@raamdev raamdev added the bug label May 5, 2023
@raamdev raamdev added this to the Next Release milestone May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant