bp_nouveau_ajax_save_cover_position()
Save Cover image position for group and member.
Description
Source
File: bp-templates/bp-nouveau/includes/ajax.php
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | function bp_nouveau_ajax_save_cover_position() { if ( ! bp_is_post_request() ) { wp_send_json_error(); } if ( ! isset( $_POST [ 'position' ] ) ) { wp_send_json_error(); } $position = floatval ( $_POST [ 'position' ] ); $updated = false; if ( bp_is_active( 'groups' ) && bp_is_group() ) { $updated = groups_update_groupmeta( bp_get_current_group_id(), 'bp_cover_position' , $position ); } else if ( bp_is_user() ) { $updated = bp_update_user_meta( bp_displayed_user_id(), 'bp_cover_position' , $position ); } if ( empty ( $updated ) ) { wp_send_json_error(); } $result [ 'content' ] = $position ; wp_send_json_success( $result ); } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.5.1 | 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.