PluginProbe
Friends / 4.3.2
Friends v4.3.2
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
← All changes | templates/admin/settings.php +149 -258 2.8.44.3.2 View file →
@@ -4,18 +4,8 @@
4 4 *
5 5 * @package Friends
6 6 */
7 7
8 -$comment_registration_class = '';
9 -if ( ! $args['comment_registration'] ) {
10 - $comment_registration_class = 'hidden';
11 -}
12 -
13 -$codeword_class = '';
14 -if ( 'friends' === $args['codeword'] || ! $args['require_codeword'] ) {
15 - $codeword_class = 'hidden';
16 -}
17 -
18 8 do_action( 'friends_settings_before_form' );
19 9
20 10 ?>
21 11 <form method="post">
@@ -21,189 +11,50 @@
21 11 <form method="post">
22 12 <?php wp_nonce_field( 'friends-settings' ); ?>
23 13 <table class="form-table">
24 14 <tbody>
25 - <?php if ( current_user_can( 'manage_options' ) ) : ?>
26 - <tr>
27 - <th scope="row"><?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Comments' ); ?></th>
28 - <td>
29 - <fieldset>
30 - <label for="comment_registration">
31 - <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked( '1', $args['comment_registration'] ); ?> />
32 - <span><?php esc_html_e( 'Only people in your network can comment.', 'friends' ); ?></span>
33 - </label>
34 - </fieldset>
35 - <div id="comment_registration_options" class="<?php echo esc_attr( $comment_registration_class ); ?>">
36 - <fieldset>
37 - <label for="comment_registration_message">
38 - <p><?php esc_html_e( 'Display this message for logged-out users:', 'friends' ); ?></p>
39 - </label>
40 - <p>
41 - <textarea name="comment_registration_message" id="comment_registration_message" class="regular-text" rows="3" cols="80" placeholder="<?php echo esc_attr( $args['comment_registration_default'] ); ?>"><?php echo esc_html( $args['comment_registration_message'] ); ?></textarea>
42 - </p>
43 - <p class="description">
44 - <?php
45 - echo wp_kses(
46 - sprintf(
47 - // translators: %1$s is the translation for "my network", %2$s is the URL for your public profile page.
48 - __( 'We\'ll link "%1$s" to <a href=%2$s>your public profile page</a>.', 'friends' ),
49 - $args['my_network'],
50 - $args['public_profile_link']
51 - ),
52 - array(
53 - 'a' => array(
54 - 'href' => array(),
55 - ),
56 - )
57 - );
58 - ?>
59 - </p>
60 - </fieldset>
61 - </div>
62 - </td>
63 - </tr>
64 - <?php
65 - endif;
66 - if ( $args['potential_main_users']->get_total() > 1 ) :
67 - ?>
15 + <?php if ( $args['potential_main_users']->get_total() > 1 ) : ?>
68 16 <tr>
69 17 <th scope="row"><?php esc_html_e( 'Main Friend User', 'friends' ); ?></th>
70 18 <td>
71 - <?php if ( current_user_can( 'manage_options' ) ) { ?>
72 - <select name="main_user_id">
73 - <?php foreach ( $args['potential_main_users']->get_results() as $potential_main_user ) : ?>
74 - <option value="<?php echo esc_attr( $potential_main_user->ID ); ?>" <?php selected( $args['main_user_id'], $potential_main_user->ID ); ?>><?php echo esc_html( $potential_main_user->display_name ); ?></option>
75 -
76 - <?php endforeach; ?>
77 - </select>
78 - <p class="description"><span><?php esc_html_e( 'Since there are multiple users on this site, we need to know which one should be considered the main one.', 'friends' ); ?></span> <span><?php esc_html_e( 'They can edit friends-related settings.', 'friends' ); ?></span> <span><?php esc_html_e( 'Whenever a friends-related action needs to be associated with a user, this one will be chosen.', 'friends' ); ?></span></p>
19 + <?php if ( current_user_can( 'manage_options' ) ) : ?>
20 + <select name="main_user_id" id="main_user_id">
21 + <?php foreach ( $args['potential_main_users']->get_results() as $potential_main_user ) : ?>
22 + <option value="<?php echo esc_attr( $potential_main_user->ID ); ?>" <?php selected( $args['main_user_id'], $potential_main_user->ID ); ?>>
23 + <?php echo esc_html( $potential_main_user->display_name ); ?>
24 + </option>
25 + <?php endforeach; ?>
26 + </select>
27 + <p class="description"><?php esc_html_e( 'Since there are multiple users on this site, we need to know which one should be considered the main one.', 'friends' ); ?> <?php esc_html_e( 'They can edit friends-related settings.', 'friends' ); ?> <?php esc_html_e( 'Whenever a friends-related action needs to be associated with a user, this one will be chosen.', 'friends' ); ?></p>
28 + <?php else : ?>
79 29 <?php
80 - } else {
81 - $c = 0;
82 - foreach ( $args['potential_main_users']->get_results() as $potential_main_user ) {
83 - $c += 1;
84 - if ( $potential_main_user->ID === $args['main_user_id'] ) {
85 - ?>
30 + $count = 0;
31 + foreach ( $args['potential_main_users']->get_results() as $potential_main_user ) {
32 + ++$count;
33 + if ( $potential_main_user->ID === $args['main_user_id'] ) {
34 + ?>
86 35 <span id="main_user_id"><?php echo esc_html( $potential_main_user->display_name ); ?></span>
87 36 <?php
37 + }
88 38 }
89 - }
90 - ?>
91 - <span> (
92 - <?php
93 - echo esc_html(
94 - sprintf(
95 - // translators: %s is a number of users.
96 - _n( '%s potential user', '%s potential users', $c, 'friends' ),
97 - $c
98 - )
99 - );
100 - ?>
101 - ) </span>
39 + ?>
40 + <span class="description">
41 + <?php
42 + echo esc_html(
43 + sprintf(
44 + /* translators: %s is a number of users. */
45 + _n( '%s potential user', '%s potential users', $count, 'friends' ),
46 + number_format_i18n( $count )
47 + )
48 + );
49 + ?>
50 + </span>
102 51 <p class="description"><?php esc_html_e( 'An administrator can change this.', 'friends' ); ?></p>
103 - <?php
104 - }
105 - ?>
52 + <?php endif; ?>
106 53 </td>
107 54 </tr>
108 - <?php
109 - endif;
110 - ?>
55 + <?php endif; ?>
111 56 <tr>
112 - <th scope="row"><?php esc_html_e( 'Friend Requests', 'friends' ); ?></th>
113 - <td>
114 - <fieldset>
115 - <label for="require_codeword">
116 - <input name="require_codeword" type="checkbox" id="require_codeword" value="1" <?php checked( '', $codeword_class ); ?>>
117 - <span><?php esc_html_e( 'Require a code word to send you friend request', 'friends' ); ?></span>
118 - </label>
119 - </fieldset>
120 - <div id="codeword_options" class="<?php echo esc_attr( $codeword_class ); ?>">
121 - <fieldset>
122 - <label for="codeword">
123 - <span><?php esc_html_e( 'This code word must be provided to send you a friend request:', 'friends' ); ?></span>
124 - <input name="codeword" type="text" id="codeword" placeholder="friends" value="<?php echo esc_attr( $args['codeword'] ); ?>" />
125 - </label>
126 - <p class="description">
127 - <?php esc_html_e( "You'll need to communicate the code word to potential friends through another medium.", 'friends' ); ?>
128 - </p>
129 - </fieldset>
130 - <fieldset>
131 - <label for="wrong_codeword_message">
132 - <p><?php esc_html_e( 'Error message for a wrong code word:', 'friends' ); ?></p>
133 - </label>
134 - <p>
135 - <textarea name="wrong_codeword_message" id="wrong_codeword_message" class="regular-text" rows="3" cols="80" placeholder="<?php echo esc_attr( __( 'Return this message to the friend requestor if a wrong code word was provided.', 'friends' ) ); ?>"><?php echo esc_html( $args['wrong_codeword_message'] ); ?></textarea>
136 - </p>
137 - </fieldset>
138 - </div>
139 - </td>
140 - </tr>
141 - <tr>
142 - <th scope="row">
143 - <?php
144 - esc_html_e( 'E-Mail Notifications', 'friends' );
145 - ?>
146 - </th>
147 - <td>
148 - <fieldset>
149 - <label for="friend_request_notification">
150 - <input name="friend_request_notification" type="checkbox" id="friend_request_notification" value="1" <?php checked( '1', ! $args['no_friend_request_notification'] ); ?>>
151 - <span><?php esc_html_e( 'Friend Requests', 'friends' ); ?></span>
152 - </label>
153 - <br />
154 - <label for="new_post_notification">
155 - <input name="new_post_notification" type="checkbox" id="new_post_notification" value="1" <?php checked( '1', ! $args['no_new_post_notification'] ); ?>>
156 - <span><?php esc_html_e( 'New Posts', 'friends' ); ?></span>
157 - </label>
158 - </fieldset>
159 - <p class="description"><?php esc_html_e( 'You can also change this setting for each friend separately.', 'friends' ); ?></p>
160 - </td>
161 - </tr>
162 - <tr>
163 - <th scope="row">
164 - <?php
165 - esc_html_e( 'Keyword Notifications', 'friends' );
166 - ?>
167 - </th>
168 - <td>
169 - <fieldset>
170 -
171 - <ol id="keyword-notifications">
172 - <li id="keyword-template" style="display: none">
173 - <input type="checkbox" name="notification_keywords_enabled[0]" value="1" checked />
174 - <input type="text" name="notification_keywords[0]" value="" placeholder="<?php esc_html_e( 'Keyword (regex allowed)', 'friends' ); ?>">
175 - </li>
176 - <?php foreach ( $args['notification_keywords'] as $i => $entry ) : ?>
177 - <li>
178 - <input type="checkbox" name="notification_keywords_enabled[<?php echo esc_attr( $i + 1 ); ?>]" value="1" <?php checked( $entry['enabled'] ); ?> />
179 - <input type="text" name="notification_keywords[<?php echo esc_attr( $i + 1 ); ?>]" value="<?php echo esc_attr( $entry['keyword'] ); ?>" placeholder="<?php esc_html_e( 'Keyword (regex allowed)', 'friends' ); ?>">
180 - </li>
181 - <?php endforeach; ?>
182 - </ol>
183 - <a href="" id="admin-add-keyword"><?php esc_html_e( 'Add a notification keyword', 'friends' ); ?></a>
184 - </fieldset>
185 - <p class="description"><?php esc_html_e( 'Empty keywords will be deleted after saving. You can temporarily disable them with the checkbox.', 'friends' ); ?></p>
186 - </td>
187 - </tr>
188 - <tr>
189 - <th scope="row"><?php esc_html_e( 'Roles', 'friends' ); ?></th>
190 - <td>
191 - <select name="default_role">
192 - <?php
193 - foreach ( $args['friend_roles'] as $role => $title ) :
194 - ?>
195 - <option value="<?php echo esc_attr( $role ); ?>" <?php selected( $args['default_role'], $role ); ?>><?php echo esc_html( $title ); ?></option>
196 -
197 - <?php endforeach; ?>
198 - </select>
199 - <p class="description">
200 - <span><?php esc_html_e( 'When accepting a friend request, first assign this role.', 'friends' ); ?></span>
201 - <span><?php esc_html_e( 'An Acquaintance has friend status but cannot read private posts.', 'friends' ); ?></span>
202 - </p>
203 - </td>
204 - </tr>
205 - <tr>
206 57 <th><?php esc_html_e( 'Retention', 'friends' ); ?></th>
207 58 <td>
208 59 <fieldset>
209 60 <div>
@@ -275,8 +126,12 @@
275 126 echo '</span>';
276 127 ?>
277 128 </span>
278 129 </div>
130 + <div>
131 + <input type="checkbox" name="retention_delete_reacted" id="retention_delete_reacted" value="1" <?php checked( ! $args['retention_delete_reacted'] ); ?> />
132 + <label for="retention_delete_reacted"><?php esc_html_e( 'Protect posts from deletion that I have reacted on.', 'friends' ); ?></label>
133 + </div>
279 134 </fieldset>
280 135 <p class="description">
281 136 <?php
282 137 echo esc_html(
@@ -307,44 +162,8 @@
307 162 <tr>
308 163 <th scope="row"><?php esc_html_e( 'Post Formats', 'friends' ); ?></th>
309 164 <td>
310 165 <fieldset>
311 - <label for="limit_homepage_post_format">
312 - <?php
313 - $select = '<select name="limit_homepage_post_format" id="limit_homepage_post_format">';
314 - $select .= '<option value="0"' . selected( $args['limit_homepage_post_format'], false, false ) . '>' . esc_html( _x( 'All', 'All post-formats', 'friends' ) ) . '</option>';
315 - foreach ( $args['post_format_strings'] as $format => $title ) {
316 - // translators: %s is a post format title.
317 - $select .= '<option value="' . esc_attr( $format ) . '"' . selected( $args['limit_homepage_post_format'], $format, false ) . '>' . esc_html( sprintf( _x( '%s only', 'post-format only', 'friends' ), $title ) ) . '</option>';
318 - }
319 - $select .= '</select>';
320 -
321 - echo wp_kses(
322 - sprintf(
323 - // translators: %s is a Select dropdown of post formats, e.g. "All" or "Standard only" (see "post-format only").
324 - __( 'On your homepage, show %s posts.', 'friends' ),
325 - $select
326 - ),
327 - array(
328 - 'select' => array(
329 - 'name' => array(),
330 - ),
331 - 'label' => array(),
332 - 'option' => array(
333 - 'value' => array(),
334 - 'selected' => array(),
335 - ),
336 - 'a' => array(
337 - 'href' => array(),
338 - 'rel' => array(),
339 - 'target' => array(),
340 - ),
341 - )
342 - );
343 - ?>
344 - </label>
345 - <br/>
346 -
347 166 <label for="force_enable_post_formats">
348 167 <input name="force_enable_post_formats" type="checkbox" id="force_enable_post_formats" value="1" <?php checked( '1', $args['force_enable_post_formats'] ); ?>>
349 168 <span><?php esc_html_e( 'Always enable Post Formats, regardless of the theme support.', 'friends' ); ?></span>
350 169 <p class="description">
@@ -378,8 +197,33 @@
378 197 </fieldset>
379 198 </td>
380 199 </tr>
381 200 <?php endif; ?>
201 + <?php if ( current_user_can( 'manage_options' ) ) : ?>
202 + <tr id="compose">
203 + <th scope="row"><?php esc_html_e( 'Compose', 'friends' ); ?></th>
204 + <td>
205 + <fieldset>
206 + <label for="friends_compose_post_format">
207 + <span><?php esc_html_e( 'Default post format for new posts:', 'friends' ); ?></span>
208 + <select name="friends_compose_post_format" id="friends_compose_post_format">
209 + <?php foreach ( get_post_format_strings() as $format => $label ) : ?>
210 + <option value="<?php echo esc_attr( $format ); ?>"<?php selected( $args['compose_post_format'], $format ); ?>><?php echo esc_html( $label ); ?></option>
211 + <?php endforeach; ?>
212 + </select>
213 + </label>
214 + <br/><br/>
215 + <label for="friends_exclude_compose_format_from_feed">
216 + <input name="friends_exclude_compose_format_from_feed" type="checkbox" id="friends_exclude_compose_format_from_feed" value="1" <?php checked( '1', $args['exclude_compose_format_from_feed'] ); ?>>
217 + <span><?php esc_html_e( 'Exclude posts in this format from the main RSS feed.', 'friends' ); ?></span>
218 + </label>
219 + <p class="description">
220 + <?php esc_html_e( 'This prevents short status posts from appearing in your regular blog RSS feed.', 'friends' ); ?>
221 + </p>
222 + </fieldset>
223 + </td>
224 + </tr>
225 + <?php endif; ?>
382 226 <tr>
383 227 <th scope="row"><?php esc_html_e( 'Reactions', 'friends' ); ?></th>
384 228 <td>
385 229 <fieldset>
@@ -386,14 +230,14 @@
386 230 <span><?php esc_html_e( 'Allow these emojis for reactions:', 'friends' ); ?></span>
387 231
388 232 <ol id="available-emojis">
389 233 <?php
390 - foreach ( Friends\Reactions::get_available_emojis() as $id => $data ) {
234 + foreach ( Friends\Reactions::get_available_emojis() as $_id => $data ) {
391 235 Friends\Friends::template_loader()->get_template_part(
392 236 'admin/add-reaction-li',
393 237 null,
394 238 array(
395 - 'id' => $id,
239 + 'id' => $_id,
396 240 'emoji' => $data->char,
397 241 )
398 242 );
399 243 }
@@ -400,73 +244,107 @@
400 244 ?>
401 245 </ol>
402 246 <a href="" id="admin-add-emoji"><?php esc_html_e( 'Add an emoji', 'friends' ); ?></a>
403 247 <?php Friends\Friends::template_loader()->get_template_part( 'admin/reactions-picker' ); ?>
248 + <?php if ( class_exists( 'Activitypub\Activitypub' ) ) : ?>
249 + <p class="description"><?php esc_html_e( 'This will always send a "Like" on ActivityPub but you can use different reactions to distinguish them for yourself. For example ⭐️ for bookmarks and ❤️ for likes.', 'friends' ); ?></p>
250 + <?php endif; ?>
404 251 </fieldset>
405 252 </td>
406 253 </tr>
407 254 <tr>
408 - <th scope="row" rowspan="2"><?php esc_html_e( 'Frontend', 'friends' ); ?></th>
255 + <th scope="row"><?php esc_html_e( 'Auto-Tagging', 'friends' ); ?></th>
409 256 <td>
410 257 <fieldset>
411 - <label for="frontend-default-view">
412 - <span><?php esc_html_e( 'Default view:', 'friends' ); ?></span>
413 - <select name="frontend_default_view" id="frontend-default-view">
414 - <option value="expanded"<?php selected( $args['frontend_default_view'], 'expanded' ); ?>><?php esc_html_e( 'Expanded', 'friends' ); ?></option>
415 - <option value="collapsed"<?php selected( $args['frontend_default_view'], 'collapsed' ); ?>><?php esc_html_e( 'Collapsed', 'friends' ); ?></option>
416 - </select>
258 + <label for="disable_auto_tagging">
259 + <input name="disable_auto_tagging" type="checkbox" id="disable_auto_tagging" value="1" <?php checked( '1', $args['disable_auto_tagging'] ); ?> />
260 + <span><?php esc_html_e( 'Disable automatic tagging of incoming posts with hashtags.', 'friends' ); ?></span>
417 261 </label>
262 + <p class="description">
263 + <?php
264 + esc_html_e( 'When incoming friend posts are tagged based on contained hashtags, you can filter by tag.', 'friends' );
265 + echo ' ';
266 + esc_html_e( 'These tags are separate from the tags you use for your own posts.', 'friends' );
267 + echo '<br>';
268 + esc_html_e( 'If you like to avoid an increased number of taxonomy terms in your database, you can disable this, although tags indicating a mention for local users will always be applied.', 'friends' );
269 + ?>
270 + </p>
418 271 </fieldset>
419 272 </td>
420 273 </tr>
421 - <?php if ( ! function_exists( 'classicpress_version' ) ) : ?>
422 274 <tr>
275 + <th scope="row"><?php esc_html_e( 'Link Previews', 'friends' ); ?></th>
423 276 <td>
424 277 <fieldset>
425 - <label for="blocks_everywhere">
426 - <input name="blocks_everywhere" type="checkbox" id="blocks_everywhere" value="1" <?php checked( '1', $args['blocks_everywhere'] ); ?> disabled="disabled" />
427 - <span><?php esc_html_e( 'Unfortunately, Gutenberg on the frontend is currently unavailable.', 'friends' ); ?></span>
278 + <label for="disable_link_previews">
279 + <input name="disable_link_previews" type="checkbox" id="disable_link_previews" value="1" <?php checked( '1', $args['disable_link_previews'] ); ?> />
280 + <span><?php esc_html_e( 'Disable link previews for incoming posts.', 'friends' ); ?></span>
428 281 </label>
282 + <p class="description">
283 + <?php
284 + esc_html_e( 'When a status contains a link but no image or video of its own, a preview card with the linked page\'s title, description and image can be shown below the post.', 'friends' );
285 + echo '<br>';
286 + esc_html_e( 'To do so, your site downloads the linked page in the background, so disable this if you\'d rather not have your site contact the linked websites.', 'friends' );
287 + ?>
288 + </p>
429 289 </fieldset>
430 290 </td>
431 291 </tr>
432 - <?php endif; ?>
433 292 <tr>
434 - <th scope="row" rowspan="2"><?php esc_html_e( 'Feed Reader', 'friends' ); ?></th>
293 + <th scope="row" rowspan="3"><?php esc_html_e( 'Frontend', 'friends' ); ?></th>
435 294 <td>
436 - <span>
437 - <?php
438 - // translators: %s is a URL.
439 - echo wp_kses( sprintf( __( 'Download the <a href=%s>Private OPML file (contains private urls!)</a> and import it to your feed reader.', 'friends' ), esc_url( home_url( '/friends/opml/?auth=' . $args['private_rss_key'] ) ) ), array( 'a' => array( 'href' => array() ) ) );
440 - ?>
441 - </span>
442 - <span>
443 - <?php
444 - // translators: %s is a URL.
445 - echo wp_kses( sprintf( __( 'Alternative: <a href=%s>Public OPML file (only public urls)</a>.', 'friends' ), esc_url( home_url( '/friends/opml/?public' ) ) ), array( 'a' => array( 'href' => array() ) ) );
446 - ?>
447 - </span>
448 - <p class="description">
449 - <?php
450 - echo __( 'If your feed reader supports it, you can also subscribe to this URL as the OPML file gets updated as you add or remove friends.', 'friends' );
451 - ?>
452 - </p>
295 + <fieldset>
296 + <label for="frontend-default-view">
297 + <span><?php esc_html_e( 'Default view:', 'friends' ); ?></span>
298 + <select name="frontend_default_view" id="frontend-default-view">
299 + <option value="expanded"<?php selected( $args['frontend_default_view'], 'expanded' ); ?>><?php esc_html_e( 'Expanded mode', 'friends' ); ?></option>
300 + <option value="collapsed"<?php selected( $args['frontend_default_view'], 'collapsed' ); ?>><?php esc_html_e( 'Compact mode', 'friends' ); ?></option>
301 + </select>
302 + </label>
303 + </fieldset>
453 304 </td>
454 305 </tr>
455 306 <tr>
456 307 <td>
457 - <span>
308 + <fieldset>
309 + <label for="frontend-theme">
310 + <span><?php esc_html_e( 'Main Theme:', 'friends' ); ?></span>
311 + <select name="friends_frontend_theme" id="frontend-theme">
312 + <?php foreach ( Friends\Frontend::get_themes() as $theme => $theme_name ) : ?>
313 + <option value="<?php echo esc_attr( $theme ); ?>"<?php selected( $args['frontend_theme'], $theme ); ?>><?php echo esc_html( $theme_name ); ?></option>
314 + <?php endforeach; ?>
315 + </select>
316 + </label>
317 + <details><summary>Post Type Themes</summary>
318 + <table>
319 + <?php foreach ( $args['post_format_strings'] as $post_type_slug => $post_type_title ) : ?>
320 + <tr>
321 + <td><label for="frontend-theme-<?php echo esc_attr( $post_type_slug ); ?>"><?php echo esc_html( $post_type_title ); ?></label></td>
322 + <td>
323 + <select name="friends_frontend_theme_<?php echo esc_attr( $post_type_slug ); ?>" id="frontend-theme-<?php echo esc_attr( $post_type_slug ); ?>">
324 + <option value=""><?php esc_html_e( 'Main Theme', 'friends' ); ?></option>
325 + <?php foreach ( Friends\Frontend::get_themes() as $theme => $theme_name ) : ?>
326 + <option value="<?php echo esc_attr( $theme ); ?>"<?php selected( $args[ 'frontend_theme_' . $post_type_slug ], $theme ); ?>><?php echo esc_html( $theme_name ); ?></option>
327 + <?php endforeach; ?>
328 + </select>
329 + </td>
330 + </tr>
331 + <?php endforeach; ?>
332 + </table>
333 + </details>
334 + </fieldset>
335 + <p>
458 336 <?php
459 - // translators: %s is a URL.
460 - echo wp_kses( sprintf( __( 'You can also subscribe to a <a href=%s>compiled RSS feed of friend posts</a>.', 'friends' ), esc_url( home_url( '/friends/feed/?auth=' . $args['private_rss_key'] ) ) ), array( 'a' => array( 'href' => array() ) ) );
337 + echo wp_kses_post(
338 + sprintf(
339 + // translators: %1$s is a link, %2$s is a link.
340 + __( 'Check out the <a href=%1$s>available themes</a>, or <a href=%2$s>write your own</a>.', 'friends' ),
341 + '"https://github.com/akirk/friends/blob/main/THEMES.md"',
342 + '"https://github.com/akirk/friends/wiki/Writing-Themes"'
343 + )
344 + );
461 345 ?>
462 - </span>
463 - <p class="description">
464 - <?php
465 - echo __( 'Please be careful what you do with these feeds as they might contain private posts of your friends.', 'friends' );
466 - ?>
467 - </p>
468 -
346 + </p>
469 347 </td>
470 348 </tr>
471 349 </tbody>
472 350 </table>
@@ -481,8 +359,9 @@
481 359 <?php
482 360 foreach ( array(
483 361 __( 'Comments' ), // phpcs:ignore WordPress.WP.I18n.MissingArgDomain
484 362 __( 'Post Formats', 'friends' ),
363 + __( 'Compose', 'friends' ),
485 364 ) as $setting ) :
486 365 ?>
487 366 <li><?php echo esc_html( $setting ); ?></li>
488 367 <?php endforeach; ?>
@@ -489,6 +368,18 @@
489 368 </ul>
490 369 </p>
491 370 <?php endif; ?>
492 371 </form>
372 +<?php if ( current_user_can( 'manage_options' ) ) : ?>
373 +<h2><?php esc_html_e( 'Advanced', 'friends' ); ?></h2>
374 +<p>
375 + <?php
376 + printf(
377 + /* translators: %s is a link to the migrations page. */
378 + esc_html__( 'Database migrations can be managed on the %s page.', 'friends' ),
379 + '<a href="' . esc_url( admin_url( 'admin.php?page=friends-migrations' ) ) . '">' . esc_html__( 'Migrations', 'friends' ) . '</a>'
380 + );
381 + ?>
382 +</p>
383 +<?php endif; ?>
493 384 <?php
494 385 do_action( 'friends_settings_after_form' );