[wp-trac] [WordPress Trac] #34272: Audit embed function names

WordPress Trac noreply at wordpress.org
Tue Oct 13 07:25:34 UTC 2015


#34272: Audit embed function names
----------------------------+-------------------------
 Reporter:  johnbillion     |       Owner:  swissspidy
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  4.4
Component:  Embeds          |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  dev-feedback    |     Focuses:
----------------------------+-------------------------

Comment (by swissspidy):

 The /embed/ rewrite endpoint isn't really dependant on oEmbed. That's why
 naming `get_post_embed_url()`, `get_post_embed_html()` and
 `the_excerpt_embed()` like that makes sense.

 I suggest renaming `wp_oembed_excerpt_more()` and
 `wp_oembed_excerpt_attachment()` to use a `wp_embed` prefix (or perhaps
 just `embed`). There are also `print_oembed_embed_styles()` and
 `print_oembed_embed_scripts()` which could be renamed to
 `print_embed_styles()` and `print_embed_scripts()`.

 In the embed template, there are hooks like `oembed_head` and
 `oembed_footer`. From what I said above, we should consider using
 `embed_head` and `embed_footer` there.

 An alternative approach is to just use `oembed` everywhere, if that's not
 too confusing.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34272#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list