[wp-trac] [WordPress Trac] #32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit

WordPress Trac noreply at wordpress.org
Thu Dec 10 10:25:39 UTC 2015


#32075: Only set WP_MAX_MEMORY_LIMIT by default when its greater than memory_limit
------------------------------------+-----------------------------
 Reporter:  danielbachhuber         |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Bootstrap/Load          |     Version:  3.2
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In the current patches, there's no indication that `image_memory_limit`
 filter was added in 3.5.0.

 Instead of passing the filter name to the function and then using
 `apply_filters()` on a dynamic filter name, I'd suggest passing the
 context: `wp_raise_memory_limit( 'admin' )` or `wp_raise_memory_limit(
 'image' )`, then applying the corresponding filter depending on context.
 That would allow us to keep to original documentation for these filters,
 which I think is more clear.

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


More information about the wp-trac mailing list