Compare commits

..

No commits in common. "be8477771cc4e18d31db86b03eab1887ed66e4df" and "a626dfce4e438abf73f0686b615dd8f0b4a11e50" have entirely different histories.

6 changed files with 8 additions and 7 deletions

View file

@ -34,7 +34,7 @@ require_once __DIR__ . '/includes/functions.php';
\defined( 'ACTIVITYPUB_AUTHORIZED_FETCH' ) || \define( 'ACTIVITYPUB_AUTHORIZED_FETCH', false );
\defined( 'ACTIVITYPUB_DISABLE_REWRITES' ) || \define( 'ACTIVITYPUB_DISABLE_REWRITES', false );
\defined( 'ACTIVITYPUB_DEFAULT_TRANSFORMER' ) || \define( 'ACTIVITYPUB_DEFAULT_TRANSFORMER', 'activitypub/default' );
\defined( 'ACTIVITYPUB_JSON_FORMAT_OPTIONS' ) || \define( 'ACTIVITYPUB_JSON_FORMAT_OPTIONS', \JSON_HEX_TAG | \JSON_HEX_AMP | \JSON_HEX_QUOT | \JSON_UNESCAPED_SLASHES);
\define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
\define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );

View file

@ -19,7 +19,7 @@ class Actor extends Base_Object {
/**
* @var string
*/
protected $type = 'Group';
protected $type = 'Person';
/**
* A reference to an ActivityStreams OrderedCollection comprised of

View file

@ -55,9 +55,9 @@ class Blog_User extends User {
*/
public function get_type() {
if ( is_single_user() ) {
return 'Application';
return 'Person';
} else {
return 'Application';
return 'Group';
}
}

View file

@ -41,7 +41,7 @@ class User extends Actor {
*
* @var string
*/
protected $type = 'Group';
protected $type = 'Person';
/**
* If the User is discoverable.

View file

@ -116,7 +116,7 @@ class Post extends Base {
* @return \Activitypub\Activity\Base_Object The ActivityPub Object
*/
public function transform() {
$object = new Base_Object();
$object = new Base_Objet();
$wp_post = $this->get_wp_post();
$object->set_id( $this->get_id() );

View file

@ -20,7 +20,7 @@ if ( \get_query_var( 'pretty' ) ) {
$options |= \JSON_PRETTY_PRINT; // phpcs:ignore
}
$options |= ACTIVITYPUB_JSON_FORMAT_OPTIONS;
$options |= \JSON_HEX_TAG | \JSON_HEX_AMP | \JSON_HEX_QUOT;
/*
* Options to be passed to json_encode()
@ -31,6 +31,7 @@ $options = \apply_filters( 'activitypub_json_post_options', $options );
\header( 'Content-Type: application/activity+json' );
echo \wp_json_encode( $json, $options );
/*
* Action triggerd after the ActivityPub profile has been created and sent to the client
*/