fix #14
This commit is contained in:
parent
6801286c5f
commit
aea050f6cc
8 changed files with 36 additions and 73 deletions
|
|
@ -23,15 +23,9 @@ function setTitleFontSizeClass($title, $level = 'h1')
|
|||
|
||||
function getAuthorBySlug($slug)
|
||||
{
|
||||
$kirby = kirby();
|
||||
$author = '';
|
||||
foreach ($kirby->users() as $user) {
|
||||
|
||||
if (Str::slug($user->name()) === $slug) {
|
||||
|
||||
$author = $user;
|
||||
}
|
||||
}
|
||||
$site = site();
|
||||
$authors = page("auteurs")->children();
|
||||
$author = $authors->find($slug);
|
||||
|
||||
return $author;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue