Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/29/2020 03:38:06 PM (16 months ago)
Author:
imath
Message:

Move Avatars & Cover from xProfile to Members component : step 3

Move the Avatar upload directory filter from the xProfile functions to the Members functions.
Move the Avatar template functions from xProfile to the Members component.

See #8156

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-template.php

    r12336 r12555  
    15111511 */
    15121512function bp_displayed_user_use_cover_image_header() {
    1513     return (bool) bp_is_active( 'xprofile', 'cover_image' ) && ! bp_disable_cover_image_uploads() && bp_attachments_is_wp_version_supported();
     1513    return (bool) bp_is_active( 'members', 'cover_image' ) && ! bp_disable_cover_image_uploads();
    15141514}
    15151515
     
    26462646            return $url;
    26472647    }
     2648
     2649
     2650/**
     2651 * Render an avatar delete link.
     2652 *
     2653 * @since 1.1.0
     2654 * @since 6.0.0 Moved from /bp-xprofile/bp-xprofile-template.php to this file.
     2655 */
     2656function bp_avatar_delete_link() {
     2657    echo bp_get_avatar_delete_link();
     2658}
     2659
     2660    /**
     2661     * Return an avatar delete link.
     2662     *
     2663     * @since 1.1.0
     2664     * @since 6.0.0 Moved from /bp-xprofile/bp-xprofile-template.php to this file.
     2665     *
     2666     * @return string
     2667     */
     2668    function bp_get_avatar_delete_link() {
     2669
     2670        /**
     2671         * Filters the link used for deleting an avatar.
     2672         *
     2673         * @since 1.1.0
     2674         *
     2675         * @param string $value Nonced URL used for deleting an avatar.
     2676         */
     2677        return apply_filters( 'bp_get_avatar_delete_link', wp_nonce_url( bp_displayed_user_domain() . bp_get_profile_slug() . '/change-avatar/delete-avatar/', 'bp_delete_avatar_link' ) );
     2678    }
Note: See TracChangeset for help on using the changeset viewer.