This file contains 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
<form action="" method="post" class="block-form" enctype="multipart/form-data"> | |
<h4 class="form-heading"><?php _e("Have an idea? Let’s discuss!","Inmost"); ?></h4> | |
<div class="d-flex flex-column form-item"> | |
<label class="label-form" for="email"><?php _e("Email","Inmost"); ?></label> | |
<!--Email--> | |
<input class="input-form" type="email" name="email" id="email" pattern="^(0|[1-9][0-9]*)$" placeholder="<?php _e("Email*","Inmost"); ?>" required> | |
<p class="message-error"><?php _e("This field is required","Inmost"); ?></p> | |
</div> | |
<div class="form-item"> | |
<!--Phone number--> |
This file contains 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 | |
$comments = get_comments(); | |
$data = [ | |
'comment_post_ID' => 1, | |
'comment_author' => 'admin', | |
'comment_author_email' => '[email protected]', | |
'comment_author_url' => 'http://', | |
'comment_content' => 'content here', | |
'comment_type' => 'comment', |
This file contains 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 //Получение категорий | |
$prod_cat_args = array( | |
'taxonomy' => 'product_cat', | |
'orderby' => 'id', // здесь по какому полю сортировать | |
'hide_empty' => false, // скрывать категории без товаров или нет | |
'parent' => 0 // id родительской категории | |
); | |
?> | |
<ul> | |
<?php //Получение всего списка категорий |
This file contains 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 | |
// Картинки из стандартной галереи товара | |
$meta = explode(',',get_post_meta( $post->ID,'_product_image_gallery')[0]); | |
// Добавляем главную картинку товара (Для вывода ее в галерее товара) | |
$product_galegy[] = array( | |
'thumb' =>wp_get_attachment_image_src(get_post_meta( $post->ID,'_thumbnail_id')[0],'slide_product_thumb')[0], | |
'full' => wp_get_attachment_image_src(get_post_meta( $post->ID,'_thumbnail_id')[0],'slide_product_full')[0], | |
'type'=> 'photo', | |
'url'=> '' |
This file contains 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 | |
$product_cat_slugs = array(); | |
foreach (get_the_terms($product->ID, 'product_cat') as $term) { | |
array_push($product_cat_slugs, $term->slug); | |
} | |
$args = array( | |
'posts_per_page' => carbon_get_theme_option('numbers'),//or carbon_get_the_post_meta('numbers')//or just number | |
'tax_query' => array( | |
'relation' => 'OR', |
This file contains 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
const LabMath = { | |
"маточікування": function avarage(arr) { | |
return arr.reduce((a, b) => a + b, 0) / arr.length; | |
}, | |
"медіана": function(arr) { | |
return arr.sort((a, b) => a - b)[Math.floor(arr.length / 2)]; | |
}, | |
"напівсума «крайніх» спостережень": function(arr) { | |
return (Math.min(...arr) + Math.max(...arr)) / 2; | |
}, |
This file contains 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
function mysite_pending($order_id) { | |
error_log("$order_id set to PENDING", 0); | |
} | |
function mysite_failed($order_id) { | |
error_log("$order_id set to FAILED", 0); | |
} | |
function mysite_hold($order_id) { | |
error_log("$order_id set to ON HOLD", 0); | |
} | |
function mysite_processing($order_id) { |
This file contains 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 | |
//Simple Ajax Login Form | |
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
?> | |
//html | |
<form id="login" action="login" method="post"> | |
<h1>Site Login</h1> | |
<p class="status"></p> | |
<label for="username">Username</label> |
NewerOlder