Skip to content

Commit

Permalink
PROD-7736: Add new filter and option for activity default privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
surajkrsingh committed Oct 1, 2024
1 parent dc02b1c commit 92a275a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function bp_nouveau_activity_localize_scripts( $params = array() ) {
'post_fail' => esc_html__( 'An error occurred while saving your post.', 'buddyboss' ),
'media_fail' => esc_html__( 'To change the media type, remove existing media from your post.', 'buddyboss' ),
),
'default_privacy' => apply_filters( 'bb_activity_default_privacy', 'public' ),
);

$user_displayname = bp_get_loggedin_user_fullname();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ window.bp = window.bp || {};
bp.album_id = 0;
bp.folder_id = 0;
bp.group_id = 0;
bp.privacy = 'public';
bp.privacy = BP_Nouveau.activity.params.default_privacy;
bp.draft_ajax_request = null;
bp.old_draft_data = false;
bp.draft_activity = {
Expand Down Expand Up @@ -309,7 +309,7 @@ window.bp = window.bp || {};
bp.album_id = 0;
bp.folder_id = 0;
bp.group_id = 0;
bp.privacy = 'public';
bp.privacy = BP_Nouveau.activity.params.default_privacy;

$( '.activity-update-form.modal-popup' ).removeClass( 'modal-popup group-activity' ).closest( 'body' ).removeClass( 'activity-modal-open' );

Expand Down Expand Up @@ -1514,7 +1514,7 @@ window.bp = window.bp || {};
link_description: '',
link_url: '',
gif_data: {},
privacy: 'public',
privacy: BP_Nouveau.activity.params.default_privacy,
privacy_modal: 'general',
edit_activity: false,
group_image: '',
Expand Down Expand Up @@ -1645,7 +1645,7 @@ window.bp = window.bp || {};
bp.album_id = 0;
bp.folder_id = 0;
bp.group_id = 0;
bp.privacy = 'public';
bp.privacy = BP_Nouveau.activity.params.default_privacy;

e.preventDefault();

Expand Down

Large diffs are not rendered by default.

0 comments on commit 92a275a

Please sign in to comment.