Skip to content

Commit 30a0053

Browse files
authored
Fix: Post Interactions settings (#1540)
1 parent 776d67d commit 30a0053

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
"Post Interactions" settings will now be saved to the options table.

includes/wp-admin/class-settings-fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ public static function render_allow_interactions_field() {
506506
</p>
507507
<p>
508508
<label>
509-
<input type="checkbox" name="activitypub_allow_announces" value="1" <?php checked( '1', $allow_reposts ); ?> />
509+
<input type="checkbox" name="activitypub_allow_reposts" value="1" <?php checked( '1', $allow_reposts ); ?> />
510510
<?php esc_html_e( 'Receive reblogs (boosts)', 'activitypub' ); ?>
511511
</label>
512512
</p>

includes/wp-admin/class-settings.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,28 @@ public static function register_settings() {
145145
)
146146
);
147147

148+
\register_setting(
149+
'activitypub',
150+
'activitypub_allow_likes',
151+
array(
152+
'type' => 'integer',
153+
'description' => \__( 'Allow likes.', 'activitypub' ),
154+
'default' => '1',
155+
'sanitize_callback' => 'absint',
156+
)
157+
);
158+
159+
\register_setting(
160+
'activitypub',
161+
'activitypub_allow_reposts',
162+
array(
163+
'type' => 'integer',
164+
'description' => \__( 'Allow reposts.', 'activitypub' ),
165+
'default' => '1',
166+
'sanitize_callback' => 'absint',
167+
)
168+
);
169+
148170
\register_setting(
149171
'activitypub',
150172
'activitypub_authorized_fetch',

0 commit comments

Comments
 (0)