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 | |
session_start(); | |
// error_reporting(0); | |
require get_template_directory() . '/inc/vendor/autoload.php'; | |
require get_template_directory() . '/inc/Provider/response.php'; | |
require get_template_directory() . '/inc/Provider/EnvatoUser.php'; | |
require get_template_directory() . '/inc/Provider/Envato.php'; |
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 wpp_get_extremes_price_in_product_cat( $term_id ) { | |
global $wpdb; | |
$results = $wpdb->get_col( " | |
SELECT pm.meta_value | |
FROM {$wpdb->prefix}term_relationships as tr | |
INNER JOIN {$wpdb->prefix}term_taxonomy as tt ON tr.term_taxonomy_id = tt.term_taxonomy_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 | |
// shortcode ценовой диапозон | |
add_shortcode( 'divi_price_cat', 'divi_price_cat_shortcode' ); | |
function divi_price_cat_shortcode( $atts ){ | |
$cur_queried_object = get_queried_object(); | |
echo '<pre class="aaa" style="display:none">'; | |
var_dump( $cur_queried_object ); | |
echo '</pre>'; |
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 | |
<?php | |
use Carbon_Fields\Container; | |
use Carbon_Fields\Field; | |
if ( ! function_exists( 'carbon_get_post_meta' ) ) { | |
function carbon_get_post_meta( $id, $name, $type = null ) { | |
return false; | |
} |
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 | |
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
function your_shipping_method_init() { | |
if ( ! class_exists( 'WC_Your_Shipping_Method' ) ) { | |
class WC_Your_Shipping_Method extends WC_Shipping_Method { | |
/** | |
* Constructor for your shipping class |
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
<input type="hidden" name="redirect_to" value="<?php echo esc_url($redirect_to); ?>"> | |
<?php | |
update_user_meta($current_user->ID, '_psyho_date', sanitize_text_field($form->date)); |
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
<h1>Countdown Clock</h1> | |
<div id="clockdiv"> | |
<div> | |
<span class="days"></span> | |
<div class="smalltext">Days</div> | |
</div> | |
<div> | |
<span class="hours"></span> | |
<div class="smalltext">Hours</div> | |
</div> |
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 | |
// $code = 11; | |
// $department = 2; | |
// $subdivision = 3; | |
// $address =4; | |
// $title =5 ; | |
// $full_title = 6; | |
// $short_title =7 ; |
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 | |
public function RecurseXML2($xml = '') | |
{ | |
function RecurseXML($xml, &$vals, $parent = "") | |
{ | |
$childs = 0; | |
$child_count = -1; # Not realy needed. | |
$arr = array(); |