@@ -19,7 +19,7 @@ |
||
19 | 19 | * @since 1.1.0 |
20 | 20 | */ |
21 | 21 | public function get_title() { |
22 | - return __( 'Accepting User', 'wordpoints-bp' ); |
|
22 | + return __('Accepting User', 'wordpoints-bp'); |
|
23 | 23 | } |
24 | 24 | } |
25 | 25 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @since 1.0.0 |
24 | 24 | */ |
25 | 25 | public function get_title() { |
26 | - return __( 'Inviter', 'wordpoints-bp' ); |
|
26 | + return __('Inviter', 'wordpoints-bp'); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @since 1.0.0 |
19 | 19 | */ |
20 | 20 | public function get_title() { |
21 | - return __( 'Promoter', 'wordpoints-bp' ); |
|
21 | + return __('Promoter', 'wordpoints-bp'); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * @since 1.1.0 |
20 | 20 | */ |
21 | 21 | public function get_title() { |
22 | - return __( 'Uploading User', 'wordpoints-bp' ); |
|
22 | + return __('Uploading User', 'wordpoints-bp'); |
|
23 | 23 | } |
24 | 24 | } |
25 | 25 |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * @since 1.0.0 |
28 | 28 | */ |
29 | - public function __construct( $slug, array $action_args, array $args = array() ) { |
|
29 | + public function __construct($slug, array $action_args, array $args = array()) { |
|
30 | 30 | |
31 | - if ( isset( $args['activity_type'] ) ) { |
|
31 | + if (isset($args['activity_type'])) { |
|
32 | 32 | $this->activity_type = $args['activity_type']; |
33 | 33 | } |
34 | 34 | |
35 | - parent::__construct( $slug, $action_args, $args ); |
|
35 | + parent::__construct($slug, $action_args, $args); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -40,16 +40,16 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function should_fire() { |
42 | 42 | |
43 | - $activity = $this->get_arg_value( "bp_{$this->activity_type}" ); |
|
43 | + $activity = $this->get_arg_value("bp_{$this->activity_type}"); |
|
44 | 44 | |
45 | 45 | if ( |
46 | 46 | ! $activity instanceof BP_Activity_Activity |
47 | - && ! is_object( $activity ) |
|
47 | + && ! is_object($activity) |
|
48 | 48 | ) { |
49 | - $activity = new BP_Activity_Activity( $activity ); |
|
49 | + $activity = new BP_Activity_Activity($activity); |
|
50 | 50 | } |
51 | 51 | |
52 | - if ( $this->activity_type !== $activity->type ) { |
|
52 | + if ($this->activity_type !== $activity->type) { |
|
53 | 53 | return false; |
54 | 54 | } |
55 | 55 |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * @since 1.0.0 |
28 | 28 | */ |
29 | - public function __construct( $slug, array $action_args, array $args = array() ) { |
|
29 | + public function __construct($slug, array $action_args, array $args = array()) { |
|
30 | 30 | |
31 | - if ( isset( $args['bp_avatar_object_type'] ) ) { |
|
31 | + if (isset($args['bp_avatar_object_type'])) { |
|
32 | 32 | $this->bp_avatar_object_type = $args['bp_avatar_object_type']; |
33 | 33 | } |
34 | 34 | |
35 | - parent::__construct( $slug, $action_args, $args ); |
|
35 | + parent::__construct($slug, $action_args, $args); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function should_fire() { |
42 | 42 | |
43 | - if ( $this->bp_avatar_object_type !== $this->args[0]['object'] ) { |
|
43 | + if ($this->bp_avatar_object_type !== $this->args[0]['object']) { |
|
44 | 44 | return false; |
45 | 45 | } |
46 | 46 | |
@@ -50,21 +50,21 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * @since 1.0.0 |
52 | 52 | */ |
53 | - public function get_arg_value( $arg_slug ) { |
|
53 | + public function get_arg_value($arg_slug) { |
|
54 | 54 | |
55 | 55 | $expected_arg_slug = $this->bp_avatar_object_type; |
56 | 56 | |
57 | - if ( 'blog' === $expected_arg_slug ) { |
|
57 | + if ('blog' === $expected_arg_slug) { |
|
58 | 58 | $expected_arg_slug = 'site'; |
59 | - } elseif ( 'user' !== $expected_arg_slug ) { |
|
59 | + } elseif ('user' !== $expected_arg_slug) { |
|
60 | 60 | $expected_arg_slug = "bp_{$expected_arg_slug}"; |
61 | 61 | } |
62 | 62 | |
63 | - if ( $arg_slug === $expected_arg_slug ) { |
|
63 | + if ($arg_slug === $expected_arg_slug) { |
|
64 | 64 | return $this->args[0]['item_id']; |
65 | 65 | } |
66 | 66 | |
67 | - return parent::get_arg_value( $arg_slug ); |
|
67 | + return parent::get_arg_value($arg_slug); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 |
@@ -20,13 +20,13 @@ |
||
20 | 20 | */ |
21 | 21 | public function should_fire() { |
22 | 22 | |
23 | - $activity = $this->get_arg_value( 'bp_group_activity_update' ); |
|
23 | + $activity = $this->get_arg_value('bp_group_activity_update'); |
|
24 | 24 | |
25 | 25 | if ( |
26 | 26 | ! $activity instanceof BP_Activity_Activity |
27 | - && ! is_object( $activity ) |
|
27 | + && ! is_object($activity) |
|
28 | 28 | ) { |
29 | - $activity = new BP_Activity_Activity( $activity ); |
|
29 | + $activity = new BP_Activity_Activity($activity); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if ( |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | /** |
18 | 18 | * @since 1.0.0 |
19 | 19 | */ |
20 | - public function get_arg_value( $arg_slug ) { |
|
20 | + public function get_arg_value($arg_slug) { |
|
21 | 21 | |
22 | 22 | $map = array( |
23 | 23 | 'user' => 'user_id', |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | 'inviter:user' => 'inviter_id', |
26 | 26 | ); |
27 | 27 | |
28 | - if ( isset( $map[ $arg_slug ] ) ) { |
|
29 | - return $this->args[0][ $map[ $arg_slug ] ]; |
|
28 | + if (isset($map[$arg_slug])) { |
|
29 | + return $this->args[0][$map[$arg_slug]]; |
|
30 | 30 | } |
31 | 31 | |
32 | - return parent::get_arg_value( $arg_slug ); |
|
32 | + return parent::get_arg_value($arg_slug); |
|
33 | 33 | } |
34 | 34 | } |
35 | 35 |
@@ -20,21 +20,21 @@ |
||
20 | 20 | * @since 1.0.0 |
21 | 21 | */ |
22 | 22 | public function get_title() { |
23 | - return __( 'Post Activity Update', 'wordpoints-bp' ); |
|
23 | + return __('Post Activity Update', 'wordpoints-bp'); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @since 1.0.0 |
28 | 28 | */ |
29 | 29 | public function get_description() { |
30 | - return __( 'Posting a status update on the BuddyPress social network.', 'wordpoints-bp' ); |
|
30 | + return __('Posting a status update on the BuddyPress social network.', 'wordpoints-bp'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @since 1.0.0 |
35 | 35 | */ |
36 | 36 | public function get_reversal_text() { |
37 | - return __( 'Activity update removed.', 'wordpoints-bp' ); |
|
37 | + return __('Activity update removed.', 'wordpoints-bp'); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |