jQuery(document).ready(function() {
jQuery('a[href="#commentstatusdiv"]').one('click', async function() {
do {
await new Promise(function(s) { setTimeout(s, 1000); });
jQuery('a[href="#commentstatusdiv"]').click();
console.log('Был выполнен клик');
} while (jQuery('a[href="#commentstatusdiv"]').length > 0);
console.log('Ссылка пропала, циклические клики по ней прекращены');
});
});
<div style="min-height: 46px;<b>position:relative;margin-top: -12px; text-align: center;">
echo preg_replace('/\A\/\//i', 'https://', 'https://exzmple1.com');
echo preg_replace('/\A\/\//i', 'https://', '//www.example2.com');
function get_first_post_image(string $post_content): string
function get_first_post_image(string $post_content)
return $img->item(0)->getAttribute('src') ?: $defaultImage;
return $img->item(0)->getAttribute('src') ? $img->item(0)->getAttribute('src') : $defaultImage;
<?php
$posthide = get_the_ID();
$args = array(
'orderby' => 'rand',
'showposts' => 10,
'cat' => array(-4,-7),
'post__not_in' => array( $posthide, 12, 16)
);
$news = new WP_query(); $news->query($args);
while ($news->have_posts()) : $news->the_post();
?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html [L,R=301]
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]
# 301 --- http://www.test.com/faq.html?faq=13&layout=bob => http://www.test2.com/faqs.html
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteCond %{QUERY_STRING} (^|&)faq\=13($|&)
RewriteCond %{QUERY_STRING} (^|&)layout\=bob($|&)
RewriteRule ^faq\.html$ http://www.test2.com/faqs.html? [L,R=301]
SetEnvIfNoCase User-Agent "BackupLand" bad_bot
SetEnvIfNoCase User-Agent "Nimbostratus-Bot" bad_bot
SetEnvIfNoCase User-Agent "Photon" bad_bot
Order Allow,Deny
Allow from all
Deny from env=bad_bot
Deny from all
<Files ~ "\.(jpe?g|png|gif)$">
Order deny,allow
Deny from env=bad_bot
</Files>