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

Special Strings in the "new_admin_email_content" filter starting with ### not being parsed correctly #236

Closed
shawnhooper opened this issue Nov 17, 2023 · 3 comments

Comments

@shawnhooper
Copy link

Originally posted in documentation GitHub WordPress/Documentation-Issue-Tracker#1208

Issue Description

Special Strings in the "new_admin_email_content" filter documentation are incorrect. They are missing the leading ### characters.

URL of the Page with the Issue

https://developer.wordpress.org/reference/hooks/new_admin_email_content/

Section of Page with the issue

Description

Why is this a problem?

Using the names specified in the documentation will result in the strings not being properly replaced when the new admin notification email is sent.

Suggested Fix

  • USERNAME### should be changed to ###USERNAME###
  • ADMIN_URL### should be changed to ###ADMIN_URL###
  • EMAIL### should be changed to ###EMAIL###
  • SITENAME### should be changed to ###SITENAME###
  • SITEURL### should be changed to ###SITEURL###

How it appears in documentation

image

How it appears in code

image

@dd32
Copy link
Member

dd32 commented Jan 16, 2024

This could be argued to be a core docs bug, as it's being parsed as markdown ### being a h3.
Something like replacing it with a list, set of bullet points for each placeholder, such as is done with https://developer.wordpress.org/reference/hooks/site_admin_email_change_email/

I don't know why headers would be supported in PHPDoc though, so ideally we should be disabling that functionality.. but I'm not sure it's an "easy" change.

@dd32
Copy link
Member

dd32 commented Jan 16, 2024

I don't know why headers would be supported in PHPDoc though

This class makes a good reason why it exists:

https://developer.wordpress.org/reference/classes/wp_html_tag_processor/

This should be filed as a core docs bug.

@dd32 dd32 closed this as completed Jan 16, 2024
@dd32 dd32 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants