groups_screen_group_admin_cover_image()

Handle the display of a group’s Change cover photo page.

Description

Source

File: bp-groups/screens/single/admin/group-cover-image.php

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function groups_screen_group_admin_cover_image() {
    if ( 'group-cover-image' != bp_get_group_current_admin_tab() ) {
        return false;
    }
 
    // If the logged-in user doesn't have permission or if cover photo uploads are disabled, then stop here.
    if ( ! bp_is_item_admin() || ! bp_group_use_cover_image_header() ) {
        return false;
    }
 
    /**
     * Fires before the loading of the group Change cover photo page template.
     *
     * @since BuddyPress 2.4.0
     *
     * @param int $id ID of the group that is being displayed.
     */
    do_action( 'groups_screen_group_admin_cover_image', bp_get_current_group_id() );
 
    /**
     * Filters the template to load for a group's Change cover photo page.
     *
     * @since BuddyPress 2.4.0
     *
     * @param string $value Path to a group's Change cover photo template.
     */
    bp_core_load_template( apply_filters( 'groups_template_group_admin_cover_image', 'groups/single/home' ) );
}

Changelog

Changelog
Version Description
BuddyPress 2.4.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.