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

fix: make sure sponsored categories, tags show sponsor info #289

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Mar 5, 2024

All Submissions:

Changes proposed in this Pull Request:

This PR fixes a regression in the Sponsors plugin, where sponsored categories and tags stopped displaying the sponsor information at the top of their individual archive pages.

This one is a little weird. Just looking at releases, this seems to have stopped working between 1.2.1 and 1.3.0, but I'm not actually sure why -- the changes in 1.3.0 alone don't seem like enough.

On top of that, the fix I landed on was something that was never in this part of the plugin -- the docs for get_term_by() say that the taxonomy is optional only if you're using term_taxonomy_id, but id definitely worked for a while. So I'm not sure if this is the best approach, or if it'd be better to pass the taxonomy to get_term_by(), or something else. Feedback welcome!

See 1200550061930446-as-1206174629624809

How to test the changes in this Pull Request:

  1. Set up at least one sponsored category and at least one sponsored tag, and apply posts to each.
  2. View the archive of one of these sponsored categories or tags, and note that it looks like a regular archive.
image
  1. Apply the PR.
  2. Refresh your archive; confirm that the sponsor's logo and description now appear at the top, and you no longer have an individual sponsor label for each post, but just at the top:
image
  1. Check your other sponsored archives, and make sure they also look like this (both a category and tag).
  2. Check some non-sponsored archives -- tags, categories, and author -- and sponsored posts in non-sponsored categories, and make sure they're displaying as expected.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@laurelfulford
Copy link
Contributor Author

Thanks @adekbadek! 🙌

@laurelfulford laurelfulford merged commit ad652aa into trunk Mar 13, 2024
6 checks passed
@laurelfulford laurelfulford deleted the fix/sponsored-tax-flair branch March 13, 2024 16:00
matticbot pushed a commit that referenced this pull request Mar 28, 2024
# [1.12.0-alpha.2](v1.12.0-alpha.1...v1.12.0-alpha.2) (2024-03-28)

### Bug Fixes

* make sure sponsored categories, tags show sponsor info ([#289](#289)) ([ad652aa](ad652aa))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.12.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Apr 8, 2024
# [1.12.0](v1.11.1...v1.12.0) (2024-04-08)

### Bug Fixes

* make sure sponsored categories, tags show sponsor info ([#289](#289)) ([ad652aa](ad652aa))

### Features

* **ci:** add epic/* release workflow and rename `master` to `trunk` ([#285](#285)) ([008c0a1](008c0a1))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants