add_filter( 'preprocess_comment', 'wpb_preprocess_comment' );
function wpb_preprocess_comment($comment) {
if ( strlen( $comment['comment_content'] ) > 5000 ) {
wp_die('Comment is too long. Please keep your comment under 5000 characters.');
}
if ( strlen( $comment['comment_content'] ) < 60 ) {
wp_die('Comment is too short. Please use at least 60 characters.');
}
return $comment;
}
<map>
берешь картинку, потом муторно создаешь area под все павильоныconsole.log('Метод: '+method);
switch (method) {
case "pickup":
console.log('Pickup choosen: ', el);
break;
case "delivery":
console.log('Delivery choosen: ', command[method]);
break;
default:
break;
}
The problem with using $field_name is that if the reference does not already exist, ACF will not be able to find the field object and will not be able to save the value. This situation would occur if you had used code to insert a post.