WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #49599, comment 2


Ignore:
Timestamp:
03/08/2020 06:57:57 PM (13 months ago)
Author:
herrvigg
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49599, comment 2

    v1 v2  
    1 Uh ... what?! The function concerns plugins so it's obvious it's **related** to plugins... But **related** does not mean relative! I think you are doing a confusion with the semantics.
     1Uh ... what? The function concerns plugins so it's obvious it's **related** to plugins... But **related** does not mean **relative**. I think you are doing a confusion with the semantics.
    22
    3 Here it's quite clear it should concerns the paths. What would "**relative to the plugin directory**" mean, if not relative to WP_PLUGIN_DIR? Either you should speak about absolute path or relative path with respect to WP_PLUGIN_DIR. Any other definition of "relative" is really not intuitive at all and it's just creating some confusions.
     3Here it's quite clear it should concern the paths. What would "**relative to the plugin directory**" mean, if not relative to WP_PLUGIN_DIR? Either you speak about absolute path or relative path with respect to WP_PLUGIN_DIR. Any other definition of "relative" is really not intuitive at all and it's just creating some confusions.
    44
    5 Already the concept of 'plugin' name is quite confusing (combining dir/file.php), but functions such as "plugin_basename($file)" take absolute path but "is_active_plugin($plugin)" take the relative path, as defined from WP_PLUGIN_DIR. The API would gain to be more consistent, but at least the documentation should be clear.
     5Already the concept of 'plugin name' is quite confusing (combining dir/file.php), but functions such as `is_active_plugin($plugin)` take the relative path, as defined from WP_PLUGIN_DIR. The API would gain to be more consistent, but at least the documentation should be clear.
     6
     7[Correction: my first example which was wrong, as `plugin_basename($file)` take absolute path and give the relative path]