Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/13/2012 12:59:21 PM (13 years ago)
Author:
boonebgorges
Message:

Adds support for WP 3.4 theme functions. Fixes #4098

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/functions.php

    r5927 r5978  
    8888
    8989    // This theme allows users to set a custom background
    90     add_custom_background( 'bp_dtheme_custom_background_style' );
     90    // Backward-compatibility with WP < 3.4 will be removed in a future release
     91    if ( bp_get_major_wp_version() >= 3.4 ) {
     92        $custom_background_args = array(
     93            'wp-head-callback' => 'bp_dtheme_custom_background_style'
     94        );
     95        add_theme_support( 'custom-background', $custom_background_args );
     96    } else {
     97        add_custom_background( 'bp_dtheme_custom_background_style' );
     98    }
    9199
    92100    // Add custom header support if allowed
     
    104112
    105113        // Add a way for the custom header to be styled in the admin panel that controls custom headers.
    106         add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' );
     114        // Backward-compatibility with WP < 3.4 will be removed in a future release
     115        if ( bp_get_major_wp_version() >= 3.4 ) {
     116            $custom_header_args = array(
     117                'wp-head-callback' => 'bp_dtheme_header_style',
     118                'admin-head-callback' => 'bp_dtheme_admin_header_style'
     119            );
     120            add_theme_support( 'custom-header', $custom_header_args );
     121        } else {
     122            add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' );
     123        }
    107124    }
    108125
Note: See TracChangeset for help on using the changeset viewer.