• Resolved binki

    (@binki)


    I can’t figure out what the standards or requirements are for plugin naming in wordpress. It appears, from the examples I read, that this plugin relies on site administrators following strict file-naming conventions when installing plugins. For example, if a plugin were to declare a dependency on contact-form-7/wp-contact-form-7.php and the admin decides to check it out into wp-content/plugins/contact-form instead of wp-content/plugins/contact-form-7 , the first plugin is unable to be enabled. I even tried just listing `wp-contact-form-7.php’ as a dependency.

    There should be a more reliable way of identifying plugins. I think that even extracting Name: Contact Form 7' from wp-contact-form-7.php would be much more reliable than depending on the filename. Unlike in drupal, as another user mentioned earlier, plugins in wordpress don't even have a standard location for acomputer-friendly’ name. The www.ads-software.com URI for wp-contact-form-7 is https://www.ads-software.com/extend/plugins/contact-form-7 — thus contact-form-7' would seem to be the longer-standing reliable handle for that plugin. Yet thecontact-form-7′ is not present in _any_ of the metadatada fields — not even in its readme.txt.

    Perhaps we can come to a compromise that might work, though. Even though plugins are resilient to the point of them being placed in different folders… and often to having the plugin entry point .php file (wp-contact-form-7.php in this case) be renamed, there is no reason I can think of for the administrator to rename a plugin’s .php file — unless if he’s developing a different plugin, of course. So ignoring the directories in a plugin’s per-installation identifier yields a slightly stabler identifier — the basename of the plugin.

    Could plugin-dependencies be modified to accept Depends: wp-contact-form-7.php' and recognize a match even when the per-installation identifier for Contact Form 7 iscontact-form-7/wp-contact-form-7.php’? May the documentation be updated to encourage plugin authors to use the `Provides:’ directive unconditionally in every plugin since the identifier a plugin author places in that directive will enable plugins to depend on it without worrying about this folder names problem?

    https://www.ads-software.com/extend/plugins/plugin-dependencies/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Plugin Dependencies] Unreliable plugin naming/identifying scheme’ is closed to new replies.