updated plugin ActivityPub version 0.13.0

This commit is contained in:
2021-07-25 23:24:56 +00:00
committed by Gitium
parent e0e2392c3c
commit e80e4be44b
15 changed files with 567 additions and 111 deletions

View File

@ -34,14 +34,16 @@ class Activitypub {
* @return string The new path to the JSON template.
*/
public static function render_json_template( $template ) {
if ( ! \is_author() && ! \is_singular() ) {
if ( ! \is_author() && ! \is_singular() && ! \is_home() ) {
return $template;
}
if ( \is_author() ) {
$json_template = \dirname( __FILE__ ) . '/../templates/json-author.php';
$json_template = \dirname( __FILE__ ) . '/../templates/author-json.php';
} elseif ( \is_singular() ) {
$json_template = \dirname( __FILE__ ) . '/../templates/json-post.php';
$json_template = \dirname( __FILE__ ) . '/../templates/post-json.php';
} elseif ( \is_home() ) {
$json_template = \dirname( __FILE__ ) . '/../templates/blog-json.php';
}
global $wp_query;