[wp-trac] [WordPress Trac] #49599: Wrong PHPDoc wp_get_active_and_valid_plugins

WordPress Trac noreply at wordpress.org
Sun Mar 8 18:23:57 UTC 2020


#49599: Wrong PHPDoc wp_get_active_and_valid_plugins
--------------------------+------------------------------
 Reporter:  herrvigg      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  5.3.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  docs
--------------------------+------------------------------

Comment (by herrvigg):

 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.

 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.

 Already the concept of 'plugin' name is quite confusing (combining
 dir/file.php), but functions such as "plugin_basename($plugin)" take
 relative path, as defined from WP_PLUGIN_DIR. The API would gain to be
 more consistent, but at least the documentation should be clear.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49599#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list