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 | |
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 | |
// 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 | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
/////// добавить файл в 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 | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
/////// 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 | |
$nonce = wp_create_nonce('my-nonce'); |
OlderNewer