WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#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)

41423.patch (490 bytes) - added by upadalavipul 2 years ago.

Download all attachments as: .zip

Change History (7)

@upadalavipul
2 years ago

#1 @upadalavipul
2 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 41125:

Docs: Correct @access entry for ::load() in WP_Image_Editor, WP_Image_Editor_GD, and WP_Image_Editor_Imagick.

Props upadalavipul.
Fixes #41423.

#3 @SergeyBiryukov
2 years ago

  • Component changed from General to Media
  • Milestone changed from Awaiting Review to 4.9

#4 @mikeschroder
2 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 @markoheijnen
2 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().

#6 @SergeyBiryukov
2 years ago

  • Summary changed from needs documents improvement to Correct @access entry for WP_Image_Editor_Imagick::load()
Note: See TracTickets for help on using tickets.