Questions tagged [deprecation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
240 views

How can I fix this deprecation error?

I get this error form the functions.php file How can I fix it? Error Level: E_DEPRECATED Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated File: wp-...
AYNTK's user avatar
  • 7
0 votes
2 answers
288 views

PHP Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string

Since the change to PHP 8.1 (from 8, WP 6.3 is now running, I get once a day, only while opening the dashboard this warnings (repeating twice): "PHP Deprecated: html_entity_decode(): Passing ...
treibstoff's user avatar
0 votes
1 answer
89 views

Replacing the deprecated function the_meta

the_meta is deprecated and it's told to replace it with get_post_meta. I'm using since long time this function for custom fields without styles: //the_meta function without styles: function mymeta() { ...
treibstoff's user avatar
0 votes
1 answer
635 views

WordPress Throwing Deprecated Errors on its own Files

My WordPress Website is throwing PHP Deprecated Errors on wp-include files. I am novice WordPress Developer working on my site. I am being flooded by these errors and extremely high CPU consumption on ...
Amit Bajar's user avatar
10 votes
1 answer
5k views

WordPress 6.1.1 shows deprecated errors with PHP 8.1 & 8.2

Is it related to my server or it is WordPress's error with PHP8.1 and PHP8.2? I see same error for both versions. Should I ignore the errors by setting wp-config.php as: define( 'WP_DEBUG_DISPLAY', ...
doraemon's user avatar
  • 213
0 votes
0 answers
352 views

Call to undefined function _deprecated_file() in class-smtp.php

I have moved two wordpress sites from a hosting provider to my own VPS with plesk. The status given by the wordpress toolkit plugin of plesk is "broken. When I look at the error details the ...
Niels's user avatar
  • 1
0 votes
1 answer
25 views

Is there a way to print/list deprecated functions or hooks in use to the screen?

As the title reads, is there a way to output to screen the list of deprecated functions and hooks that may be use as well as the location of these? For example, in reviewing the hooks in use in a site ...
Motivated's user avatar
  • 205
0 votes
1 answer
48 views

WordPress 6.0 upgrade caused my custom function to stop working

Not working on WordPress 6.0: https://thealliance.health/for-providers/resources/provider-news-archives/ Working dev site on WordPress 5.9.3: https://ccahdev.wpengine.com/for-providers/resources/...
Sky's user avatar
  • 1
5 votes
2 answers
2k views

How can I see a list of pages and post where my custom Gutenberg block is used?

Background: Creating Custom Gutenberg Blocks and the Challenges with Breaking Changes I am new to creating custom Gutenberg blocks (each block is a separate plugin) and have recently ran into the ...
Jonathan L Clark's user avatar
0 votes
1 answer
27 views

I changed .live() to .on() but change is not reflected on the server

I downloaded a quantity increment plugin (themeszone Woocommerce ajax quantity) for my Wordpress site. Some of the Jquery was outdated this line specifically; $('.tz-qty-cont').live('click', function()...
Dean's user avatar
  • 23
0 votes
1 answer
511 views

Replace deprecated get_category_children code with get_terms

I've been using this piece of code for years on one of my websites: <?php if (is_category()) { $this_category = get_category($cat); if (...
Boris's user avatar
  • 3
1 vote
2 answers
3k views

media_buttons_context is deprecated

Was just checking the error logs on a new install of 5.4.1 and see a lot: Got error 'PHP message: PHP Deprecated: media_buttons_context is <strong>deprecated</strong> since version 3.5.0!...
breadwild's user avatar
  • 331
1 vote
0 answers
15 views

Mute Debug Messages from Plugins

I have an older plugin installed that is firing all these PHP Deprecated and PHP Notices in my debug.log every time a page loads. Is it possible to mute PHP Deprecated and PHP Notices but ONLY for ...
mike's user avatar
  • 111
0 votes
0 answers
67 views

Update Code to be Compatible with WP 5.3 ('cannot modify header information' warning)

The following function that we have in a plugin a developer helped us create (he is no longer available) is giving errors when debugging is on once we updated the site from WP 4.9 to WP 5.3. Wondering ...
Kenny J's user avatar
  • 105
0 votes
1 answer
17 views

Overwrote index.php. When I restored it, I got lots of Notice level errors

I overwrote the index.php file in the main directory of wordpress. I was working on something else and uploaded an index.php file from a different project. I didn't realize and no-one pointed it out ...
IJustMightBeAnIdiot's user avatar
0 votes
1 answer
1k views

WordPress core code contains things marked as deprecated by... Wordpress?

I have some problems matching this message in my WordPress network update page: You have the latest version of WordPress. Future security updates will be applied automatically. If you need to re-...
trejder's user avatar
  • 322
1 vote
1 answer
8k views

Replacing a deprecated filter 'woocommerce_get_price' with 'woocommerce_product_get_price'

I recently updated WooCommerce on a site that I didn't make myself. After doing this, then I saw the following line in the error-log: woocommerce_get_price is deprecated since version 3.0.0! Use ...
Zeth's user avatar
  • 858
-3 votes
3 answers
699 views

Your PHP installation appears to be missing the MySQL ... After deleting and restarting from cpanel

I deleted everything in my directory to "start over" When I install wordpress it says : Your PHP installation appears to be missing the MySQL extension which is required by WordPress. I tried changing ...
Eesaa Philips's user avatar
0 votes
1 answer
905 views

Pass parameter to hooked function using custom page template

Based upon this I have tried to write the following code as: Custom Page template: /* Template Name: product_filter */ get_header(); do_action( 'pre_get_posts', 'COOLING'); ...
Muhammad Muazzam's user avatar
1 vote
1 answer
767 views

Deprecated: mysql_connect():

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/gorilla911/public_html/wp-includes/wp-db.php on line 1520 ...
Vivek Tamrakar's user avatar
0 votes
1 answer
1k views

wp_get_http has been deprecated. Use WP_Http instead

I use a premium plugin (for theme dev.) that has included the WordPress Importer plugin and I get a deprecated notice: "wp_get_http has been deprecated. Use WP_Http instead" But the WP_Http send me ...
Knott's user avatar
  • 454
2 votes
0 answers
66 views

Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update

My server is updating to PHP 5.6 next week. I manage about 30 WordPress websites. I looked for a plugin that would check if any of the code throughout the other plugins and theme would break with the ...
byronyasgur's user avatar
  • 3,022
19 votes
4 answers
3k views

How to deprecate a function used in a plugin?

One of the functions I'm using in my plugin is polluting the global scope with a name that could collide with another function (used in another plugin). So, I guess I should deprecate it. But how ...
henrywright's user avatar
  • 3,037
0 votes
1 answer
2k views

wp_create_category deprecated?

Was trying to use this today: WP Create Category https://codex.wordpress.org/Function_Reference/wp_create_category Trying that (which I also assume it's only going to add terms to the built in "...
Nathan's user avatar
  • 431
0 votes
0 answers
164 views

Is there any harm in using RSS.php (or other deprecated features)?

I'm using RSS.php to parse RSS feeds on my site because I haven't got my head around SimplePie yet. Functionally, it works exactly as I want it to, but with error reporting on, I of course get the "...
SinisterBeard's user avatar
1 vote
1 answer
478 views

wp_customize_image_control deprecated add_tab alternative

I have been using add_tab to add a tab in Customizer with default images. It is deprecated and no longer works in WordPress 4.1. How can I create/find an alternative? add_action( 'customize_register',...
Alvaro's user avatar
  • 2,573
8 votes
1 answer
154 views

Deprecating functions in a plugin class

I'm updating one of my plugins and I'm a little stuck with deprecating functions. Originally, my plugin had a global variable and the plugin's main class was instantiated and stored in the global ...
helgatheviking's user avatar
0 votes
1 answer
223 views

Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )

I've been adding some data to the columns of two taxonomies in a theme I'm working on. I've hit something that's got me confused though. I'm using this hook manage_{$taxonomy}_custom_column but the ...
Dan 's user avatar
  • 464
0 votes
1 answer
136 views

Where to find new class reference or function of deprecated one?

After upgrading from WordPress 3.5.2 to 3.6.1, with define('WP_DEBUG', true); a site of mine's showing warning for some deprecated codes throughout the site. Some of 'em are generated from my codes, ...
Mayeenul Islam's user avatar
1 vote
1 answer
2k views

How a deprecated function can crash WordPress site while upgrading

It is said that deprecated functions used in plugins & themes can crash a wordress website while upgrading to newer version, I want to see an example of deprecated function that can cause a crash. ...
Tahir Yasin's user avatar
3 votes
1 answer
10k views

Warning/Notice about functions.php

I have trouble about the notice shows on the top of the home page as: Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7 with no alternative available. ...
Ada's user avatar
  • 31
0 votes
2 answers
234 views

wp_get_theme Warning: Illegal offset type

I'm using Post templates plugin. But its very outdated. I'm getting Warning: Illegal offset type at this line $templates = $themes[$theme]['Template Files']; Here is my full function code. ...
PrivateUser's user avatar
  • 3,461
0 votes
1 answer
474 views

Deprecated function get_user_by_email($email)

I tried to find replacement function for get_user_by_email($email) but no luck. This function I am using to allow user to log in by email address or user id. Is there any replacement function or ...
pixelngrain's user avatar
  • 1,400
0 votes
2 answers
59 views

Is it safe to update from 2.6.2 to the newest version?

I'm using Wordpress version 2.6.2 and now it shows in the page that Deprecated: Assigning the return value of new by reference is deprecated in /home/np14388/domains/<sitename>/public_html/wp-...
jrara's user avatar
  • 135
4 votes
4 answers
28k views

How to replace bloginfo(template_url)

Basically I've used bloginfo(template_url) in a WordPress theme, but when I run theme-checker, it recommends to replace bloginfo(template_url) with get_template_directory_uri(), however when I use ...
WagnerMatosUK's user avatar
3 votes
1 answer
5k views

Use 'add_theme_support' instead of 'add_custom_image_header' In WordPress 3.4

I am debugging my theme using Debug Bar plugin, which is showing me this error (among a few others): Notice: add_custom_image_header is deprecated since version 3.4! Use add_theme_support( 'custom-...
its_me's user avatar
  • 4,501
3 votes
1 answer
101 views

_deprecated_argument for constants

i'm working on updating a theme and previously it had used a lot of php CONSTANTS to set up some options as true or false. we're going to be updating these "decisions" to use add_theme_support() ...
helgatheviking's user avatar
22 votes
4 answers
478 views

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 ...
Brian Fegter's user avatar
  • 9,948
4 votes
4 answers
1k views

Automating deprecated call checks?

I've recently started revamping and re-releasing some abandoned (yet important) WordPress plugins. As I walk through the code patching other bugs, my IDE highlights deprecated function calls for me, ...
EAMann's user avatar
  • 32k
0 votes
1 answer
3k views

Display only author posts in dashboard all posts panel

I would like to display only authors own posts in dashboard all posts section. As of now it displays everything. I found some code here which is written by @t31os Its working correctly. function ...
PrivateUser's user avatar
  • 3,461
6 votes
2 answers
1k views

What is the best way to handle deprecated functions?

Wordpress 3.3 has deprecated the add_contextual_help() functions and it's filters, so in order to continue supporting 3.0 - 3.2.1 and also comply with 3.3, I have done the following: global $...
Aram Kocharyan's user avatar
0 votes
1 answer
2k views

Undefined index: debuging error for theme option template snippet

Hello I tried to find the solution but couldn't get what I am looking for..I am getting error exactly as bellow.. Notice: Undefined index: page in C:\xampp\htdocs\site\wp-content\themes\mytheme\admin\...
pixelngrain's user avatar
  • 1,400
2 votes
5 answers
1k views

How to debug WordPress correctly?

I'm using a few plugins and UpThemes framework on my new website and if I turn on Wp Debug I can see that there are a few errors related to Deprecated functions (but website is working). What I would ...
maisdesign's user avatar
0 votes
1 answer
119 views

How to receive notification of deprecated API elements and functions?

There is some way to get notifications when deprecated API elements are used in WordPress. How is it done? Put WordPress in debug mode (which also shows all other types of errors) or is there another ...
rsman's user avatar
  • 2,290