PluginProbe
Friends / 2.8.7
Friends v2.8.7
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
friends / templates / frontend / activitypub / reply.php

reply.php in Friends 2.8.7, at templates/frontend/activitypub/reply.php

70 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template contains the form for replying to a URL from the frontend.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 ?><form method="post" action="<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>" id="quick-post-panel" class="<?php echo esc_html( $args['form_class'] ); ?>">
10 <?php wp_nonce_field( 'friends_publish' ); ?>
11 <input type="hidden" name="action" value="friends_publish" />
12 <input type="hidden" name="format" value="status" />
13 <input type="hidden" name="status" value="publish" />
14
15 <label for="boost"><?php esc_html_e( 'Reply to this URL:', 'friends' ); ?></label>
16 <small>
17 <?php
18 echo wp_kses(
19 sprintf(
20 // translators: %s is a URL.
21 __( 'You could also <a href=%s>boost</a> this.', 'friends' ),
22 '"' . ( ! empty( $args['in_reply_to'] ) ? ( '?boost=' . urlencode( $args['in_reply_to']['url'] ) ) : '' ) . '" class="boost-link"'
23 ),
24 array(
25 'a' => array(
26 'href' => array(),
27 'class' => array(),
28 ),
29 )
30 );
31 ?>
32 </small>
33 <input class="form-input activitypub_preview_url" type="url" name="in_reply_to" placeholder="<?php esc_attr_e( 'In reply to https://...', 'friends' ); ?>" value="<?php echo esc_attr( ! empty( $args['in_reply_to'] ) ? $args['in_reply_to']['url'] : '' ); ?>" autocomplete="off"/>
34 <div class="activitypub_preview"><?php echo wp_kses_post( ! empty( $args['in_reply_to'] ) ? $args['in_reply_to']['html'] : '' ); ?></div>
35 <p class="description"><?php esc_html_e( 'Click the mentions to copy them into your reply.', 'friends' ); ?></p>
36 <div class="form-group<?php echo esc_attr( $args['blocks-everywhere'] ? ' blocks-everywhere iso-editor__loading' : '' ); ?>">
37 <label class="form-label" for="content"><?php esc_html_e( 'Text', 'friends' ); ?></label>
38 <textarea class="form-input friends-status-content<?php echo esc_attr( $args['blocks-everywhere'] ? ' blocks-everywhere-enabled' : '' ); ?>" name="content" rows="5" cols="70" placeholder="<?php echo /* translators: %s is a user display name. */ esc_attr( sprintf( __( "What's on your mind, %s?", 'friends' ), wp_get_current_user()->display_name ) ); ?>"><?php echo wp_kses_post( ! empty( $args['in_reply_to'] ) ? ( $args['blocks-everywhere'] ? '<!-- wp:paragraph -->' . PHP_EOL . '<p>' . $args['in_reply_to']['mention'] . PHP_EOL . '</p>' . PHP_EOL . '<!-- /wp:paragraph -->' . PHP_EOL : $args['in_reply_to']['mention'] . ' ' ) : '' ); ?></textarea><br />
39 <?php
40 do_action( 'friends_post_status_form' );
41 ?>
42 </div>
43
44 <div class="form-group col-4">
45 <select name="status" class="form-select">
46 <option value="publish"><?php esc_html_e( 'Visible to everyone', 'friends' ); ?></option>
47 <option value="private"><?php esc_html_e( 'Only visible to my friends', 'friends' ); ?></option>
48 </select>
49 </div>
50
51 <div class="form-group col-4">
52 <p>
53 <?php
54 echo esc_html(
55 sprintf(
56 // translators: %s is the name of a post format.
57 __( 'Post Format: %s', 'friends' ),
58 __( 'Status' ) // phpcs:ignore WordPress.WP.I18n.MissingArgDomain
59 )
60 );
61 ?>
62 </p>
63 </div>
64
65 <div class="form-group">
66 <button class="btn"><?php esc_html_e( 'Publish Reply', 'friends' ); ?></button>
67 <a href="#" class="quick-post-panel-toggle"><?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Cancel' ); ?></a>
68 </div>
69 </form>
70