Skip to content

Commit

Permalink
PROD-7433 - Only validate for schedule post
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendrabanjara1991 committed May 20, 2024
1 parent bb19a7f commit 395b441
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bp-templates/bp-nouveau/includes/activity/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,8 @@ function bp_nouveau_ajax_get_single_activity_content() {
);

// Check scheduled status.
$post_status = filter_input( INPUT_POST, 'post_status', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
$post_status = ! empty( $post_status ) ? sanitize_text_field( wp_unslash( $post_status ) ) : '';
if ( ! empty( $post_status ) && in_array( $post_status, array( 'published', 'scheduled' ), true ) ) {
$post_status = filter_input( INPUT_POST, 'status', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
if ( ! empty( $post_status ) && sanitize_text_field( wp_unslash( $post_status ) ) === bb_get_activity_scheduled_status() ) {
$args['status'] = $post_status;
}

Expand Down

0 comments on commit 395b441

Please sign in to comment.