Skip to content

Commit

Permalink
[ARCH-131] PROD-7948 - Add since tag and direct return query instead …
Browse files Browse the repository at this point in the history
…of var use
  • Loading branch information
jitendrabanjara1991 committed Oct 7, 2024
1 parent a40b82c commit bf036d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/bp-moderation/classes/suspend/class-bp-core-suspend.php
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,6 @@ public static function get_suspend_id( $item_id, $item_type ) {
global $wpdb;
$bp = buddypress();

$result = $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT id FROM {$bp->moderation->table_name} WHERE item_id = %d AND item_type = %s", $item_id, $item_type ) ); // phpcs:ignore

return $result;
return $wpdb->get_var( $wpdb->prepare( "SELECT DISTINCT id FROM {$bp->moderation->table_name} WHERE item_id = %d AND item_type = %s", $item_id, $item_type ) );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ abstract class BP_Suspend_Abstract {
/**
* White listed DB Fields.
*
* @since BuddyBoss [BBVERSION]
*
* @var array
*/
public static $white_list_keys = array(
Expand All @@ -68,6 +66,8 @@ abstract class BP_Suspend_Abstract {
/**
* Components and its moderation types.
*
* @since BuddyBoss [BBVERSION]
*
* @var array[] $components
*/
public static $components = array(
Expand Down

0 comments on commit bf036d3

Please sign in to comment.