use full function name in templates

This commit is contained in:
Matthias Pfefferle 2023-05-17 09:01:28 +02:00
parent 9cd2a04955
commit 3d16b8de1d
2 changed files with 8 additions and 12 deletions

View file

@ -1,6 +1,4 @@
<?php <?php
use function Activitypub\get_rest_url_by_path;
$author_id = \get_the_author_meta( 'ID' ); $author_id = \get_the_author_meta( 'ID' );
$json = new \stdClass(); $json = new \stdClass();
@ -30,10 +28,10 @@ if ( \has_header_image() ) {
); );
} }
$json->inbox = get_rest_url_by_path( sprintf( 'users/%d/inbox', $author_id ) ); $json->inbox = \Activitypub\get_rest_url_by_path( sprintf( 'users/%d/inbox', $author_id ) );
$json->outbox = get_rest_url_by_path( sprintf( 'users/%d/outbox', $author_id ) ); $json->outbox = \Activitypub\get_rest_url_by_path( sprintf( 'users/%d/outbox', $author_id ) );
$json->followers = get_rest_url_by_path( sprintf( 'users/%d/followers', $author_id ) ); $json->followers = \Activitypub\get_rest_url_by_path( sprintf( 'users/%d/followers', $author_id ) );
$json->following = get_rest_url_by_path( sprintf( 'users/%d/following', $author_id ) ); $json->following = \Activitypub\get_rest_url_by_path( sprintf( 'users/%d/following', $author_id ) );
$json->manuallyApprovesFollowers = \apply_filters( 'activitypub_json_manually_approves_followers', \__return_false() ); // phpcs:ignore $json->manuallyApprovesFollowers = \apply_filters( 'activitypub_json_manually_approves_followers', \__return_false() ); // phpcs:ignore

View file

@ -1,6 +1,4 @@
<?php <?php
use function Activitypub\get_rest_url_by_path;
$json = new \stdClass(); $json = new \stdClass();
$json->{'@context'} = \Activitypub\get_context(); $json->{'@context'} = \Activitypub\get_context();
@ -29,10 +27,10 @@ if ( \has_header_image() ) {
); );
} }
$json->inbox = get_rest_url_by_path( 'blog/inbox' ); $json->inbox = \Activitypub\get_rest_url_by_path( 'blog/inbox' );
$json->outbox = get_rest_url_by_path( 'blog/outbox' ); $json->outbox = \Activitypub\get_rest_url_by_path( 'blog/outbox' );
$json->followers = get_rest_url_by_path( 'blog/followers' ); $json->followers = \Activitypub\get_rest_url_by_path( 'blog/followers' );
$json->following = get_rest_url_by_path( 'blog/following' ); $json->following = \Activitypub\get_rest_url_by_path( 'blog/following' );
$json->manuallyApprovesFollowers = \apply_filters( 'activitypub_json_manually_approves_followers', \__return_false() ); // phpcs:ignore $json->manuallyApprovesFollowers = \apply_filters( 'activitypub_json_manually_approves_followers', \__return_false() ); // phpcs:ignore