[wp-trac] [WordPress Trac] #23180: Introduce get_plugin_part

WordPress Trac noreply at wordpress.org
Mon Jan 14 08:23:40 UTC 2013


#23180: Introduce get_plugin_part
-----------------------------+------------------------------
 Reporter:  wonderboymusic   |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Plugins          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  dev-feedback     |
-----------------------------+------------------------------

Comment (by tarasm):

 @kovshenin its true that it might necessary to look into plugins directory
 to figure out the paths but it can be done in a way that's not confusing.

 For example: if templates went into templates directory then you'd just
 have to follow directory structure thats in the plugin.

 To load template thats located at /wp-
 content/plugins/someplugin/templates/template1.php, themer would use code

 {{{
 get_template_part( 'templates1')
 }}}

 If its located in subdirectory, /wp-
 content/plugins/someplugin/templates/directory/template1.php, the themer
 would use

 {{{
 get_template_part( 'directory/template1')
 }}}

 Would you like me to propose a patch to this effect?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23180#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list