#41423 closed defect (bug) (fixed)
Correct @access entry for WP_Image_Editor_Imagick::load()
Reported by: | upadalavipul | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
the access specifiers of the function are public but documentation define is protected.
Attachments (1)
Change History (7)
#2
@
7 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
#3
@
7 years ago
- Component changed from General to Media
- Milestone changed from Awaiting Review to 4.9
#4
@
7 years ago
As far as I'm aware, this was marked protected not because it couldn't technically be called, but because the intent is for load()
not to be called directly by anything other than core functions.
cc: @markoheijnen
#5
@
7 years ago
As I assumed when I was thinking about it. load()
was a true protected method a couple of weeks before the release of WordPress 3.5. Change [22817] changed the behavior. So it's true that the intent was to always be like a protected method.
However lately we started adding additional functionality into WP_Image_Editor
that people could and already do call WP_Image_Editor
themselves. Specially when they only want WP_Image_Editor_Imagick
. Like with the PDF thumbnails changing the resolution(would require extending), some values need to be set before load()
is being called. If we want to prevent people from doing this, we should add a settings variable or alike to wp_get_image_editor()
.
In 41125: