Support » Fixing WordPress » Deprecated messages "add" and "get" after upgrade

  • Resolved awdr


    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 */

    – 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,

Viewing 10 replies - 1 through 10 (of 10 total)
  • Your themes just need updating.

    So the only thing I can do is wait for the devolopers to update their themes or use another theme?

    Yes. In the meantime, these notices aren’t serious and they won’t affect the running of your site. Hopefully, the developer of your theme will update it shortly. Updating a theme properly does take some time.

    Ok good. Do you know if it’s possible to remove these notices from showing on my website?

    Thanks for the help esmi!

    They shouldn’t be showing on the front end of your site. If they are, it’s a hosting issue. The error reporting needs re-configuring on your server.

    Thanks. Unfortunately they are. Do you know how I go about and do that or if there’s any docs I can check?

    You need to speak to your hosts about hiding PHP notices. In the meantime, try switching to another theme.

    Will do. Thanks for all the help. I really appreciate it!

    You may close the topic if you wish to do so. Bye!


    If you really want to get rid of the error messages go to WP-Config, in there if you see around line 81 define ('WP_DEBUG', true); change this to define('WP_DEBUG', false); save the file and this should solve the problem.

    I must also add, that if you want to update the themes yourself this is possible, just follow the simple methods listed here and you will be on your way – WordPress is about moving forward and opening new possibilities, just make sure you backup before you start!!

    You will feel so good if you do it yourself instead of waiting for the tedious theme writers 😉 (We are tedious you know)

    Thank you so much, wackyedd! That tutorial for updating the theme yourself was very helpful. Fixed my issue. 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Deprecated messages "add" and "get" after upgrade’ is closed to new replies.