[wp-trac] [WordPress Trac] #47574: Public custom post status cannot be embedded

WordPress Trac noreply at wordpress.org
Thu Feb 18 23:05:47 UTC 2021


#47574: Public custom post status cannot be embedded
--------------------------------------+-----------------------------
 Reporter:  goaroundagain             |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.7
Component:  Embeds                    |     Version:  5.2.2
 Severity:  normal                    |  Resolution:
 Keywords:  has-unit-tests has-patch  |     Focuses:
--------------------------------------+-----------------------------

Comment (by peterwilsoncc):

 In the [https://github.com/WordPress/wordpress-develop/pull/1020 linked
 pull request], I've modified the patch to use the
 [https://make.wordpress.org/core/2021/02/18/introducing-additional-
 functions-to-check-if-a-post-is-publicly-viewable-in-wordpress-5-7/ new
 `is_post_publicly_viewable()` function] which allows for public custom
 statuses and post types rather than repeat the code.

 I've replaced the existing check the post exists, as
 `is_post_publicly_viewable()` doesn't consider non-existent post as
 public. That would be silly :D

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


More information about the wp-trac mailing list