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

Only prepend player for is_singular() context #378

Merged

Conversation

galbus
Copy link
Collaborator

@galbus galbus commented Mar 21, 2024

While investigating #374 I noticed that the code that auto-prepends the audio player HTML to the_content() could be improved – it was auto-prepending the player to the_content() everywhere.

If the player was only prepended when is_singular() then there would be no need to remove/re-add the player from the_content() when the body for the audio content is generated.

This may help to resolve #374 because I expect the paywall is only applied in frontend is_singular() screens. In admin screens (where the body for the audio content is constructed) the entire post content should now hopefully be used for the audio body, instead of the paywalled content.

This needs some manual testing to check it has no adverse effects for other publishers.

@galbus galbus self-assigned this Mar 21, 2024
@galbus galbus linked an issue Mar 21, 2024 that may be closed by this pull request
Copy link

linear bot commented Mar 21, 2024

@galbus galbus added wip Work in Progress php Pull requests that update Php code enhancement and removed wip Work in Progress labels Mar 21, 2024
@galbus galbus marked this pull request as draft March 21, 2024 18:32
@galbus galbus requested a review from nklhtv March 28, 2024 14:07
@galbus galbus marked this pull request as ready for review March 28, 2024 14:07
@galbus galbus merged commit 066ea10 into main Mar 28, 2024
8 checks passed
@galbus galbus deleted the s-4947-update-auto-prepending-of-player-to-allow-for-filters-eg branch March 28, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate hook to remove content filter
1 participant