Skip to content

Commit ace8e4a

Browse files
authored
Have better checks if audience should be set or not (#1002)
1 parent 6ec77cc commit ace8e4a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

includes/class-admin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public static function register_settings() {
277277
array(
278278
'type' => 'integer',
279279
'description' => \__( 'Choose your preferred Actor-Mode.', 'activitypub' ),
280-
'default' => '1',
280+
'default' => ACTIVITYPUB_ACTOR_MODE,
281281
)
282282
);
283283

includes/transformer/class-post.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,14 @@ protected function get_cc() {
798798
* @return string|null The audience.
799799
*/
800800
public function get_audience() {
801-
if ( is_single_user() ) {
802-
return null;
803-
} else {
801+
$actor_mode = \get_option( 'activitypub_actor_mode', ACTIVITYPUB_ACTOR_MODE );
802+
803+
if ( ACTIVITYPUB_ACTOR_AND_BLOG_MODE === $actor_mode ) {
804804
$blog = new Blog();
805805
return $blog->get_id();
806806
}
807+
808+
return null;
807809
}
808810

809811
/**

0 commit comments

Comments
 (0)