commit a8837a72909d586e21cda0a40e4a4047235f9939 Author: Jeremy Dormitzer Date: Tue Aug 21 09:17:07 2018 -0400 Initial commit diff --git a/activitypub.php b/activitypub.php new file mode 100644 index 0000000..6c0f888 --- /dev/null +++ b/activitypub.php @@ -0,0 +1,11 @@ +post_author; +} +add_action( 'publish_post', 'post_published_activity', 10, 2 ); +?> diff --git a/inc/actors.php b/inc/actors.php new file mode 100644 index 0000000..fd74a11 --- /dev/null +++ b/inc/actors.php @@ -0,0 +1,23 @@ + array( "https://www.w3.org/ns/activitystreams" ), + "type" => "Person", + "id" => get_rest_url( null, sprintf( '/activitypub/v1/user/%s', $handle ) ), + "following" => "TODO", // link to following JSON + "followers" => "TODO", // link to followers JSON + "liked" => "TODO", // link to liked JSON + "inbox" => "TODO", // link to inbox JSON + "outbox" => "TODO", // link to outbox JSON + "preferredUsername": $handle, + "name": get_the_author_meta( 'display_name', $authorID ), + "summary": get_the_author_meta( 'description', $authorID ), + "icon": get_avatar_url ( $authorID ), + "url": get_the_author_meta( 'user_url', $authorID ), + ); + return $actor; +} +?> diff --git a/inc/api.php b/inc/api.php new file mode 100644 index 0000000..229df9e --- /dev/null +++ b/inc/api.php @@ -0,0 +1,16 @@ +[A-Za-z0-9]+)', array( + 'methods' => 'GET', + 'callback' => 'get_user', + ) ); +} ); +?> diff --git a/inc/inbox.php b/inc/inbox.php new file mode 100644 index 0000000..62a2de0 --- /dev/null +++ b/inc/inbox.php @@ -0,0 +1,3 @@ + diff --git a/inc/outbox.php b/inc/outbox.php new file mode 100644 index 0000000..62a2de0 --- /dev/null +++ b/inc/outbox.php @@ -0,0 +1,3 @@ +