[wp-trac] [WordPress Trac] #12922: Setting featured image does not require the post to be saved

WordPress Trac noreply at wordpress.org
Wed Jul 20 14:30:41 UTC 2016


#12922: Setting featured image does not require the post to be saved
-----------------------------+-----------------------
 Reporter:  rooodini         |       Owner:  flixos90
     Type:  defect (bug)     |      Status:  accepted
 Priority:  normal           |   Milestone:  4.6
Component:  Post Thumbnails  |     Version:  3.0
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------

Comment (by ocean90):

 Let's do [attachment:12922.6.diff]. I've only a couple of minor things
 which can be fixed on commit:

 * `get-post-thumbnail-html` should be added to the end of the list in
 admin-ajax.php.
 * "backwards compatibility" without "s", see
 https://make.wordpress.org/core/handbook/best-practices/spelling/.
 * Can we add a short comment above the code in wp-includes/post.php?
 Something like `// Add or remove featured image`.
 * `_wp_preview_post_thumbnail_filter()`: In the DocBlock, between the name
 and the description of a variable one space should be removed, there
 should be only one (and the others aligned).
 * Yoda conditions for <, >, <= or >= should be avoided, see
 https://make.wordpress.org/core/handbook/best-practices/coding-
 standards/php/#yoda-conditions.
 * It seems like `$single` is unused in
 `_wp_preview_post_thumbnail_filter()`. It should be removed. (The
 `add_filter()` call needs to be adjusted too, 4 => 3)

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


More information about the wp-trac mailing list