Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/01/2018 10:26:00 PM (4 years ago)
Author:
djpaul
Message:

Templates: swap shared _attachments/avatars/index.php with Legacy version; fix path in wp-admin.

The Nouveau template was previously used, and included a call to a Nouveau-only function, which I missed in r11835.
The Nouveau pack now has a copy of its Nouveau template again.

Also changes a patch in bp_attachments_get_template_part() to support the changed location for this template asset.
This is used for the "Upload Avatar" screens in wp-admin Users > Edit.

Props boonebgorges, hnla.

Fixes #7679 and #7675

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/shared/buddypress/assets/_attachments/avatars/index.php

    r11836 r11839  
    99 *
    1010 * @since 2.3.0
     11 *
     12 * @package BuddyPress
     13 * @subpackage bp-attachments
    1114 */
    1215
     
    3235<script id="tmpl-bp-avatar-delete" type="text/html">
    3336    <# if ( 'user' === data.object ) { #>
    34         <p><?php esc_html_e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
    35         <button type="button" class="button edit" id="bp-delete-avatar"><?php esc_html_e( 'Delete My Profile Photo', 'buddypress' ); ?></button>
     37        <p><?php _e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
     38        <p><a class="button edit" id="bp-delete-avatar" href="#"><?php esc_html_e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p>
    3639    <# } else if ( 'group' === data.object ) { #>
    37         <?php bp_nouveau_user_feedback( 'group-avatar-delete-info' ); ?>
    38         <button type="button" class="button edit" id="bp-delete-avatar"><?php esc_html_e( 'Delete Group Profile Photo', 'buddypress' ); ?></button>
     40        <p><?php _e( "If you'd like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.", 'buddypress' ); ?></p>
     41        <p><a class="button edit" id="bp-delete-avatar" href="#"><?php esc_html_e( 'Delete Group Profile Photo', 'buddypress' ); ?></a></p>
    3942    <# } else { #>
    4043        <?php do_action( 'bp_attachments_avatar_delete_template' ); ?>
     
    4245</script>
    4346
    44 <?php do_action( 'bp_attachments_avatar_main_template' ); ?>
     47<?php do_action( 'bp_attachments_avatar_main_template' );
Note: See TracChangeset for help on using the changeset viewer.