Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5184 closed enhancement (duplicate)

Make it obvious when you're using deprecated functions

Reported by: westi's profile westi Owned by: westi's profile 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)

#1 @ryan
17 years ago

rm wp-includes/deprecated.php :-)

#2 @JeremyVisser
17 years ago

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

#3 @JeremyVisser
17 years ago

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

#4 @johnbillion
17 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).

#5 @JeremyVisser
17 years ago

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

#6 @Viper007Bond
17 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. :(

#7 @westi
17 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.