@@ -37,6 +37,13 @@ public static function register_settings_fields() {
37
37
'activitypub_settings '
38
38
);
39
39
40
+ add_settings_section (
41
+ 'activitypub_notifications ' ,
42
+ __ ( 'Notifications ' , 'activitypub ' ),
43
+ array ( self ::class, 'render_notifications_section ' ),
44
+ 'activitypub_settings '
45
+ );
46
+
40
47
add_settings_section (
41
48
'activitypub_general ' ,
42
49
__ ( 'General ' , 'activitypub ' ),
@@ -153,6 +160,49 @@ public static function register_settings_fields() {
153
160
}
154
161
}
155
162
163
+ /**
164
+ * Render notifications section.
165
+ */
166
+ public static function render_notifications_section () {
167
+ ?>
168
+ <p>
169
+ <?php \esc_html_e ( 'Choose which notifications you want to receive. The plugin currently only supports e-mail notifications, but we will add more options in the future. ' , 'activitypub ' ); ?>
170
+ </p>
171
+ <table class="form-table">
172
+ <tbody>
173
+ <tr>
174
+ <th scope="col">
175
+ <?php \esc_html_e ( 'Type ' , 'activitypub ' ); ?>
176
+ </th>
177
+ <th scope="col">
178
+ <?php \esc_html_e ( 'E-Mail ' , 'activitypub ' ); ?>
179
+ </th>
180
+ </tr>
181
+ <tr>
182
+ <td>
183
+ <?php \esc_html_e ( 'New followers ' , 'activitypub ' ); ?>
184
+ </td>
185
+ <td>
186
+ <label>
187
+ <input type="checkbox" name="activitypub_mailer_new_follower" id="activitypub_mailer_new_follower" value="1" <?php \checked ( '1 ' , \get_option ( 'activitypub_mailer_new_follower ' , '0 ' ) ); ?> />
188
+ </label>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <td>
193
+ <?php \esc_html_e ( 'Direct Messages ' , 'activitypub ' ); ?>
194
+ </td>
195
+ <td>
196
+ <label>
197
+ <input type="checkbox" name="activitypub_mailer_new_dm" id="activitypub_mailer_new_dm" value="1" <?php \checked ( '1 ' , \get_option ( 'activitypub_mailer_new_dm ' , '0 ' ) ); ?> />
198
+ </label>
199
+ </td>
200
+ </tr>
201
+ </tbody>
202
+ </table>
203
+ <?php
204
+ }
205
+
156
206
/**
157
207
* Render actor mode field.
158
208
*/
0 commit comments