modified file w3-total-cache
This commit is contained in:
@ -64,7 +64,7 @@ class User extends Actor {
|
||||
*
|
||||
* @var string<url>
|
||||
*/
|
||||
protected $resource;
|
||||
protected $webfinger;
|
||||
|
||||
/**
|
||||
* Restrict posting to mods
|
||||
@ -135,8 +135,8 @@ class User extends Actor {
|
||||
*
|
||||
* @return string The User-URL with @-Prefix for the username.
|
||||
*/
|
||||
public function get_at_url() {
|
||||
return \esc_url( \trailingslashit( get_home_url() ) . '@' . $this->get_username() );
|
||||
public function get_alternate_url() {
|
||||
return \esc_url( \trailingslashit( get_home_url() ) . '@' . $this->get_preferred_username() );
|
||||
}
|
||||
|
||||
public function get_preferred_username() {
|
||||
@ -226,6 +226,18 @@ class User extends Actor {
|
||||
return get_rest_url_by_path( sprintf( 'users/%d/collections/featured', $this->get__id() ) );
|
||||
}
|
||||
|
||||
public function get_endpoints() {
|
||||
$endpoints = null;
|
||||
|
||||
if ( ACTIVITYPUB_SHARED_INBOX_FEATURE ) {
|
||||
$endpoints = array(
|
||||
'sharedInbox' => get_rest_url_by_path( 'inbox' ),
|
||||
);
|
||||
}
|
||||
|
||||
return $endpoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend the User-Output with Attachments.
|
||||
*
|
||||
@ -274,10 +286,14 @@ class User extends Actor {
|
||||
*
|
||||
* @return string The Webfinger-Identifier.
|
||||
*/
|
||||
public function get_resource() {
|
||||
public function get_webfinger() {
|
||||
return $this->get_preferred_username() . '@' . \wp_parse_url( \home_url(), \PHP_URL_HOST );
|
||||
}
|
||||
|
||||
public function get_resource() {
|
||||
return $this->get_webfinger();
|
||||
}
|
||||
|
||||
public function get_canonical_url() {
|
||||
return $this->get_url();
|
||||
}
|
||||
|
Reference in New Issue
Block a user