| 1 |
<div class="wrap"> |
| 2 |
<h1><?php esc_html_e( 'ActivityPub Settings', 'activitypub' ); ?></h1> |
| 3 |
|
| 4 |
<p><?php esc_html_e( 'ActivityPub turns your blog into a federated social network. This means you can share and talk to everyone using the ActivityPub protocol, including users of Friendica, Pleroma and Mastodon.', 'activitypub' ); ?></p> |
| 5 |
|
| 6 |
<form method="post" action="options.php"> |
| 7 |
<?php settings_fields( 'activitypub' ); ?> |
| 8 |
|
| 9 |
<h2><?php esc_html_e( 'Activities', 'activitypub' ); ?></h2> |
| 10 |
|
| 11 |
<p><?php esc_html_e( 'All activity related settings.', 'activitypub' ); ?></p> |
| 12 |
|
| 13 |
<table class="form-table"> |
| 14 |
<tbody> |
| 15 |
<tr> |
| 16 |
<th scope="row"> |
| 17 |
<?php esc_html_e( 'Post-Content', 'activitypub' ); ?> |
| 18 |
</th> |
| 19 |
<td> |
| 20 |
<p> |
| 21 |
<label><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' ) ); ?> /> <?php esc_html_e( 'Excerpt', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'A content summary, shortened to 400 characters and without markup.', 'activitypub' ); ?></span> |
| 22 |
</p> |
| 23 |
<p> |
| 24 |
<label><input type="radio" name="activitypub_post_content_type" id="activitypub_post_content_type_content" value="content" <?php echo checked( 'content', get_option( 'activitypub_post_content_type', 'content' ) ); ?> /> <?php esc_html_e( 'Content (default)', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'The full content.', 'activitypub' ); ?></span> |
| 25 |
</p> |
| 26 |
</td> |
| 27 |
</tr> |
| 28 |
<tr> |
| 29 |
<th scope="row"> |
| 30 |
<?php esc_html_e( 'Backlink', 'activitypub' ); ?> |
| 31 |
</th> |
| 32 |
<td> |
| 33 |
<p><label><input type="checkbox" name="activitypub_use_shortlink" id="activitypub_use_shortlink" value="1" <?php echo checked( '1', get_option( 'activitypub_use_shortlink', '0' ) ); ?> /> <?php esc_html_e( 'Use the Shortlink instead of the permalink', 'activitypub' ); ?></label></p> |
| 34 |
<p class="description"><?php printf( esc_html( 'I can recommend %sHum%s, to prettify the Shortlinks', 'activitypub' ), '<a href="https://wordpress.org/plugins/hum/" target="_blank">', '</a>' ); ?></p> |
| 35 |
</td> |
| 36 |
</tr> |
| 37 |
<tr> |
| 38 |
<th scope="row"> |
| 39 |
<?php esc_html_e( 'Activity-Object-Type', 'activitypub' ); ?> |
| 40 |
</th> |
| 41 |
<td> |
| 42 |
<p> |
| 43 |
<label><input type="radio" name="activitypub_object_type" id="activitypub_object_type_note" value="note" <?php echo checked( 'note', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'Note (default)', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'Should work with most platforms.', 'activitypub' ); ?></span> |
| 44 |
</p> |
| 45 |
<p> |
| 46 |
<label><input type="radio" name="activitypub_object_type" id="activitypub_object_type_article" value="article" <?php echo checked( 'article', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'Article', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'The presentation of the "Article" might change on different platforms. Mastodon for example shows the "Article" type as a simple link.', 'activitypub' ); ?></span> |
| 47 |
</p> |
| 48 |
<p> |
| 49 |
<label><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' ) ); ?> /> <?php esc_html_e( 'WordPress Post-Format', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'Maps the WordPress Post-Format to the ActivityPub Object Type.', 'activitypub' ); ?></span> |
| 50 |
</p> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
<tr> |
| 54 |
<th scope="row"> |
| 55 |
<?php esc_html_e( 'Hashtags', 'activitypub' ); ?> |
| 56 |
</th> |
| 57 |
<td> |
| 58 |
<p> |
| 59 |
<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 _e( 'Add hashtags in the content as native tags and replace the <code>#tag</code> with the tag-link.', 'activitypub' ); ?></label> |
| 60 |
</p> |
| 61 |
<p> |
| 62 |
<label><input type="checkbox" name="activitypub_add_tags_as_hashtags" id="activitypub_add_tags_as_hashtags" value="1" <?php echo checked( '1', get_option( 'activitypub_add_tags_as_hashtags', '0' ) ); ?> /> <?php _e( 'Add all tags as hashtags to the end of each activity.', 'activitypub' ); ?></label> |
| 63 |
</p> |
| 64 |
</td> |
| 65 |
</tr> |
| 66 |
</tbody> |
| 67 |
</table> |
| 68 |
|
| 69 |
<?php do_settings_fields( 'activitypub', 'activity' ); ?> |
| 70 |
|
| 71 |
<h2><?php esc_html_e( 'Profile', 'activitypub' ); ?></h2> |
| 72 |
|
| 73 |
<p><?php esc_html_e( 'All profile related settings.', 'activitypub' ); ?></p> |
| 74 |
|
| 75 |
<?php \Activitypub\get_identifier_settings( get_current_user_id() ); ?> |
| 76 |
|
| 77 |
<?php do_settings_fields( 'activitypub', 'profile' ); ?> |
| 78 |
|
| 79 |
<h2><?php esc_html_e( 'Followers', 'activitypub' ); ?></h2> |
| 80 |
|
| 81 |
<p><?php esc_html_e( 'All follower related settings.', 'activitypub' ); ?></p> |
| 82 |
|
| 83 |
<table class="form-table"> |
| 84 |
<tbody> |
| 85 |
<tr> |
| 86 |
<th scope="row"> |
| 87 |
<label><?php esc_html_e( 'List of followers', 'activitypub' ); ?></label> |
| 88 |
</th> |
| 89 |
<td> |
| 90 |
<?php if ( \Activitypub\Db\Followers::get_followers( get_current_user_id() ) ) { ?> |
| 91 |
<ul> |
| 92 |
<?php foreach ( \Activitypub\Db\Followers::get_followers( get_current_user_id() ) as $follower ) { ?> |
| 93 |
<li><?php echo esc_attr( $follower ); ?></li> |
| 94 |
<?php } ?> |
| 95 |
</ul> |
| 96 |
<?php } else { ?> |
| 97 |
<p><?php esc_html_e( 'No followers yet', 'activitypub' ); ?></p> |
| 98 |
<?php } ?> |
| 99 |
</td> |
| 100 |
</tr> |
| 101 |
</tbody> |
| 102 |
</table> |
| 103 |
|
| 104 |
<?php do_settings_fields( 'activitypub', 'followers' ); ?> |
| 105 |
|
| 106 |
<?php do_settings_sections( 'activitypub' ); ?> |
| 107 |
|
| 108 |
<?php submit_button(); ?> |
| 109 |
</form> |
| 110 |
|
| 111 |
<p> |
| 112 |
<small><?php _e( 'If you like this plugin, what about a small <a href="https://notiz.blog/donate">donation</a>?', 'activitypub' ); ?></small> |
| 113 |
</p> |
| 114 |
</div> |
| 115 |
|