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
<?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 | |
// 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 | |
// мвкс и мин | |
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 | |
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 | |
$text_html = apply_filters( 'the_content', carbon_get_term_meta( $category->term_id, 'crb_mini_text_cat' ) ); | |
// для всех страниц администратора. | |
add_action('admin_head', 'yamaps_shortcode_tmpl'); | |
// срабатывают условные тэги |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme", | |
"font_size": 8, | |
"ignored_packages": | |
[ | |
"phpfmt", | |
"Vintage" | |
], | |
"material_theme_compact_sidebar": true, | |
"preview_on_click": 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
////////////////////////////////(window)//////////////////////////////// | |
cd /d d:/ | |
IPconfig | |
find . -type d | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/" -- tree | |
////////////////////////////////(mysql)//////////////////////////////// | |
mysql -u root -p wp_online3 < D:\Pro\database.sql |
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('add_meta_boxes', 'divie_desc_down_add_custom_box'); | |
function divie_desc_down_add_custom_box(){ | |
$screens = array( 'product' ); | |
add_meta_box( 'divie_desc_down_sectionid', 'Описание под кнопкой', 'divie_desc_down_meta_box_callback', $screens, 'side', 'low' ); | |
} | |
// HTML код блока 222 |