Making WordPress.org

Opened 7 months ago

Last modified 6 weeks ago

#8115 new defect (bug)

Replace Tonesque due to deprecation.

Reported by: dd32's profile dd32 Owned by:
Milestone: Priority: low
Component: Plugin Directory Keywords: needs-patch good-first-bug
Cc:

Description

Jetpack has deprecated Tonesque:

Deprecated: Function Tonesque::__construct is <strong>deprecated</strong> since version jetpack-13.8 with no alternative available.
Deprecated: Function Tonesque::imagecreatefromurl is <strong>deprecated</strong> since version jetpack-13.8 with no alternative available.

While Jetpack appears to still support it (albeit deprecated) commonly deprecated functionalities are eventually removed, and the deprecated warnings are annoying when a developer is running imports manually :)

We should consider whether this functionality can be easily replaced, or a customised slimmed version just added to the plugin directory codebase.

Change History (1)

#1 @felipevelzani
6 weeks ago

I checked the code, and my understanding is that we only use Tonesque for one thing.

If a plugin banner exists, we use it to generate the plugin’s icon image when one is not available. It finds the average color from the banner and uses that to generate the icon.

But TBH it is very uncommon for a plugin to have a banner and not have an icon. Usually, it is the opposite. Or it just doesn't have anything.

With that in mind, I would suggest removing Tonesque so it always generates a random color based on the plugin name, which I believe already happens for the majority of plugins.

Note: See TracTickets for help on using tickets.