How long does a deprecated function live in core?

I’m curious to find out the process/philosophy behind removing deprecated functions from core.

The Codex says this:

These functions below have been deprecated. That means they have been replaced by new functions or are no longer supported, and may be removed from future versions.

Since ‘may be removed’ is a bit ominous and somewhat unclear, I have the following questions.

  1. What is the criteria for deletion of a deprecated function? (i.e. version gap, time-frame, security risk, etc…)
  2. Is the deletion of a function communicated to the public officially?

For example: get_postdata() has been deprecated since 1.5.1 and doesn’t have an official Codex page. Is there a reason this is still around other than to support older versions of WordPress?

4

To the best of my knowledge, and having heard Nacin say it explicitly, no deprecated function has ever been removed from WordPress to date.

No guarantees for the future, but it’s never happened yet. Still, avoid deprecated functions.

Leave a Comment