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

Create function to output admin notices #1161

Open
nalininsbs opened this issue Oct 12, 2023 · 9 comments
Open

Create function to output admin notices #1161

nalininsbs opened this issue Oct 12, 2023 · 9 comments
Assignees
Labels
6.4 Changes in 6.4 release [Status] To do Issue marked as Todo
Milestone

Comments

@nalininsbs
Copy link

Ticket: https://core.trac.wordpress.org/ticket/57791

Has label needs-dev-note

@github-actions
Copy link

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

@abhansnuk
Copy link
Collaborator

Follow up on the trac ticket.

Costdev's reply:

  • plans to focus dev note to introduce extenders to the new wp_admin_notice() and wp_get_admin_notice() functions so that they too can benefit from the reduce the maintenance burden of maintaining HTML for their admin notices
  • has asked for the dev note to get a callout in the Field Guide

This conservative search shows that a significant number of plugins can benefit from these two functions right away.

Status:

  • no dev note in draft, Colin can write it for next week.
  • Highlighted timing need it and to have been reviewed on Monday to include in Field Guide. To be confirmed if this is possible.
  • shared link to issue on documentation tracker on Trac Ticket.

@shabnam611 shabnam611 added the 6.4 Changes in 6.4 release label Oct 14, 2023
@shabnam611 shabnam611 added this to the 6.4 milestone Oct 14, 2023
@shabnam611
Copy link
Collaborator

shabnam611 commented Oct 14, 2023

Keyword: needs-dev-note
Ticket owner: joedolson
Core committer: costdev

There are some work remaining on this ticket which is punted to 6.5 and closing this one for 6.4

This task has not been completed 100% so Colin mentioned to close this trac ticket off for 6.4 and put the remaining task in 6.5. Later in the conversation, Colin offered to write the dev note. So I guess we can use the dev note.

@costdev
Copy link

costdev commented Oct 15, 2023

Hey folks! I have the draft of the dev note here: https://make.wordpress.org/core/?p=108856&preview=1&_ppp=706f77a1f6

This has been peer-reviewed by @joedolson too, so handing over to the Documentation team for final review and publishing.

If a blurb is required for the Field Guide, here's one from the dev note:

These functions abstract the HTML markup generation to reduce the maintenance burden, encourage consistency, and enable argument and message filtering for all admin notices.

Let me know if you need anything else from me. Thanks all! 🙂

@nalininsbs
Copy link
Author

Thank you.

Dev note
Excerpt added, props added.
Minor text edit on bracket and point.

Published https://make.wordpress.org/core/2023/10/16/introducing-admin-notice-functions-in-wordpress-6-4/

Like the section on Usage in WordPress Core. This would be useful for a number of dev notes.

@abhansnuk are you adding to the Field Guide now too that the post is live?

@abhansnuk
Copy link
Collaborator

Thanks @nalininsbs for stepping in and monitoring the flow.

Added to the Field Guide.
image

@abhansnuk
Copy link
Collaborator

Thanks Colin and Joe.

@costdev
Copy link

costdev commented Oct 16, 2023

@abhansnuk Thanks! Quick question: The Field Guide screenshot shows this under the Comments heading, but admin notices can appear in any administration area. Maybe "Notices" would be better here, or do you have other thoughts on this?

@zzap zzap added the [Status] To do Issue marked as Todo label Oct 17, 2023
@codente
Copy link

codente commented Oct 17, 2023

@costdev Thanks! We've moved it to an Admin Notices section in the field guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.4 Changes in 6.4 release [Status] To do Issue marked as Todo
Projects
Status: Done
Development

No branches or pull requests

6 participants