// 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 tinh khiết Miru 19L (úp) - Nước khoáng
Skip to content
“Nước tinh khiết DASANI 500ml- Thùng 24 chai” đã được thêm vào giỏ hàng.
Xem giỏ hàng
Nước tinh khiết Miru 19L (úp)
zoritoler imol –
I like what you guys are up too. Such smart work and reporting! Keep up the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my web site 🙂
https://www.zoritolerimol.com
Ivy Belmonte –
Hey There. I found your blog using msn. This is an extremely well written article. I’ll be sure to bookmark it and return to read more of your useful information. Thanks for the post. I will definitely return.
https://www.zoritolerimol.com
Mini led bulb –
Do you mind if I quote a few of your articles as long as I provide credit and sources back to your blog? My website is in the very same niche as yours and my users would genuinely benefit from some of the information you provide here. Please let me know if this ok with you. Thanks a lot!
https://www.ledlightbulb.net
miminwd login –
Wow! Thank you! I permanently needed to write on my website something like that. Can I take a portion of your post to my website?
https://miminwd.it.com/
วิดีโอแชท CooMeet –
I’m very happy to read this. This is the kind of manual that needs to be given and not the random misinformation that’s at the other blogs. Appreciate your sharing this best doc.
https://vibragame.biz/th/
mediterrane protocol for tinnitus –
you are really a good webmaster. The site loading speed is amazing. It seems that you are doing any unique trick. Furthermore, The contents are masterwork. you’ve done a great job on this topic!
https://youtu.be/PH3UHf2W1hQ
honey trick –
Valuable information. Lucky me I found your website by accident, and I’m shocked why this accident didn’t happened earlier! I bookmarked it.
https://youtu.be/YTpu1Zf0LSI
29 empire –
F*ckin’ amazing things here. I am very satisfied to look your article. Thanks so much and i’m having a look ahead to touch you. Will you please drop me a e-mail?
https://www.aslwithandrew.com/about/
audifort review –
Greetings! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone 4. I’m trying to find a theme or plugin that might be able to correct this problem. If you have any recommendations, please share. Thanks!
https://youtu.be/lgFZidyBQ0c
daftar cakra111 –
You have mentioned very interesting points! ps decent site.
https://cakra111.com/
china metal injection molding parts –
I got what you mean , thanks for putting up.Woh I am happy to find this website through google. “Money is the most egalitarian force in society. It confers power on whoever holds it.” by Roger Starr.
https://mikeshoppingroom.com/product-category/mim-parts/
29empire –
Fantastic beat ! I would like to apprentice while you amend your website, how could i subscribe for a blog website? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear idea
https://www.thegrandsouthseakhaolak.com/accommodation.html
toto slot gacor –
I’d incessantly want to be update on new posts on this site, saved to my bookmarks! .
https://www.lovebacksolutionastrologer.com/love-problem-solution-without-money/
bandar99 daftar –
Very well written story. It will be helpful to anybody who employess it, as well as myself. Keep doing what you are doing – can’r wait to read more posts.
https://bandar99.it.com/
pengacara perceraian jakarta selatan –
Hey! Do you use Twitter? I’d like to follow you if that would be ok. I’m absolutely enjoying your blog and look forward to new posts.
https://www.legalkeluarga.id/
vigorjp login –
Thank you, I have just been searching for info about this subject for ages and yours is the best I’ve discovered so far. But, what about the bottom line? Are you sure about the source?
https://www.gowireless.net/aboutus.html
situs scatter hitam –
Those are yours alright! . We at least need to get these people stealing images to start blogging! They probably just did a image search and grabbed them. They look good though!
https://www.belandnev.com/
fdertol mrtokev –
It¦s really a cool and useful piece of info. I am happy that you simply shared this useful info with us. Please keep us up to date like this. Thank you for sharing.
https://www.fdertolmrtokev.com
tlovertonet –
Hey would you mind stating which blog platform you’re using? I’m looking to start my own blog soon but I’m having a tough time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something unique. P.S Sorry for getting off-topic but I had to ask!
http://www.tlovertonet.com/
zabornatorilon –
It’s a pity you don’t have a donate button! I’d without a doubt donate to this outstanding blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to fresh updates and will share this website with my Facebook group. Talk soon!
https://www.zabornatorilon.com/
👅 Adult Dating. Start – yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=11d551c4023e4adf7949e523e8af8fc8& Case # FWCC9749947 👅 –
n2vwzs