[
'%icon' => 'icon-cloud-upload',
'%attr' => 'data-trigger="anywhere-upload-input"',
'%text' => _s('Upload images'),
],
'new_album' => [
'%icon' => 'icon-folder',
'%attr' => 'data-modal="edit" data-target="new-album"',
'%text' => _s('Create new album'),
],
];
if(function_exists('is_owner') && is_owner() && is_upload_allowed()) {
if(G\Handler::getCond('user_images') || function_exists('get_album')) {
$button = $buttons['upload_images'];
}
if(G\Handler::getCond('user_albums')) {
$button = $buttons['new_album'];
}
}
if(in_array(G\get_route_name(), ['explore', 'category']) && !isset($button) && is_upload_allowed()) {
$button = $buttons['upload_images'];
}
if(isset($button)) {
echo strtr('', $button);
}
?>