From dc2022306dfa235a2bce8ddf6679534546d37cd9 Mon Sep 17 00:00:00 2001 From: AK Delfin Date: Tue, 9 Apr 2024 10:57:49 +0300 Subject: [PATCH] update more load mainpage --- front-page.php | 2 +- frontend/dist/assets/main.css | 5 +-- frontend/src/partials/articles-show-more.html | 2 +- frontend/src/styles/pages/main.css | 4 +- functions.php | 43 +++++++++++++++++++ js/load-more.js | 2 +- 6 files changed, 50 insertions(+), 8 deletions(-) diff --git a/front-page.php b/front-page.php index 617966d..630e084 100644 --- a/front-page.php +++ b/front-page.php @@ -18,6 +18,6 @@ ?> false, 'query' => $query]); ?> - + diff --git a/frontend/dist/assets/main.css b/frontend/dist/assets/main.css index c253e09..e5d3b95 100644 --- a/frontend/dist/assets/main.css +++ b/frontend/dist/assets/main.css @@ -3249,6 +3249,7 @@ a.pagination__item:hover { } .articles-preview__show-next { + color: var(--secondary); padding: 1.8rem 0 1.7rem; grid-column: span 2; width: 100%; @@ -3256,11 +3257,9 @@ a.pagination__item:hover { border-top: 0.1rem solid var(--gray); margin-top: -1px; font-family: 'Raleway', sans-serif; - -webkit-transition: 0.3s; - transition: 0.3s; - font-size: 1.3rem; + font-size: 1.6rem; display: -webkit-box; display: -ms-flexbox; display: flex; diff --git a/frontend/src/partials/articles-show-more.html b/frontend/src/partials/articles-show-more.html index 1b740d2..3d96cce 100644 --- a/frontend/src/partials/articles-show-more.html +++ b/frontend/src/partials/articles-show-more.html @@ -1 +1 @@ - + diff --git a/frontend/src/styles/pages/main.css b/frontend/src/styles/pages/main.css index 1e38666..74147c9 100644 --- a/frontend/src/styles/pages/main.css +++ b/frontend/src/styles/pages/main.css @@ -89,6 +89,7 @@ } .articles-preview__show-next { + color: var(--secondary); padding: 1.8rem 0 1.7rem; grid-column: span 2; width: 100%; @@ -96,9 +97,8 @@ border-top: 0.1rem solid var(--gray); margin-top: -1px; font-family: 'Raleway', sans-serif; - transition: 0.3s; - font-size: 1.3rem; + font-size: 1.6rem; display: flex; justify-content: center; } diff --git a/functions.php b/functions.php index aae849f..18ac0b2 100644 --- a/functions.php +++ b/functions.php @@ -600,3 +600,46 @@ function custom_meta_tags() { echo $og_tags; } + +add_action('wpcf7_before_send_mail', 'my_custom_contact_form_handler', 10, 3); +function my_custom_contact_form_handler($contact_form, $abort, $submission) { + + + + // Получаем ID формы + $form_id = $contact_form->id(); + + + if ( $form_id == '0ddb83c' ) { + + // Получаем данные формы + $submission = WPCF7_Submission::get_instance(); + + if ($submission) { + + $posted_data = $submission->get_posted_data(); + + // Подключаемся к базе данных WordPress + global $wpdb; + + // Определяем таблицу в базе данных WordPress в зависимости от ID формы + $table_name = $wpdb->prefix . 'subusers'; + + $wpdb->insert( + $table_name, + array( + 'mail' => $posted_data['your-email'], + 'status' => 0, + 'date' => current_time('mysql') + ), + array( + '%s', // Формат для строкового поля + '%d', // Формат для цифрового поля + '%s' // Формат для поля с датой и временем + ) + ); + + } + } + +} diff --git a/js/load-more.js b/js/load-more.js index 4b621ff..bcde45c 100644 --- a/js/load-more.js +++ b/js/load-more.js @@ -16,7 +16,7 @@ jQuery(function($){ }, success : function( data ){ if( data ) { - button.text('Загрузить ещё'); + button.text('Еще новости'); $('.articles-preview').append(data); my_load_more_params.current_page++;