Deprecated functions in WordPress are functions that still work but are scheduled for eventual removal. Log Deprecated Notices surfaces calls to these functions so you can address them before they cause breaking changes in a future WordPress update.
The Deprecation Lifecycle in WordPress
WordPress follows a deprecation process before removing any function:
- A function is marked deprecated in a specific WordPress version with a notice logged when it is called.
- It continues to work for at least several major versions after deprecation.
- Eventually it is removed in a future major version.
The WordPress developer handbook documents deprecated functions, when they were deprecated, and what replacement function to use instead. Search for the function name at developer.wordpress.org/reference to find the deprecation notice and the recommended alternative.
Common Deprecated Functions and Their Replacements
Some frequently seen deprecated calls in older WordPress code:
get_currentuserinfo()— deprecated in 3.5. Replacement:wp_get_current_user()wp_specialchars()— deprecated in 2.8. Replacement:esc_html()the_author_posts_link()— deprecated in 2.1. Replacement:get_author_posts_url()with manual link markupget_settings()— deprecated in 2.1. Replacement:get_option()add_contextual_help()— deprecated in 3.3. Replacement: WP_Screen add_help_tab()
If Log Deprecated Notices shows a function you do not recognise, search the WordPress developer reference to find its replacement.
Fixing Deprecated Calls in Your Own Code
If the deprecated call is in your child theme or a custom plugin you control, the fix is straightforward — find the function call in your code and replace it with the current equivalent. Search your code for the function name and update each occurrence. Test thoroughly after the change.
Fixing Deprecated Calls in Third-Party Plugins
You cannot and should not edit third-party plugin files directly because changes are overwritten on the next update. Your options are:
- Check whether a newer version of the plugin already fixes the deprecated call — update to the latest version first.
- Report the deprecated function to the plugin developer with the specific function name, the file path, and the line number shown in Log Deprecated Notices.
- If the plugin is abandoned (no updates for years), replace it with an actively maintained alternative.
Deprecated Hooks vs Deprecated Functions
Log Deprecated Notices tracks both deprecated functions and deprecated hooks (actions and filters). Deprecated hooks are often more impactful because a plugin or theme may be hooking into a removed action and that hook callback will never fire. Check the deprecated hooks tab separately from the deprecated functions tab.
Prioritising Which Deprecations to Fix
Not all deprecated functions are equally urgent. A function deprecated in WordPress 3.0 that is still present in WordPress 6.x has clearly not been removed despite being deprecated for a long time — this is lower priority. A function deprecated in WordPress 6.4 with a removal notice for 7.x is higher priority. Focus on recently deprecated calls first.
For code audits, PHP and WordPress compatibility reviews, and updating legacy custom code to current WordPress standards, a WordPress developer can audit your codebase and implement the necessary updates.