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.
Source Source
File: bp-core/bp-core-attachments.php
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 ); }
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |