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 | |
$nonce = wp_create_nonce('my-nonce'); |
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 | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
/////// proxi | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
function proxi($url, $postdata = null, $cookiefile = 'tmp/cookie.txt'){ | |
$proxy = '127.0.0.1:8888'; | |
//$proxyauth = 'user:password'; | |
$ch = curl_init($url); |
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 | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
/////// добавить файл в cf7 | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
add_filter( 'wpcf7_mail_components', 'filter_wpcf7_mail_components', 10, 3 ); | |
function filter_wpcf7_mail_components( $components, $wpcf7_get_current_contact_form, $instance ) { | |
$components['attachments'][] = __DIR__. '/screenshot.png'; | |
return $components; |
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 | |
// get price | |
$custom_price = floatval($price) > 0 ? floatval($price) : 0; | |
$price = wc_price($custom_price); | |
$discount_woo = get_woocommerce_currency_symbol() .' '. $discount; | |
// create product | |
function stickertime_set_product_default() | |
{ | |
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 | |
add_action( 'wp_head',[&$this, 'hook_css'] ); | |
function hook_css(){ | |
echo '<style>'.self::get_setting('map_styles').'</style>'; | |
} | |
add_action( 'save_post_product', 'divie_save_post_product_for_urls' ); | |
function divie_save_post_product_for_urls( $post_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
<?php | |
// checkbox | |
$val = get_option('compare_cars_templ'); | |
$hide_comp_icon = !empty($val['no_comp_icon']) ? $val['no_comp_icon'] : false; | |
?> | |
<label><input type="checkbox" name="compare_cars_templ[no_comp_icon]" value="1" <?php checked( 1, $hide_comp_icon ) ?> /></label> | |
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 | |
$f = new NumberFormatter("ru", NumberFormatter::SPELLOUT); | |
echo $f->format(123456); | |
$content = "Статус посылки НП: </br>" | |
."Выдано в месте YYYY </br>" | |
."Ориентировочная доставка до Отделения ЧЧЧЧ dd--mm </br>" | |
."Ждите дополнительное уведомление при прибытии</br>"; |
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
document.addEventListener('DOMContentLoaded', function(){ | |
EnviarCorreo(); | |
}); | |
function EnviarCorreo() | |
{ | |
jQuery.ajax({ | |
type: "POST", | |
url: 'coordinates.php', | |
data: {}, |
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 devise_number_displayed_posts($query) { | |
if (is_admin() || !$query->is_main_query()) { | |
return; | |
} | |
if (is_tax('category-catalogs')) { | |
$query->set('posts_per_page', 16); | |
return; | |
} |
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 | |
/*======================================================== | |
* add field woo | |
========================================================*/ | |
add_action('woocommerce_product_options_general_product_data', 'divie_woo_add_custom_fields_euro'); | |
function divie_woo_add_custom_fields_euro() | |
{ | |
global $product, $post; | |
NewerOlder