// 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 ) . '
';
}
Bia lon 333 - 24 lon 330ml - Nước khoáng
Skip to content
Bia lon 333 – 24 lon 330ml
Home - Sản phẩm - Bia - Bia lon 333 – 24 lon 330ml
Bia lon 333 – 24 lon 330ml
Một trong những thương hiệu bia Việt nổi tiếng được nhiều người biết đến phải kể đến là bia 333, được giới thiệu bởi SABECO vào năm 1985. Bia 333 được tạo nên từ sự kết hợp giữa hoa bia Pháp, công thức Đức và tinh thần Việt Nam.
Raymonde Blute –
I really like your writing style, wonderful info, regards for posting :D. “Much unhappiness has come into the world because of bewilderment and things left unsaid.” by Feodor Mikhailovich Dostoyevsky.
https://www.zoritolerimol.com
Meetup账号购买 –
It’s best to take part in a contest for one of the best blogs on the web. I’ll suggest this site!
https://linkedin.im/goods/28.html
แชทสุ่ม –
I think other site proprietors should take this web site as an model, very clean and excellent user friendly style and design, let alone the content. You are an expert in this topic!
https://vibragame.biz/th/
29empire –
Hello very cool blog!! Guy .. Excellent .. Superb .. I’ll bookmark your blog and take the feeds additionally…I am satisfied to seek out numerous helpful info right here in the publish, we need develop extra strategies in this regard, thanks for sharing. . . . . .
https://www.aslwithandrew.com/about/
cakra111 –
Great website. A lot of helpful information here. I¦m sending it to several friends ans also sharing in delicious. And certainly, thank you in your effort!
https://cakra111.com/
slot maxwin –
We are a group of volunteers and opening a new scheme in our community. Your website provided us with valuable info to work on. You have done a formidable job and our entire community will be thankful to you.
https://bandar99.it.com/
vigorjp –
I am constantly searching online for articles that can facilitate me. Thanks!
https://www.gowireless.net/aboutus.html
qjoker123 –
I have been exploring for a little bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this site. Reading this information So i am happy to convey that I’ve an incredibly good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to don’t forget this website and give it a look regularly.
https://surat.fh.unitomo.ac.id/
fdertol mrtokev –
Keep functioning ,remarkable job!
https://www.fdertolmrtokev.com
toto togel –
I will right away seize your rss as I can’t find your email subscription hyperlink or newsletter service. Do you’ve any? Kindly allow me know so that I may just subscribe. Thanks.
https://pizzarusticaweho.com/
scatter hitam –
Some genuinely nice and useful info on this internet site, also I believe the style has excellent features.
https://macanempire.com/
Pultrusion mold –
Very nice article and straight to the point. I don’t know if this is in fact the best place to ask but do you folks have any thoughts on where to employ some professional writers? Thanks 🙂
https://incomepultrusion.com/pultrusion-die/
olxtoto –
There may be noticeably a bundle to find out about this. I assume you made sure good factors in features also.
https://www.ancientfutureworship.com/
recruitment –
Spot on with this write-up, I truly suppose this website needs way more consideration. I’ll in all probability be again to learn rather more, thanks for that info.
https://oveersea.com/
bank guarantee provider –
I would like to thnkx for the efforts you have put in writing this blog. I am hoping the same high-grade blog post from you in the upcoming as well. In fact your creative writing abilities has inspired me to get my own blog now. Really the blogging is spreading its wings quickly. Your write up is a good example of it.
https://www.wonderlandgmbh.com
slot deposit dana –
Thanks for the good writeup. It in fact was a amusement account it. Look complicated to more added agreeable from you! However, how could we keep up a correspondence?
https://www.cavecitychristian.com/index.cfm
zaborna torilon –
I really appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thanks again
https://www.zabornatorilon.com/