Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/30/2015 08:21:26 PM (6 years ago)
Author:
imath
Message:

Avatar UI : make sure the current site is using at least WordPress 3.9

To maximize browsers compatibility, the Avatar UI requires Pluload 2.1.1. This version of the script was introduced in version 3.9 of WordPress.
For WordPress versions 3.6 to 3.8, the legacy UI will be used.

Fixes #6290

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r9819 r9827  
    691691     */
    692692    public function enqueue_scripts( $screen_id ) {
    693         if ( ( false === strpos( $screen_id, 'users_page_bp-profile-edit' ) && false === strpos( $screen_id, 'profile_page_bp-profile-edit' ) ) || bp_core_get_root_option( 'bp-disable-avatar-uploads' ) || ! buddypress()->avatar->show_avatars ) {
     693        if ( ( false === strpos( $screen_id, 'users_page_bp-profile-edit' )
     694            && false === strpos( $screen_id, 'profile_page_bp-profile-edit' ) )
     695            || bp_core_get_root_option( 'bp-disable-avatar-uploads' )
     696            || ! buddypress()->avatar->show_avatars
     697            || ! bp_attachments_is_wp_version_supported() ) {
    694698            return;
    695699        }
     
    10701074            <?php endif;
    10711075
    1072             // Load the Avatar UI templates if user avatar uploads are enabled
    1073             if ( ! bp_core_get_root_option( 'bp-disable-avatar-uploads' ) ) : ?>
     1076            // Load the Avatar UI templates if user avatar uploads are enabled and current WordPress version is supported
     1077            if ( ! bp_core_get_root_option( 'bp-disable-avatar-uploads' ) && bp_attachments_is_wp_version_supported() ) : ?>
    10741078                <a href="#TB_inline?width=800px&height=400px&inlineId=bp-xprofile-avatar-editor" title="<?php esc_attr_e( 'Edit Profile Photo', 'buddypress' );?>" class="thickbox bp-xprofile-avatar-user-edit"><?php esc_html_e( 'Edit Profile Photo', 'buddypress' ); ?></a>
    10751079                <div id="bp-xprofile-avatar-editor" style="display:none;">
Note: See TracChangeset for help on using the changeset viewer.