В файлах header.php и footer.php все на менсте, в профиле галочка стоит.
show_admin_bar(false);
add_filter('show_admin_bar', '__return_false');
<a>
<div class="wp-block-buttons">
<div class="wp-block-button is-style-fill"> <a class="wp-block-button__link has-background has-vivid-green-cyan-background-color" href="www.makety.top/search-tenders" style="border-radius:10px" target="_blank" rel="noreferrer noopener"> Найти объявления </div>
</div>
<div class="wp-block-buttons">
<div class="wp-block-button is-style-fill">
<a class="wp-block-button__link has-background has-vivid-green-cyan-background-color" href="www.makety.top/search-tenders" style="border-radius:10px" target="_blank" rel="noreferrer noopener"> Найти объявления</a>
</div>
</div>
<a>
или тег <div>
<div class="wp-block-buttons">
<div class="wp-block-button is-style-fill" style="width:150px;">
<a class="wp-block-button__link has-background has-vivid-green-cyan-background-color" href="www.makety.top/search-tenders" style="border-radius:10px" target="_blank" rel="noreferrer noopener"> Найти объявления</a>
</div>
</div>
<div class="wp-block-buttons">
<div class="wp-block-button is-style-fill">
<a class="wp-block-button__link has-background has-vivid-green-cyan-background-color" href="www.makety.top/search-tenders" style="width: 150px; border-radius:10px" target="_blank" rel="noreferrer noopener"> Найти объявления</a>
</div>
</div>
This issue is due to WordFence.
We received an answer from WordFence and a solution to get rid of this false positive:
.”Putting the firewall into learning mode and then attempting the action that is blocked
wget -r -k -l 10 -p -E -nc http://site.com/
@RequiredArgsConstructor
@ControllerAdvice
public class GlobalControllerAdvice {
private final UserServiceImpl userServiceImpl;
@ModelAttribute("currentUser")
public User getUserProfile(
@AuthenticationPrincipal UserDetails currentUser
) {
if (currentUser != null)
return (User) userServiceImpl.findUserByEmail(currentUser.getUsername());
return null;
}
}
${currentUser}
(текущий авторизованный пользователь)<div class="comments" th:each="comment : ${comments}">
<input th:if="${comment.author} eq ${currentUser}" type="button" value="Отредактировать комментарий"/>
</div>
@GetMapping("/edit/{commentId}")
public String editComment(
@PathVariable("commentId") Long commentId,
@AuthenticationPrincipal UserDetails currentUser,
) {
User user = (User) userServiceImpl.findUserByEmail(currentUser.getUsername());
/*
Далее находим комментарий по его id. находим его автора и сравниваем с user.
*/
}
база недвижимости откуда выгружаются объекты
java -version
sudo apt update
sudo apt install openjdk-11-jre
sudo update-alternatives --config java
sudo nano /etc/environment
JAVA_HOME="{путь, который скопировали, включая директорию bin}"
source /etc/environment
echo $JAVA_HOME
<?php
/*
Template Name: Мой шаблон страницы
Template Post Type: post, page, product
*/
?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content (); ?>
<?php endwhile; ?>
<?php endif; ?>
$the_query = new WP_Query( 'page_id='.$id );
while ( $the_query->have_posts() ) {
$the_query->the_post();
the_content();
}
wp_reset_postdata();
I have had this problem before: shortcodes shouldn't display any content (using print or echo), instead return the content to be outputted.
If it's too much trouble converting all of your output statements, or you need to use a function that will always display the output, you can use output buffering. A buffer will 'catch' any echo'd or print'd content and allow you to write it to a variable.