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 | |
$product->get_id() | |
$product->get_type() | |
wc_get_product_tag_list($product->get_id(), ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', $tag_count, 'woocommerce' ) . ' ', '.</span>' ) ============ | |
$product->get_tags( ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', $tag_count, 'woocommerce' ) . ' ', '.</span>' ) | |
wc_get_product_category_list($product->get_id(), ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $cat_count, 'woocommerce' ) . ' ', '.</span>' ) ================ $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $cat_count, 'woocommerce' ) . ' ', '.</span>' ) | |
$product->get_gallery_image_ids() ===== $product->get_gallery_attachment_ids(); |
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); |
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_filter( 'template_include', 'echo_cur_tplfile', 99 ); | |
function echo_cur_tplfile( $template ){ | |
echo '<span style="color:red">'. wp_basename( $template ) .'</span>'; | |
return $template; | |
} |
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 | |
//отправка письма sendEmail(get_bloginfo("admin_email"),get_bloginfo('name'),esc_html($posted['user_mail']),esc_html($get_user_by_mail->data->display_name),__("Сбросить пароль","vbegy"),$last_message_email); | |
//*** убрать форму стандартную регистрации пользавателя | |
// jQuery("html,body").animate({scrollTop:0},500); | |
// jQuery("body").prepend("<div class='wrap-pop'></div>"); | |
// wrap_pop(); | |
}); | |
</script> |
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 | |
//****************admin********************* | |
//страница настроек | |
add_action('admin_menu', 'compare_cars_wc_submenu_page_url', 999); | |
function compare_cars_wc_submenu_page_url() { | |
add_submenu_page( 'edit.php?post_type=pixad-autos', __('Compare page', 'compare_cars'), _x('Compare page', 'menu', 'compare_cars'), 'manage_options', 'compare-cars', 'compare_cars_submenu_page' ); | |
} | |
function compare_cars_submenu_page(){ |
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('current_screen', 'autozone_admin_db_ajax'); | |
function autozone_admin_db_ajax(){ | |
if('settings_page_keypage99' === get_current_screen()->base){ | |
add_action('admin_print_footer_scripts', 'autozone_delete_key_js', 99); | |
add_action( 'admin_enqueue_scripts', 'autozone_ajax_delete_key'); | |
} | |
} |
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 | |
// create table | |
if( !$wpdb->query( $wpdb->prepare("SHOW TABLES LIKE '%s'", $AUTO_license['table_name'] ) ) ){ | |
create_table_key_activate(); | |
} | |
$table_name = $wpdb->get_blog_prefix() . 'test_table331234'; | |
if($wpdb->query("SHOW TABLES LIKE '$table_name'")){ |
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
object(stdClass)#234 (6) { ["item_name"]=> string(32) "Autozone - Automotive Car Dealer" ["item_id"]=> string(8) "15911085" ["created_at"]=> string(30) "Mon May 28 05:45:35 +1000 2018" ["buyer"]=> string(11) "RSGDynamics" ["licence"]=> string(15) "Regular License" ["supported_until"]=> string(30) "Mon Nov 26 21:45:35 +1100 2018" } |
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 | |
//добавить для мобилы вывод продуктов | |
array( "name" => esc_html__( "Number of Products displayed on WooCommerce archive pages", $themename ), | |
"id" => $shortname . "_woocommerce_archive_num_posts", | |
"std" => "9", | |
"type" => "text", | |
"desc" => esc_html__( "Here you can designate how many WooCommerce products are displayed on the archive page. This option works independently from the Settings > Reading options in wp-admin.", $themename), | |
"validation_type" => "number" | |
), |
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_enqueue_scripts', 'my_styles_method35325235' ); | |
add_action('wp_print_footer_scripts', 'autozone_print_footer_color', 99 ); | |
function autozone_print_footer_color() { | |
global $autozone_opt_val; | |
?> | |
<style scoped> |