WordPress / Documentation-Issue-Tracker

Issue Tracker for the WordPress Documentation team.
https://make.wordpress.org/docs/
Other
83 stars 41 forks source link

Update Plugin Handbook with a reason why text-domains must be identical to the WordPress Org Repo Slug of the plugin #1001

Open smileBeda opened 1 year ago

smileBeda commented 1 year ago

Issue Description

In WP there are 2 details about text domain that often get missed:

URL of the Page with the Issue

Some of it is talked about here but might profit from some add-on details

Why is this a problem?

Well, it just comes up very often that devs or users want to use $var (and then one needs to inefficiently google for the "reason why not"), and it is also not very prominently documented that the text-domain must match the WP Org Slug.... which is truly confusing and even I as a Plugin dev, discovered this only after the fact. It is confusing because in a WP Plugin there are several "slugs":

Suggested Fix

@theMikeD suggested he will look at some possible ways to add specifically the "why" to the doc.

anandau commented 1 year ago

Plugin developers must ensure that the text domain they are using in their plugin should be unique. But I think this is not the rule that the text domain "must" match the slug of the plugin.

Why do I think so? The plugin review team does not apply this rule while reviewing plugins. This is my experience so far with 10+ plugins. I don't think I can be lucky to bypass a rule so many times 😀

I think it will be best to get this rule verified by the plugin review team and then update the docs with the appropriate verbiage.

github-actions[bot] commented 1 year ago

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