[wp-trac] [WordPress Trac] #23237: Add tag function to format markup

WordPress Trac noreply at wordpress.org
Thu May 16 04:32:30 UTC 2013


#23237: Add tag function to format markup
-------------------------+------------------------------
 Reporter:  ryanve       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by ryanve):

 This ticket is dependent on #23236. I added
 [https://github.com/airve/phat/blob/master/wphat.php wphat.php] in the
 [https://github.com/airve/phat phat repo] called  where I'm working on
 these. The syntax `wp_tag($tagname, $attrs, $inner)` described above is
 ideal IMO. A closing tag is added when `$inner` is not `null`. Do we need
 to provide a syntax for auto-closing XHTML self-closing tags? If needed I
 think one of these syntaxes could work:

 `wp_tag('img/', $attrs)` // reads better
 `wp_tag('img', $attrs, true)` // makes secondary use of the `$inner` param

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


More information about the wp-trac mailing list