// Add custom Theme Functions here
//CODE LAY LUOT XEM
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
return "01 lượt xem";
}
return $count.' lượt xem';
}
// CODE DEM LUOT XEM
function setPostViews($postID) {
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
}else{
$count++;
update_post_meta($postID, $count_key, $count);
}
}
//CODE HIEN THI SO LUOT XEM BAI VIET TRONG DASHBOARDH
add_filter('manage_posts_columns', 'posts_column_views');
add_action('manage_posts_custom_column', 'posts_custom_column_views',5,2);
function posts_column_views($defaults){
$defaults['post_views'] = __('Views');
return $defaults;
}
function posts_custom_column_views($column_name, $id){
if($column_name === 'post_views'){
echo getPostViews(get_the_ID());
}
}
/*Sắp xếp lại thứ tự các field*/
add_filter("woocommerce_checkout_fields", "order_fields");
function order_fields($fields) {
//Shipping
$order_shipping = array(
"shipping_last_name",
"shipping_phone",
"shipping_address_1"
);
foreach($order_shipping as $field_shipping)
{
$ordered_fields2[$field_shipping] = $fields["shipping"][$field_shipping];
}
$fields["shipping"] = $ordered_fields2;
return $fields;
}
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields',99 );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_address_2']);
$fields['billing']['billing_last_name'] = array(
'label' => __('Họ và tên', 'devvn'),
'placeholder' => _x('Nhập đầy đủ họ và tên của bạn', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['billing']['billing_address_1']['placeholder'] = 'Ví dụ: Số xx Ngõ xx Phú Kiều, Bắc Từ Liêm, Hà Nội';
unset($fields['shipping']['shipping_company']);
unset($fields['shipping']['shipping_postcode']);
unset($fields['shipping']['shipping_country']);
unset($fields['shipping']['shipping_city']);
unset($fields['shipping']['shipping_state']);
unset($fields['shipping']['shipping_address_2']);
$fields['shipping']['shipping_phone'] = array(
'label' => __('Điện thoại', 'devvn'),
'placeholder' => _x('Số điện thoại người nhận hàng', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['shipping']['shipping_last_name'] = array(
'label' => __('Họ và tên', 'devvn'),
'placeholder' => _x('Nhập đầy đủ họ và tên của người nhận', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['shipping']['shipping_address_1']['placeholder'] = 'Ví dụ: Số xx Ngõ xx Phú Kiều, Bắc Từ Liêm, Hà Nội';
return $fields;
}
add_action( 'woocommerce_admin_order_data_after_shipping_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
function my_custom_checkout_field_display_admin_order_meta($order){
echo '
'.__('Số ĐT người nhận').': ' . get_post_meta( $order->get_id(), '_shipping_phone', true ) . '
';
}
Nước khoáng Lavie 6 lít - Nước khoáng
Skip to content
“Nước khoáng Lavie 500ml -24 chai” đã được thêm vào giỏ hàng.
Xem giỏ hàng
Nước khoáng Lavie 6 lít
Uống nước khoáng thiên nhiên Lavie bình 6 lít mỗi ngày còn giúp đào thải các độc tố ra khỏi cơ thể, thanh lọc da giúp bạn tinh thần tươi trẻ, sức khỏe căng tràn. Uống nước khoáng Lavie 6 lít hàng ngày là cách để có một sức khỏe tốt.
zoritoler imol –
I enjoy your writing style truly loving this site.
https://www.zoritolerimol.com
slot depo qris terpercaya –
The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.
https://www.uptv.org/contact-us/
亚洲交友账号 –
I know this if off topic but I’m looking into starting my own blog and was wondering what all is required to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very internet savvy so I’m not 100 sure. Any suggestions or advice would be greatly appreciated. Many thanks
https://linkedin.im/goods/21.html
แชท Flirtbees –
Terrific post however I was wondering if you could write a litte more on this subject? I’d be very grateful if you could elaborate a little bit more. Appreciate it!
https://vibragame.biz/th/
mim parts –
you’re really a good webmaster. The site loading speed is incredible. It seems that you’re doing any unique trick. Also, The contents are masterpiece. you have done a excellent job on this topic!
https://mikeshoppingroom.com/product-category/mim-parts/
29 empire –
I’ve been absent for some time, but now I remember why I used to love this blog. Thanks , I will try and check back more frequently. How frequently you update your website?
https://www.thegrandsouthseakhaolak.com/accommodation.html
pengacara perceraian jakarta –
I got what you mean , thankyou for putting up.Woh I am happy to find this website through google. “Those who corrupt the public mind are just as evil as those who steal from the public.” by Theodor Wiesengrund Adorno.
https://www.legalkeluarga.id/
Stream NHL Hockey –
Simply want to say your article is as astounding. The clarity to your put up is just excellent and that i could think you’re a professional in this subject. Well with your permission let me to grab your feed to stay up to date with forthcoming post. Thank you 1,000,000 and please continue the gratifying work.
https://nhlbox.me/hockey-streams
vigorjp login –
It’s actually a cool and useful piece of info. I’m satisfied that you simply shared this useful information with us. Please stay us up to date like this. Thanks for sharing.
https://www.gowireless.net/aboutus.html
fdertolmrtokev –
Perfect piece of work you have done, this website is really cool with great info .
https://www.fdertolmrtokev.com
29 empire –
I am impressed with this site, very I am a fan.
https://freshkitchenboca.com/menu/
toto togel –
Thanks , I have just been looking for info approximately this topic for ages and yours is the greatest I have came upon so far. But, what concerning the bottom line? Are you sure in regards to the supply?
https://pizzarusticaweho.com/
Real estate José Ignacio –
Perfect work you have done, this web site is really cool with great info .
https://www.location.uy/en/
bank guarantee provider –
I like the valuable info you supply in your articles. I’ll bookmark your blog and test again right here regularly. I am quite certain I will learn many new stuff right right here! Best of luck for the next!
https://www.wonderlandgmbh.com
raja botak –
Somebody necessarily assist to make critically articles I’d state. That is the very first time I frequented your web page and thus far? I amazed with the research you made to make this actual put up amazing. Magnificent task!
https://www.cavecitychristian.com/index.cfm