[wp-trac] [WordPress Trac] #15907: inconsistent handling of plugin_folder in get_plugins()

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 20 03:35:16 UTC 2010


#15907: inconsistent handling of plugin_folder in get_plugins()
--------------------------+-----------------------------
 Reporter:  wpmuguru      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 If you pass the name of a folder to get_plugins, it needs to have a
 leading slash which then stores the plugin list from that folder in
 {{{$wp_plugins['/folder-name']}}}.

 Secondly, the plugin file/path does not include folder-name passed to
 get_plugins, so the returned data has to have the {{{'folder-name/'}}}
 added to the key of each plugin's information before it can be used
 throughout WP. The code I'm currently using to work around the issue is

 {{{
                         $my_plugins = get_plugins( '/extra' );
                         $extra = array();
                         if( !empty( $my_plugins ) ) {
                                 foreach( $my_plugins as $k => $v )
                                         $extra['extra/' . $k] = $v;
                         }
 }}}

 related #15906

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15907>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list