WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#5184 closed enhancement (duplicate)

Make it obvious when you're using deprecated functions

Reported by: westi Owned by: westi
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords:
Focuses: Cc:

Description

We need to make it more obvious to plugin authors when they are using depreceated functions.

We can use the new WP_DEBUG define to enable some of this stuff and some stuff should always be enabled.

if WP_DEBUG we should just not include depreceated.php so errors are obvious.

Otherwise we can record calls to depreceated functions and notify the admin somehow

Change History (7)

comment:1 ryan7 years ago

rm wp-includes/deprecated.php :-)

comment:2 JeremyVisser7 years ago

  • Summary changed from Make it obvious when your using depreceated functions to Make it obvious when you're using depreceated functions

comment:3 JeremyVisser7 years ago

  • Summary changed from Make it obvious when you're using depreceated functions to Make it obvious when you're using deprecated functions

comment:4 johnbillion7 years ago

Idea: Upon plugin activation when in WP_DEBUG mode, the plugin is grepped for deprecated functions and a warning displayed if any are found.

The Upgrade Preflight plugin hunts down potential 2.3 compatibility problems by traversing the plugin directory and using file_get_contents and strpos to find problem strings. A similar system could be used on plugin activation to hunt down deprecated functions within the a plugin.

Same thing could also be done for themes (related: #4361).

comment:5 JeremyVisser7 years ago

John, I think your idea would be better suited to an upload site — you upload, we validate!

comment:6 Viper007Bond7 years ago

  • Version set to 2.3

Agreed. I don't see the need for this to bloat core, although I do support the intent.

I had actually considered writing something like this:

http://groups.google.com/group/wp-hackers/browse_thread/thread/682206fd10b32247/f41498554d525641

But I got busy with other things. :(

comment:7 westi6 years ago

  • Milestone 2.4 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing as a duplicate of #4361 as they both share the same intent of increasing the obviousness of depreceated function usage.

Note: See TracTickets for help on using tickets.