[wp-trac] [WordPress Trac] #34561: Abstract some embed template code into functions
    WordPress Trac 
    noreply at wordpress.org
       
    Wed Nov  4 08:10:08 UTC 2015
    
    
  
#34561: Abstract some embed template code into functions
------------------------------------+-----------------------------
 Reporter:  johnbillion             |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Embeds                  |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------
Changes (by swissspidy):
 * keywords:  needs-patch => has-patch dev-feedback
Comment:
 I'd like to get this and #34278 into 4.4 so we have a good template right
 from the start.
 [attachment:34561.diff] adds `the_embed_header()` (includes the featured
 image and the post title) and `the_embed_footer()` (includes the site
 title and sharing options) template tags. `print_embed_sharing_dialog()`
 is hooked to the `embed_footer` action to print the necessary markup for
 the sharing dialog.
 This already leads to a greatly simplified template, consisting of only 88
 lines!
 Questions:
 the_embed_header()` is rather long. How could the featured image logic be
 separated out of it? The image is displayed before or after the heading,
 depending on the image shape. Maybe that part could be simplified?
 Also, should `the_excerpt_embed()` function also be used to print the
 'Nothing found' message on 404s?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34561#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list