PluginProbe
ActivityPub / 2.6.0
ActivityPub v2.6.0
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
activitypub / templates / user-settings.php

user-settings.php in ActivityPub 2.6.0, at templates/user-settings.php

68 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
3 $user = \Activitypub\Collection\Users::get_by_id( \get_current_user_id() ); ?>
4 <h2 id="activitypub"><?php \esc_html_e( 'ActivityPub', 'activitypub' ); ?></h2>
5
6 <table class="form-table">
7 <tbody>
8 <tr>
9 <th scope="row">
10 <label><?php \esc_html_e( 'Profile URL', 'activitypub' ); ?></label>
11 </th>
12 <td>
13 <p>
14 <code><?php echo \esc_html( $user->get_webfinger() ); ?></code> or
15 <code><?php echo \esc_url( $user->get_url() ); ?></code>
16 </p>
17 <?php // translators: the webfinger resource ?>
18 <p class="description"><?php \printf( \esc_html__( 'Follow "@%s" by searching for it on Mastodon, Friendica, etc.', 'activitypub' ), \esc_html( $user->get_webfinger() ) ); ?></p>
19 </td>
20 </tr>
21 <tr class="activitypub-user-description-wrap">
22 <th>
23 <label for="activitypub-user-description"><?php \esc_html_e( 'Biography', 'activitypub' ); ?></label>
24 </th>
25 <td>
26 <textarea name="activitypub-user-description" id="activitypub-user-description" rows="5" cols="30" placeholder="<?php echo \esc_html( get_user_meta( \get_current_user_id(), 'description', true ) ); ?>"><?php echo \esc_html( $args['description'] ); ?></textarea>
27 <p class="description"><?php \esc_html_e( 'If you wish to use different biographical info for the fediverse, enter your alternate bio here.', 'activitypub' ); ?></p>
28 </td>
29 <?php wp_nonce_field( 'activitypub-user-description', '_apnonce' ); ?>
30 </tr>
31 <tr scope="row">
32 <th>
33 <label><?php \esc_html_e( 'Extra fields', 'activitypub' ); ?></label>
34 </th>
35 <td>
36 <p class="description"><?php \esc_html_e( 'Your homepage, social profiles, pronouns, age, anything you want.', 'activitypub' ); ?></p>
37
38 <table class="widefat striped activitypub-extra-fields" role="presentation" style="margin: 15px 0;">
39 <?php
40 $extra_fields = \Activitypub\get_actor_extra_fields( \get_current_user_id() );
41
42 foreach ( $extra_fields as $extra_field ) {
43 ?>
44 <tr>
45 <td><?php echo \esc_html( $extra_field->post_title ); ?></td>
46 <td><?php echo \wp_kses_post( \get_the_excerpt( $extra_field ) ); ?></td>
47 <td>
48 <a href="<?php echo \esc_url( \get_edit_post_link( $extra_field->ID ) ); ?>" class="button">
49 <?php \esc_html_e( 'Edit', 'activitypub' ); ?>
50 </a>
51 </td>
52 </tr>
53 <?php } ?>
54 </table>
55
56 <p>
57 <a href="<?php echo esc_url( admin_url( '/post-new.php?post_type=ap_extrafield' ) ); ?>" class="button">
58 <?php esc_html_e( 'Add new', 'activitypub' ); ?>
59 </a>
60 <a href="<?php echo esc_url( admin_url( '/edit.php?post_type=ap_extrafield' ) ); ?>">
61 <?php esc_html_e( 'Manage all', 'activitypub' ); ?>
62 </a>
63 </p>
64 </td>
65 </tr>
66 </tbody>
67 </table>
68