updated plugin ActivityPub
version 3.3.3
This commit is contained in:
@ -1,5 +1,20 @@
|
||||
<?php
|
||||
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
|
||||
/**
|
||||
* Admin header template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
/* @var array $args Template arguments. */
|
||||
$args = wp_parse_args(
|
||||
$args,
|
||||
array(
|
||||
'welcome' => '',
|
||||
'settings' => '',
|
||||
'blog-profile' => '',
|
||||
'followers' => '',
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div class="activitypub-settings-header">
|
||||
<div class="activitypub-settings-title-section">
|
||||
@ -7,17 +22,21 @@
|
||||
</div>
|
||||
|
||||
<nav class="activitypub-settings-tabs-wrapper" aria-label="<?php \esc_attr_e( 'Secondary menu', 'activitypub' ); ?>">
|
||||
<a href="<?php echo \esc_url_raw( admin_url( 'options-general.php?page=activitypub' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['welcome'] ); ?>">
|
||||
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=activitypub' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['welcome'] ); ?>">
|
||||
<?php \esc_html_e( 'Welcome', 'activitypub' ); ?>
|
||||
</a>
|
||||
|
||||
<a href="<?php echo \esc_url_raw( admin_url( 'options-general.php?page=activitypub&tab=settings' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['settings'] ); ?>">
|
||||
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=activitypub&tab=settings' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['settings'] ); ?>">
|
||||
<?php \esc_html_e( 'Settings', 'activitypub' ); ?>
|
||||
</a>
|
||||
|
||||
<?php if ( ! \Activitypub\is_user_disabled( \Activitypub\Collection\Users::BLOG_USER_ID ) ) : ?>
|
||||
|
||||
<a href="<?php echo \esc_url_raw( admin_url( 'options-general.php?page=activitypub&tab=followers' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['followers'] ); ?>">
|
||||
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=activitypub&tab=blog-profile' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['blog-profile'] ); ?>">
|
||||
<?php \esc_html_e( 'Blog-Profile', 'activitypub' ); ?>
|
||||
</a>
|
||||
|
||||
<a href="<?php echo \esc_url( admin_url( 'options-general.php?page=activitypub&tab=followers' ) ); ?>" class="activitypub-settings-tab <?php echo \esc_attr( $args['followers'] ); ?>">
|
||||
<?php \esc_html_e( 'Followers', 'activitypub' ); ?>
|
||||
</a>
|
||||
|
||||
|
@ -1,14 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub Blog Followers List template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
\load_template(
|
||||
__DIR__ . '/admin-header.php',
|
||||
true,
|
||||
array(
|
||||
'settings' => '',
|
||||
'welcome' => '',
|
||||
'followers' => 'active',
|
||||
)
|
||||
);
|
||||
$table = new \Activitypub\Table\Followers();
|
||||
|
||||
$table = new \Activitypub\Table\Followers();
|
||||
$follower_count = $table->get_user_count();
|
||||
// translators: The follower count.
|
||||
$followers_template = _n( 'Your blog profile currently has %s follower.', 'Your blog profile currently has %s followers.', $follower_count, 'activitypub' );
|
@ -1,15 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub Blog JSON template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
$user = new \Activitypub\Model\Blog();
|
||||
|
||||
/*
|
||||
* Action triggerd prior to the ActivityPub profile being created and sent to the client
|
||||
/**
|
||||
* Action triggered prior to the ActivityPub profile being created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_author_pre', $user->get__id() );
|
||||
|
||||
\header( 'Content-Type: application/activity+json' );
|
||||
echo $user->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
/*
|
||||
* Action triggerd after the ActivityPub profile has been created and sent to the client
|
||||
/**
|
||||
* Action triggered after the ActivityPub profile has been created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_author_post', $user->get__id() );
|
||||
|
190
wp-content/plugins/activitypub/templates/blog-settings.php
Normal file
190
wp-content/plugins/activitypub/templates/blog-settings.php
Normal file
@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub Blog Settings template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
\load_template(
|
||||
__DIR__ . '/admin-header.php',
|
||||
true,
|
||||
array(
|
||||
'blog-profile' => 'active',
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="activitypub-settings activitypub-settings-page hide-if-no-js">
|
||||
<form method="post" action="options.php">
|
||||
<?php \settings_fields( 'activitypub_blog' ); ?>
|
||||
|
||||
<div class="box">
|
||||
<h3><?php \esc_html_e( 'Blog-Profile', 'activitypub' ); ?></h3>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'Manage Avatar', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php if ( \has_site_icon() ) : ?>
|
||||
<p><img src="<?php echo esc_url( get_site_icon_url( '50' ) ); ?>" /></p>
|
||||
<?php endif; ?>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo \wp_kses(
|
||||
\sprintf(
|
||||
// translators: %s is a URL.
|
||||
\__( 'The ActivityPub plugin uses the WordPress Site Icon as Avatar for the Blog-Profile, you can change the Site Icon in the "<a href="%s">General Settings</a>" of WordPress.', 'activitypub' ),
|
||||
\esc_url( \admin_url( 'options-general.php' ) )
|
||||
),
|
||||
'default'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php \esc_html_e( 'Manage Header Image', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
$classes_for_upload_button = 'button upload-button button-add-media button-add-header-image';
|
||||
$classes_for_update_button = 'button';
|
||||
$classes_for_wrapper = '';
|
||||
|
||||
if ( (int) get_option( 'activitypub_header_image', 0 ) ) :
|
||||
$classes_for_wrapper .= ' has-header-image';
|
||||
$classes_for_button = $classes_for_update_button;
|
||||
$classes_for_button_on_change = $classes_for_upload_button;
|
||||
else :
|
||||
$classes_for_wrapper .= ' hidden';
|
||||
$classes_for_button = $classes_for_upload_button;
|
||||
$classes_for_button_on_change = $classes_for_update_button;
|
||||
endif;
|
||||
?>
|
||||
<div id="activitypub-header-image-preview-wrapper" class='<?php echo esc_attr( $classes_for_wrapper ); ?>'>
|
||||
<img id='activitypub-header-image-preview' src='<?php echo esc_url( wp_get_attachment_url( get_option( 'activitypub_header_image' ) ) ); ?>' style="max-width: 100%;" />
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
id="activitypub-choose-from-library-button"
|
||||
type="button"
|
||||
class="<?php echo esc_attr( $classes_for_button ); ?>"
|
||||
data-alt-classes="<?php echo esc_attr( $classes_for_button_on_change ); ?>"
|
||||
data-choose-text="<?php esc_attr_e( 'Choose a Header Image', 'activitypub' ); ?>"
|
||||
data-update-text="<?php esc_attr_e( 'Change Header Icon', 'activitypub' ); ?>"
|
||||
data-update="<?php esc_attr_e( 'Set as Header Image', 'activitypub' ); ?>"
|
||||
data-state="<?php echo esc_attr( (int) get_option( 'activitypub_header_image', 0 ) ); ?>">
|
||||
<?php if ( (int) get_option( 'activitypub_header_image', 0 ) ) : ?>
|
||||
<?php esc_html_e( 'Change Header Image', 'activitypub' ); ?>
|
||||
<?php else : ?>
|
||||
<?php esc_html_e( 'Choose a Header Image', 'activitypub' ); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
<button
|
||||
id="activitypub-remove-header-image"
|
||||
type="button"
|
||||
<?php echo (int) get_option( 'activitypub_header_image', 0 ) ? 'class="button button-secondary reset"' : 'class="button button-secondary reset hidden"'; ?>>
|
||||
<?php esc_html_e( 'Remove Header Image', 'activitypub' ); ?>
|
||||
</button>
|
||||
<input type='hidden' name='activitypub_header_image' id='activitypub_header_image' value='<?php echo esc_attr( get_option( 'activitypub_header_image' ) ); ?>'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'Change profile ID', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<label for="activitypub_blog_identifier">
|
||||
<input class="blog-user-identifier" name="activitypub_blog_identifier" id="activitypub_blog_identifier" type="text" value="<?php echo esc_attr( \get_option( 'activitypub_blog_identifier', \Activitypub\Model\Blog::get_default_username() ) ); ?>" />
|
||||
@<?php echo esc_html( \wp_parse_url( \home_url(), PHP_URL_HOST ) ); ?>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php \esc_html_e( 'This profile name will federate all posts written on your blog, regardless of the author who posted it.', 'activitypub' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<strong>
|
||||
<?php \esc_html_e( 'Please avoid using an existing author’s name as the blog profile ID. Fediverse platforms might use caching and this could break the functionality completely.', 'activitypub' ); ?>
|
||||
</strong>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'Change Description', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<label for="activitypub_blog_description">
|
||||
<textarea
|
||||
class="blog-user-description large-text"
|
||||
rows="5"
|
||||
name="activitypub_blog_description"
|
||||
id="activitypub_blog_description"
|
||||
placeholder="<?php echo esc_attr( \get_bloginfo( 'description' ) ); ?>"
|
||||
><?php echo \esc_textarea( \get_option( 'activitypub_blog_description' ) ); ?></textarea>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php \esc_html_e( 'By default the ActivityPub plugin uses the WordPress tagline as a description for the blog profile.', 'activitypub' ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr scope="row">
|
||||
<th>
|
||||
<label><?php \esc_html_e( 'Extra Fields', 'activitypub' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<p class="description">
|
||||
<?php
|
||||
\esc_html_e( 'Your homepage, social profiles, pronouns, age, anything you want.', 'activitypub' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<table class="widefat striped activitypub-extra-fields" role="presentation" style="margin: 15px 0;">
|
||||
<?php
|
||||
$extra_fields = \Activitypub\Collection\Extra_Fields::get_actor_fields( \Activitypub\Collection\Users::BLOG_USER_ID );
|
||||
|
||||
if ( empty( $extra_fields ) ) :
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<?php \esc_html_e( 'No extra fields found.', 'activitypub' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
foreach ( $extra_fields as $extra_field ) :
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo \esc_html( $extra_field->post_title ); ?></td>
|
||||
<td><?php echo \wp_kses_post( \get_the_excerpt( $extra_field ) ); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo \esc_url( \get_edit_post_link( $extra_field->ID ) ); ?>" class="button">
|
||||
<?php \esc_html_e( 'Edit', 'activitypub' ); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<a href="<?php echo esc_url( admin_url( '/post-new.php?post_type=ap_extrafield_blog' ) ); ?>" class="button">
|
||||
<?php esc_html_e( 'Add new', 'activitypub' ); ?>
|
||||
</a>
|
||||
<a href="<?php echo esc_url( admin_url( '/edit.php?post_type=ap_extrafield_blog' ) ); ?>">
|
||||
<?php esc_html_e( 'Manage all', 'activitypub' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php \do_settings_sections( 'activitypub_blog_profile' ); ?>
|
||||
|
||||
<?php \submit_button(); ?>
|
||||
</form>
|
||||
</div>
|
@ -1,5 +1,11 @@
|
||||
<?php
|
||||
$comment = \get_comment( \get_query_var( 'c', null ) ); // phpcs:ignore
|
||||
/**
|
||||
* ActivityPub Comment JSON template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
$comment = \get_comment( \get_query_var( 'c', null ) ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $comment );
|
||||
|
||||
if ( \is_wp_error( $transformer ) ) {
|
||||
@ -9,15 +15,15 @@ if ( \is_wp_error( $transformer ) ) {
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* Action triggerd prior to the ActivityPub profile being created and sent to the client
|
||||
/**
|
||||
* Action triggered prior to the ActivityPub profile being created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_comment_pre' );
|
||||
|
||||
\header( 'Content-Type: application/activity+json' );
|
||||
echo $transformer->to_object()->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
/*
|
||||
* Action triggerd after the ActivityPub profile has been created and sent to the client
|
||||
/**
|
||||
* Action triggered after the ActivityPub profile has been created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_comment_post' );
|
||||
|
@ -1,6 +1,11 @@
|
||||
<?php
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$post = \get_post();
|
||||
/**
|
||||
* ActivityPub Post JSON template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
$post = \get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $post );
|
||||
|
||||
if ( \is_wp_error( $transformer ) ) {
|
||||
@ -11,15 +16,15 @@ if ( \is_wp_error( $transformer ) ) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action triggerd prior to the ActivityPub profile being created and sent to the client
|
||||
/**
|
||||
* Action triggered prior to the ActivityPub profile being created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_post_pre' );
|
||||
|
||||
\header( 'Content-Type: application/activity+json' );
|
||||
echo $transformer->to_object()->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
/*
|
||||
* Action triggerd after the ActivityPub profile has been created and sent to the client
|
||||
/**
|
||||
* Action triggered after the ActivityPub profile has been created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_post_post' );
|
||||
|
@ -1,11 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub settings template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
\load_template(
|
||||
__DIR__ . '/admin-header.php',
|
||||
true,
|
||||
array(
|
||||
'settings' => 'active',
|
||||
'welcome' => '',
|
||||
'followers' => '',
|
||||
'settings' => 'active',
|
||||
)
|
||||
);
|
||||
?>
|
||||
@ -26,7 +30,7 @@
|
||||
<p>
|
||||
<label>
|
||||
<input type="checkbox" name="activitypub_enable_users" id="activitypub_enable_users" value="1" <?php echo \checked( '1', \get_option( 'activitypub_enable_users', '1' ) ); ?> />
|
||||
<?php \esc_html_e( 'Enable authors', 'activitypub' ); ?>
|
||||
<?php \esc_html_e( 'Enable Author-Profiles', 'activitypub' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p class="description">
|
||||
@ -38,7 +42,7 @@
|
||||
<p>
|
||||
<label>
|
||||
<input type="checkbox" name="activitypub_enable_blog_user" id="activitypub_enable_blog_user" value="1" <?php echo \checked( '1', \get_option( 'activitypub_enable_blog_user', '0' ) ); ?> />
|
||||
<?php \esc_html_e( 'Enable blog', 'activitypub' ); ?>
|
||||
<?php \esc_html_e( 'Enable Blog-Profile', 'activitypub' ); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p class="description">
|
||||
@ -46,25 +50,6 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'Change blog profile ID', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<label for="activitypub_blog_user_identifier">
|
||||
<input class="blog-user-identifier" name="activitypub_blog_user_identifier" id="activitypub_blog_user_identifier" type="text" value="<?php echo esc_attr( \get_option( 'activitypub_blog_user_identifier', \Activitypub\Model\Blog::get_default_username() ) ); ?>" />
|
||||
@<?php echo esc_html( \wp_parse_url( \home_url(), PHP_URL_HOST ) ); ?>
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php \esc_html_e( 'This profile name will federate all posts written on your blog, regardless of the author who posted it.', 'activitypub' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<strong>
|
||||
<?php \esc_html_e( 'Please avoid using an existing author’s name as the blog profile ID. Fediverse platforms might use caching and this could break the functionality completely.', 'activitypub' ); ?>
|
||||
</strong>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -103,8 +88,7 @@
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php // phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace ?>
|
||||
<tr <?php if ( 'wordpress-post-format' === \get_option( 'activitypub_object_type', ACTIVITYPUB_DEFAULT_OBJECT_TYPE ) ) { echo 'style="display: none"'; } ?>>
|
||||
<tr <?php echo 'wordpress-post-format' === \get_option( 'activitypub_object_type', ACTIVITYPUB_DEFAULT_OBJECT_TYPE ) ? 'style="display: none"' : ''; ?>>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'Post content', 'activitypub' ); ?>
|
||||
</th>
|
||||
@ -156,12 +140,12 @@
|
||||
<summary><?php esc_html_e( 'See a list of ActivityPub Template Tags.', 'activitypub' ); ?></summary>
|
||||
<div class="description">
|
||||
<ul>
|
||||
<li><code>[ap_title]</code> - <?php \esc_html_e( 'The post\'s title.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_content]</code> - <?php \esc_html_e( 'The post\'s content.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_excerpt]</code> - <?php \esc_html_e( 'The post\'s excerpt (may be truncated).', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_permalink]</code> - <?php \esc_html_e( 'The post\'s permalink.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_shortlink]</code> - <?php echo \wp_kses( \__( 'The post\'s shortlink. I can recommend <a href="https://wordpress.org/plugins/hum/" target="_blank">Hum</a>.', 'activitypub' ), 'default' ); ?></li>
|
||||
<li><code>[ap_hashtags]</code> - <?php \esc_html_e( 'The post\'s tags as hashtags.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_title]</code> - <?php \esc_html_e( 'The post’s title.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_content]</code> - <?php \esc_html_e( 'The post’s content.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_excerpt]</code> - <?php \esc_html_e( 'The post’s excerpt (may be truncated).', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_permalink]</code> - <?php \esc_html_e( 'The post’s permalink.', 'activitypub' ); ?></li>
|
||||
<li><code>[ap_shortlink]</code> - <?php echo \wp_kses( \__( 'The pos’s shortlink. I can recommend <a href="https://wordpress.org/plugins/hum/" target="_blank">Hum</a>.', 'activitypub' ), 'default' ); ?></li>
|
||||
<li><code>[ap_hashtags]</code> - <?php \esc_html_e( 'The post’s tags as hashtags.', 'activitypub' ); ?></li>
|
||||
</ul>
|
||||
<p><?php \esc_html_e( 'You can find the full list with all possible attributes in the help section on the top-right of the screen.', 'activitypub' ); ?></p>
|
||||
</div>
|
||||
@ -179,7 +163,7 @@
|
||||
<?php
|
||||
echo \wp_kses(
|
||||
\sprintf(
|
||||
// translators:
|
||||
// translators: %s is a number.
|
||||
\__( 'The number of media (images, audio, video) to attach to posts. Default: <code>%s</code>', 'activitypub' ),
|
||||
\esc_html( ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS )
|
||||
),
|
||||
@ -202,19 +186,21 @@
|
||||
<fieldset>
|
||||
<?php \esc_html_e( 'Automatically publish items of the selected post types to the fediverse:', 'activitypub' ); ?>
|
||||
|
||||
<?php $post_types = \get_post_types( array( 'public' => true ), 'objects' ); ?>
|
||||
<?php $support_post_types = \get_option( 'activitypub_support_post_types', array( 'post' ) ) ? \get_option( 'activitypub_support_post_types', array( 'post' ) ) : array(); ?>
|
||||
<ul>
|
||||
<?php // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited ?>
|
||||
<?php foreach ( $post_types as $post_type ) { ?>
|
||||
<?php
|
||||
$post_types = \get_post_types( array( 'public' => true ), 'objects' );
|
||||
$supported_post_types = (array) \get_option( 'activitypub_support_post_types', array( 'post' ) );
|
||||
|
||||
foreach ( $post_types as $_post_type ) :
|
||||
?>
|
||||
<li>
|
||||
<input type="checkbox" id="activitypub_support_post_type_<?php echo \esc_attr( $post_type->name ); ?>" name="activitypub_support_post_types[]" value="<?php echo \esc_attr( $post_type->name ); ?>" <?php echo \checked( \in_array( $post_type->name, $support_post_types, true ) ); ?> />
|
||||
<label for="activitypub_support_post_type_<?php echo \esc_attr( $post_type->name ); ?>"><?php echo \esc_html( $post_type->label ); ?></label>
|
||||
<input type="checkbox" id="activitypub_support_post_type_<?php echo \esc_attr( $_post_type->name ); ?>" name="activitypub_support_post_types[]" value="<?php echo \esc_attr( $_post_type->name ); ?>" <?php echo \checked( \in_array( $_post_type->name, $supported_post_types, true ) ); ?> />
|
||||
<label for="activitypub_support_post_type_<?php echo \esc_attr( $_post_type->name ); ?>"><?php echo \esc_html( $_post_type->label ); ?></label>
|
||||
<span class="description">
|
||||
<?php echo \esc_html( \Activitypub\get_post_type_description( $post_type ) ); ?>
|
||||
<?php echo \esc_html( \Activitypub\get_post_type_description( $_post_type ) ); ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</td>
|
||||
@ -236,21 +222,31 @@
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h3><?php \esc_html_e( 'Server', 'activitypub' ); ?></h3>
|
||||
<h3><?php \esc_html_e( 'General', 'activitypub' ); ?></h3>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'OpenGraph', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<p>
|
||||
<label><input type="checkbox" name="activitypub_use_opengraph" id="activitypub_use_opengraph" value="1" <?php echo \checked( '1', \get_option( 'activitypub_use_opengraph', '1' ) ); ?> /> <?php echo wp_kses( \__( 'Automatically add <code><meta name="fediverse:creator" /></code> tags for Authors and the Blog-User. You can read more about the feature on the <a href="https://blog.joinmastodon.org/2024/07/highlighting-journalism-on-mastodon/" target="_blank">Mastodon Blog</a>.', 'activitypub' ), 'post' ); ?></label>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?php \esc_html_e( 'Blocklist', 'activitypub' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<p class="description">
|
||||
<p>
|
||||
<?php
|
||||
echo \wp_kses(
|
||||
\sprintf(
|
||||
// translators: %s is a URL.
|
||||
\__( 'To block servers, add the host of the server to the "<a href="%s">Disallowed Comment Keys</a>" list.', 'activitypub' ),
|
||||
\esc_attr( \admin_url( 'options-discussion.php#disallowed_keys' ) )
|
||||
\esc_url( \admin_url( 'options-discussion.php#disallowed_keys' ) )
|
||||
),
|
||||
'default'
|
||||
);
|
||||
@ -260,7 +256,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php \do_settings_fields( 'activitypub', 'general' ); ?>
|
||||
<?php \do_settings_fields( 'activitypub', 'server' ); ?>
|
||||
</div>
|
||||
<?php \do_settings_sections( 'activitypub' ); ?>
|
||||
|
74
wp-content/plugins/activitypub/templates/toolbox.php
Normal file
74
wp-content/plugins/activitypub/templates/toolbox.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Toolbox template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<div class="card activitypub" id="activitypub">
|
||||
<h2><?php esc_html_e( '⁂ Fediverse Bookmarklet', 'activitypub' ); ?></h2>
|
||||
<p>
|
||||
<?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' ); ?>
|
||||
</p>
|
||||
<form>
|
||||
<h3><?php esc_html_e( 'Install Bookmarklet', 'activitypub' ); ?></h3>
|
||||
<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>
|
||||
<p class="activitypub-bookmarklet-wrapper">
|
||||
<a class="activitypub-bookmarklet button" onclick="return false;" href="<?php echo esc_url( \Activitypub\get_reply_intent_uri() ); ?>" style="cursor: grab;">
|
||||
<?php // translators: The host (domain) of the Blog. ?>
|
||||
<?php printf( esc_html__( 'Reply from %s', 'activitypub' ), esc_attr( \wp_parse_url( \home_url(), PHP_URL_HOST ) ) ); ?>
|
||||
</a>
|
||||
</p>
|
||||
<div class="activitypub-code-wrap clear" id="activitypub-code-wrap">
|
||||
<p id="activitypub-code-desc">
|
||||
<?php esc_html_e( 'Or copy the following code and create a new bookmark. Paste the code into the new bookmark’s URL field.', 'activitypub' ); ?>
|
||||
</p>
|
||||
<p>
|
||||
<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_uri() ); ?></textarea>
|
||||
</p>
|
||||
<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>
|
||||
</div>
|
||||
<script>
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
var $copyActivitypubBookmarkletCode = $( '.copy-activitypub-bookmarklet-code' );
|
||||
$copyActivitypubBookmarkletCode.on( 'click', function( event ) {
|
||||
// Get the text field.
|
||||
var copyText = document.getElementById("activitypub-bookmarklet-code");
|
||||
|
||||
// Select the text field.
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); // For mobile devices.
|
||||
|
||||
// Copy the text inside the text field.
|
||||
navigator.clipboard.writeText(copyText.value);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
<h3><?php esc_html_e( 'Reply Intent', 'activitypub' ); ?></h3>
|
||||
<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>
|
||||
<h4><?php esc_html_e( 'URL', 'activitypub' ); ?></h4>
|
||||
<p><code><?php echo esc_url( \admin_url( 'post-new.php' ) ); ?></code></p>
|
||||
<h4><?php esc_html_e( 'Query parameters', 'activitypub' ); ?></h4>
|
||||
<table class="wp-list-table widefat fixed striped table-view-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<?php esc_html_e( 'Parameter', 'activitypub' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php esc_html_e( 'Description', 'activitypub' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>in_reply_to</td>
|
||||
<td><?php esc_html_e( 'The URL of the content you want to reply to.', 'activitypub' ); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><?php esc_html_e( 'There might be more query parameters in the future.', 'activitypub' ); ?></p>
|
||||
</div>
|
@ -1,4 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub User Followers List template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
$follower_count = \Activitypub\Collection\Followers::count_followers( \get_current_user_id() );
|
||||
// translators: The follower count.
|
||||
|
@ -1,15 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub User JSON template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
$user = \Activitypub\Collection\Users::get_by_id( \get_the_author_meta( 'ID' ) );
|
||||
|
||||
/*
|
||||
* Action triggerd prior to the ActivityPub profile being created and sent to the client
|
||||
/**
|
||||
* Action triggered prior to the ActivityPub profile being created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_author_pre', $user->get__id() );
|
||||
|
||||
\header( 'Content-Type: application/activity+json' );
|
||||
echo $user->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
/*
|
||||
* Action triggerd after the ActivityPub profile has been created and sent to the client
|
||||
/**
|
||||
* Action triggered after the ActivityPub profile has been created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_author_post', $user->get__id() );
|
@ -1,8 +1,20 @@
|
||||
<?php
|
||||
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
|
||||
/**
|
||||
* ActivityPub User Settings template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
/* @var array $args Template arguments. */
|
||||
$args = wp_parse_args( $args, array( 'description' => '' ) );
|
||||
|
||||
$user = \Activitypub\Collection\Users::get_by_id( \get_current_user_id() ); ?>
|
||||
<h2 id="activitypub"><?php \esc_html_e( 'ActivityPub', 'activitypub' ); ?></h2>
|
||||
|
||||
<p><?php esc_html_e( 'Define what others can see on your public Fediverse profile and next to your posts. With a profile picture and a fully completed profile, you are more likely to gain interactions and followers.', 'activitypub' ); ?></p>
|
||||
|
||||
<p><?php esc_html_e( 'The ActivityPub plugin tries to take as much information as possible from your profile settings. However, the following settings are not supported by WordPress or should be adjusted independently of the WordPress settings.', 'activitypub' ); ?></p>
|
||||
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -14,32 +26,91 @@ $user = \Activitypub\Collection\Users::get_by_id( \get_current_user_id() ); ?>
|
||||
<code><?php echo \esc_html( $user->get_webfinger() ); ?></code> or
|
||||
<code><?php echo \esc_url( $user->get_url() ); ?></code>
|
||||
</p>
|
||||
<?php // translators: the webfinger resource ?>
|
||||
<?php // translators: the webfinger resource. ?>
|
||||
<p class="description"><?php \printf( \esc_html__( 'Follow "@%s" by searching for it on Mastodon, Friendica, etc.', 'activitypub' ), \esc_html( $user->get_webfinger() ) ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="activitypub-user-description-wrap">
|
||||
<tr class="activitypub-description-wrap">
|
||||
<th>
|
||||
<label for="activitypub-user-description"><?php \esc_html_e( 'Biography', 'activitypub' ); ?></label>
|
||||
<label for="activitypub_description"><?php \esc_html_e( 'Biography', 'activitypub' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<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>
|
||||
<textarea name="activitypub_description" id="activitypub_description" rows="5" cols="30" placeholder="<?php echo \esc_attr( get_user_meta( \get_current_user_id(), 'description', true ) ); ?>"><?php echo \esc_html( $args['description'] ); ?></textarea>
|
||||
<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>
|
||||
</td>
|
||||
<?php wp_nonce_field( 'activitypub-user-description', '_apnonce' ); ?>
|
||||
</tr>
|
||||
<tr scope="row">
|
||||
<th>
|
||||
<label><?php \esc_html_e( 'Extra fields', 'activitypub' ); ?></label>
|
||||
<label><?php \esc_html_e( 'Header Image', 'activitypub' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<p class="description"><?php \esc_html_e( 'Your homepage, social profiles, pronouns, age, anything you want.', 'activitypub' ); ?></p>
|
||||
<?php
|
||||
$classes_for_upload_button = 'button upload-button button-add-media button-add-header-image';
|
||||
$classes_for_update_button = 'button';
|
||||
$classes_for_wrapper = '';
|
||||
|
||||
$header_image = \get_user_option( 'activitypub_header_image', \get_current_user_id() );
|
||||
|
||||
if ( (int) $header_image ) :
|
||||
$classes_for_wrapper .= ' has-header-image';
|
||||
$classes_for_button = $classes_for_update_button;
|
||||
$classes_for_button_on_change = $classes_for_upload_button;
|
||||
else :
|
||||
$classes_for_wrapper .= ' hidden';
|
||||
$classes_for_button = $classes_for_upload_button;
|
||||
$classes_for_button_on_change = $classes_for_update_button;
|
||||
endif;
|
||||
?>
|
||||
<div id="activitypub-header-image-preview-wrapper" class='<?php echo esc_attr( $classes_for_wrapper ); ?>'>
|
||||
<img id='activitypub-header-image-preview' src='<?php echo \esc_url( \wp_get_attachment_url( $header_image ) ); ?>' style="max-width: 100%;" alt="" />
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
id="activitypub-choose-from-library-button"
|
||||
type="button"
|
||||
class="<?php echo \esc_attr( $classes_for_button ); ?>"
|
||||
data-alt-classes="<?php echo \esc_attr( $classes_for_button_on_change ); ?>"
|
||||
data-choose-text="<?php \esc_attr_e( 'Choose a Header Image', 'activitypub' ); ?>"
|
||||
data-update-text="<?php \esc_attr_e( 'Change Header Icon', 'activitypub' ); ?>"
|
||||
data-update="<?php \esc_attr_e( 'Set as Header Image', 'activitypub' ); ?>"
|
||||
<?php
|
||||
// We only need to constrain the user_id for users who can't edit others' posts.
|
||||
if ( ! \current_user_can( 'edit_others_posts' ) ) :
|
||||
printf( 'data-user-id="%s"', esc_attr( \get_current_user_id() ) );
|
||||
endif;
|
||||
?>
|
||||
data-state="<?php echo \esc_attr( (int) $header_image ); ?>">
|
||||
<?php if ( (int) $header_image ) : ?>
|
||||
<?php \esc_html_e( 'Change Header Image', 'activitypub' ); ?>
|
||||
<?php else : ?>
|
||||
<?php \esc_html_e( 'Choose a Header Image', 'activitypub' ); ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
<button
|
||||
id="activitypub-remove-header-image"
|
||||
type="button"
|
||||
<?php echo (int) $header_image ? 'class="button button-secondary reset"' : 'class="button button-secondary reset hidden"'; ?>>
|
||||
<?php esc_html_e( 'Remove Header Image', 'activitypub' ); ?>
|
||||
</button>
|
||||
<input type='hidden' name='activitypub_header_image' id='activitypub_header_image' value='<?php echo esc_attr( $header_image ); ?>'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr scope="row">
|
||||
<th>
|
||||
<label><?php \esc_html_e( 'Extra Fields', 'activitypub' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<p class="description">
|
||||
<?php
|
||||
\esc_html_e( 'Your homepage, social profiles, pronouns, age, anything you want.', 'activitypub' );
|
||||
?>
|
||||
</p>
|
||||
|
||||
<table class="widefat striped activitypub-extra-fields" role="presentation" style="margin: 15px 0;">
|
||||
<?php
|
||||
$extra_fields = \Activitypub\get_actor_extra_fields( \get_current_user_id() );
|
||||
$extra_fields = \Activitypub\Collection\Extra_Fields::get_actor_fields( \get_current_user_id() );
|
||||
|
||||
foreach ( $extra_fields as $extra_field ) {
|
||||
foreach ( $extra_fields as $extra_field ) :
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo \esc_html( $extra_field->post_title ); ?></td>
|
||||
@ -50,7 +121,7 @@ $user = \Activitypub\Collection\Users::get_by_id( \get_current_user_id() ); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
@ -65,3 +136,5 @@ $user = \Activitypub\Collection\Users::get_by_id( \get_current_user_id() ); ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php wp_nonce_field( 'activitypub-user-settings', '_apnonce' ); ?>
|
||||
|
@ -1,11 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* ActivityPub Welcome template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
\load_template(
|
||||
__DIR__ . '/admin-header.php',
|
||||
true,
|
||||
array(
|
||||
'settings' => '',
|
||||
'welcome' => 'active',
|
||||
'followers' => '',
|
||||
'welcome' => 'active',
|
||||
)
|
||||
);
|
||||
?>
|
||||
@ -17,7 +21,36 @@
|
||||
<p><?php echo wp_kses( \__( 'Enter the fediverse with <strong>ActivityPub</strong>, broadcasting your blog to a wider audience. Attract followers, deliver updates, and receive comments from a diverse user base on <strong>Mastodon</strong>, <strong>Friendica</strong>, <strong>Pleroma</strong>, <strong>Pixelfed</strong>, and all <strong>ActivityPub</strong>-compliant platforms.', 'activitypub' ), array( 'strong' => array() ) ); ?></p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php if ( \Activitypub\site_supports_blocks() ) : ?>
|
||||
<div class="box">
|
||||
<h3><?php \esc_html_e( 'Bookmarklet', 'activitypub' ); ?></h3>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
$bookmarklet_url = \Activitypub\get_reply_intent_uri();
|
||||
|
||||
/* translators: %s is the domain of this site */
|
||||
$reply_from_template = __( 'Reply from %s', 'activitypub' );
|
||||
$button = sprintf(
|
||||
'<a href="%s" class="button">%s</a>',
|
||||
esc_url( $bookmarklet_url ), // Need to escape quotes for the bookmarklet.
|
||||
sprintf( $reply_from_template, \wp_parse_url( \home_url(), PHP_URL_HOST ) )
|
||||
);
|
||||
/* translators: %s is where the button HTML will be rendered. */
|
||||
$button_and_explanation_template = \__(
|
||||
'%s Save this bookmarklet to reply to posts on other sites from your own blog! When visiting a post on another site, click the bookmarklet to start a reply.',
|
||||
'activitypub'
|
||||
);
|
||||
|
||||
printf( $button_and_explanation_template, $button ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
printf( ' <a href="%s">%s</a>', esc_url( \admin_url( 'tools.php#activitypub' ) ), esc_html__( 'For additional information, please visit the Tools page.', 'activitypub' ) );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ( ! \Activitypub\is_user_disabled( \Activitypub\Collection\Users::BLOG_USER_ID ) ) :
|
||||
$blog_user = new \Activitypub\Model\Blog();
|
||||
?>
|
||||
@ -42,7 +75,7 @@
|
||||
<?php \esc_html_e( 'This blog profile will federate all posts written on your blog, regardless of the author who posted it.', 'activitypub' ); ?>
|
||||
<p>
|
||||
<p>
|
||||
<a href="<?php echo \esc_url_raw( \admin_url( '/options-general.php?page=activitypub&tab=settings' ) ); ?>">
|
||||
<a href="<?php echo \esc_url_raw( \admin_url( '/options-general.php?page=activitypub&tab=blog-profile ' ) ); ?>">
|
||||
<?php \esc_html_e( 'Customize the blog profile', 'activitypub' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
@ -92,7 +125,7 @@
|
||||
'If you have problems using this plugin, please check the <a href="%s">Site Health</a> page to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).',
|
||||
'activitypub'
|
||||
),
|
||||
\esc_url_raw( admin_url( 'site-health.php' ) )
|
||||
\esc_url( admin_url( 'site-health.php' ) )
|
||||
),
|
||||
'default'
|
||||
);
|
||||
@ -116,7 +149,7 @@
|
||||
</h4>
|
||||
<div id="activitypub-settings-accordion-block-friends-plugin" class="activitypub-settings-accordion-panel plugin-card-friends">
|
||||
<p><?php \esc_html_e( 'To follow people on Mastodon or similar platforms using your own WordPress, you can use the Friends Plugin for WordPress which uses this plugin to receive posts and display them on your own WordPress, thus making your own WordPress a Fediverse instance of its own.', 'activitypub' ); ?></p>
|
||||
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=friends&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the Friends Plugin', 'activitypub' ); ?></a></p>
|
||||
<p><a href="<?php echo \esc_url( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=friends&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the Friends Plugin', 'activitypub' ); ?></a></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! \class_exists( 'Hum' ) ) : ?>
|
||||
@ -128,7 +161,7 @@
|
||||
</h4>
|
||||
<div id="activitypub-settings-accordion-block-activitypub-hum-plugin" class="activitypub-settings-accordion-panel plugin-card-hum" hidden="hidden">
|
||||
<p><?php \esc_html_e( 'Hum is a personal URL shortener for WordPress, designed to provide short URLs to your personal content, both hosted on WordPress and elsewhere.', 'activitypub' ); ?></p>
|
||||
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=hum&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the Hum Plugin', 'activitypub' ); ?></a></p>
|
||||
<p><a href="<?php echo \esc_url( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=hum&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the Hum Plugin', 'activitypub' ); ?></a></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! \class_exists( 'Webfinger' ) ) : ?>
|
||||
@ -141,7 +174,7 @@
|
||||
<div id="activitypub-settings-accordion-block-activitypub-webfinger-plugin" class="activitypub-settings-accordion-panel plugin-card-webfinger" hidden="hidden">
|
||||
<p><?php \esc_html_e( 'WebFinger is a protocol that allows for discovery of information about people and things identified by a URI. Information about a person might be discovered via an "acct:" URI, for example, which is a URI that looks like an email address.', 'activitypub' ); ?></p>
|
||||
<p><?php \esc_html_e( 'The ActivityPub plugin comes with basic WebFinger support, if you need more configuration options and compatibility with other Fediverse/IndieWeb plugins, please install the WebFinger plugin.', 'activitypub' ); ?></p>
|
||||
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=webfinger&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the WebFinger Plugin', 'activitypub' ); ?></a></p>
|
||||
<p><a href="<?php echo \esc_url( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=webfinger&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the WebFinger Plugin', 'activitypub' ); ?></a></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! \function_exists( 'nodeinfo_init' ) ) : ?>
|
||||
@ -154,7 +187,7 @@
|
||||
<div id="activitypub-settings-accordion-block-activitypub-nodeinfo-plugin" class="activitypub-settings-accordion-panel plugin-card-nodeinfo" hidden="hidden">
|
||||
<p><?php \esc_html_e( 'NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks. The two key goals are being able to get better insights into the user base of distributed social networking and the ability to build tools that allow users to choose the best fitting software and server for their needs.', 'activitypub' ); ?></p>
|
||||
<p><?php \esc_html_e( 'The ActivityPub plugin comes with a simple NodeInfo endpoint. If you need more configuration options and compatibility with other Fediverse plugins, please install the NodeInfo plugin.', 'activitypub' ); ?></p>
|
||||
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=nodeinfo&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the NodeInfo Plugin', 'activitypub' ); ?></a></p>
|
||||
<p><a href="<?php echo \esc_url( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=nodeinfo&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the NodeInfo Plugin', 'activitypub' ); ?></a></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user