Documentation-Issue-Tracker icon indicating copy to clipboard operation
Documentation-Issue-Tracker copied to clipboard

Update Plugin Best Practices section on Avoid Naming Collisions to include namespaces as an option

Open jonathanbossenger opened this issue 1 year ago • 3 comments

Issue Description

The Avoid Naming Collisions section of the Best Practices page in the Plugin developer handbook includes the options to use prefixes, and classes, but not namespaces, to avoid naming collisions.

We do have a section on using namespaces in our coding standards, so it makes sense to add this to our plugin developer handbook as well.

URL of the Page with the Issue

https://developer.wordpress.org/plugins/plugin-basics/best-practices/

Section of Page with the issue

The section Avoid Naming Collisions

Why is this a problem?

It doesn't include namespaces as a solution

Suggested Fix

Add a section on the use of namespaces as an option, after the prefix section. Include details on how to create good namespaces based on the WordPress coding standards

jonathanbossenger avatar Aug 22 '24 11:08 jonathanbossenger

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

github-actions[bot] avatar Aug 22 '24 11:08 github-actions[bot]

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

github-actions[bot] avatar Aug 22 '24 11:08 github-actions[bot]

I am also offering to add the content for this section, and I will share a draft here for review in the next few days.

jonathanbossenger avatar Aug 22 '24 11:08 jonathanbossenger

Closing in favour of https://github.com/WordPress/developer-plugins-handbook/issues/44

jonathanbossenger avatar Dec 09 '24 18:12 jonathanbossenger