%s% used', 'buddydrive' ), $space_left['percent'] ), $space_left ); } } /** * Displays a form if the file needs a password to be downloaded. */ function buddydrive_file_password_form() { ?>

' . $space_left . ''; } add_action( 'bp_members_admin_user_stats', 'buddydrive_wpadmin_profile_stats', 10, 1 ); /** * An Editor other plugins can use for their need. * * @since 1.3.0 * * @param string $editor_id the Editor's id to insert the BuddyDrive oembed link into. */ function buddydrive_editor( $editor_id = '' ) { $buddydrive = buddydrive(); $current_user_can = (bool) apply_filters( 'buddydrive_editor_can', is_user_logged_in() ); // Bail if current user can't use it and if not in front end if ( ! $current_user_can || is_admin() ) { return; } // Enqueue Thickbox wp_enqueue_style ( 'thickbox' ); wp_enqueue_script( 'thickbox' ); if ( ! empty( $editor_id ) ) { $buddydrive->editor_id = $editor_id; } // Temporary filters to add custom strings and settings add_filter( 'bp_attachments_get_plupload_l10n', 'buddydrive_editor_strings', 10, 1 ); add_filter( 'bp_attachments_get_plupload_default_settings', 'buddydrive_editor_settings', 10, 1 ); add_filter( 'buddydrive_attachment_script_data', 'buddydrive_editor_script_data', 10, 1 ); // Enqueue BuddyPress attachments scripts bp_attachments_enqueue_scripts( 'BuddyDrive_Attachment' ); // Remove the temporary filters remove_filter( 'bp_attachments_get_plupload_l10n', 'buddydrive_editor_strings', 10, 1 ); remove_filter( 'bp_attachments_get_plupload_default_settings', 'buddydrive_editor_settings', 10, 1 ); remove_filter( 'buddydrive_attachment_script_data', 'buddydrive_editor_script_data', 10, 1 ); $url = remove_query_arg( array_keys( $_REQUEST ) ); ?>