Make WordPress Core

Ticket #23170: theme.php.2.patch

File theme.php.2.patch, 1.2 KB (added by alex-ye, 12 years ago)

Using isset() to avoid the PHP notice .

  • theme.php

    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    14921492                        if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) )
    14931493                                break;
    14941494                        $support = get_theme_support( 'custom-header' );
    1495                         if ( $support[0]['wp-head-callback'] )
     1495                        if ( isset( $support[0]['wp-head-callback'] ) )
    14961496                                remove_action( 'wp_head', $support[0]['wp-head-callback'] );
    14971497                        remove_action( 'admin_menu', array( $GLOBALS['custom_image_header'], 'init' ) );
    14981498                        unset( $GLOBALS['custom_image_header'] );
     
    15021502                        if ( false === did_action( 'wp_loaded', '_custom_header_background_just_in_time' ) )
    15031503                                break;
    15041504                        $support = get_theme_support( 'custom-background' );
     1505                        if ( isset( $support[0]['wp-head-callback'] ) )                       
     1506                                remove_action( 'wp_head', $support[0]['wp-head-callback'] );
    15051507                        remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
    15061508                        unset( $GLOBALS['custom_background'] );