Skip to content

Commit

Permalink
Merge branch 'release' into PROD-8210
Browse files Browse the repository at this point in the history
* release: (149 commits)
PROD-8378 - Grunt
PROD-8378 - Remove code which strip html tags so script tag can remove from draft also fixed jshint
PROD-8378 - sanitize topic title when added in draft
PROD-8378 -  sanitize topic title when add/edit
[PROD-8332] Remove open class from message more option wrap once the dropdown is closed
Update: Grunt
Update: Grunt string-replace
Update: Version name update
grunt
Added change log
PROD-8260 - fix the click issue on label
PROD-8260 default telemetry to anonymous
PROD-8279 - implement the version control check
PROD-8279 - updated domain path
PROD-8273 Update function to wp_safe_remote_post
PROD-8273 change function
PROD-7492 Code refactor
PROD-8279 - update the typo
[PROD-8279] PROD-7279 - fix the translation issue with the WP 6.7.1 and the below versions
PROD-8265: Updated View Tutorials links target for Learndash section
...

# Conflicts:
#	src/bp-templates/bp-nouveau/css/buddypress-rtl.min.css
#	src/bp-templates/bp-nouveau/css/buddypress.min.css
  • Loading branch information
KartikSuthar committed Dec 17, 2024
2 parents d404c72 + 7d64c65 commit 9b96bce
Show file tree
Hide file tree
Showing 93 changed files with 4,075 additions and 835 deletions.
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ module.exports = function (grunt) {
expand: true,
ext: '.css',
flatten: true,
src: ['bp-core/admin/sass/*.scss'],
src: [
'bp-core/admin/sass/*.scss',
'!bp-core/admin/sass/tooltips.scss'
],
dest: SOURCE_DIR + 'bp-core/admin/css/'
},
pusher: {
Expand Down
4 changes: 2 additions & 2 deletions bp-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Description: The BuddyBoss Platform adds community features to WordPress. Member Profiles, Activity Feeds, Direct Messaging, Notifications, and more!
* Author: BuddyBoss
* Author URI: https://buddyboss.com/
* Version: 2.7.30
* Version: 2.7.50
* Text Domain: buddyboss
* Domain Path: /bp-languages/
* Domain Path: /src/languages
* License: GPLv2 or later (license.txt)
*/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
},
"license": "GPL-2.0-or-later",
"version": "3.1.0",
"BBVersion": "2.7.30"
"BBVersion": "2.7.50"
}
2 changes: 1 addition & 1 deletion src/bp-activity/bb-activity-reactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ function bb_get_activity_reaction_ajax_callback() {
);

$tab_content = $current_reacted['reactions'];
$popup_heading = $current_tabs['icon_text'];
$popup_heading = 'likes' === strtolower( $current_tabs['name'] ) && ! bb_is_reaction_emotions_enabled() ? $popup_heading : $current_tabs['icon_text'];
$popup_heading_count = $current_tabs['total_count'];
$total_pages = $current_tabs['total_pages'];

Expand Down
19 changes: 15 additions & 4 deletions src/bp-activity/bp-activity-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7156,10 +7156,11 @@ function bb_user_has_mute_notification( $activity_id, $user_id ) {
function bb_validate_activity_privacy( $args ) {
$activity = new BP_Activity_Activity( $args['activity_id'] );

if (
! empty( $activity->privacy ) &&
! empty( $args['user_id'] )
) {
if ( empty( $args['user_id'] ) ) {
$args['user_id'] = bp_loggedin_user_id();
}

if ( ! empty( $activity->privacy ) ) {
if ( 'onlyme' === $activity->privacy && $activity->user_id !== $args['user_id'] ) {
if ( 'new_comment' === $args['validate_action'] ) {
return new WP_Error( 'error', __( 'Sorry, You cannot add comments on `Only Me` activity.', 'buddyboss' ) );
Expand All @@ -7170,6 +7171,9 @@ function bb_validate_activity_privacy( $args ) {
) {
return new WP_Error( 'error', __( 'Sorry, You cannot perform reactions on `Only Me` activity.', 'buddyboss' ) );
}
if ( 'view_activity' === $args['validate_action'] ) {
return new WP_Error( 'error', __( 'Sorry, You cannot view on `Only Me` activity.', 'buddyboss' ) );
}
} elseif (
'friends' === $activity->privacy &&
$activity->user_id !== $args['user_id'] &&
Expand All @@ -7187,6 +7191,13 @@ function bb_validate_activity_privacy( $args ) {
) {
return new WP_Error( 'error', __( 'Sorry, please establish a friendship with the author of the activity to perform a reaction.', 'buddyboss' ) );
}
if ( 'view_activity' === $args['validate_action'] ) {
return new WP_Error( 'error', __( 'Sorry, please establish a friendship with the author of the activity to view.', 'buddyboss' ) );
}
} elseif ( 'loggedin' === $activity->privacy && ! is_user_logged_in() ) {
if ( 'view_activity' === $args['validate_action'] ) {
return new WP_Error( 'error', __( 'Sorry, You cannot view on this activity.', 'buddyboss' ) );
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/bp-blogs/bp-blogs-activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,20 @@ function bp_blogs_register_post_tracking_args( $params = null, $post_type = 0 )
remove_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_tutorlms_post_types' );
}

if ( function_exists( 'bb_feed_not_allowed_meprlms_post_types' ) ) {
remove_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_meprlms_post_types' );
}

$bp_allowed_cpt = bb_feed_post_types();

if ( function_exists( 'bb_feed_not_allowed_tutorlms_post_types' ) ) {
add_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_tutorlms_post_types' );
}

if ( function_exists( 'bb_feed_not_allowed_meprlms_post_types' ) ) {
add_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_meprlms_post_types' );
}

$comment_post_types = apply_filters( 'bp_blogs_record_comment_post_types', $bp_allowed_cpt );
$comment_post_types_array = array_flip( $comment_post_types );

Expand Down
16 changes: 16 additions & 0 deletions src/bp-core/admin/bp-core-admin-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3429,6 +3429,10 @@ function_exists( 'bb_platform_pro' ) &&
(
'polls' === $type &&
version_compare( bb_platform_pro()->version, bb_pro_poll_version(), '<' )
) ||
(
'sso' === $type &&
version_compare( bb_platform_pro()->version, bb_pro_sso_version(), '<' )
)
)
) {
Expand Down Expand Up @@ -3493,6 +3497,10 @@ function_exists( 'bb_platform_pro' ) &&
(
'polls' === $type &&
version_compare( bb_platform_pro()->version, bb_pro_poll_version(), '<' )
) ||
(
'sso' === $type &&
version_compare( bb_platform_pro()->version, bb_pro_sso_version(), '<' )
)
)
) {
Expand Down Expand Up @@ -3722,12 +3730,20 @@ function bb_cpt_feed_enabled_disabled() {
remove_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_tutorlms_post_types' );
}

if ( function_exists( 'bb_feed_not_allowed_meprlms_post_types' ) ) {
remove_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_meprlms_post_types' );
}

$post_types = bb_feed_post_types();

if ( function_exists( 'bb_feed_not_allowed_tutorlms_post_types' ) ) {
add_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_tutorlms_post_types' );
}

if ( function_exists( 'bb_feed_not_allowed_meprlms_post_types' ) ) {
add_filter( 'bb_feed_excluded_post_types', 'bb_feed_not_allowed_meprlms_post_types' );
}

foreach ( $post_types as $cpt ) {
$enable_blog_feeds = apply_filters( 'bb_enable_blog_feed', isset( $_POST["bp-feed-custom-post-type-$cpt"] ), $cpt );

Expand Down
2 changes: 1 addition & 1 deletion src/bp-core/admin/bp-core-admin-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function bb_registration_page_tutorial() {
?>

<p>
<a class="button" href="<?php echo bp_get_admin_url(
<a class="button" target="_blank" href="<?php echo bp_get_admin_url(
add_query_arg(
array(
'page' => 'bp-help',
Expand Down
2 changes: 1 addition & 1 deletion src/bp-core/admin/bp-core-admin-schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ function bp_core_install_suspend() {
KEY user_suspended (user_suspended),
KEY hide_parent (hide_parent),
KEY hide_sitewide (hide_sitewide),
KEY suspend_conditions (user_suspended, hide_parent, hide_sitewide),
KEY suspend_conditions (user_suspended, hide_parent, hide_sitewide)
) {$charset_collate};";

$sql[] = "CREATE TABLE {$bp_prefix}bp_suspend_details (
Expand Down
51 changes: 27 additions & 24 deletions src/bp-core/admin/bp-core-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function bp_admin_setting_callback_admin_admin_bar() {
function bp_admin_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -139,7 +139,7 @@ function bp_admin_setting_callback_private_network_public_content() {
function bp_privacy_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -196,7 +196,7 @@ function bp_admin_setting_callback_blogforum_comments() {
function bp_posts_in_activity_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -332,7 +332,7 @@ function bp_admin_setting_callback_enable_activity_link_preview() {
function bp_activity_settings_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -786,7 +786,7 @@ function bb_admin_setting_callback_default_profile_cover_size() {
function bp_profile_photos_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -815,7 +815,7 @@ function bp_profile_photos_tutorial() {
function bb_group_headers_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -844,7 +844,7 @@ function bb_group_headers_tutorial() {
function bp_group_avatar_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -1159,7 +1159,7 @@ function bb_admin_setting_callback_default_group_cover_size() {
function bb_profile_headers_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -1300,6 +1300,9 @@ function bb_admin_setting_member_profile_actions( $args ) {
<?php
if ( isset( $args['elements'] ) && ! empty( $args['elements'] ) ) {
foreach ( $args['elements'] as $profile_action ) {
if ( false !== strpos( $profile_action['element_class'], 'bp-hide' ) ) {
continue;
}
?>
<div class="bb-member-directory-profile-action bb-member-directory-profile-action-<?php echo esc_attr( $profile_action['element_name'] ); ?> <?php echo ! empty( $profile_action['element_class'] ) ? esc_attr( $profile_action['element_class'] ) : ''; ?>">
<?php
Expand Down Expand Up @@ -1417,7 +1420,7 @@ function bp_admin_setting_callback_group_cover_image_uploads() {
function bp_group_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -1508,7 +1511,7 @@ function bp_admin_setting_callback_group_auto_join() {
function bp_group_types_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -1574,7 +1577,7 @@ function bp_admin_setting_callback_group_restrict_invites() {
function bp_group_hierarchies_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -1958,7 +1961,7 @@ function bp_admin_setting_callback_enable_profile_gravatar() {
function bp_email_invites_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -2078,7 +2081,7 @@ function bp_admin_setting_callback_nickname_hide_last_name() {
function bp_profile_names_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -2395,7 +2398,7 @@ function bb_admin_setting_group_elements( $args ) {
function bp_group_directories_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -2473,7 +2476,7 @@ function bp_admin_setting_callback_register_page_url() {
function bp_admin_registration_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -2512,7 +2515,7 @@ function bp_admin_setting_callback_group_messages() {
function bp_admin_moderation_block_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand All @@ -2539,7 +2542,7 @@ function bp_admin_moderation_block_setting_tutorial() {
function bp_admin_moderation_report_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -2679,7 +2682,7 @@ function bb_admin_setting_callback_on_screen_notifications_visibility() {
function bp_admin_on_screen_notification_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -2776,7 +2779,7 @@ function bb_admin_setting_callback_private_rest_apis() {
<?php
if ( function_exists( 'bbapp_is_private_app_enabled' ) && false === bbapp_is_private_app_enabled() ) {
?>
<div class="bp-feedback info">
<div class="bp-feedback info bp-feedback--clean bp-feedback--vmiddle">
<span class="bp-icon" aria-hidden="true"></span>
<p>
<?php
Expand Down Expand Up @@ -2997,7 +3000,7 @@ function bb_admin_setting_callback_group_subscriptions() {
function bb_profile_slug_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand All @@ -3024,7 +3027,7 @@ function bb_profile_slug_tutorial() {
function bb_registration_restrictions_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -3351,7 +3354,7 @@ function bb_admin_setting_callback_enable_activity_pinned_posts() {
function bb_admin_redirection_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down Expand Up @@ -3654,7 +3657,7 @@ function bb_reactions_settings_callback_reactions_button() {
function bb_admin_performance_general_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand All @@ -3681,7 +3684,7 @@ function bb_admin_performance_general_setting_tutorial() {
function bb_admin_performance_activity_setting_tutorial() {
?>
<p>
<a class="button" href="
<a class="button" target="_blank" href="
<?php
echo esc_url(
bp_get_admin_url(
Expand Down
Loading

0 comments on commit 9b96bce

Please sign in to comment.