This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Template Name: Fullwidth | |
| */ | |
| get_header(); ?> | |
| <div class="container"> | |
| <?php /* The loop */ ?> | |
| <?php while ( have_posts() ) : the_post(); ?> | |
| <?php the_post_thumbnail(); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Создание заказа по кнопке "Заказать в один клик | |
| */ | |
| function roomble_ajax_create_order() { | |
| // Получить корзину | |
| $cart = WC()->cart; | |
| $phone = esc_attr( trim( $_REQUEST['phone'] ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * | |
| * Plugin Name: CF7 to Webhook - Airtable | |
| * Description: Send webhook to Airtable API | |
| * Version: 1.0.0 | |
| * Author: Mário Valney | |
| * Author URI: https://mariovalney.com | |
| * Text Domain: cf7-to-webhook-air-table | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: CF7 Modal Invalid Answer | |
| * Plugin URI: https://gist.github.com/campusboy87/a056c288c99feee70058ed24cee805ad | |
| * Author: Campusboy (wp-plus) | |
| * Author URI: https://www.youtube.com/wp-plus | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'wpcf7_modal_invalid_js' ); | |
| add_action( 'wp_footer', 'wpcf7_modal_invalid_js_inline', 999 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Code Editor for Contact Form 7 | |
| * Plugin URI: https://gist.github.com/campusboy87/2daad24e45116721759991549b626977 | |
| * Author: Campusboy (wp-plus) | |
| * Author URI: https://www.youtube.com/wp-plus | |
| */ | |
| add_action( 'admin_print_styles-toplevel_page_wpcf7', function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $tplProduct = 3; //номер шаблона для карточки товара | |
| $tplParent = 2; //номер шаблона для категорий | |
| $tplChildParent = 2; //номер шаблона для подкатегорий | |
| $idParent = 6; //id каталога товаров | |
| $fileProduct = 'product.xml'; //имя файла с товарами | |
| $xpath_expression['pagetitle'] = '//Товары/Номенклатура'; //DOM структура в XML файле до имени | |
| $xpath_expression['article'] = '//Товары/Артикул'; //DOM структура в XML файле до артикула | |
| $xpath_expression['parents'] = '//Товары/Родитель'; //DOM структура в XML файле до родителей |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Get ACF File | |
| * | |
| * @param string $key – the ACF field key | |
| * @param string $post_id – the ID of the post (if empty, will use $post->ID) | |
| * @return string The image URL | |
| **/ | |
| function get_acf_file( $key = 'file', $post_id = '' ) { | |
| if($post_id == ''): | |
| global $post; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Добавляем произвольный тип записи со всеми настройками | |
| * https://wp-kama.ru/function/register_post_type#hilsjs_extra_css | |
| * Генератор Post Type https://generatewp.com/post-type/ | |
| * Ютуб https://www.youtube.com/watch?v=iRLhKNXNIzI | |
| * Вывод https://wordpressrus.ru/wordpress/vyvod-proizvolnyh-tipov-zapisej-wordpress.html | |
| */ | |
| add_action('init', 'create_services_type'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function add_email_to_sendpulse($contact_form) { | |
| $wpcf7 = WPCF7_ContactForm::get_current(); | |
| $submission = WPCF7_Submission::get_instance(); | |
| $data = $submission->get_posted_data(); | |
| $cur_email = $data['Email']; | |
| if ($cur_email != '') { | |
| define( 'API_USER_ID', '' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Register Custom Taxonomy | |
| function ess_custom_taxonomy_Item() { | |
| $labels = array( | |
| 'name' => 'Brands', | |
| 'singular_name' => 'Brand', | |
| 'menu_name' => 'Brands', | |
| 'all_items' => 'All Brands', | |
| 'parent_item' => 'Parent Brand', | |
| 'parent_item_colon' => 'Parent Brand:', |
OlderNewer