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

Plugin handbook: Misleading code snippets on "Custom Hooks" page #578

Closed
1 task
Tracked by #565
nielslange opened this issue Nov 5, 2022 · 2 comments
Closed
1 task
Tracked by #565
Labels
developer documentation (DevHub) Improvements or additions to developer documentation plugins Issues for Plugin Developer Handbook tracking issue Use to track a series of related issues.

Comments

@nielslange
Copy link
Collaborator

Issue Description

Some code snippet on https://developer.wordpress.org/plugins/hooks/custom-hooks/ are misleading.

Example of an misleading code snippet

Screenshot 2022-11-05 at 12 30 17

URL of the Page with the Issue

Section of Page with the issue

Why is this a problem?

The code snippets contain irrelevant information such as Foo:, Bar: and New 1:. A beginning WordPress developer might copy these parts into their plugin.

Suggested Fix

Remove the irrelevant information from the corresponding code snippets.

@nielslange nielslange added developer documentation (DevHub) Improvements or additions to developer documentation tracking issue Use to track a series of related issues. plugins Issues for Plugin Developer Handbook labels Nov 5, 2022
@github-actions
Copy link

github-actions bot commented Nov 5, 2022

Heads up @theMikeD - the "plugins" label was applied to this issue.

@nielslange nielslange changed the title Plugin handbook: Misleading code snippets on "Header Requirements" page Plugin handbook: Misleading code snippets on "Custom Hooks" page Nov 5, 2022
@theMikeD
Copy link

Done. I also updated the page content to clarify why a prefix is important, and removed the external links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer documentation (DevHub) Improvements or additions to developer documentation plugins Issues for Plugin Developer Handbook tracking issue Use to track a series of related issues.
Projects
None yet
Development

No branches or pull requests

2 participants