JavaScript
3
Вклад в тег
add_filter('the_content', 'my_filter_function');
function my_filter_function($content){
$content = str_replace('p><img', 'div class="note-section__img"><img', $content);
$content = str_replace('></p>', '/></div>', $content);
$out = $content;
return $out;
}
the_content();
$(.class-all-form).find('form').submit(function(event){
var text = $(this).find('input[type="name"]');
if( text.val() < 6 ){
text.after("<span style="color:red">Minimum 6 symbols</span>");
}
return false;
});