bp_attachments_cover_image_is_edit()

Are we on a page to edit a cover image?


Description Description


Return Return

(bool) True if on a page to edit a cover image, false otherwise.


Top ↑

Source Source

File: bp-core/bp-core-attachments.php

1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
function bp_attachments_cover_image_is_edit() {
    $retval = false;
 
    $current_component = bp_current_component();
    if ( bp_is_active( 'xprofile' ) && bp_is_current_component( 'xprofile' ) ) {
        $current_component = 'xprofile';
    }
 
    if ( ! bp_is_active( $current_component, 'cover_image' ) ) {
        return $retval;
    }
 
    if ( bp_is_user_change_cover_image() ) {
        $retval = ! bp_disable_cover_image_uploads();
    }
 
    if ( ( bp_is_group_admin_page() && 'group-cover-image' == bp_get_group_current_admin_tab() )
        || ( bp_is_group_create() && bp_is_group_creation_step( 'group-cover-image' ) ) ) {
        $retval = ! bp_disable_group_cover_image_uploads();
    }
 
    return apply_filters( 'bp_attachments_cover_image_is_edit', $retval, $current_component );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.