Deprecated messages "add" and "get" after upgrade
-
Hi there,
I’ve just upgraded to the 3.4.1 version and I receive the following message for two of my themes:
Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( ‘custom-background’, $args ) instead. in /var/www/web/xxxx/xxxx/wp-includes/functions.php on line 2628 Notice: add_custom_image_header is deprecated since version 3.4! Use add_theme_support( ‘custom-header’, $args ) instead. in /var/www/web/xxxx/xxxx/wp-includes/functions.php on line 2628 Notice: get_theme_data is deprecated since version 3.4! Use wp_get_theme() instead. in /var/www/web/xxxx/xxxx/wp-includes/functions.php on line 2628
I’m having issues with a theme called Hatch and the other one is called Minimatica. The latter one does not give the get_theme_data message.
It works fines with no messages if I switch back to either the Twenty Ten or Eleven theme.
I’ve tried the following:
1. Re-installed version 3.4.1 – 2 times.
2. Checked the …/wp-includes/functions.php file as advised to do in the message – Unable to find add_custom_background, add_custom_image_header or get_theme_data in there.
3. Checked line 2628 in …/wp-includes/functions.php file – Found:
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function,
4. Checked the functions.php file for the theme Hatch – Found the following:
/* Add support for custom backgrounds */ add_custom_background();
– Replaced the last line with:
add_theme_support( 'custom-background', $args )
/* Add a way for the custom header to be styled in the admin panel that controls custom headers. See hatch_admin_header_style(), below. */ add_custom_image_header( 'hatch_header_style', 'hatch_admin_header_style', 'hatch_admin_header_image' );
– Replaced the last line with:
add_theme_support( 'custom-header', $args )
– Unable to find get_theme_data.
Updated the *.php file but it resulted in a “syntax error” so I just put the original file back so I could access the wp-admin site again.
5. Updated all plugins – Same message appeared and now also under the “Update details” but all were successfully updated.
6. Deactivated all plugins.
7. Re-installed themes.
I’ve searched on WP’s support docs, FAQ’s and forum and also on google but cannot find anything that helps me. Could anyone please help me with this?
I recently started with WP and I have no previous experience with the tool and php so please give me easy and clear suggestions on what I can try. Thanks!
Kind Regards,
awdr
- The topic ‘Deprecated messages "add" and "get" after upgrade’ is closed to new replies.