There is a hook_token already, so "menu_token" seems to be an implementation of it, instead of a module.

Comments

dealancer’s picture

Status: Active » Needs review

It is ok, I think. So if you want to use hook_token, please use menu_token_token and it will.

dealancer’s picture

In other hand it would be difficult to rename module.

dealancer’s picture

Status: Needs review » Closed (won't fix)

I am not sure we need to do it - the reason is no so clear fo me, so I am closing this issue.

develcuy’s picture

Assigned: Unassigned » ygerasimov
Status: Closed (won't fix) » Needs review

The thing for me is that menutoken_get_tokens() is more clear than menu_token_get_tokens()... another kind of misstakes may happen. I think that is a good practice to not use "_" in module names because it is the *namespace*.
Anyway, I will appreciate feedback from @ygerasimov before deciding to close this issue.

dealancer’s picture

Hey develCuy could you provide us with links on some authorized sources which have more description for this issue? I would appriciate this, cause I am not understand the problem really good.

Do you mean the problem is in following. When we have a function menu_token_get, drupal could treat it like implemetation of hook_token_get?

develcuy’s picture

Thanks for asking @dealancer,

It is not an official practice but is something that I want to follow: "Namespaces should be lowercase alphanumeric characters only" it excludes "_" and "-".

See #367355: Module names should not contain an underscore for reference.

ygerasimov’s picture

Status: Needs review » Closed (won't fix)

@develCuy I don't think that this is a really a problem about renaming this module. First of all we need to think about sites that already have installed this module. There are plenty of them. As we don't have any problems with name yet and we have all doxigen comments in the code (where expicitly stated what is the name of hook) I wouldn't bother for now.

develcuy’s picture

Assigned: ygerasimov » develcuy
Status: Closed (won't fix) » Postponed

Thanks for your feedback @ygerasimov!

I understand the risk and implications, but prefer to do the change now, because later we will have more users. The path and project will be kept as menu_token, so the filenames and functions will be renamed.

Hope to start working on it next week and release as version 2.x

dealancer’s picture

Status: Postponed » Closed (works as designed)

It's to late to rename module, hooks and tables, so let's close it.

develcuy’s picture

Status: Closed (works as designed) » Postponed

I still want to rename it ;)

dealancer’s picture

ok.

develcuy’s picture

Status: Postponed » Closed (won't fix)

7k installations ;)