Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/17/2021 12:03:45 PM (3 years ago)
Author:
imath
Message:

Into bp_activity_post_update() do return a WP Error when requested

Props oztaser

Fixes #8587

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-functions.php

    r13108 r13128  
    20522052
    20532053    if ( empty( $r['content'] ) || ! strlen( trim( $r['content'] ) ) ) {
     2054        if ( 'wp_error' === $r['error_type'] ) {
     2055            return new WP_Error( 'bp_activity_missing_content', __( 'Please enter some content to post.', 'buddypress' ) );
     2056        }
     2057
    20542058        return false;
    20552059    }
    20562060
    20572061    if ( bp_is_user_inactive( $r['user_id'] ) ) {
     2062        if ( 'wp_error' === $r['error_type'] ) {
     2063            return new WP_Error( 'bp_activity_inactive_user', __( 'User account has not yet been activated.', 'buddypress' ) );
     2064        }
     2065
    20582066        return false;
    20592067    }
Note: See TracChangeset for help on using the changeset viewer.