[wp-trac] [WordPress Trac] #48477: Add a hook before creating image sub-sizes

WordPress Trac noreply at wordpress.org
Thu Dec 5 23:59:31 UTC 2019


#48477: Add a hook before creating image sub-sizes
-------------------------------------------------+---------------------
 Reporter:  GregLone                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  5.4
Component:  Upload                               |     Version:  5.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing 2nd-opinion  |     Focuses:
-------------------------------------------------+---------------------
Changes (by azaozz):

 * keywords:  has-patch needs-testing 2nd-opinion reporter-feedback => has-
     patch needs-testing 2nd-opinion
 * milestone:  5.3.1 => 5.4


Comment:

 Replying to [comment:7 GregLone]:
 > Currently I’m also thinking adding one after the sub-sizes are created
 and recorded in the database, maybe at the end of
 `wp_update_attachment_metadata()`, with an additional context argument
 (`create`/`update`), like you suggested recently if I remember well.

 Yeah, this can potentially be useful. At the same time I'd prefer not to
 "rush it" in 5.3.1. Perhaps better to confirm the use cases before adding
 the hooks. Then a good decisions can be made whether to pass context, etc.

 Moving this to 5.4 perhaps pending a revised/updated patch.

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


More information about the wp-trac mailing list