updated plugin ActivityPub
version 5.8.0
This commit is contained in:
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub New Mention E-Mail template with styles.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
use Activitypub\Collection\Actors;
|
||||
use Activitypub\Embed;
|
||||
|
||||
/* @var array $args Template arguments. */
|
||||
$args = wp_parse_args( $args ?? array() );
|
||||
|
||||
// Load header.
|
||||
require __DIR__ . '/parts/header.php';
|
||||
?>
|
||||
|
||||
<h1>
|
||||
<?php
|
||||
if ( Actors::BLOG_USER_ID === $args['user_id'] ) :
|
||||
esc_html_e( 'Your blog was mentioned!', 'activitypub' );
|
||||
else :
|
||||
esc_html_e( 'You were mentioned!', 'activitypub' );
|
||||
endif;
|
||||
?>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
if ( Actors::BLOG_USER_ID === $args['user_id'] ) :
|
||||
/* translators: %s: The name of the person who mentioned the blog. */
|
||||
$message = __( 'Looks like someone’s talking about your blog! It was just mentioned by %s in a post on the Fediverse. Here’s what they said:', 'activitypub' );
|
||||
else :
|
||||
/* translators: %s: The name of the person who mentioned the user. */
|
||||
$message = __( 'Looks like someone’s talking about you! You were just mentioned by %s in a post on the Fediverse. Here’s what they said:', 'activitypub' );
|
||||
endif;
|
||||
|
||||
printf( esc_html( $message ), '<a href="' . esc_url( $args['actor']['url'] ) . '">' . esc_html( $args['actor']['webfinger'] ) . '</a>' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<div class="embed">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo Embed::get_html_for_object( $args['activity']['object'] );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a class="button" href="<?php echo esc_url( admin_url( 'post-new.php?in_reply_to=' . $args['activity']['object']['id'] ) ); ?>">
|
||||
<?php esc_html_e( 'Reply to the post', 'activitypub' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Fires at the bottom of the new mention emails.
|
||||
*
|
||||
* @param array $args The template arguments.
|
||||
*/
|
||||
do_action( 'activitypub_new_mention_email', $args );
|
||||
|
||||
// Load footer.
|
||||
require __DIR__ . '/parts/footer.php';
|
Reference in New Issue
Block a user