[wp-trac] [WordPress Trac] #35567: New argument `is_embeddable` for `register_post_type()`
WordPress Trac
noreply at wordpress.org
Mon Feb 29 13:52:14 UTC 2016
#35567: New argument `is_embeddable` for `register_post_type()`
-------------------------------------------------+-------------------------
Reporter: pampfelimetten | Owner: bradleyt
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
Component: Embeds | Release
Severity: normal | Version: 4.4
Keywords: good-first-bug has-patch has-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by bradleyt):
Hi guys, really like the idea of adding a `is_post_embeddable`/
`is_object_embeddable` filter, and changing the function to
`is_object_embeddable` seems sensible.
I have just noticed that manually going to the embed URL for a post which
is set as not embeddable will still return the content. This seems OK to
me, but I think it would be better to return the "Oops! That embed can't
be found." message instead. If so we probably want to add an
`is_post_embeddable` check to the have_posts() conditional on line 34 of
embed-template.php?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35567#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list