[wp-trac] [WordPress Trac] #54736: get_sample_permalink unsets $post->filter even though this is a public property.

WordPress Trac noreply at wordpress.org
Tue Apr 26 04:10:28 UTC 2022


#54736: get_sample_permalink unsets $post->filter even though this is a public
property.
----------------------------------------+-----------------------------
 Reporter:  herregroen                  |       Owner:  hellofromTonya
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  6.0
Component:  Posts, Post Types           |     Version:  2.7.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by peterwilsoncc):

 I've created an initial patch in the linked pull request:

 * The original `filter` value is stored early in the function
 * This value is then restored after been replaced with `sample`

 In [53042] it was ensured that the filter was always set in post objects,
 this is why I am restoring it rather than `null`ing it.

 No tests at present but feel free to push them to the branch on my repo.

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


More information about the wp-trac mailing list