'tax_query' => 'pechati-v-metallicheskom-korpuse');
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => 'pechati-v-metallicheskom-korpuse'
)
)
implementation group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity5', version: '3.0.4.RELEASE'
sec:authorize="hasAuthority('ADMIN')"
<div class="dashboard_rules" sec:authorize="hasAuthority('ADMIN')">
<!-- Увидит только админ-->
</div>
@PreAuthorize("hasAuthority('ADMIN')")
Как в зависимости от роли пользователя, после удачного входа подгружать index.html с разным наполнением?
@AuthenticationPrincipal UserDetails currentUser
User user = (User) userService.findUserByEmail(currentUser.getUsername());
@GetMapping("/dashboard")
public String dashboard(
@AuthenticationPrincipal UserDetails currentUser,
Model model
) {
model.addAttribute("pageTitle","Панель управления");
User user = (User) userService.findUserByEmail(currentUser.getUsername());
if(user.isAdmin()) {
model.addAttribute("posts", posts.getAdminPosts());
} else {
model.addAttribute("posts", posts.getUserPosts());
}
return "backend/dashboard";
}
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');
[select* recipient "Санкт-Петербург|mail@example.com" "Москва|custom@example.com"]
[recipient]
define('FS_METHOD', 'direct');
<div id="portfoliowrap">
<div class="portfolio-centered">
<div class="recentitems portfolio">
<?php if( have_rows('gallery') ):
while( have_rows('gallery') ) : the_row();
?>
<div class="portfolio-item graphic-design">
<div class="he-wrap tpl6">
<?php $image = get_sub_field('image');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
<div class="he-view">
<div class="bg a0" data-animate="fadeIn">
<h3 class="a1" data-animate="fadeInDown"><?php the_sub_field('title'); ?></h3>
<a data-rel="prettyPhoto" href="<?php echo $image['url']; ?>" class="dmbutton a2" data-animate="fadeInUp"><i class="fa fa-search"></i></a>
<a href="<?php echo get_sub_field('page_link');?>" class="dmbutton a2" data-animate="fadeInUp"><i class="fa fa-link"></i></a>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
</div>
</div>
<?php echo $image['url']; ?>
<?php the_sub_field('page_link');?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
передать урл миниатюры. Или вообще не нужно класть файл database.db при билде jar файла?