Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/13/2012 01:07:56 PM (12 years ago)
Author:
boonebgorges
Message:

Adds support for WP 3.4 theme functions. Fixes #4098. Props chrisclayton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-core/admin/bp-core-update.php

    r5201 r5979  
    604604
    605605        $installed_plugins = get_plugins();
    606         $installed_themes  = get_themes();
     606
     607        // Backward-compatibility with WP < 3.4 will be removed in a future release
     608        if ( bp_get_major_wp_version() >= 3.4 ) {
     609            $installed_themes = wp_get_themes();
     610        } else {
     611            $installed_themes = get_themes();
     612        }
    607613
    608614        $template_pack_installed = false;
     
    626632
    627633        // Get theme screenshot
    628         $current_theme = get_current_theme();
     634        // Backward-compatibility with WP < 3.4 will be removed in a future release
     635        if ( bp_get_major_wp_version() >= 3.4 ) {
     636            $current_theme = wp_get_theme();
     637        } else {
     638            $current_theme = get_current_theme();
     639        }
    629640        $screenshot    = '';
    630         $themes        = get_themes();
    631 
    632         if ( !empty( $themes[$current_theme]['Screenshot'] ) )
     641
     642        if ( !empty( $installed_themes[$current_theme]['Screenshot'] ) )
    633643            $screenshot = trailingslashit( get_stylesheet_directory_uri() ) . $themes[$current_theme]['Screenshot'];
    634644    ?>
Note: See TracChangeset for help on using the changeset viewer.