Fix: Render notices after page actions if present#14
Merged
JasonTheAdams merged 4 commits intomainfrom Jul 10, 2025
Merged
Conversation
Merged
5 tasks
JasonTheAdams
suggested changes
Jul 10, 2025
Contributor
JasonTheAdams
left a comment
There was a problem hiding this comment.
Thank you, @JoshuaHungDinh! One little suggestion!
JasonTheAdams
approved these changes
Jul 10, 2025
|
@JoshuaHungDinh Can you add a hover state to the explore campaign button? |
Contributor
|
Wrong repo, @jdghinson. 😄 This is an independent package that displays admin notices in WordPress. It has no specific tie to GiveWP. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On certain admin pages, such as the Plugins page, there is a page action link (e.g., "Add Plugin") displayed immediately after the H1 header. Currently, notices with the
below_headerlocation are rendered directly after the H1 tag, which places them between the header and the page action. This can lead to an inconsistent and visually confusing user interface.This PR introduces a conditional check for the presence of a page title action element. If the element exists, notices with the location set to
below_headerwill be rendered immediately after the page action instead of directly after the H1, ensuring a more consistent and intuitive layout.Also updates the GitHub Actions workflow to use actions/cache@v4 instead of the deprecated v2 version. This change resolves the deprecation error in the unit tests.
Affects
Admin notices rendered with
below_headeron pages withpage-title-actionlinks.Visuals
Issue
Resolved
Testing Instructions
below_header.