diff --git a/functions.php b/functions.php index 4cd47c9..4146031 100644 --- a/functions.php +++ b/functions.php @@ -1,520 +1,12 @@ 'Меню в шапке', - 'footer_menu' => 'Меню в подвале' - ] ); -} - -function change_wp_nav_menu( $classes, $args, $depth ) { - if ( $args->theme_location == 'header_menu' ) { - $classes[] = 'header-submenu'; - } - if ( $args->theme_location == 'footer_menu' ) { - $classes[] = 'footer__submenu'; - } - - return $classes; -} - -function register_armanty_types(){ - register_post_type('armanty_quests', array( - 'labels' => array( - 'name' => 'Квесты', // Основное название типа записи - 'singular_name' => 'Квест', // отдельное название записи типа Book - 'add_new' => 'Добавить новый', - 'add_new_item' => 'Добавить новый квест', - 'edit_item' => 'Редактировать квест', - 'new_item' => 'Новый квест', - 'view_item' => 'Посмотреть квест', - 'search_items' => 'Найти квест', - 'not_found' => 'Квестов не найдено', - 'not_found_in_trash' => 'В корзине квестов не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Квесты' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-universal-access', - 'supports' => array('title','editor','thumbnail','excerpt') - ) ); - - register_post_type('armanty_rooms', array( - 'labels' => array( - 'name' => 'Комнаты', // Основное название типа записи - 'singular_name' => 'Комната', // отдельное название записи типа Book - 'add_new' => 'Добавить новую', - 'add_new_item' => 'Добавить новую комнату', - 'edit_item' => 'Редактировать комнату', - 'new_item' => 'Новая комната', - 'view_item' => 'Посмотреть комнату', - 'search_items' => 'Найти комнату', - 'not_found' => 'Комнат не найдено', - 'not_found_in_trash' => 'В корзине комнаты не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Комнаты' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-admin-home', - 'supports' => array('title','editor','thumbnail','excerpt') - ) ); - - register_post_type('armanty_discounts', array( - 'labels' => array( - 'name' => 'Скидки', // Основное название типа записи - 'singular_name' => 'Скидка', // отдельное название записи типа Book - 'add_new' => 'Добавить новую', - 'add_new_item' => 'Добавить новую скидку', - 'edit_item' => 'Редактировать скидку', - 'new_item' => 'Новая скидка', - 'view_item' => 'Посмотреть скидку', - 'search_items' => 'Найти скидку', - 'not_found' => 'Скидки не найдено', - 'not_found_in_trash' => 'В корзине скидок не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Скидки' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-tag', - 'supports' => array('title','editor','thumbnail','excerpt') - ) ); - - register_post_type('armanty_certificate', array( - 'labels' => array( - 'name' => 'Сертификаты', // Основное название типа записи - 'singular_name' => 'Сертификат', // отдельное название записи типа Book - 'add_new' => 'Добавить новый', - 'add_new_item' => 'Добавить новый сертификат', - 'edit_item' => 'Редактировать сертификат', - 'new_item' => 'Новый скидка', - 'view_item' => 'Посмотреть сертификат', - 'search_items' => 'Найти сертификат', - 'not_found' => 'Сертификатов не найдено', - 'not_found_in_trash' => 'В корзине сертификатов не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Сертификаты' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-media-document', - 'supports' => array('title','editor','thumbnail','excerpt') - ) ); - - register_post_type('armanty_offer', array( - 'labels' => array( - 'name' => 'Пакетные предложения', // Основное название типа записи - 'singular_name' => 'Пакет', // отдельное название записи типа Book - 'add_new' => 'Добавить новый', - 'add_new_item' => 'Добавить новый пакет', - 'edit_item' => 'Редактировать пакет', - 'new_item' => 'Новый пакет', - 'view_item' => 'Посмотреть пакет', - 'search_items' => 'Найти пакет', - 'not_found' => 'Пакетов не найдено', - 'not_found_in_trash' => 'В корзине пакетных предложений не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Пакетные предложения' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-tickets-alt', - 'supports' => array('thumbnail') - ) ); - - register_post_type('armanty_feedback', array( - 'labels' => array( - 'name' => 'Отзывы', // Основное название типа записи - 'singular_name' => 'Отзыв', // отдельное название записи типа Book - 'add_new' => 'Добавить новый', - 'add_new_item' => 'Добавить новый отзыв', - 'edit_item' => 'Редактировать отзыв', - 'new_item' => 'Новый отзыв', - 'view_item' => 'Посмотреть отзыв', - 'search_items' => 'Найти отзыв', - 'not_found' => 'Отзывов не найдено', - 'not_found_in_trash' => 'В корзине отзывов не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Отзывы' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-share-alt2', - 'supports' => array('title', 'thumbnail') - ) ); - - register_post_type('armanty_partners', array( - 'labels' => array( - 'name' => 'Партнеры', // Основное название типа записи - 'singular_name' => 'Партнего', // отдельное название записи типа Book - 'add_new' => 'Добавить нового', - 'add_new_item' => 'Добавить нового партнера', - 'edit_item' => 'Редактировать партнера', - 'new_item' => 'Новый партнер', - 'view_item' => 'Посмотреть партнера', - 'search_items' => 'Найти партнера', - 'not_found' => 'Партнеров не найдено', - 'not_found_in_trash' => 'В корзине партнеров не найдено', - 'parent_item_colon' => '', - 'menu_name' => 'Партнеры' - - ), - 'public' => true, - 'publicly_queryable' => true, - 'show_ui' => true, - 'show_in_menu' => true, - 'query_var' => true, - 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true - 'capability_type' => 'post', - 'hierarchical' => false, - 'menu_position' => 2, - 'menu_icon' => 'dashicons-businesswoman', - 'supports' => array('title', 'thumbnail') - ) ); - -} - -function send_mail(){ - $orderName = $_POST['orderName']; - $orderTel = $_POST['orderTel']; - $orderEmail = $_POST['orderEmail']; - $orderOthers = $_POST['orderOthers']; - // подразумевается что $to, $subject, $message уже определены... - $to = get_option('admin_email'); - $subject = 'Перезвонить'; - $message = 'Имя: ' . $orderName . '
' . - 'Телефон: ' . $orderTel . '
' . - 'Почта: ' . $orderEmail . '
' . - 'Пожелание: ' . $orderOthers . '
'; - // удалим фильтры, которые могут изменять заголовок $headers - remove_all_filters( 'wp_mail_from' ); - remove_all_filters( 'wp_mail_from_name' ); - - $headers = array( - 'From: Armanty Quest ', - 'content-type: text/html', - ); - - wp_mail( $to, $subject, $message, $headers ); - wp_die(); -} - -function send_main_form(){ - $name = $_POST['name']; - $phone = $_POST['phone']; - $holidayType = $_POST['holidayType']; - $birthdayName = $_POST['birthdayName']; - $birthdayDate = $_POST['birthdayDate']; - $questName = $_POST['questName']; - $questRoom = $_POST['questRoom']; - $guestCount = $_POST['guestCount']; - $date = $_POST['date']; - $startSum = $_POST['startSum']; - $addingSum = $_POST['addingSum']; - $sum = $_POST['sum']; - $addingItems = $_POST['addingItems']; - - // подразумевается что $to, $subject, $message уже определены... - if($holidayType == 'Birthday'){ - $holiday = 'Тип праздника: ' . 'День Рождения' . '
' . - 'Имя именинника: ' . $birthdayName . '
'. - 'День Рождения: ' . $birthdayDate . '
'; - }else{ - $holiday = 'Тип праздника: ' . 'Выпускной' . '
'; - } - $add = 'Доп.услуги:
'; - foreach ($addingItems as $addItem){ - $add = $add . ' ' . $addItem[name] . ' - '. $addItem[price] . ' рублей
'; - } - if($addingSum !== ''){ - $addSum = 'Доплата за количество детей ' . $addingSum . '
'; - } - - - $to = get_option('admin_email'); - $subject = 'Заяка на проведение праздника'; - $message = 'Имя: ' . $name . '
' . - 'Телефон: ' . $phone . '
' . - $holiday . - 'Квест: ' . $questName . '
' . - 'Комната: ' . $questRoom . '
' . - 'Количество гостей: ' . $guestCount . '
' . - 'Дата бронирования: ' . $date . '
' . - 'Цена в этот день: ' . $startSum . '
' . - $add . - $addSum . - 'Cумма: ' . $sum . '
'; - // удалим фильтры, которые могут изменять заголовок $headers - remove_all_filters( 'wp_mail_from' ); - remove_all_filters( 'wp_mail_from_name' ); - - $headers = array( - 'From: Armanty Quest ', - 'content-type: text/html', - ); - - wp_mail( $to, $subject, $message, $headers ); - wp_die(); -} - -function send_callback(){ - $name = $_POST['name']; - $phone = $_POST['phone']; - - $to = get_option('admin_email'); - $subject = 'Требуется перезвонить'; - $message = 'Имя: ' . $name . '
' . - 'Телефон: ' . $phone . '
'; - // удалим фильтры, которые могут изменять заголовок $headers - remove_all_filters( 'wp_mail_from' ); - remove_all_filters( 'wp_mail_from_name' ); - - $headers = array( - 'From: Armanty Quest ', - 'content-type: text/html', - ); - - wp_mail( $to, $subject, $message, $headers ); - wp_die(); - -} - -function graduation_callback(){ - date_default_timezone_set('Europe/Moscow'); - - $name = $_POST['name']; - $phone = $_POST['phone']; - $packetName = $_POST['packetName']; - $date = date('m/d/Y h:i:s a', time()); - - $to = get_option('admin_email'); - $subject = 'Требуется перезвонить (Выпускной)'; - $message = 'Имя: ' . $name . '
' . - 'Телефон: ' . $phone . '
'; - if ($packetName) $message = $message . 'Пакет: ' . $packetName . '
'; - $message = $message . 'Время отправки: ' . $date . '
'; - - - // удалим фильтры, которые могут изменять заголовок $headers - remove_all_filters( 'wp_mail_from' ); - remove_all_filters( 'wp_mail_from_name' ); - - $headers = array( - 'From: Armanty Quest ', - 'content-type: text/html', - ); - - wp_mail( $to, $subject, $message, $headers ); - wp_die(); -} - -/** - * Like get_template_part() put lets you pass args to the template file - * Args are available in the tempalte as $template_args array - * @param string filepart - * @param mixed wp_args style argument list - */ - function hm_get_template_part( $file, $template_args = array(), $cache_args = array() ) { - $template_args = wp_parse_args( $template_args ); - $cache_args = wp_parse_args( $cache_args ); - if ( $cache_args ) { - foreach ( $template_args as $key => $value ) { - if ( is_scalar( $value ) || is_array( $value ) ) { - $cache_args[$key] = $value; - } else if ( is_object( $value ) && method_exists( $value, 'get_id' ) ) { - $cache_args[$key] = call_user_method( 'get_id', $value ); - } - } - if ( ( $cache = wp_cache_get( $file, serialize( $cache_args ) ) ) !== false ) { - if ( ! empty( $template_args['return'] ) ) - return $cache; - echo $cache; - return; - } - } - $file_handle = $file; - do_action( 'start_operation', 'hm_template_part::' . $file_handle ); - if ( file_exists( get_stylesheet_directory() . '/' . $file . '.php' ) ) - $file = get_stylesheet_directory() . '/' . $file . '.php'; - elseif ( file_exists( get_template_directory() . '/' . $file . '.php' ) ) - $file = get_template_directory() . '/' . $file . '.php'; - ob_start(); - $return = require( $file ); - $data = ob_get_clean(); - do_action( 'end_operation', 'hm_template_part::' . $file_handle ); - if ( $cache_args ) { - wp_cache_set( $file, $data, serialize( $cache_args ), 3600 ); - } - if ( ! empty( $template_args['return'] ) ) - if ( $return === false ) - return false; - else - return $data; - echo $data; -} \ No newline at end of file +?> \ No newline at end of file diff --git a/parts/landings/graduation/callback.php b/parts/landings/graduation/callback.php index bb9347c..62d92db 100644 --- a/parts/landings/graduation/callback.php +++ b/parts/landings/graduation/callback.php @@ -4,6 +4,7 @@

Мы позвоним

Оставьте номер телефона для заказа выпускного

+
+ diff --git a/php/tools.php b/php/tools.php new file mode 100644 index 0000000..b5f070a --- /dev/null +++ b/php/tools.php @@ -0,0 +1,47 @@ + $value ) { + if ( is_scalar( $value ) || is_array( $value ) ) { + $cache_args[$key] = $value; + } else if ( is_object( $value ) && method_exists( $value, 'get_id' ) ) { + $cache_args[$key] = call_user_method( 'get_id', $value ); + } + } + if ( ( $cache = wp_cache_get( $file, serialize( $cache_args ) ) ) !== false ) { + if ( ! empty( $template_args['return'] ) ) + return $cache; + echo $cache; + return; + } + } + $file_handle = $file; + do_action( 'start_operation', 'hm_template_part::' . $file_handle ); + if ( file_exists( get_stylesheet_directory() . '/' . $file . '.php' ) ) + $file = get_stylesheet_directory() . '/' . $file . '.php'; + elseif ( file_exists( get_template_directory() . '/' . $file . '.php' ) ) + $file = get_template_directory() . '/' . $file . '.php'; + ob_start(); + $return = require( $file ); + $data = ob_get_clean(); + do_action( 'end_operation', 'hm_template_part::' . $file_handle ); + if ( $cache_args ) { + wp_cache_set( $file, $data, serialize( $cache_args ), 3600 ); + } + if ( ! empty( $template_args['return'] ) ) + if ( $return === false ) + return false; + else + return $data; + echo $data; +} +?> \ No newline at end of file diff --git a/php/wordpress/actions.php b/php/wordpress/actions.php new file mode 100644 index 0000000..7feb239 --- /dev/null +++ b/php/wordpress/actions.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/php/wordpress/filters.php b/php/wordpress/filters.php new file mode 100644 index 0000000..41006df --- /dev/null +++ b/php/wordpress/filters.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/php/wordpress/mail.php b/php/wordpress/mail.php new file mode 100644 index 0000000..11037a7 --- /dev/null +++ b/php/wordpress/mail.php @@ -0,0 +1,135 @@ +Имя: ' . $orderName . '
' . + 'Телефон: ' . $orderTel . '
' . + 'Почта: ' . $orderEmail . '
' . + 'Пожелание: ' . $orderOthers . '
'; + // удалим фильтры, которые могут изменять заголовок $headers + remove_all_filters( 'wp_mail_from' ); + remove_all_filters( 'wp_mail_from_name' ); + + $headers = array( + 'From: Armanty Quest ', + 'content-type: text/html', + ); + + wp_mail( $to, $subject, $message, $headers ); + wp_die(); + } + + function send_main_form(){ + $name = $_POST['name']; + $phone = $_POST['phone']; + $holidayType = $_POST['holidayType']; + $birthdayName = $_POST['birthdayName']; + $birthdayDate = $_POST['birthdayDate']; + $questName = $_POST['questName']; + $questRoom = $_POST['questRoom']; + $guestCount = $_POST['guestCount']; + $date = $_POST['date']; + $startSum = $_POST['startSum']; + $addingSum = $_POST['addingSum']; + $sum = $_POST['sum']; + $addingItems = $_POST['addingItems']; + + // подразумевается что $to, $subject, $message уже определены... + if($holidayType == 'Birthday'){ + $holiday = 'Тип праздника: ' . 'День Рождения' . '
' . + 'Имя именинника: ' . $birthdayName . '
'. + 'День Рождения: ' . $birthdayDate . '
'; + }else{ + $holiday = 'Тип праздника: ' . 'Выпускной' . '
'; + } + $add = 'Доп.услуги:
'; + foreach ($addingItems as $addItem){ + $add = $add . ' ' . $addItem[name] . ' - '. $addItem[price] . ' рублей
'; + } + if($addingSum !== ''){ + $addSum = 'Доплата за количество детей ' . $addingSum . '
'; + } + + + $to = get_option('admin_email'); + $subject = 'Заяка на проведение праздника'; + $message = 'Имя: ' . $name . '
' . + 'Телефон: ' . $phone . '
' . + $holiday . + 'Квест: ' . $questName . '
' . + 'Комната: ' . $questRoom . '
' . + 'Количество гостей: ' . $guestCount . '
' . + 'Дата бронирования: ' . $date . '
' . + 'Цена в этот день: ' . $startSum . '
' . + $add . + $addSum . + 'Cумма: ' . $sum . '
'; + // удалим фильтры, которые могут изменять заголовок $headers + remove_all_filters( 'wp_mail_from' ); + remove_all_filters( 'wp_mail_from_name' ); + + $headers = array( + 'From: Armanty Quest ', + 'content-type: text/html', + ); + + wp_mail( $to, $subject, $message, $headers ); + wp_die(); + } + + function send_callback(){ + $name = $_POST['name']; + $phone = $_POST['phone']; + + $to = get_option('admin_email'); + $subject = 'Требуется перезвонить'; + $message = 'Имя: ' . $name . '
' . + 'Телефон: ' . $phone . '
'; + // удалим фильтры, которые могут изменять заголовок $headers + remove_all_filters( 'wp_mail_from' ); + remove_all_filters( 'wp_mail_from_name' ); + + $headers = array( + 'From: Armanty Quest ', + 'content-type: text/html', + ); + + wp_mail( $to, $subject, $message, $headers ); + wp_die(); + + } + + function graduation_callback(){ + date_default_timezone_set('Europe/Moscow'); + + $name = $_POST['name']; + $phone = $_POST['phone']; + $packetName = $_POST['packetName']; + $date = date('m/d/Y h:i:s a', time()); + + $to = get_option('admin_email'); + $subject = 'Требуется перезвонить (Выпускной)'; + $message = 'Имя: ' . $name . '
' . + 'Телефон: ' . $phone . '
'; + if ($packetName) $message = $message . 'Пакет: ' . $packetName . '
'; + $message = $message . 'Время отправки: ' . $date . '
'; + + + // удалим фильтры, которые могут изменять заголовок $headers + remove_all_filters( 'wp_mail_from' ); + remove_all_filters( 'wp_mail_from_name' ); + + $headers = array( + 'From: Armanty Quest ', + 'content-type: text/html', + ); + + wp_mail( $to, $subject, $message, $headers ); + wp_die(); + } +?> \ No newline at end of file diff --git a/php/wordpress/others.php b/php/wordpress/others.php new file mode 100644 index 0000000..abd19ab --- /dev/null +++ b/php/wordpress/others.php @@ -0,0 +1,35 @@ + 'Меню в шапке', + 'footer_menu' => 'Меню в подвале' + ] ); + } + + function change_wp_nav_menu( $classes, $args, $depth ) { + if ( $args->theme_location == 'header_menu' ) { + $classes[] = 'header-submenu'; + } + if ( $args->theme_location == 'footer_menu' ) { + $classes[] = 'footer__submenu'; + } + + return $classes; + } +?> \ No newline at end of file diff --git a/php/wordpress/scripts.php b/php/wordpress/scripts.php new file mode 100644 index 0000000..4464b95 --- /dev/null +++ b/php/wordpress/scripts.php @@ -0,0 +1,47 @@ + \ No newline at end of file diff --git a/php/wordpress/styles.php b/php/wordpress/styles.php new file mode 100644 index 0000000..8d59270 --- /dev/null +++ b/php/wordpress/styles.php @@ -0,0 +1,36 @@ + \ No newline at end of file diff --git a/php/wordpress/types.php b/php/wordpress/types.php new file mode 100644 index 0000000..68feb75 --- /dev/null +++ b/php/wordpress/types.php @@ -0,0 +1,207 @@ + array( + 'name' => 'Квесты', // Основное название типа записи + 'singular_name' => 'Квест', // отдельное название записи типа Book + 'add_new' => 'Добавить новый', + 'add_new_item' => 'Добавить новый квест', + 'edit_item' => 'Редактировать квест', + 'new_item' => 'Новый квест', + 'view_item' => 'Посмотреть квест', + 'search_items' => 'Найти квест', + 'not_found' => 'Квестов не найдено', + 'not_found_in_trash' => 'В корзине квестов не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Квесты' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-universal-access', + 'supports' => array('title','editor','thumbnail','excerpt') + ) ); + + register_post_type('armanty_rooms', array( + 'labels' => array( + 'name' => 'Комнаты', // Основное название типа записи + 'singular_name' => 'Комната', // отдельное название записи типа Book + 'add_new' => 'Добавить новую', + 'add_new_item' => 'Добавить новую комнату', + 'edit_item' => 'Редактировать комнату', + 'new_item' => 'Новая комната', + 'view_item' => 'Посмотреть комнату', + 'search_items' => 'Найти комнату', + 'not_found' => 'Комнат не найдено', + 'not_found_in_trash' => 'В корзине комнаты не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Комнаты' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-admin-home', + 'supports' => array('title','editor','thumbnail','excerpt') + ) ); + + register_post_type('armanty_discounts', array( + 'labels' => array( + 'name' => 'Скидки', // Основное название типа записи + 'singular_name' => 'Скидка', // отдельное название записи типа Book + 'add_new' => 'Добавить новую', + 'add_new_item' => 'Добавить новую скидку', + 'edit_item' => 'Редактировать скидку', + 'new_item' => 'Новая скидка', + 'view_item' => 'Посмотреть скидку', + 'search_items' => 'Найти скидку', + 'not_found' => 'Скидки не найдено', + 'not_found_in_trash' => 'В корзине скидок не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Скидки' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-tag', + 'supports' => array('title','editor','thumbnail','excerpt') + ) ); + + register_post_type('armanty_certificate', array( + 'labels' => array( + 'name' => 'Сертификаты', // Основное название типа записи + 'singular_name' => 'Сертификат', // отдельное название записи типа Book + 'add_new' => 'Добавить новый', + 'add_new_item' => 'Добавить новый сертификат', + 'edit_item' => 'Редактировать сертификат', + 'new_item' => 'Новый скидка', + 'view_item' => 'Посмотреть сертификат', + 'search_items' => 'Найти сертификат', + 'not_found' => 'Сертификатов не найдено', + 'not_found_in_trash' => 'В корзине сертификатов не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Сертификаты' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-media-document', + 'supports' => array('title','editor','thumbnail','excerpt') + ) ); + + register_post_type('armanty_offer', array( + 'labels' => array( + 'name' => 'Пакетные предложения', // Основное название типа записи + 'singular_name' => 'Пакет', // отдельное название записи типа Book + 'add_new' => 'Добавить новый', + 'add_new_item' => 'Добавить новый пакет', + 'edit_item' => 'Редактировать пакет', + 'new_item' => 'Новый пакет', + 'view_item' => 'Посмотреть пакет', + 'search_items' => 'Найти пакет', + 'not_found' => 'Пакетов не найдено', + 'not_found_in_trash' => 'В корзине пакетных предложений не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Пакетные предложения' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-tickets-alt', + 'supports' => array('thumbnail') + ) ); + + register_post_type('armanty_feedback', array( + 'labels' => array( + 'name' => 'Отзывы', // Основное название типа записи + 'singular_name' => 'Отзыв', // отдельное название записи типа Book + 'add_new' => 'Добавить новый', + 'add_new_item' => 'Добавить новый отзыв', + 'edit_item' => 'Редактировать отзыв', + 'new_item' => 'Новый отзыв', + 'view_item' => 'Посмотреть отзыв', + 'search_items' => 'Найти отзыв', + 'not_found' => 'Отзывов не найдено', + 'not_found_in_trash' => 'В корзине отзывов не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Отзывы' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-share-alt2', + 'supports' => array('title', 'thumbnail') + ) ); + + register_post_type('armanty_partners', array( + 'labels' => array( + 'name' => 'Партнеры', // Основное название типа записи + 'singular_name' => 'Партнего', // отдельное название записи типа Book + 'add_new' => 'Добавить нового', + 'add_new_item' => 'Добавить нового партнера', + 'edit_item' => 'Редактировать партнера', + 'new_item' => 'Новый партнер', + 'view_item' => 'Посмотреть партнера', + 'search_items' => 'Найти партнера', + 'not_found' => 'Партнеров не найдено', + 'not_found_in_trash' => 'В корзине партнеров не найдено', + 'parent_item_colon' => '', + 'menu_name' => 'Партнеры' + + ), + 'public' => true, + 'publicly_queryable' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'query_var' => true, + 'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true + 'capability_type' => 'post', + 'hierarchical' => false, + 'menu_position' => 2, + 'menu_icon' => 'dashicons-businesswoman', + 'supports' => array('title', 'thumbnail') + ) ); + + } +?> \ No newline at end of file