Make WordPress Core

Opened 8 years ago

Last modified 6 years ago

#37253 new defect (bug)

Add several missing "_deprecated_function()" calls

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

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 8 years ago.

Download all attachments as: .zip

Change History (7)

@ramiy
8 years ago

#1 @ramiy
8 years ago

  • Keywords has-patch added

#2 @ramiy
8 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
8 years ago

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

#4 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 4.6

#5 follow-up: @ocean90
8 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
8 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.