PluginProbe
ActivityPub / trunk
ActivityPub vtrunk
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 / toolbox.php

toolbox.php in ActivityPub trunk, at templates/toolbox.php

79 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Toolbox template.
4 *
5 * @package Activitypub
6 */
7
8 ?>
9
10 <div class="card activitypub" id="activitypub">
11 <h2><?php esc_html_e( 'Fediverse Bookmarklet ⁂', 'activitypub' ); ?></h2>
12 <p>
13 <?php esc_html_e( 'This lightweight bookmarklet makes it simple to reply to content on any webpage that supports ActivityPub, enhancing your interaction on the fediverse.', 'activitypub' ); ?>
14 </p>
15 <form>
16 <h3><?php esc_html_e( 'Install Bookmarklet', 'activitypub' ); ?></h3>
17 <p><?php esc_html_e( 'Drag and drop this button to your browser’s bookmark bar or save this bookmarklet to reply to posts on other websites from your blog! When visiting a post on another site, click the bookmarklet to start a reply.', 'activitypub' ); ?></p>
18 <p class="activitypub-bookmarklet-wrapper">
19 <a class="activitypub-bookmarklet button" onclick="return false;" href="<?php echo esc_attr( \Activitypub\get_reply_intent_js() ); ?>" style="cursor: grab;">
20 <?php // translators: The host (domain) of the Blog. ?>
21 <?php printf( esc_html__( 'Reply from %s', 'activitypub' ), esc_attr( \wp_parse_url( \home_url(), PHP_URL_HOST ) ) ); ?>
22 </a>
23 </p>
24 <div class="activitypub-code-wrap clear" id="activitypub-code-wrap">
25 <p id="activitypub-code-desc">
26 <?php esc_html_e( 'Or copy the following code and create a new bookmark. Paste the code into the new bookmark&#8217;s URL field.', 'activitypub' ); ?>
27 </p>
28 <p>
29 <textarea id="activitypub-bookmarklet-code" class="large-text activitypub-code" rows="5" readonly="readonly" aria-labelledby="activitypub-code-desc"><?php echo esc_textarea( \Activitypub\get_reply_intent_js() ); ?></textarea>
30 </p>
31 <p><span class="dashicons dashicons-clipboard"></span> <a href="javascript:;" class="copy-activitypub-bookmarklet-code" style="cursor: copy;"><?php esc_html_e( 'Copy to clipboard', 'activitypub' ); ?></a></p>
32 </div>
33 <script>
34 jQuery( document ).ready( function( $ ) {
35 var $copyActivitypubBookmarkletCode = $( '.copy-activitypub-bookmarklet-code' );
36 $copyActivitypubBookmarkletCode.on( 'click', function( event ) {
37 // Get the text field.
38 var copyText = document.getElementById("activitypub-bookmarklet-code");
39
40 // Select the text field.
41 copyText.select();
42 copyText.setSelectionRange(0, 99999); // For mobile devices.
43
44 // Copy the text inside the text field.
45 navigator.clipboard.writeText(copyText.value);
46 });
47 });
48 </script>
49 </form>
50 <h3><?php esc_html_e( 'Reply Intent', 'activitypub' ); ?></h3>
51 <p><?php esc_html_e( 'The Reply Intent makes it easy for you to compose and post a Reply to your audience from a link on the Fediverse (Mastodon, Pixelfed, ...).', 'activitypub' ); ?></p>
52 <h4><?php esc_html_e( 'URL', 'activitypub' ); ?></h4>
53 <p><code><?php echo esc_url( \admin_url( 'post-new.php' ) ); ?></code></p>
54 <h4><?php esc_html_e( 'Query parameters', 'activitypub' ); ?></h4>
55 <table class="wp-list-table widefat fixed striped table-view-list">
56 <thead>
57 <tr>
58 <th>
59 <?php esc_html_e( 'Parameter', 'activitypub' ); ?>
60 </th>
61 <th>
62 <?php esc_html_e( 'Description', 'activitypub' ); ?>
63 </th>
64 </tr>
65 </thead>
66 <tbody>
67 <tr>
68 <td>in_reply_to</td>
69 <td><?php esc_html_e( 'The URL of the content you want to reply to.', 'activitypub' ); ?></td>
70 </tr>
71 <tr>
72 <td>post_type</td>
73 <td><?php esc_html_e( 'The Post-Type you want to use for replies.', 'activitypub' ); ?></td>
74 </tr>
75 </tbody>
76 </table>
77 <p><?php esc_html_e( 'There might be more query parameters in the future.', 'activitypub' ); ?></p>
78 </div>
79