Initial commit
This commit is contained in:
16
author.php
Normal file
16
author.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$context = Timber::context();
|
||||
|
||||
$user = get_queried_object();
|
||||
if (!($user instanceof WP_User)) {
|
||||
global $wp_query;
|
||||
$wp_query->set_404();
|
||||
status_header(404);
|
||||
return;
|
||||
}
|
||||
|
||||
$context['author'] = thalim_get_author_data($user->ID);
|
||||
$context['author_posts'] = thalim_get_author_posts_by_category($user->ID);
|
||||
$context['author_edit_link'] = current_user_can('edit_user', $user->ID) ? get_edit_user_link($user->ID) : '';
|
||||
|
||||
Timber::render('author.twig', $context);
|
||||
Reference in New Issue
Block a user