added profile fields
This commit is contained in:
parent
64a5128e1e
commit
f5e9c265d2
4 changed files with 49 additions and 14 deletions
|
@ -28,6 +28,7 @@ If you want to have a **decentralized social network**, please use [Mastodon](ht
|
|||
|
||||
* refactorins
|
||||
* functional inbox
|
||||
* nicer profile views
|
||||
|
||||
### 0.0.1 ###
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: ActivityPub 0.0.2\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/activitypub\n"
|
||||
"POT-Creation-Date: 2018-09-30 20:50:08+00:00\n"
|
||||
"POT-Creation-Date: 2018-11-04 20:21:26+00:00\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@ -13,11 +13,11 @@ msgstr ""
|
|||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"X-Generator: grunt-wp-i18n1.0.2\n"
|
||||
|
||||
#: includes/class-activitypub-inbox.php:41
|
||||
#: includes/class-activitypub-inbox.php:47
|
||||
msgid "Invalid payload"
|
||||
msgstr ""
|
||||
|
||||
#: includes/class-activitypub-inbox.php:56
|
||||
#: includes/class-activitypub-inbox.php:62
|
||||
msgid "This method is not yet implemented"
|
||||
msgstr ""
|
||||
|
||||
|
@ -26,6 +26,18 @@ msgstr ""
|
|||
msgid "User not found"
|
||||
msgstr ""
|
||||
|
||||
#: templates/json-author.php:44
|
||||
msgid "Blog"
|
||||
msgstr ""
|
||||
|
||||
#: templates/json-author.php:50
|
||||
msgid "Profile"
|
||||
msgstr ""
|
||||
|
||||
#: templates/json-author.php:57
|
||||
msgid "Website"
|
||||
msgstr ""
|
||||
|
||||
#. Plugin Name of the plugin/theme
|
||||
msgid "ActivityPub"
|
||||
msgstr ""
|
||||
|
|
|
@ -28,6 +28,7 @@ If you want to have a **decentralized social network**, please use [Mastodon](ht
|
|||
|
||||
* refactorins
|
||||
* functional inbox
|
||||
* nicer profile views
|
||||
|
||||
= 0.0.1 =
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ $json->{'@context'} = get_activitypub_context();
|
|||
$json->id = get_author_posts_url( $author_id );
|
||||
$json->type = 'Person';
|
||||
$json->name = get_the_author_meta( 'display_name', $author_id );
|
||||
$json->summary = wp_strip_all_tags( get_the_author_meta( 'description', $author_id ) );
|
||||
$json->summary = esc_html( get_the_author_meta( 'description', $author_id ) );
|
||||
$json->preferredUsername = get_the_author_meta( 'login', $author_id ); // phpcs:ignore
|
||||
$json->url = get_author_posts_url( $author_id );
|
||||
$json->icon = array(
|
||||
|
@ -38,6 +38,27 @@ $json->publicKey = array(
|
|||
|
||||
$json->tag = array();
|
||||
$json->attachment = array();
|
||||
|
||||
$json->attachment[] = array(
|
||||
'type' => 'PropertyValue',
|
||||
'name' => __( 'Blog', 'activitypub' ),
|
||||
'value' => esc_html( '<a rel="me" title="' . esc_attr( home_url( '/' ) ) . '" target="_blank" href="' . home_url( '/' ) . '">' . wp_parse_url( home_url( '/' ), PHP_URL_HOST ) . '</a>' ),
|
||||
);
|
||||
|
||||
$json->attachment[] = array(
|
||||
'type' => 'PropertyValue',
|
||||
'name' => __( 'Profile', 'activitypub' ),
|
||||
'value' => esc_html( '<a rel="me" title="' . esc_attr( get_author_posts_url( $author_id ) ) . '" target="_blank" href="' . get_author_posts_url( $author_id ) . '">' . wp_parse_url( get_author_posts_url( $author_id ), PHP_URL_HOST ) . '</a>' ),
|
||||
);
|
||||
|
||||
if ( get_the_author_meta( 'user_url', $author_id ) ) {
|
||||
$json->attachment[] = array(
|
||||
'type' => 'PropertyValue',
|
||||
'name' => __( 'Website', 'activitypub' ),
|
||||
'value' => esc_html( '<a rel="me" title="' . esc_attr( get_the_author_meta( 'user_url', $author_id ) ) . '" target="_blank" href="' . get_the_author_meta( 'user_url', $author_id ) . '">' . wp_parse_url( get_the_author_meta( 'user_url', $author_id ), PHP_URL_HOST ) . '</a>' ),
|
||||
);
|
||||
}
|
||||
|
||||
//$json->endpoints = array(
|
||||
// 'sharedInbox' => get_rest_url( null, '/activitypub/1.0/inbox' ),
|
||||
//);
|
||||
|
|
Loading…
Reference in a new issue