[buddypress-trac] [BuddyPress Trac] #6948: Add more filters to short-circuit avatar/cover image operations.
buddypress-trac
noreply at wordpress.org
Tue Mar 8 21:06:39 UTC 2016
#6948: Add more filters to short-circuit avatar/cover image operations.
-------------------------------------+--------------------
Reporter: DJPaul | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.5.1
Component: Component - Attachments | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------------------+--------------------
Comment (by imath):
You mean in 02.patch, instead of having
{{{
if ( isset( $pre_filter['result'] ) ) {
bp_attachments_json_response( $pre_filter['result'], $is_html4,
$pre_filter );
}
}}}
Using this:
{{{
if ( isset( $pre_filter['result'] ) ) {
return;
}
}}}
If so we come back to your patch :) And the UI will display an error
message.
Maybe i misunderstood your goal. If you want to completely disable cover
image uploads, filters are already existing:
{{{
// For members :
add_filter( 'bp_is_profile_cover_image_active', '__return_false' );
// For groups :
add_filter( 'bp_is_groups_cover_image_active', '__return_false' );
}}}
I think it's best to use these, because the error message in the UI is not
great for the user. If the goal is to short-circuit the upload, then
.02.patch should help make this happen, am i wrong ?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6948#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list