now with more use
This commit is contained in:
parent
314ccf43a6
commit
3fa5e4f37e
10 changed files with 17 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace Activitypub\Model;
|
||||
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub Post Class
|
||||
*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace Activitypub\Model;
|
||||
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub Post Class
|
||||
*
|
||||
|
|
|
@ -6,6 +6,7 @@ use stdClass;
|
|||
use WP_REST_Server;
|
||||
use WP_REST_Response;
|
||||
use Activitypub\Collection\Followers as FollowerCollection;
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub Followers REST-Class
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace Activitypub\Rest;
|
||||
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub Following REST-Class
|
||||
*
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
namespace Activitypub\Rest;
|
||||
|
||||
use Activitypub\Model\Activity;
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub Inbox REST-Class
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace Activitypub\Rest;
|
||||
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub NodeInfo REST-Class
|
||||
*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace Activitypub\Rest;
|
||||
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
/**
|
||||
* ActivityPub Outbox REST-Class
|
||||
*
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
$author_id = \get_the_author_meta( 'ID' );
|
||||
|
||||
$json = new \stdClass();
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
use function Activitypub\get_rest_url_by_path;
|
||||
|
||||
$json = new \stdClass();
|
||||
|
||||
$json->{'@context'} = \Activitypub\get_context();
|
||||
|
|
|
@ -22,7 +22,7 @@ class Test_Activitypub_Activity extends WP_UnitTestCase {
|
|||
$activitypub_activity = new \Activitypub\Model\Activity( 'Create' );
|
||||
$activitypub_activity->from_post( $activitypub_post );
|
||||
|
||||
$this->assertContains( get_rest_url_by_path( 'users/1/followers' ), $activitypub_activity->get_to() );
|
||||
$this->assertContains( \Activitypub\get_rest_url_by_path( 'users/1/followers' ), $activitypub_activity->get_to() );
|
||||
$this->assertContains( 'https://example.com/alex', $activitypub_activity->get_cc() );
|
||||
|
||||
remove_all_filters( 'activitypub_extract_mentions' );
|
||||
|
|
Loading…
Reference in a new issue