Completed
Branch develop (da3211)
by J.D.
02:19
created
Category
src/components/points/includes/members.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 
21 21
 	bp_core_new_nav_item(
22 22
 		array(
23
-			'name'                => _x( 'Points', 'BuddyPress member profile nav item', 'wordpoints-bp' ),
23
+			'name'                => _x('Points', 'BuddyPress member profile nav item', 'wordpoints-bp'),
24 24
 			'slug'                => 'points',
25
-			'default_subnav_slug' => key( $points_types ),
25
+			'default_subnav_slug' => key($points_types),
26 26
 			'screen_function'     => 'wordpoints_bp_points_members_profile_screen',
27 27
 			'parent_url'          => $bp->displayed_user->domain,
28 28
 			'parent_slug'         => $bp->profile->slug,
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		, 'members'
31 31
 	);
32 32
 
33
-	foreach ( $points_types as $slug => $points_type ) {
33
+	foreach ($points_types as $slug => $points_type) {
34 34
 
35 35
 		bp_core_new_subnav_item(
36 36
 			array(
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	);
59 59
 
60 60
 	bp_core_load_template(
61
-		apply_filters( 'bp_core_template_plugin', 'members/single/plugins' )
61
+		apply_filters('bp_core_template_plugin', 'members/single/plugins')
62 62
 	);
63 63
 }
64 64
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @param string $points_type The slug of the points type being displayed.
80 80
 	 */
81
-	do_action( 'wordpoints_bp_points_members_profile_screen_content', $points_type );
81
+	do_action('wordpoints_bp_points_members_profile_screen_content', $points_type);
82 82
 }
83 83
 
84 84
 /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
  *
89 89
  * @param string $points_type The slug of the points type being displayed.
90 90
  */
91
-function wordpoints_bp_points_members_profile_screen_content_stats( $points_type ) {
91
+function wordpoints_bp_points_members_profile_screen_content_stats($points_type) {
92 92
 
93 93
 	/**
94 94
 	 * Fires before the stats are displayed on the Points screen on the member profile.
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 * @param string $points_type The slug of the points type being displayed.
99 99
 	 */
100
-	do_action( 'wordpoints_bp_points_members_profile_screen_before_stats', $points_type );
100
+	do_action('wordpoints_bp_points_members_profile_screen_before_stats', $points_type);
101 101
 
102 102
 	?>
103 103
 
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 			echo esc_html(
110 110
 				sprintf(
111 111
 					// translators: 1: Points type name; 2: Formatted points amount.
112
-					__( '%1$s: %2$s', 'wordpoints-bp' )
113
-					, wordpoints_get_points_type_setting( $points_type, 'name' )
112
+					__('%1$s: %2$s', 'wordpoints-bp')
113
+					, wordpoints_get_points_type_setting($points_type, 'name')
114 114
 					, wordpoints_get_formatted_points(
115 115
 						bp_displayed_user_id()
116 116
 						, $points_type
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		 *
132 132
 		 * @param string $points_type The slug of the points type being displayed.
133 133
 		 */
134
-		do_action( 'wordpoints_bp_points_members_profile_screen_stats', $points_type );
134
+		do_action('wordpoints_bp_points_members_profile_screen_stats', $points_type);
135 135
 
136 136
 		?>
137 137
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 *
147 147
 	 * @param string $points_type The slug of the points type being displayed.
148 148
 	 */
149
-	do_action( 'wordpoints_bp_points_members_profile_screen_after_stats', $points_type );
149
+	do_action('wordpoints_bp_points_members_profile_screen_after_stats', $points_type);
150 150
 }
151 151
 
152 152
 /**
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
  *
157 157
  * @param string $points_type The slug of the points type being displayed.
158 158
  */
159
-function wordpoints_bp_points_members_profile_screen_content_logs( $points_type ) {
159
+function wordpoints_bp_points_members_profile_screen_content_logs($points_type) {
160 160
 
161 161
 	/**
162 162
 	 * Fires before the logs are displayed on the Points screen on the member profile.
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 *
166 166
 	 * @param string $points_type The slug of the points type being displayed.
167 167
 	 */
168
-	do_action( 'wordpoints_bp_points_members_profile_screen_before_logs', $points_type );
168
+	do_action('wordpoints_bp_points_members_profile_screen_before_logs', $points_type);
169 169
 
170 170
 	$query = new WordPoints_Points_Logs_Query(
171 171
 		array(
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		)
175 175
 	);
176 176
 
177
-	wordpoints_show_points_logs( $query, array( 'show_users' => false ) );
177
+	wordpoints_show_points_logs($query, array('show_users' => false));
178 178
 
179 179
 	/**
180 180
 	 * Fires after the logs are displayed on the Points screen on the member profile.
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 *
184 184
 	 * @param string $points_type The slug of the points type being displayed.
185 185
 	 */
186
-	do_action( 'wordpoints_bp_points_members_profile_screen_after_logs', $points_type );
186
+	do_action('wordpoints_bp_points_members_profile_screen_after_logs', $points_type);
187 187
 }
188 188
 
189 189
 // EOF
Please login to merge, or discard this patch.
src/components/points/includes/actions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  * @since 1.0.0
8 8
  */
9 9
 
10
-add_action( 'bp_setup_nav', 'wordpoints_bp_points_members_profile_nav' );
11
-add_action( 'wordpoints_bp_points_members_profile_screen_content', 'wordpoints_bp_points_members_profile_screen_content_stats' );
12
-add_action( 'wordpoints_bp_points_members_profile_screen_content', 'wordpoints_bp_points_members_profile_screen_content_logs' );
10
+add_action('bp_setup_nav', 'wordpoints_bp_points_members_profile_nav');
11
+add_action('wordpoints_bp_points_members_profile_screen_content', 'wordpoints_bp_points_members_profile_screen_content_stats');
12
+add_action('wordpoints_bp_points_members_profile_screen_content', 'wordpoints_bp_points_members_profile_screen_content_logs');
13 13
 
14 14
 // EOF
Please login to merge, or discard this patch.
src/components/points/points.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
  *
15 15
  * @since 1.0.0
16 16
  */
17
-require_once( WORDPOINTS_BP_DIR . '/components/points/includes/members.php' );
17
+require_once(WORDPOINTS_BP_DIR . '/components/points/includes/members.php');
18 18
 
19 19
 /**
20 20
  * Hook up the action and filter hooks relating to the points component.
21 21
  *
22 22
  * @since 1.0.0
23 23
  */
24
-require_once( WORDPOINTS_BP_DIR . '/components/points/includes/actions.php' );
24
+require_once(WORDPOINTS_BP_DIR . '/components/points/includes/actions.php');
25 25
 
26 26
 // EOF
Please login to merge, or discard this patch.
src/components/ranks/includes/integration/points/actions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,6 +7,6 @@
 block discarded – undo
7 7
  * @since 1.0.0
8 8
  */
9 9
 
10
-add_action( 'wordpoints_bp_points_members_profile_screen_stats', 'wordpoints_bp_ranks_points_members_profile_screen_content_stats' );
10
+add_action('wordpoints_bp_points_members_profile_screen_stats', 'wordpoints_bp_ranks_points_members_profile_screen_content_stats');
11 11
 
12 12
 // EOF
Please login to merge, or discard this patch.
src/components/ranks/includes/integration/points/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  *
15 15
  * @param string $points_type The slug of the points type being displayed.
16 16
  */
17
-function wordpoints_bp_ranks_points_members_profile_screen_content_stats( $points_type ) {
17
+function wordpoints_bp_ranks_points_members_profile_screen_content_stats($points_type) {
18 18
 
19 19
 	?>
20 20
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		echo wp_kses_post(
25 25
 			sprintf(
26 26
 				// translators: Rank name.
27
-				__( 'Rank: %s', 'wordpoints-bp' )
27
+				__('Rank: %s', 'wordpoints-bp')
28 28
 				, wordpoints_get_formatted_user_rank(
29 29
 					bp_displayed_user_id()
30 30
 					, "points_type-$points_type"
Please login to merge, or discard this patch.
src/components/ranks/ranks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@
 block discarded – undo
7 7
  * @since   1.0.0
8 8
  */
9 9
 
10
-if ( wordpoints_component_is_active( 'points' ) ) {
10
+if (wordpoints_component_is_active('points')) {
11 11
 
12 12
 	/**
13 13
 	 * The functions integrating the ranks component with the points component.
14 14
 	 *
15 15
 	 * @since 1.0.0
16 16
 	 */
17
-	require_once( WORDPOINTS_BP_DIR . '/components/ranks/includes/integration/points/functions.php' );
17
+	require_once(WORDPOINTS_BP_DIR . '/components/ranks/includes/integration/points/functions.php');
18 18
 
19 19
 	/**
20 20
 	 * Hooks up the actions and filters integrating ranks with the points component.
21 21
 	 *
22 22
 	 * @since 1.0.0
23 23
 	 */
24
-	require_once( WORDPOINTS_BP_DIR . '/components/ranks/includes/integration/points/actions.php' );
24
+	require_once(WORDPOINTS_BP_DIR . '/components/ranks/includes/integration/points/actions.php');
25 25
 }
26 26
 
27 27
 // EOF
Please login to merge, or discard this patch.
src/includes/constants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
  *
15 15
  * @type string
16 16
  */
17
-define( 'WORDPOINTS_BP_DIR', dirname( dirname( __FILE__ ) ) );
17
+define('WORDPOINTS_BP_DIR', dirname(dirname(__FILE__)));
18 18
 
19 19
 // EOF
Please login to merge, or discard this patch.
src/includes/actions.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,47 +7,47 @@
 block discarded – undo
7 7
  * @since 1.0.0
8 8
  */
9 9
 
10
-if ( function_exists( 'bp_is_active' ) ) {
10
+if (function_exists('bp_is_active')) {
11 11
 
12
-	if ( bp_is_active( 'messages' ) ) {
12
+	if (bp_is_active('messages')) {
13 13
 
14
-		add_action( 'wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_messages_entities_init' );
15
-		add_action( 'wordpoints_init_app_registry-entities-restrictions-know', 'wordpoints_bp_messages_entity_restrictions_know_init' );
16
-		add_action( 'wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_messages_hook_actions_init' );
17
-		add_action( 'wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_messages_hook_events_init' );
14
+		add_action('wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_messages_entities_init');
15
+		add_action('wordpoints_init_app_registry-entities-restrictions-know', 'wordpoints_bp_messages_entity_restrictions_know_init');
16
+		add_action('wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_messages_hook_actions_init');
17
+		add_action('wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_messages_hook_events_init');
18 18
 	}
19 19
 
20
-	if ( bp_is_active( 'friends' ) ) {
20
+	if (bp_is_active('friends')) {
21 21
 
22
-		add_action( 'wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_friends_entities_init' );
23
-		add_action( 'wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_friends_hook_actions_init' );
24
-		add_action( 'wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_friends_hook_events_init' );
22
+		add_action('wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_friends_entities_init');
23
+		add_action('wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_friends_hook_actions_init');
24
+		add_action('wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_friends_hook_events_init');
25 25
 	}
26 26
 
27
-	if ( bp_is_active( 'groups' ) ) {
27
+	if (bp_is_active('groups')) {
28 28
 
29
-		add_action( 'wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_groups_entities_init' );
30
-		add_action( 'wordpoints_init_app_registry-entities-restrictions-know', 'wordpoints_bp_groups_entity_restrictions_know_init' );
31
-		add_action( 'wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_groups_hook_actions_init' );
32
-		add_action( 'wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_groups_hook_events_init' );
29
+		add_action('wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_groups_entities_init');
30
+		add_action('wordpoints_init_app_registry-entities-restrictions-know', 'wordpoints_bp_groups_entity_restrictions_know_init');
31
+		add_action('wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_groups_hook_actions_init');
32
+		add_action('wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_groups_hook_events_init');
33 33
 
34
-		add_action( 'bp_groups_delete_group', 'wordpoints_bp_groups_split_delete_group_action', 10, 2 );
34
+		add_action('bp_groups_delete_group', 'wordpoints_bp_groups_split_delete_group_action', 10, 2);
35 35
 	}
36 36
 
37
-	if ( bp_is_active( 'activity' ) ) {
37
+	if (bp_is_active('activity')) {
38 38
 
39
-		add_action( 'wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_activity_entities_init' );
40
-		add_action( 'wordpoints_init_app_registry-entities-restrictions-know', 'wordpoints_bp_activity_entity_restrictions_know_init' );
41
-		add_action( 'wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_activity_hook_actions_init' );
42
-		add_action( 'wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_activity_hook_events_init' );
39
+		add_action('wordpoints_init_app_registry-apps-entities', 'wordpoints_bp_activity_entities_init');
40
+		add_action('wordpoints_init_app_registry-entities-restrictions-know', 'wordpoints_bp_activity_entity_restrictions_know_init');
41
+		add_action('wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_activity_hook_actions_init');
42
+		add_action('wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_activity_hook_events_init');
43 43
 
44
-		add_action( 'bp_activity_before_delete', 'wordpoints_bp_activity_split_before_delete_action' );
44
+		add_action('bp_activity_before_delete', 'wordpoints_bp_activity_split_before_delete_action');
45 45
 	}
46 46
 
47
-	if ( bp_is_active( 'xprofile' ) ) {
47
+	if (bp_is_active('xprofile')) {
48 48
 
49
-		add_action( 'wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_xprofile_hook_actions_init' );
50
-		add_action( 'wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_xprofile_hook_events_init' );
49
+		add_action('wordpoints_init_app_registry-hooks-actions', 'wordpoints_bp_xprofile_hook_actions_init');
50
+		add_action('wordpoints_init_app_registry-hooks-events', 'wordpoints_bp_xprofile_hook_events_init');
51 51
 	}
52 52
 
53 53
 } // End if ( BuddyPress installed ).
Please login to merge, or discard this patch.
src/includes/functions.php 1 patch
Spacing   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
20 20
  *
21 21
  * @param WordPoints_App_Registry $entities The entities app.
22 22
  */
23
-function wordpoints_bp_messages_entities_init( $entities ) {
23
+function wordpoints_bp_messages_entities_init($entities) {
24 24
 
25
-	$children = $entities->get_sub_app( 'children' );
25
+	$children = $entities->get_sub_app('children');
26 26
 
27
-	$entities->register( 'bp_message', 'WordPoints_BP_Entity_Message' );
28
-	$children->register( 'bp_message', 'content', 'WordPoints_BP_Entity_Message_Content' );
29
-	$children->register( 'bp_message', 'date_sent', 'WordPoints_BP_Entity_Message_Date_Sent' );
30
-	$children->register( 'bp_message', 'recipients', 'WordPoints_BP_Entity_Message_Recipients' );
31
-	$children->register( 'bp_message', 'sender', 'WordPoints_BP_Entity_Message_Sender' );
32
-	$children->register( 'bp_message', 'subject', 'WordPoints_BP_Entity_Message_Subject' );
27
+	$entities->register('bp_message', 'WordPoints_BP_Entity_Message');
28
+	$children->register('bp_message', 'content', 'WordPoints_BP_Entity_Message_Content');
29
+	$children->register('bp_message', 'date_sent', 'WordPoints_BP_Entity_Message_Date_Sent');
30
+	$children->register('bp_message', 'recipients', 'WordPoints_BP_Entity_Message_Recipients');
31
+	$children->register('bp_message', 'sender', 'WordPoints_BP_Entity_Message_Sender');
32
+	$children->register('bp_message', 'subject', 'WordPoints_BP_Entity_Message_Subject');
33 33
 }
34 34
 
35 35
 /**
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
  * @param WordPoints_Class_Registry_Deep_Multilevel $restrictions The restrictions
46 46
  *                                                                registry.
47 47
  */
48
-function wordpoints_bp_messages_entity_restrictions_know_init( $restrictions ) {
48
+function wordpoints_bp_messages_entity_restrictions_know_init($restrictions) {
49 49
 
50 50
 	$restrictions->register(
51 51
 		'thread_accessible'
52
-		, array( 'bp_message' )
52
+		, array('bp_message')
53 53
 		, 'WordPoints_BP_Entity_Restriction_Message_Thread_Accessible'
54 54
 	);
55 55
 }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  *
64 64
  * @param WordPoints_Hook_Actions $actions The action registry.
65 65
  */
66
-function wordpoints_bp_messages_hook_actions_init( $actions ) {
66
+function wordpoints_bp_messages_hook_actions_init($actions) {
67 67
 
68 68
 	$actions->register(
69 69
 		'bp_message_send'
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		, array(
72 72
 			'action' => 'messages_message_sent',
73 73
 			'data'   => array(
74
-				'arg_index' => array( 'bp_message' => 0 ),
74
+				'arg_index' => array('bp_message' => 0),
75 75
 			),
76 76
 		)
77 77
 	);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
  *
87 87
  * @param WordPoints_Hook_Events $events The event registry.
88 88
  */
89
-function wordpoints_bp_messages_hook_events_init( $events ) {
89
+function wordpoints_bp_messages_hook_events_init($events) {
90 90
 
91 91
 	$events->register(
92 92
 		'bp_message_send'
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
  *
120 120
  * @param WordPoints_App_Registry $entities The entities app.
121 121
  */
122
-function wordpoints_bp_friends_entities_init( $entities ) {
122
+function wordpoints_bp_friends_entities_init($entities) {
123 123
 
124
-	$children = $entities->get_sub_app( 'children' );
124
+	$children = $entities->get_sub_app('children');
125 125
 
126
-	$entities->register( 'bp_friendship', 'WordPoints_BP_Entity_Friendship' );
127
-	$children->register( 'bp_friendship', 'date_created', 'WordPoints_BP_Entity_Friendship_Date_Created' );
128
-	$children->register( 'bp_friendship', 'friend', 'WordPoints_BP_Entity_Friendship_Friend' );
129
-	$children->register( 'bp_friendship', 'initiator', 'WordPoints_BP_Entity_Friendship_Initiator' );
126
+	$entities->register('bp_friendship', 'WordPoints_BP_Entity_Friendship');
127
+	$children->register('bp_friendship', 'date_created', 'WordPoints_BP_Entity_Friendship_Date_Created');
128
+	$children->register('bp_friendship', 'friend', 'WordPoints_BP_Entity_Friendship_Friend');
129
+	$children->register('bp_friendship', 'initiator', 'WordPoints_BP_Entity_Friendship_Initiator');
130 130
 }
131 131
 
132 132
 /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  *
139 139
  * @param WordPoints_Hook_Actions $actions The action registry.
140 140
  */
141
-function wordpoints_bp_friends_hook_actions_init( $actions ) {
141
+function wordpoints_bp_friends_hook_actions_init($actions) {
142 142
 
143 143
 	$actions->register(
144 144
 		'bp_friendship_request'
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			'action' => 'friends_friendship_requested',
148 148
 			'data'   => array(
149 149
 				// 0 is the ID, but 3 gives us the object itself.
150
-				'arg_index' => array( 'bp_friendship' => 3 ),
150
+				'arg_index' => array('bp_friendship' => 3),
151 151
 			),
152 152
 		)
153 153
 	);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 			'action' => 'friends_friendship_withdrawn',
160 160
 			'data'   => array(
161 161
 				// 0 is the ID, but 1 gives us the object itself.
162
-				'arg_index' => array( 'bp_friendship' => 1 ),
162
+				'arg_index' => array('bp_friendship' => 1),
163 163
 			),
164 164
 		)
165 165
 	);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 			'action' => 'friends_friendship_accepted',
172 172
 			'data'   => array(
173 173
 				// 0 is the ID, but 3 gives us the object itself.
174
-				'arg_index' => array( 'bp_friendship' => 3 ),
174
+				'arg_index' => array('bp_friendship' => 3),
175 175
 			),
176 176
 		)
177 177
 	);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 			// Despite the name, it fires before delete.
184 184
 			'action' => 'friends_friendship_deleted',
185 185
 			'data'   => array(
186
-				'arg_index' => array( 'bp_friendship' => 0 ),
186
+				'arg_index' => array('bp_friendship' => 0),
187 187
 			),
188 188
 		)
189 189
 	);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
  *
199 199
  * @param WordPoints_Hook_Events $events The event registry.
200 200
  */
201
-function wordpoints_bp_friends_hook_events_init( $events ) {
201
+function wordpoints_bp_friends_hook_events_init($events) {
202 202
 
203 203
 	$events->register(
204 204
 		'bp_friendship_request'
@@ -242,25 +242,25 @@  discard block
 block discarded – undo
242 242
  *
243 243
  * @param WordPoints_App_Registry $entities The entities app.
244 244
  */
245
-function wordpoints_bp_groups_entities_init( $entities ) {
246
-
247
-	$children = $entities->get_sub_app( 'children' );
248
-
249
-	$entities->register( 'bp_group', 'WordPoints_BP_Entity_Group' );
250
-	$children->register( 'bp_group', 'creator', 'WordPoints_BP_Entity_Group_Creator' );
251
-	$children->register( 'bp_group', 'date_created', 'WordPoints_BP_Entity_Group_Date_Created' );
252
-	$children->register( 'bp_group', 'description', 'WordPoints_BP_Entity_Group_Description' );
253
-	$children->register( 'bp_group', 'name', 'WordPoints_BP_Entity_Group_Name' );
254
-	$children->register( 'bp_group', 'parent', 'WordPoints_BP_Entity_Group_Parent' );
255
-	$children->register( 'bp_group', 'slug', 'WordPoints_BP_Entity_Group_Slug' );
256
-	$children->register( 'bp_group', 'status', 'WordPoints_BP_Entity_Group_Status' );
257
-
258
-	if ( bp_is_active( 'activity' ) ) {
259
-		$entities->register( 'bp_group_activity_update', 'WordPoints_BP_Entity_Activity_Update' );
260
-		$children->register( 'bp_group_activity_update', 'author', 'WordPoints_BP_Entity_Activity_Update_Author' );
261
-		$children->register( 'bp_group_activity_update', 'content', 'WordPoints_BP_Entity_Activity_Update_Content' );
262
-		$children->register( 'bp_group_activity_update', 'date_posted', 'WordPoints_BP_Entity_Activity_Update_Date_Posted' );
263
-		$children->register( 'bp_group_activity_update', 'group', 'WordPoints_BP_Entity_Group_Activity_Update_Group' );
245
+function wordpoints_bp_groups_entities_init($entities) {
246
+
247
+	$children = $entities->get_sub_app('children');
248
+
249
+	$entities->register('bp_group', 'WordPoints_BP_Entity_Group');
250
+	$children->register('bp_group', 'creator', 'WordPoints_BP_Entity_Group_Creator');
251
+	$children->register('bp_group', 'date_created', 'WordPoints_BP_Entity_Group_Date_Created');
252
+	$children->register('bp_group', 'description', 'WordPoints_BP_Entity_Group_Description');
253
+	$children->register('bp_group', 'name', 'WordPoints_BP_Entity_Group_Name');
254
+	$children->register('bp_group', 'parent', 'WordPoints_BP_Entity_Group_Parent');
255
+	$children->register('bp_group', 'slug', 'WordPoints_BP_Entity_Group_Slug');
256
+	$children->register('bp_group', 'status', 'WordPoints_BP_Entity_Group_Status');
257
+
258
+	if (bp_is_active('activity')) {
259
+		$entities->register('bp_group_activity_update', 'WordPoints_BP_Entity_Activity_Update');
260
+		$children->register('bp_group_activity_update', 'author', 'WordPoints_BP_Entity_Activity_Update_Author');
261
+		$children->register('bp_group_activity_update', 'content', 'WordPoints_BP_Entity_Activity_Update_Content');
262
+		$children->register('bp_group_activity_update', 'date_posted', 'WordPoints_BP_Entity_Activity_Update_Date_Posted');
263
+		$children->register('bp_group_activity_update', 'group', 'WordPoints_BP_Entity_Group_Activity_Update_Group');
264 264
 	}
265 265
 }
266 266
 
@@ -277,24 +277,24 @@  discard block
 block discarded – undo
277 277
  * @param WordPoints_Class_Registry_Deep_Multilevel $restrictions The restrictions
278 278
  *                                                                registry.
279 279
  */
280
-function wordpoints_bp_groups_entity_restrictions_know_init( $restrictions ) {
280
+function wordpoints_bp_groups_entity_restrictions_know_init($restrictions) {
281 281
 
282 282
 	$restrictions->register(
283 283
 		'status_nonpublic'
284
-		, array( 'bp_group' )
284
+		, array('bp_group')
285 285
 		, 'WordPoints_BP_Entity_Restriction_Group_Status_Nonpublic'
286 286
 	);
287 287
 
288
-	if ( bp_is_active( 'activity' ) ) {
288
+	if (bp_is_active('activity')) {
289 289
 		$restrictions->register(
290 290
 			'hidden'
291
-			, array( 'bp_group_activity_update' )
291
+			, array('bp_group_activity_update')
292 292
 			, 'WordPoints_BP_Entity_Restriction_Activity_Hidden'
293 293
 		);
294 294
 
295 295
 		$restrictions->register(
296 296
 			'spam'
297
-			, array( 'bp_group_activity_update' )
297
+			, array('bp_group_activity_update')
298 298
 			, 'WordPoints_BP_Entity_Restriction_Activity_Spam'
299 299
 		);
300 300
 	}
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
  *
310 310
  * @param WordPoints_Hook_Actions $actions The action registry.
311 311
  */
312
-function wordpoints_bp_groups_hook_actions_init( $actions ) {
312
+function wordpoints_bp_groups_hook_actions_init($actions) {
313 313
 
314 314
 	$actions->register(
315 315
 		'bp_group_create'
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 			'action' => 'groups_create_group',
319 319
 			'data'   => array(
320 320
 				// 0 is the ID, but 2 gives us the object itself.
321
-				'arg_index' => array( 'bp_group' => 2 ),
321
+				'arg_index' => array('bp_group' => 2),
322 322
 			),
323 323
 		)
324 324
 	);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 		, array(
330 330
 			'action' => 'groups_before_delete_group',
331 331
 			'data'   => array(
332
-				'arg_index' => array( 'bp_group' => 0 ),
332
+				'arg_index' => array('bp_group' => 0),
333 333
 			),
334 334
 		)
335 335
 	);
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 		, array(
341 341
 			'action' => 'groups_join_group',
342 342
 			'data'   => array(
343
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
343
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
344 344
 			),
345 345
 		)
346 346
 	);
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 		, array(
352 352
 			'action' => 'groups_leave_group',
353 353
 			'data'   => array(
354
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
354
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
355 355
 			),
356 356
 		)
357 357
 	);
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 		, array(
363 363
 			'action' => 'groups_ban_member',
364 364
 			'data'   => array(
365
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
365
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
366 366
 			),
367 367
 		)
368 368
 	);
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 		, array(
374 374
 			'action' => 'groups_unban_member',
375 375
 			'data'   => array(
376
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
376
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
377 377
 			),
378 378
 		)
379 379
 	);
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 		, array(
385 385
 			'action' => 'groups_remove_member',
386 386
 			'data'   => array(
387
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
387
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
388 388
 			),
389 389
 		)
390 390
 	);
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 		, array(
396 396
 			'action' => 'wordpoints_bp_groups_delete_group_remove_member',
397 397
 			'data'   => array(
398
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
398
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
399 399
 			),
400 400
 		)
401 401
 	);
@@ -406,8 +406,8 @@  discard block
 block discarded – undo
406 406
 		, array(
407 407
 			'action' => 'groups_promote_member',
408 408
 			'data'   => array(
409
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
410
-				'requirements' => array( 2 => 'mod' ),
409
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
410
+				'requirements' => array(2 => 'mod'),
411 411
 			),
412 412
 		)
413 413
 	);
@@ -418,8 +418,8 @@  discard block
 block discarded – undo
418 418
 		, array(
419 419
 			'action' => 'groups_promote_member',
420 420
 			'data'   => array(
421
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
422
-				'requirements' => array( 2 => 'admin' ),
421
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
422
+				'requirements' => array(2 => 'admin'),
423 423
 			),
424 424
 		)
425 425
 	);
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 		, array(
431 431
 			'action' => 'groups_demote_member',
432 432
 			'data'   => array(
433
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
433
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
434 434
 			),
435 435
 		)
436 436
 	);
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 		, array(
450 450
 			'action' => 'groups_uninvite_user',
451 451
 			'data'   => array(
452
-				'arg_index' => array( 'bp_group' => 0, 'user' => 1 ),
452
+				'arg_index' => array('bp_group' => 0, 'user' => 1),
453 453
 			),
454 454
 		)
455 455
 	);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 		, array(
461 461
 			'action' => 'groups_accept_invite',
462 462
 			'data'   => array(
463
-				'arg_index' => array( 'user' => 0, 'bp_group' => 1, 'inviter:user' => 2 ),
463
+				'arg_index' => array('user' => 0, 'bp_group' => 1, 'inviter:user' => 2),
464 464
 			),
465 465
 		)
466 466
 	);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		, array(
472 472
 			'action' => 'groups_delete_invite',
473 473
 			'data'   => array(
474
-				'arg_index' => array( 'user' => 0, 'bp_group' => 1 ),
474
+				'arg_index' => array('user' => 0, 'bp_group' => 1),
475 475
 			),
476 476
 		)
477 477
 	);
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 		, array(
483 483
 			'action' => 'groups_membership_requested',
484 484
 			'data'   => array(
485
-				'arg_index' => array( 'user' => 0, 'bp_group' => 2 ),
485
+				'arg_index' => array('user' => 0, 'bp_group' => 2),
486 486
 			),
487 487
 		)
488 488
 	);
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 		, array(
494 494
 			'action' => 'groups_membership_accepted',
495 495
 			'data'   => array(
496
-				'arg_index' => array( 'user' => 0, 'bp_group' => 1 ),
496
+				'arg_index' => array('user' => 0, 'bp_group' => 1),
497 497
 			),
498 498
 		)
499 499
 	);
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 		, array(
505 505
 			'action' => 'groups_avatar_uploaded',
506 506
 			'data'   => array(
507
-				'arg_index' => array( 'bp_group' => 0 ),
507
+				'arg_index' => array('bp_group' => 0),
508 508
 			),
509 509
 		)
510 510
 	);
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 		, array(
527 527
 			'action' => 'groups_cover_image_uploaded',
528 528
 			'data'   => array(
529
-				'arg_index' => array( 'bp_group' => 0 ),
529
+				'arg_index' => array('bp_group' => 0),
530 530
 			),
531 531
 		)
532 532
 	);
@@ -537,12 +537,12 @@  discard block
 block discarded – undo
537 537
 		, array(
538 538
 			'action' => 'groups_cover_image_deleted',
539 539
 			'data'   => array(
540
-				'arg_index' => array( 'bp_group' => 0 ),
540
+				'arg_index' => array('bp_group' => 0),
541 541
 			),
542 542
 		)
543 543
 	);
544 544
 
545
-	if ( bp_is_active( 'activity' ) ) {
545
+	if (bp_is_active('activity')) {
546 546
 
547 547
 		$actions->register(
548 548
 			'bp_group_activity_update_post'
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 			, array(
551 551
 				'action' => 'bp_groups_posted_update',
552 552
 				'data'   => array(
553
-					'arg_index' => array( 'bp_group_activity_update' => 3 ),
553
+					'arg_index' => array('bp_group_activity_update' => 3),
554 554
 				),
555 555
 			)
556 556
 		);
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 			, array(
562 562
 				'action' => 'bp_activity_mark_as_ham',
563 563
 				'data'   => array(
564
-					'arg_index' => array( 'bp_group_activity_update' => 0 ),
564
+					'arg_index' => array('bp_group_activity_update' => 0),
565 565
 				),
566 566
 			)
567 567
 		);
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 			, array(
573 573
 				'action' => 'bp_activity_mark_as_spam',
574 574
 				'data'   => array(
575
-					'arg_index' => array( 'bp_group_activity_update' => 0 ),
575
+					'arg_index' => array('bp_group_activity_update' => 0),
576 576
 				),
577 577
 			)
578 578
 		);
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 			, array(
584 584
 				'action' => 'wordpoints_bp_activity_before_delete_activity_update',
585 585
 				'data'   => array(
586
-					'arg_index' => array( 'bp_group_activity_update' => 0 ),
586
+					'arg_index' => array('bp_group_activity_update' => 0),
587 587
 				),
588 588
 			)
589 589
 		);
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
  *
601 601
  * @param WordPoints_Hook_Events $events The event registry.
602 602
  */
603
-function wordpoints_bp_groups_hook_events_init( $events ) {
603
+function wordpoints_bp_groups_hook_events_init($events) {
604 604
 
605 605
 	$events->register(
606 606
 		'bp_group_create'
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 
619 619
 	// Support for multiple signature args was added in WordPoints 2.3.0-alpha-2.
620 620
 	// See https://github.com/WordPoints/wordpoints/issues/594.
621
-	if ( version_compare( WORDPOINTS_VERSION, '2.3.0-alpha-1', '>' ) ) {
621
+	if (version_compare(WORDPOINTS_VERSION, '2.3.0-alpha-1', '>')) {
622 622
 
623 623
 		$events->register(
624 624
 			'bp_group_join'
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 				),
728 728
 				// The inviter arg wasn't added until BuddyPress 2.8.0.
729 729
 				// See https://buddypress.trac.wordpress.org/ticket/7410.
730
-				'args'    => ( version_compare( buddypress()->version, '2.8.0-alpha', '>=' )
730
+				'args'    => (version_compare(buddypress()->version, '2.8.0-alpha', '>=')
731 731
 					? array(
732 732
 						'bp_group'     => 'WordPoints_Hook_Arg',
733 733
 						'user'         => 'WordPoints_Hook_Arg',
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 	// Group avatar uploads can be disabled.
782 782
 	// The group avatar upload action was added to BuddyPress in 2.8.0.
783 783
 	// See https://buddypress.trac.wordpress.org/changeset/11314.
784
-	if ( ! bp_disable_group_avatar_uploads() && version_compare( buddypress()->version, '2.8.0-alpha', '>=' ) ) {
784
+	if ( ! bp_disable_group_avatar_uploads() && version_compare(buddypress()->version, '2.8.0-alpha', '>=')) {
785 785
 
786 786
 		$events->register(
787 787
 			'bp_group_avatar_upload'
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 	// Cover image uploads can be disabled.
803 803
 	// The cover image delete action was only added in BuddyPress 2.8.0.
804 804
 	// See https://buddypress.trac.wordpress.org/ticket/7409.
805
-	if ( ! bp_disable_group_cover_image_uploads() && version_compare( buddypress()->version, '2.8.0-alpha', '>=' ) ) {
805
+	if ( ! bp_disable_group_cover_image_uploads() && version_compare(buddypress()->version, '2.8.0-alpha', '>=')) {
806 806
 
807 807
 		$events->register(
808 808
 			'bp_group_cover_image_upload'
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 		);
821 821
 	}
822 822
 
823
-	if ( bp_is_active( 'activity' ) ) {
823
+	if (bp_is_active('activity')) {
824 824
 
825 825
 		$events->register(
826 826
 			'bp_group_activity_update_post'
@@ -852,9 +852,9 @@  discard block
 block discarded – undo
852 852
  * @param BP_Groups_Group $group    The group object.
853 853
  * @param int[]           $user_ids The IDs of the users.
854 854
  */
855
-function wordpoints_bp_groups_split_delete_group_action( $group, $user_ids ) {
855
+function wordpoints_bp_groups_split_delete_group_action($group, $user_ids) {
856 856
 
857
-	foreach ( $user_ids as $user_id ) {
857
+	foreach ($user_ids as $user_id) {
858 858
 
859 859
 		/**
860 860
 		 * Fires for each user that is a member of a group that is being deleted.
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
 		 * @param BP_Groups_Group $group    The group object.
865 865
 		 * @param int[]           $user_ids The IDs of the users.
866 866
 		 */
867
-		do_action( 'wordpoints_bp_groups_delete_group_remove_member', $group, $user_id );
867
+		do_action('wordpoints_bp_groups_delete_group_remove_member', $group, $user_id);
868 868
 	}
869 869
 }
870 870
 
@@ -881,25 +881,25 @@  discard block
 block discarded – undo
881 881
  *
882 882
  * @param WordPoints_App_Registry $entities The entities app.
883 883
  */
884
-function wordpoints_bp_activity_entities_init( $entities ) {
884
+function wordpoints_bp_activity_entities_init($entities) {
885 885
 
886
-	$children = $entities->get_sub_app( 'children' );
886
+	$children = $entities->get_sub_app('children');
887 887
 
888
-	$entities->register( 'bp_activity', 'WordPoints_BP_Entity_Activity' );
889
-	$children->register( 'bp_activity', 'date', 'WordPoints_BP_Entity_Activity_Date' );
890
-	$children->register( 'bp_activity', 'user', 'WordPoints_BP_Entity_Activity_User' );
888
+	$entities->register('bp_activity', 'WordPoints_BP_Entity_Activity');
889
+	$children->register('bp_activity', 'date', 'WordPoints_BP_Entity_Activity_Date');
890
+	$children->register('bp_activity', 'user', 'WordPoints_BP_Entity_Activity_User');
891 891
 
892
-	$entities->register( 'bp_activity_update', 'WordPoints_BP_Entity_Activity_Update' );
893
-	$children->register( 'bp_activity_update', 'author', 'WordPoints_BP_Entity_Activity_Update_Author' );
894
-	$children->register( 'bp_activity_update', 'content', 'WordPoints_BP_Entity_Activity_Update_Content' );
895
-	$children->register( 'bp_activity_update', 'date_posted', 'WordPoints_BP_Entity_Activity_Update_Date_Posted' );
892
+	$entities->register('bp_activity_update', 'WordPoints_BP_Entity_Activity_Update');
893
+	$children->register('bp_activity_update', 'author', 'WordPoints_BP_Entity_Activity_Update_Author');
894
+	$children->register('bp_activity_update', 'content', 'WordPoints_BP_Entity_Activity_Update_Content');
895
+	$children->register('bp_activity_update', 'date_posted', 'WordPoints_BP_Entity_Activity_Update_Date_Posted');
896 896
 
897
-	$entities->register( 'bp_activity_comment', 'WordPoints_BP_Entity_Activity_Comment' );
898
-	$children->register( 'bp_activity_comment', 'activity', 'WordPoints_BP_Entity_Activity_Comment_Activity' );
899
-	$children->register( 'bp_activity_comment', 'author', 'WordPoints_BP_Entity_Activity_Comment_Author' );
900
-	$children->register( 'bp_activity_comment', 'content', 'WordPoints_BP_Entity_Activity_Update_Content' );
901
-	$children->register( 'bp_activity_comment', 'date_posted', 'WordPoints_BP_Entity_Activity_Update_Date_Posted' );
902
-	$children->register( 'bp_activity_comment', 'parent', 'WordPoints_BP_Entity_Activity_Comment_Parent' );
897
+	$entities->register('bp_activity_comment', 'WordPoints_BP_Entity_Activity_Comment');
898
+	$children->register('bp_activity_comment', 'activity', 'WordPoints_BP_Entity_Activity_Comment_Activity');
899
+	$children->register('bp_activity_comment', 'author', 'WordPoints_BP_Entity_Activity_Comment_Author');
900
+	$children->register('bp_activity_comment', 'content', 'WordPoints_BP_Entity_Activity_Update_Content');
901
+	$children->register('bp_activity_comment', 'date_posted', 'WordPoints_BP_Entity_Activity_Update_Date_Posted');
902
+	$children->register('bp_activity_comment', 'parent', 'WordPoints_BP_Entity_Activity_Comment_Parent');
903 903
 }
904 904
 
905 905
 /**
@@ -915,41 +915,41 @@  discard block
 block discarded – undo
915 915
  * @param WordPoints_Class_Registry_Deep_Multilevel $restrictions The restrictions
916 916
  *                                                                registry.
917 917
  */
918
-function wordpoints_bp_activity_entity_restrictions_know_init( $restrictions ) {
918
+function wordpoints_bp_activity_entity_restrictions_know_init($restrictions) {
919 919
 
920 920
 	$restrictions->register(
921 921
 		'hidden'
922
-		, array( 'bp_activity' )
922
+		, array('bp_activity')
923 923
 		, 'WordPoints_BP_Entity_Restriction_Activity_Hidden'
924 924
 	);
925 925
 
926 926
 	$restrictions->register(
927 927
 		'spam'
928
-		, array( 'bp_activity' )
928
+		, array('bp_activity')
929 929
 		, 'WordPoints_BP_Entity_Restriction_Activity_Spam'
930 930
 	);
931 931
 
932 932
 	$restrictions->register(
933 933
 		'hidden'
934
-		, array( 'bp_activity_update' )
934
+		, array('bp_activity_update')
935 935
 		, 'WordPoints_BP_Entity_Restriction_Activity_Hidden'
936 936
 	);
937 937
 
938 938
 	$restrictions->register(
939 939
 		'spam'
940
-		, array( 'bp_activity_update' )
940
+		, array('bp_activity_update')
941 941
 		, 'WordPoints_BP_Entity_Restriction_Activity_Spam'
942 942
 	);
943 943
 
944 944
 	$restrictions->register(
945 945
 		'hidden'
946
-		, array( 'bp_activity_comment' )
946
+		, array('bp_activity_comment')
947 947
 		, 'WordPoints_BP_Entity_Restriction_Activity_Hidden'
948 948
 	);
949 949
 
950 950
 	$restrictions->register(
951 951
 		'spam'
952
-		, array( 'bp_activity_comment' )
952
+		, array('bp_activity_comment')
953 953
 		, 'WordPoints_BP_Entity_Restriction_Activity_Spam'
954 954
 	);
955 955
 }
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
  *
964 964
  * @param WordPoints_Hook_Actions $actions The action registry.
965 965
  */
966
-function wordpoints_bp_activity_hook_actions_init( $actions ) {
966
+function wordpoints_bp_activity_hook_actions_init($actions) {
967 967
 
968 968
 	// Activity update.
969 969
 	$actions->register(
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
 		, array(
973 973
 			'action' => 'bp_activity_posted_update',
974 974
 			'data'   => array(
975
-				'arg_index' => array( 'bp_activity_update' => 2 ),
975
+				'arg_index' => array('bp_activity_update' => 2),
976 976
 			),
977 977
 		)
978 978
 	);
@@ -983,7 +983,7 @@  discard block
 block discarded – undo
983 983
 		, array(
984 984
 			'action' => 'bp_activity_mark_as_spam',
985 985
 			'data'   => array(
986
-				'arg_index' => array( 'bp_activity_update' => 0 ),
986
+				'arg_index' => array('bp_activity_update' => 0),
987 987
 			),
988 988
 		)
989 989
 	);
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 		, array(
995 995
 			'action' => 'bp_activity_mark_as_ham',
996 996
 			'data'   => array(
997
-				'arg_index' => array( 'bp_activity_update' => 0 ),
997
+				'arg_index' => array('bp_activity_update' => 0),
998 998
 			),
999 999
 		)
1000 1000
 	);
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
 		, array(
1006 1006
 			'action' => 'wordpoints_bp_activity_before_delete_activity_update',
1007 1007
 			'data'   => array(
1008
-				'arg_index' => array( 'bp_activity_update' => 0 ),
1008
+				'arg_index' => array('bp_activity_update' => 0),
1009 1009
 			),
1010 1010
 		)
1011 1011
 	);
@@ -1017,18 +1017,18 @@  discard block
 block discarded – undo
1017 1017
 		, array(
1018 1018
 			'action' => 'bp_activity_comment_posted',
1019 1019
 			'data'   => array(
1020
-				'arg_index' => array( 'bp_activity_comment' => 0 ),
1020
+				'arg_index' => array('bp_activity_comment' => 0),
1021 1021
 			),
1022 1022
 		)
1023 1023
 	);
1024 1024
 
1025 1025
 	// See https://github.com/WordPoints/wordpoints/issues/592.
1026
-	wordpoints_hooks()->get_sub_app( 'router' )->add_action(
1026
+	wordpoints_hooks()->get_sub_app('router')->add_action(
1027 1027
 		'bp_activity_comment_post'
1028 1028
 		, array(
1029 1029
 			'action' => 'bp_activity_comment_posted_notification_skipped',
1030 1030
 			'data'   => array(
1031
-				'arg_index' => array( 'bp_activity_comment' => 0 ),
1031
+				'arg_index' => array('bp_activity_comment' => 0),
1032 1032
 			),
1033 1033
 		)
1034 1034
 	);
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
 		, array(
1040 1040
 			'action' => 'bp_activity_mark_as_spam',
1041 1041
 			'data'   => array(
1042
-				'arg_index'     => array( 'bp_activity_comment' => 0 ),
1042
+				'arg_index'     => array('bp_activity_comment' => 0),
1043 1043
 				'activity_type' => 'activity_comment',
1044 1044
 			),
1045 1045
 		)
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 		, array(
1052 1052
 			'action' => 'bp_activity_mark_as_ham',
1053 1053
 			'data'   => array(
1054
-				'arg_index'     => array( 'bp_activity_comment' => 0 ),
1054
+				'arg_index'     => array('bp_activity_comment' => 0),
1055 1055
 				'activity_type' => 'activity_comment',
1056 1056
 			),
1057 1057
 		)
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 		, array(
1064 1064
 			'action' => 'wordpoints_bp_activity_before_delete_activity_comment',
1065 1065
 			'data'   => array(
1066
-				'arg_index' => array( 'bp_activity_comment' => 0 ),
1066
+				'arg_index' => array('bp_activity_comment' => 0),
1067 1067
 			),
1068 1068
 		)
1069 1069
 	);
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 		, array(
1076 1076
 			'action' => 'bp_activity_add_user_favorite',
1077 1077
 			'data'   => array(
1078
-				'arg_index' => array( 'bp_activity' => 0, 'user' => 1 ),
1078
+				'arg_index' => array('bp_activity' => 0, 'user' => 1),
1079 1079
 			),
1080 1080
 		)
1081 1081
 	);
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
 		, array(
1087 1087
 			'action' => 'bp_activity_remove_user_favorite',
1088 1088
 			'data'   => array(
1089
-				'arg_index' => array( 'bp_activity' => 0, 'user' => 1 ),
1089
+				'arg_index' => array('bp_activity' => 0, 'user' => 1),
1090 1090
 			),
1091 1091
 		)
1092 1092
 	);
@@ -1101,7 +1101,7 @@  discard block
 block discarded – undo
1101 1101
  *
1102 1102
  * @param WordPoints_Hook_Events $events The event registry.
1103 1103
  */
1104
-function wordpoints_bp_activity_hook_events_init( $events ) {
1104
+function wordpoints_bp_activity_hook_events_init($events) {
1105 1105
 
1106 1106
 	$events->register(
1107 1107
 		'bp_activity_update_post'
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
 
1146 1146
 	// Support for multiple signature args was added in WordPoints 2.3.0-alpha-2.
1147 1147
 	// See https://github.com/WordPoints/wordpoints/issues/594.
1148
-	if ( version_compare( WORDPOINTS_VERSION, '2.3.0-alpha-1', '>' ) ) {
1148
+	if (version_compare(WORDPOINTS_VERSION, '2.3.0-alpha-1', '>')) {
1149 1149
 
1150 1150
 		$events->register(
1151 1151
 			'bp_activity_favorite'
@@ -1173,11 +1173,11 @@  discard block
 block discarded – undo
1173 1173
  *
1174 1174
  * @param object[] $activities The activities being deleted.
1175 1175
  */
1176
-function wordpoints_bp_activity_split_before_delete_action( $activities ) {
1176
+function wordpoints_bp_activity_split_before_delete_action($activities) {
1177 1177
 
1178
-	foreach ( $activities as $activity ) {
1178
+	foreach ($activities as $activity) {
1179 1179
 
1180
-		if ( 'activity_update' === $activity->type ) {
1180
+		if ('activity_update' === $activity->type) {
1181 1181
 
1182 1182
 			/**
1183 1183
 			 * Fires for an activity update before it is deleted.
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 				, $activity
1192 1192
 			);
1193 1193
 
1194
-		} elseif ( 'activity_comment' === $activity->type ) {
1194
+		} elseif ('activity_comment' === $activity->type) {
1195 1195
 
1196 1196
 			/**
1197 1197
 			 * Fires for an activity comment before it is deleted.
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
  *
1222 1222
  * @param WordPoints_Hook_Actions $actions The action registry.
1223 1223
  */
1224
-function wordpoints_bp_xprofile_hook_actions_init( $actions ) {
1224
+function wordpoints_bp_xprofile_hook_actions_init($actions) {
1225 1225
 
1226 1226
 	$actions->register(
1227 1227
 		'bp_xprofile_avatar_upload'
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
 		, array(
1230 1230
 			'action' => 'xprofile_avatar_uploaded',
1231 1231
 			'data'   => array(
1232
-				'arg_index' => array( 'user' => 0 ),
1232
+				'arg_index' => array('user' => 0),
1233 1233
 			),
1234 1234
 		)
1235 1235
 	);
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
 		, array(
1249 1249
 			'action' => 'xprofile_cover_image_uploaded',
1250 1250
 			'data'   => array(
1251
-				'arg_index' => array( 'user' => 0 ),
1251
+				'arg_index' => array('user' => 0),
1252 1252
 			),
1253 1253
 		)
1254 1254
 	);
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
 		, array(
1260 1260
 			'action' => 'xprofile_cover_image_deleted',
1261 1261
 			'data'   => array(
1262
-				'arg_index' => array( 'user' => 0 ),
1262
+				'arg_index' => array('user' => 0),
1263 1263
 			),
1264 1264
 		)
1265 1265
 	);
@@ -1274,10 +1274,10 @@  discard block
 block discarded – undo
1274 1274
  *
1275 1275
  * @param WordPoints_Hook_Events $events The event registry.
1276 1276
  */
1277
-function wordpoints_bp_xprofile_hook_events_init( $events ) {
1277
+function wordpoints_bp_xprofile_hook_events_init($events) {
1278 1278
 
1279 1279
 	// xProfile avatar uploads can be disabled.
1280
-	if ( ! bp_disable_avatar_uploads() ) {
1280
+	if ( ! bp_disable_avatar_uploads()) {
1281 1281
 
1282 1282
 		$events->register(
1283 1283
 			'bp_xprofile_avatar_upload'
@@ -1297,7 +1297,7 @@  discard block
 block discarded – undo
1297 1297
 	// Cover image uploads can be disabled.
1298 1298
 	// The cover image delete action was only added in BuddyPress 2.8.0.
1299 1299
 	// See https://buddypress.trac.wordpress.org/ticket/7409.
1300
-	if ( ! bp_disable_cover_image_uploads() && version_compare( buddypress()->version, '2.8.0-alpha', '>=' ) ) {
1300
+	if ( ! bp_disable_cover_image_uploads() && version_compare(buddypress()->version, '2.8.0-alpha', '>=')) {
1301 1301
 
1302 1302
 		$events->register(
1303 1303
 			'bp_xprofile_cover_image_upload'
Please login to merge, or discard this patch.