WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 months ago

#37253 new defect (bug)

Add several missing "_deprecated_function()" calls

Reported by: ramiy Owned by:
Milestone: Future Release Priority: low
Severity: normal Version:
Component: General Keywords: has-patch needs-refresh
Focuses: Cc:
PR Number:

Description

I found 13 deprecated functions that don't use _deprecated_function().

We have to use the deprecated functions call to trigger an error when WP_DEBUG is true. It helps developers to catch and fix their code.

See the attached patch.

Attachments (1)

37253.patch (3.4 KB) - added by ramiy 3 years ago.

Download all attachments as: .zip

Change History (7)

@ramiy
3 years ago

#1 @ramiy
3 years ago

  • Keywords has-patch added

#2 @ramiy
3 years ago

It's important because I still see many plugins that use get_screen_icon() and screen_icon().

Many developers don't know that they use those deprecated function because those functions don't call _deprecated_function().

#3 @ramiy
3 years ago

By the way, each and every WordPress deprecated function uses _deprecated_function(). All, besides those 13 functions in the patch.

#4 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 4.6

#5 follow-up: @ocean90
3 years ago

  • Keywords needs-refresh added
  • Milestone changed from 4.6 to Future Release
  • Priority changed from normal to low

I don't think we need to add them to functions which were previously used as callbacks. For the screen icon see [26537]. WP_Screen::render_screen_meta() is not a direct replacement for screen_meta(), it should be something like screen_options() or screen_layout() is using.

#6 in reply to: ↑ 5 @ramiy
3 years ago

Replying to ocean90:

I don't think we need to add them to functions which were previously used as callbacks. For the screen icon see [26537]. WP_Screen::render_screen_meta() is not a direct replacement for screen_meta(), it should be something like screen_options() or screen_layout() is using.

@ocean90, what about the other functions? The patch adds _deprecated_function() to 13 functions.

Note: See TracTickets for help on using tickets.