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: update above-header hook to use wp_body_open #856

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Jun 7, 2024

In Automattic/newspack-popups#1302, I updated the hook the above-header prompt placement used from before_header to wp_body_open to make sure it worked with block themes. This had the inadvertant side effect of switching the order of the above header ad and above header prompt.

This PR also updates the ads plugin to use wp_body_open for the above header ad placement. This will return the order to normal, and will also make this Global Placement work with block themes.

I've set this up as a regular PR but given the size and that it's impacting some publisher sites, we may want to apply it as a hotfix early next week.

See: p1717780063436159-slack-newspack-support

Steps to test

  1. On a test site, set up an above header ad space, and an above header prompt.
  2. [Steps 2-4 are optional, to see what this originally looked like] In the Newspack Popups plugin, edit this line to use the before_header hook instead to recreate what this used to look like before Update above-header hook used by plugin newspack-popups#1302 landed.
  3. View on the front-end; if you don't have ads fully set up and working, you can also view in the Customizer to see the old placement:

image

  1. Revert the Newspack Popups change you made locally and see what it looks like now on live sites:

image

  1. Apply this PR; confirm that the order is now back to what it used to be before the Newspack Campaigns change:

image

@laurelfulford
Copy link
Contributor Author

Thanks @chickenn00dle!

@laurelfulford laurelfulford merged commit 4e0c1e4 into release Jun 10, 2024
9 checks passed
@laurelfulford laurelfulford deleted the hotfix/update-above-header-hook branch June 10, 2024 18:18
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.0.1 🎉

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