PluginProbe
ActivityPub / 3.2.5
ActivityPub v3.2.5
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | templates/settings.php +71 -74 1.0.53.2.5 View file →
@@ -2,11 +2,12 @@
2 2 \load_template(
3 3 __DIR__ . '/admin-header.php',
4 4 true,
5 5 array(
6 - 'settings' => 'active',
7 - 'welcome' => '',
8 - 'followers' => '',
6 + 'settings' => 'active',
7 + 'welcome' => '',
8 + 'followers' => '',
9 + 'blog-profile' => '',
9 10 )
10 11 );
11 12 ?>
12 13
@@ -25,18 +26,21 @@
25 26 <td>
26 27 <p>
27 28 <label>
28 29 <input type="checkbox" name="activitypub_enable_users" id="activitypub_enable_users" value="1" <?php echo \checked( '1', \get_option( 'activitypub_enable_users', '1' ) ); ?> />
29 - <?php \esc_html_e( 'Enable authors', 'activitypub' ); ?>
30 + <?php \esc_html_e( 'Enable Author-Profiles', 'activitypub' ); ?>
30 31 </label>
31 32 </p>
32 33 <p class="description">
33 - <?php echo \wp_kses( \__( 'Every author on this blog (with the <code>publish_posts</code> capability) gets their own ActivityPub profile.', 'activitypub' ), array( 'code' => array() ) ); ?>
34 + <?php echo \wp_kses( \__( 'Every author on this blog (with the <code>activitypub</code> capability) gets their own ActivityPub profile.', 'activitypub' ), array( 'code' => array() ) ); ?>
35 + <?php // translators: %s is a URL. ?>
36 + <strong><?php echo \wp_kses( sprintf( \__( 'You can add/remove the capability in the <a href="%s">user settings.</a>', 'activitypub' ), admin_url( '/users.php' ) ), array( 'a' => array( 'href' => array() ) ) ); ?></strong>
37 + <?php echo \wp_kses( \__( 'Select all the users you want to update, choose the method from the drop-down list and click on the "Apply" button.', 'activitypub' ), array( 'code' => array() ) ); ?>
34 38 </p>
35 39 <p>
36 40 <label>
37 41 <input type="checkbox" name="activitypub_enable_blog_user" id="activitypub_enable_blog_user" value="1" <?php echo \checked( '1', \get_option( 'activitypub_enable_blog_user', '0' ) ); ?> />
38 - <?php \esc_html_e( 'Enable blog', 'activitypub' ); ?>
42 + <?php \esc_html_e( 'Enable Blog-Profile', 'activitypub' ); ?>
39 43 </label>
40 44 </p>
41 45 <p class="description">
42 46 <?php \esc_html_e( 'Your blog becomes an ActivityPub profile.', 'activitypub' ); ?>
@@ -42,27 +46,8 @@
42 46 <?php \esc_html_e( 'Your blog becomes an ActivityPub profile.', 'activitypub' ); ?>
43 47 </p>
44 48 </td>
45 49 </tr>
46 - <tr>
47 - <th scope="row">
48 - <?php \esc_html_e( 'Change blog profile ID', 'activitypub' ); ?>
49 - </th>
50 - <td>
51 - <label for="activitypub_blog_user_identifier">
52 - <input class="blog-user-identifier" name="activitypub_blog_user_identifier" id="activitypub_blog_user_identifier" type="text" value="<?php echo esc_attr( \get_option( 'activitypub_blog_user_identifier', \Activitypub\Model\Blog_User::get_default_username() ) ); ?>" />
53 - @<?php echo esc_html( \wp_parse_url( \home_url(), PHP_URL_HOST ) ); ?>
54 - </label>
55 - <p class="description">
56 - <?php \esc_html_e( 'This profile name will federate all posts written on your blog, regardless of the author who posted it.', 'activitypub' ); ?>
57 - </p>
58 - <p>
59 - <strong>
60 - <?php \esc_html_e( 'Please avoid using an existing author’s name as the blog profile ID. Fediverse platforms might use caching and this could break the functionality completely.', 'activitypub' ); ?>
61 - </strong>
62 - </p>
63 - </td>
64 - </tr>
65 50 </tbody>
66 51 </table>
67 52
68 53 <?php \do_settings_fields( 'activitypub', 'user' ); ?>
@@ -73,11 +58,41 @@
73 58 <table class="form-table">
74 59 <tbody>
75 60 <tr>
76 61 <th scope="row">
62 + <?php \esc_html_e( 'Activity-Object-Type', 'activitypub' ); ?>
63 + </th>
64 + <td>
65 + <p>
66 + <label for="activitypub_object_type_note">
67 + <input type="radio" name="activitypub_object_type" id="activitypub_object_type_note" value="note" <?php echo \checked( 'note', \get_option( 'activitypub_object_type', ACTIVITYPUB_DEFAULT_OBJECT_TYPE ) ); ?> />
68 + <?php \esc_html_e( 'Note (default)', 'activitypub' ); ?>
69 + -
70 + <span class="description">
71 + <?php \esc_html_e( 'Should work with most platforms.', 'activitypub' ); ?>
72 + </span>
73 + </label>
74 + </p>
75 + <p>
76 + <label>
77 + <input type="radio" name="activitypub_object_type" id="activitypub_object_type" value="wordpress-post-format" <?php echo \checked( 'wordpress-post-format', \get_option( 'activitypub_object_type', ACTIVITYPUB_DEFAULT_OBJECT_TYPE ) ); ?> />
78 + <?php \esc_html_e( 'WordPress Post-Format', 'activitypub' ); ?>
79 + -
80 + <span class="description">
81 + <?php \esc_html_e( 'Maps the WordPress Post-Format to the ActivityPub Object Type.', 'activitypub' ); ?>
82 + </span>
83 + </label>
84 + </p>
85 +
86 + </td>
87 + </tr>
88 + <?php // phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace ?>
89 + <tr <?php if ( 'wordpress-post-format' === \get_option( 'activitypub_object_type', ACTIVITYPUB_DEFAULT_OBJECT_TYPE ) ) { echo 'style="display: none"'; } ?>>
90 + <th scope="row">
77 91 <?php \esc_html_e( 'Post content', 'activitypub' ); ?>
78 92 </th>
79 93 <td>
94 + <p><strong><?php \esc_html_e( 'These settings only apply if you use the "Note" Object-Type setting above.', 'activitypub' ); ?></strong></p>
80 95 <p>
81 96 <label for="activitypub_post_content_type_title_link">
82 97 <input type="radio" name="activitypub_post_content_type" id="activitypub_post_content_type_title_link" value="title" <?php echo \checked( 'title', \get_option( 'activitypub_post_content_type', 'content' ) ); ?> />
83 98 <?php \esc_html_e( 'Title and link', 'activitypub' ); ?>
@@ -92,9 +107,9 @@
92 107 <input type="radio" name="activitypub_post_content_type" id="activitypub_post_content_type_excerpt" value="excerpt" <?php echo \checked( 'excerpt', \get_option( 'activitypub_post_content_type', 'content' ) ); ?> />
93 108 <?php \esc_html_e( 'Excerpt', 'activitypub' ); ?>
94 109 -
95 110 <span class="description">
96 - <?php \esc_html_e( 'A content summary, shortened to 400 characters and without markup.', 'activitypub' ); ?>
111 + <?php \esc_html_e( 'A content summary without markup (truncated if no excerpt is provided).', 'activitypub' ); ?>
97 112 </span>
98 113 </label>
99 114 </p>
100 115 <p>
@@ -117,9 +132,9 @@
117 132 </span>
118 133 </label>
119 134 </p>
120 135 <p>
121 - <textarea name="activitypub_custom_post_content" id="activitypub_custom_post_content" rows="10" cols="50" class="large-text" placeholder="<?php echo wp_kses( ACTIVITYPUB_CUSTOM_POST_CONTENT, 'post' ); ?>"><?php echo wp_kses( \get_option( 'activitypub_custom_post_content', ACTIVITYPUB_CUSTOM_POST_CONTENT ), 'post' ); ?></textarea>
136 + <textarea name="activitypub_custom_post_content" id="activitypub_custom_post_content" rows="10" cols="50" class="large-text" placeholder="<?php echo wp_kses( ACTIVITYPUB_CUSTOM_POST_CONTENT, 'post' ); ?>"><?php echo esc_textarea( wp_kses( \get_option( 'activitypub_custom_post_content', ACTIVITYPUB_CUSTOM_POST_CONTENT ), 'post' ) ); ?></textarea>
122 137 <details>
123 138 <summary><?php esc_html_e( 'See a list of ActivityPub Template Tags.', 'activitypub' ); ?></summary>
124 139 <div class="description">
125 140 <ul>
@@ -124,9 +139,9 @@
124 139 <div class="description">
125 140 <ul>
126 141 <li><code>[ap_title]</code> - <?php \esc_html_e( 'The post\'s title.', 'activitypub' ); ?></li>
127 142 <li><code>[ap_content]</code> - <?php \esc_html_e( 'The post\'s content.', 'activitypub' ); ?></li>
128 - <li><code>[ap_excerpt]</code> - <?php \esc_html_e( 'The post\'s excerpt (default 400 chars).', 'activitypub' ); ?></li>
143 + <li><code>[ap_excerpt]</code> - <?php \esc_html_e( 'The post\'s excerpt (may be truncated).', 'activitypub' ); ?></li>
129 144 <li><code>[ap_permalink]</code> - <?php \esc_html_e( 'The post\'s permalink.', 'activitypub' ); ?></li>
130 145 <li><code>[ap_shortlink]</code> - <?php echo \wp_kses( \__( 'The post\'s shortlink. I can recommend <a href="https://wordpress.org/plugins/hum/" target="_blank">Hum</a>.', 'activitypub' ), 'default' ); ?></li>
131 146 <li><code>[ap_hashtags]</code> - <?php \esc_html_e( 'The post\'s tags as hashtags.', 'activitypub' ); ?></li>
132 147 </ul>
@@ -137,9 +152,9 @@
137 152 </td>
138 153 </tr>
139 154 <tr>
140 155 <th scope="row">
141 - <?php \esc_html_e( 'Number of images', 'activitypub' ); ?>
156 + <?php \esc_html_e( 'Media attachments', 'activitypub' ); ?>
142 157 </th>
143 158 <td>
144 159 <input value="<?php echo esc_attr( \get_option( 'activitypub_max_image_attachments', ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS ) ); ?>" name="activitypub_max_image_attachments" id="activitypub_max_image_attachments" type="number" min="0" />
145 160 <p class="description">
@@ -146,9 +161,9 @@
146 161 <?php
147 162 echo \wp_kses(
148 163 \sprintf(
149 164 // translators:
150 - \__( 'The number of images to attach to posts. Default: <code>%s</code>', 'activitypub' ),
165 + \__( 'The number of media (images, audio, video) to attach to posts. Default: <code>%s</code>', 'activitypub' ),
151 166 \esc_html( ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS )
152 167 ),
153 168 'default'
154 169 );
@@ -153,46 +168,15 @@
153 168 'default'
154 169 );
155 170 ?>
156 171 </p>
157 - </td>
158 - </tr>
159 - <tr>
160 - <th scope="row">
161 - <?php \esc_html_e( 'Activity-Object-Type', 'activitypub' ); ?>
162 - </th>
163 - <td>
164 - <p>
165 - <label for="activitypub_object_type_note">
166 - <input type="radio" name="activitypub_object_type" id="activitypub_object_type_note" value="note" <?php echo \checked( 'note', \get_option( 'activitypub_object_type', 'note' ) ); ?> />
167 - <?php \esc_html_e( 'Note (default)', 'activitypub' ); ?>
168 - -
169 - <span class="description">
170 - <?php \esc_html_e( 'Should work with most platforms.', 'activitypub' ); ?>
171 - </span>
172 - </label>
172 + <p class="description">
173 + <em>
174 + <?php
175 + esc_html_e( 'Note: audio and video attachments are only supported from Block Editor.', 'activitypub' );
176 + ?>
177 + </em>
173 178 </p>
174 - <p><strong><?php \esc_html_e( 'Please note that the following "Activity-Object-Type" options may cause your texts to be displayed differently on each platform and/or parts may be completely ignored. Mastodon, for example, displays all content that is not of the "Note" type as links only.', 'activitypub' ); ?></strong></p>
175 - <p>
176 - <label for="activitypub_object_type_article">
177 - <input type="radio" name="activitypub_object_type" id="activitypub_object_type_article" value="article" <?php echo \checked( 'article', \get_option( 'activitypub_object_type', 'note' ) ); ?> />
178 - <?php \esc_html_e( 'Article', 'activitypub' ); ?>
179 - -
180 - <span class="description">
181 - <?php \esc_html_e( 'The presentation of the "Article" might change on different platforms.', 'activitypub' ); ?>
182 - </span>
183 - </label>
184 - </p>
185 - <p>
186 - <label>
187 - <input type="radio" name="activitypub_object_type" id="activitypub_object_type" value="wordpress-post-format" <?php echo \checked( 'wordpress-post-format', \get_option( 'activitypub_object_type', 'note' ) ); ?> />
188 - <?php \esc_html_e( 'WordPress Post-Format', 'activitypub' ); ?>
189 - -
190 - <span class="description">
191 - <?php \esc_html_e( 'Maps the WordPress Post-Format to the ActivityPub Object Type.', 'activitypub' ); ?>
192 - </span>
193 - </label>
194 - </p>
195 179 </td>
196 180 </tr>
197 181 <tr>
198 182 <th scope="row"><?php \esc_html_e( 'Supported post types', 'activitypub' ); ?></th>
@@ -197,12 +181,12 @@
197 181 <tr>
198 182 <th scope="row"><?php \esc_html_e( 'Supported post types', 'activitypub' ); ?></th>
199 183 <td>
200 184 <fieldset>
201 - <?php \esc_html_e( 'Enable ActivityPub support for the following post types:', 'activitypub' ); ?>
185 + <?php \esc_html_e( 'Automatically publish items of the selected post types to the fediverse:', 'activitypub' ); ?>
202 186
203 187 <?php $post_types = \get_post_types( array( 'public' => true ), 'objects' ); ?>
204 - <?php $support_post_types = \get_option( 'activitypub_support_post_types', array( 'post', 'page' ) ) ? \get_option( 'activitypub_support_post_types', array( 'post', 'page' ) ) : array(); ?>
188 + <?php $support_post_types = \get_option( 'activitypub_support_post_types', array( 'post' ) ) ? \get_option( 'activitypub_support_post_types', array( 'post' ) ) : array(); ?>
205 189 <ul>
206 190 <?php // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
207 191 <?php foreach ( $post_types as $post_type ) { ?>
208 192 <li>
@@ -207,8 +191,11 @@
207 191 <?php foreach ( $post_types as $post_type ) { ?>
208 192 <li>
209 193 <input type="checkbox" id="activitypub_support_post_type_<?php echo \esc_attr( $post_type->name ); ?>" name="activitypub_support_post_types[]" value="<?php echo \esc_attr( $post_type->name ); ?>" <?php echo \checked( \in_array( $post_type->name, $support_post_types, true ) ); ?> />
210 194 <label for="activitypub_support_post_type_<?php echo \esc_attr( $post_type->name ); ?>"><?php echo \esc_html( $post_type->label ); ?></label>
195 + <span class="description">
196 + <?php echo \esc_html( \Activitypub\get_post_type_description( $post_type ) ); ?>
197 + </span>
211 198 </li>
212 199 <?php } ?>
213 200 </ul>
214 201 </fieldset>
@@ -215,13 +202,13 @@
215 202 </td>
216 203 </tr>
217 204 <tr>
218 205 <th scope="row">
219 - <?php \esc_html_e( 'Hashtags (beta)', 'activitypub' ); ?>
206 + <?php \esc_html_e( 'Hashtags', 'activitypub' ); ?>
220 207 </th>
221 208 <td>
222 209 <p>
223 - <label><input type="checkbox" name="activitypub_use_hashtags" id="activitypub_use_hashtags" value="1" <?php echo \checked( '1', \get_option( 'activitypub_use_hashtags', '1' ) ); ?> /> <?php echo wp_kses( \__( 'Add hashtags in the content as native tags and replace the <code>#tag</code> with the tag link. <strong>This feature is experimental! Please disable it, if you find any HTML or CSS errors.</strong>', 'activitypub' ), 'default' ); ?></label>
210 + <label><input type="checkbox" name="activitypub_use_hashtags" id="activitypub_use_hashtags" value="1" <?php echo \checked( '1', \get_option( 'activitypub_use_hashtags', '1' ) ); ?> /> <?php echo wp_kses( \__( 'Add hashtags in the content as native tags and replace the <code>#tag</code> with the tag link.', 'activitypub' ), 'default' ); ?></label>
224 211 </p>
225 212 </td>
226 213 </tr>
227 214 </tbody>
@@ -230,17 +217,27 @@
230 217 <?php \do_settings_fields( 'activitypub', 'activity' ); ?>
231 218 </div>
232 219
233 220 <div class="box">
234 - <h3><?php \esc_html_e( 'Server', 'activitypub' ); ?></h3>
221 + <h3><?php \esc_html_e( 'General', 'activitypub' ); ?></h3>
235 222 <table class="form-table">
236 223 <tbody>
237 224 <tr>
238 225 <th scope="row">
226 + <?php \esc_html_e( 'OpenGraph', 'activitypub' ); ?>
227 + </th>
228 + <td>
229 + <p>
230 + <label><input type="checkbox" name="activitypub_use_opengraph" id="activitypub_use_opengraph" value="1" <?php echo \checked( '1', \get_option( 'activitypub_use_opengraph', '1' ) ); ?> /> <?php echo wp_kses( \__( 'Automatically add <code>&lt;meta name="fediverse:creator" /&gt;</code> tags for Authors and the Blog-User. You can read more about the feature on the <a href="https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/" target="_blank">Mastodon Blog</a>.', 'activitypub' ), 'post' ); ?></label>
231 + </p>
232 + </td>
233 + </tr>
234 + <tr>
235 + <th scope="row">
239 236 <?php \esc_html_e( 'Blocklist', 'activitypub' ); ?>
240 237 </th>
241 238 <td>
242 - <p class="description">
239 + <p>
243 240 <?php
244 241 echo \wp_kses(
245 242 \sprintf(
246 243 // translators: %s is a URL.
@@ -254,9 +251,9 @@
254 251 </td>
255 252 </tr>
256 253 </tbody>
257 254 </table>
258 -
255 + <?php \do_settings_fields( 'activitypub', 'general' ); ?>
259 256 <?php \do_settings_fields( 'activitypub', 'server' ); ?>
260 257 </div>
261 258 <?php \do_settings_sections( 'activitypub' ); ?>
262 259