[wp-trac] [WordPress Trac] #34561: Abstract some embed template code into functions
WordPress Trac
noreply at wordpress.org
Mon Dec 14 08:35:25 UTC 2015
#34561: Abstract some embed template code into functions
-------------------------------------+---------------------------
Reporter: johnbillion | Owner: DrewAPicture
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.5
Component: Embeds | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+---------------------------
Changes (by swissspidy):
* keywords: has-patch => has-patch needs-testing
* milestone: Future Release => 4.5
Comment:
Thanks for your feedback, Sam! Good that we agree on things that need to
be improved.
[attachment:34561.8.diff] is a suggested first step into this direction
for 4.5.
* Adds new `embed_heading_before` (before `<p class="wp-embed-heading">…`,
`embed_content_before` (between heading and excerpt), and
`embed_content_footer` (inside `<div class="wp-embed-footer">`) hooks
* Adds `$thumbnail_id` parameter to `embed_thumbnail_image_size` and
`embed_thumbnail_image_shape` filters
* Hooks a new `print_embed_thumbnail()` function to `embed_heading_before`
and `embed_content_before`. The attachment is only displayed once
depending on the size.
* Hooks a new `print_embed_site_title()` function to
`embed_content_footer`.
Asked @imath for feedback as well as he implemented this in his
[https://wordpress.org/plugins/wp-idea-stream/ WP Idea Stream] plugin for
embedding user profiles.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34561#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list