// создали область меню.
function register_my_menus() {
register_nav_menus(
array(
'main_menu' => 'Главное меню'
)
);
}
add_action( 'init', 'register_my_menus' );
<?php wp_nav_menu( array( 'theme_location' => 'main_menu' ) ); ?>
register_nav_menus([
'primary' => __('Primary Menu', 'oxboot'),
'secondary' => __('Secondary Menu', 'oxboot'),
'sidebar' => __('Sidebar Menu', 'oxboot'),
'additional' => __('Additional Menu', 'oxboot'),
'footer' => __('Footer Menu', 'oxboot')
]);
if (empty($_POST['ваш name']); {
echo json_encode(array('result' => 'error'));
}
foreach($result as $fieldName => $oneField){
if($oneField == ''){
$error[$fieldName] = 'Поле обязательно для заполнения';
}
}
RewriteEngine on
######Block BAD traffic#######
RewriteCond %{HTTP:Accept-Language} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} !.*\s((\(.*\s.*\))|(\(compatible;\s.*http.*\))) [OR,NC]
RewriteCond %{HTTPS} on
RewriteCond %{SSL:SSL_TLS_SNI} =""
RewriteRule .* - [R=404,NC,L]
#Terms of Service
RewriteCond %{HTTP_COOKIE} !tos=accepted
RewriteCond %{REQUEST_URI} !^.*(terms-of-service.html)
RewriteRule .* /terms-of-service.html?%{REQUEST_URI}\?%{QUERY_STRING} [R,L]