Changeset 9827
- Timestamp:
- 04/30/2015 08:21:26 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-attachments.php
r9826 r9827 9 9 // Exit if accessed directly 10 10 defined( 'ABSPATH' ) || exit; 11 12 /** 13 * Check if the current WordPress version is using Plupload 2.1.1 14 * 15 * Plupload 2.1.1 was introduced in WordPress 3.9. Our bp-plupload.js 16 * script requires it. So we need to make sure the current WordPress 17 * match with our needs. 18 * 19 * @since BuddyPress (2.3.0) 20 * 21 * @return bool True if WordPress is 3.9+, false otherwise 22 */ 23 function bp_attachments_is_wp_version_supported() { 24 return (bool) version_compare( bp_get_major_wp_version(), '3.9', '>=' ); 25 } 11 26 12 27 /** -
trunk/src/bp-core/bp-core-avatars.php
r9826 r9827 1802 1802 $retval = false; 1803 1803 1804 // No need to carry on if the current WordPress version is not supported. 1805 if ( ! bp_attachments_is_wp_version_supported() ) { 1806 return $retval; 1807 } 1808 1804 1809 if ( bp_is_user_change_avatar() && 'crop-image' !== bp_get_avatar_admin_step() ) { 1805 1810 $retval = ! bp_core_get_root_option( 'bp-disable-avatar-uploads' ); -
trunk/src/bp-xprofile/bp-xprofile-admin.php
r9819 r9827 691 691 */ 692 692 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() ) { 694 698 return; 695 699 } … … 1070 1074 <?php endif; 1071 1075 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() ) : ?> 1074 1078 <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> 1075 1079 <div id="bp-xprofile-avatar-editor" style="display:none;">
Note: See TracChangeset
for help on using the changeset viewer.