| 1 |
<?php |
| 2 |
/** |
| 3 |
* This template contains the form for boosting a URL from the frontend. |
| 4 |
* |
| 5 |
* @version 1.0 |
| 6 |
* @package Friends |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
<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'] ); ?>"> |
| 11 |
<?php wp_nonce_field( 'friends-reblog' ); ?> |
| 12 |
<input type="hidden" name="action" value="friends-reblog" /> |
| 13 |
|
| 14 |
<label for="boost"><?php esc_html_e( 'Boost this URL:', 'friends' ); ?></label> |
| 15 |
<small> |
| 16 |
<?php |
| 17 |
echo wp_kses( |
| 18 |
sprintf( |
| 19 |
// translators: %s is a URL. |
| 20 |
__( 'You could also <a href=%s>reply to</a> this.', 'friends' ), |
| 21 |
'"' . ( ! empty( $args['boost'] ) ? ( '?in_reply_to=' . urlencode( $args['boost']['url'] ) ) : '' ) . '" class="reply-to-link"' |
| 22 |
), |
| 23 |
array( |
| 24 |
'a' => array( |
| 25 |
'href' => array(), |
| 26 |
'class' => array(), |
| 27 |
), |
| 28 |
) |
| 29 |
); |
| 30 |
?> |
| 31 |
</small> |
| 32 |
<input class="form-input activitypub_preview_url" type="url" name="boost" placeholder="<?php esc_attr_e( 'Boost https://...', 'friends' ); ?>" value="<?php echo esc_attr( ! empty( $args['boost'] ) ? $args['boost']['url'] : '' ); ?>" autocomplete="off"/> |
| 33 |
<div class="activitypub_preview"><?php echo wp_kses_post( ! empty( $args['boost'] ) ? $args['boost']['html'] : '' ); ?></div> |
| 34 |
|
| 35 |
<div class="form-group"> |
| 36 |
<button class="btn"><?php esc_html_e( 'Boost', 'friends' ); ?></button> |
| 37 |
<a href="#" class="quick-post-panel-toggle"><?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Cancel' ); ?></a> |
| 38 |
</div> |
| 39 |
</form> |
| 40 |
|