/** * The Liquid Themes Hub Theme * * Note: Do not add any custom code here. Please use a child theme so that your customizations aren't lost during updates. * http://codex.wordpress.org/Child_Themes * * @link https://codex.wordpress.org/Theme_Development * @link https://codex.wordpress.org/Child_Themes * * Text Domain: 'hub' * Domain Path: /languages/ */ update_option( 'hub_purchase_code', '**********' ); update_option( 'hub_purchase_code_status', 'valid' ); update_option( 'hub_register_email', 'noreply@gmail.com' ); // Starting The Engine / Load the Liquid Framework ---------------- include_once( get_template_directory() . '/liquid/liquid-init.php' ); add_filter('woocommerce_get_image_size_thumbnail', function($size) { return 0; // 返回0会强制使用原图 }); function refresh_aliyun_cdn_cache($post_id) { $url = 'cdn.ap-southeast-1.aliyuncs.com'; $accessKeyId = 'LTAI5tL9ZyGYy1SaEgF6htfq'; $accessKeySecret = 'slNGl8Lyua6KilQHukf3CyP5nsMBxt'; $refreshUrl = "https://maxodoshop.com/blog/"; // 要刷新的URL // 生成签名和请求参数 $params = array( 'Action' => 'RefreshObjectCaches', 'ObjectPath' => $refreshUrl, 'ObjectType' => 'Directory', 'Version' => '2014-11-11', 'AccessKeyId' => $accessKeyId, 'Timestamp' => gmdate('Y-m-d\TH:i:s\Z'), 'SignatureMethod' => 'HMAC-SHA1', 'SignatureVersion' => '1.0', ); // 签名和发送请求 ksort($params); $query = http_build_query($params); $signature = base64_encode(hash_hmac('sha1', "GET&%2F&" . urlencode($query), $accessKeySecret . '&', true)); $query .= "&Signature=" . urlencode($signature); $response = wp_remote_get("$url/?$query"); return $response; } add_action('publish_post', 'refresh_aliyun_cdn_cache'); // 信息订阅 // function theme_enqueue_scripts() { // wp_enqueue_script('your-script-handle', get_template_directory_uri() . '/assets/js/custom-popup.js',array(), '1.1.10', true); // } // add_action('wp_enqueue_scripts', 'theme_enqueue_scripts'); function add_custom_header_menu() { wp_enqueue_script('custom-header-menu', get_template_directory_uri() . '/assets/js/menu.js', array(), '1.5.3', true); } add_action('wp_enqueue_scripts', 'add_custom_header_menu'); function add_custom_script_scroll_home() { if(is_front_page()){ wp_enqueue_script('custom-scrolljs-home', get_template_directory_uri() . '/assets/js/scrollJs-home.js', array(), '1.1.10', true); } } add_action('wp_enqueue_scripts', 'add_custom_script_scroll_home'); function add_custom_script_scroll() { if(is_page('hair-dryers')){ wp_enqueue_script('custom-scrolljs', get_template_directory_uri() . '/assets/js/scrollJs.js', array(), '1.1.12', true); } } add_action('wp_enqueue_scripts', 'add_custom_script_scroll'); function add_custom_innovation_and_quality() { if(is_page('innovation-and-quality')){ wp_enqueue_script('custom-innovation-and-quality', get_template_directory_uri() . '/assets/js/scrollJs-home.js', array(), '1.1.8', true); } } add_action('wp_enqueue_scripts', 'add_custom_innovation_and_quality'); function add_custom_maxodo_history() { if(is_page('maxodo-history')){ wp_enqueue_script('custom-maxodo-history', get_template_directory_uri() . '/assets/js/scrollJs-home.js', array(), '1.1.8', true); } } add_action('wp_enqueue_scripts', 'add_custom_maxodo_history'); // 创建简码显示 ACF 字段的值 function display_acf_field_with_select_shortcode() { // 获取当前产品的 ID $product_id = get_the_ID(); // 获取 'product_pseudo_variations' 字段的值 $product_pseudo_variations = get_field('product_pseudo_variations', $product_id); // 如果有数据,则创建下拉框 if ($product_pseudo_variations) { // 开始输出自定义下拉框 $output = '
'; $output .= '
'; // $output .= ''; $output .= ''; $link = get_sub_field('products_link'); $count = 0; // 用于计数,确定是否需要开始新行 // 遍历字段数据,创建每个自定义选项 foreach ($product_pseudo_variations as $variation) { // 每两项后换行 if ($count > 0 && $count % 2 === 0) { $output .= ''; } $output .= ''; $count++; } // 检查是否需要关闭未结束的行 if ($count % 2 !== 0) { $output .= ''; // 添加一个空单元格以对齐 } $output .= '
'; $output .= ''; $output .= '' . esc_html($variation['product_title']) . ' '; $output .= esc_html($variation['product_title']); $output .= ''; $output .= '
'; $output .= '
'; // 结束 custom-select $output .= '
'; // 结束 custom-select-wrapper // 添加自定义样式和 JavaScript // $output .= ''; } else { $output = 'No product pseudo variations found.'; } // 返回输出内容 return $output; } // 注册简码 add_shortcode('acf_product_variations', 'display_acf_field_with_select_shortcode'); // 文章详情页 tag function display_post_tags() { $post_tags = get_the_tags(); if ($post_tags) { $tags = ''; foreach($post_tags as $tag) { $tag_link = get_tag_link($tag->term_id); $tags .= '' . esc_html($tag->name) . ' '; } return $tags; } else { return 'No tags found'; } } add_shortcode('post_tags', 'display_post_tags'); // 产品详情页Tags function display_product_tags() { global $product; $product_tags = get_the_terms($product->get_id(), 'product_tag'); if ($product_tags && ! is_wp_error($product_tags)) { $tags = ''; foreach ($product_tags as $tag) { $tag_link = get_term_link($tag); if (!is_wp_error($tag_link)) { $tags .= '' . esc_html($tag->name) . ' '; } } return $tags; } else { return 'No tags found'; } } add_shortcode('product_tags', 'display_product_tags'); // 产品详情面包屑 // 添加自定义简码 [custom_product_breadcrumbs] function custom_product_breadcrumbs_shortcode() { ob_start(); custom_product_breadcrumbs(); return ob_get_clean(); } add_shortcode('custom_product_breadcrumbs', 'custom_product_breadcrumbs_shortcode'); // 自定义产品面包屑函数 function custom_product_breadcrumbs() { if (is_product()) { global $post; // 获取当前产品的所有分类 $terms = get_the_terms($post->ID, 'product_cat'); if ($terms && !is_wp_error($terms)) { $primary_term = ''; // 用于存储主要分类 // 找到主要分类(假设主要分类是父级分类) foreach ($terms as $term) { if ($term->parent == 0) { $primary_term = $term; break; } } // 如果没有找到主要分类,则使用第一个分类 if (!$primary_term) { $primary_term = $terms[0]; } // 生成面包屑 echo ''; } } } // 在 functions.php 文件中添加自定义函数 function display_post_excerpt() { global $post; if ( has_excerpt($post->ID) ) { return get_the_excerpt($post->ID); } else { return 'No excerpt available for this post.'; } } // 注册短代码 add_shortcode('post_excerpt', 'display_post_excerpt'); function replace_excerpt_with_yoast_metadescription( $excerpt ) { global $post; // 获取当前文章的 Yoast 元描述 $yoast_metadescription = get_post_meta( $post->ID, '_yoast_wpseo_metadesc', true ); // 如果存在 Yoast 元描述,返回它,否则返回原始摘录 if ( ! empty( $yoast_metadescription ) ) { return $yoast_metadescription; } return $excerpt; } add_action( 'elementor/widget/posts/skins_init', function( $widget ) { add_filter( 'the_excerpt', 'replace_excerpt_with_yoast_metadescription' ); } ); {"id":19931,"date":"2024-11-07T08:54:49","date_gmt":"2024-11-07T13:54:49","guid":{"rendered":"https:\/\/maxodoshop.com\/?p=19931"},"modified":"2024-11-05T22:37:58","modified_gmt":"2024-11-06T03:37:58","slug":"blue-hair-dryer-why-maxodo-is-the-best-choice","status":"publish","type":"post","link":"https:\/\/maxodoshop.com\/blog\/hair-dryer\/blue-hair-dryer-why-maxodo-is-the-best-choice\/","title":{"rendered":"Blue Hair Dryer: Why Maxodo Is the Best Choice"},"content":{"rendered":"

When it comes to finding the perfect blue hair dryer<\/strong>, there are plenty of options on the market, but not all of them deliver the same quality or experience. If you’re looking for a reliable, effective, and stylish hair dryer, you\u2019ll want to find a product that combines functionality with aesthetics. The Maxodo Blue Hair Dryer<\/strong> is here to meet your needs, offering a high-performance solution in a sleek blue design that\u2019s both visually stunning and highly efficient.<\/p>\n

This guide will help you understand what to look for in a blue hair dryer<\/strong> and why the Maxodo Blue Hair Dryer<\/strong> is an ideal choice for all your styling needs.<\/p>\n

Understanding the Importance of a Quality Hair Dryer<\/h2>\n

Choosing a hair dryer isn\u2019t just about picking something that blows hot air. Your hair dryer plays a critical role in determining your hair health, overall style, and the time you spend getting ready every morning. A blue hair dryer<\/strong> can give you the opportunity to express your personal style while ensuring effective drying and styling.<\/p>\n

Hair Health and Technology<\/h3>\n

A good quality hair dryer uses advanced technology to reduce damage, promote shine, and keep frizz at bay. The Maxodo Blue Hair Dryer<\/strong> stands out for its ionic technology<\/strong> that releases 200 million negative ions<\/strong> to neutralize static and condition the hair, leaving you with a smooth, glossy finish.<\/p>\n

\"Maxodo

Maxodo Bio Ionic Blue Hair Dryer<\/p><\/div>\n

Ergonomic Design for Comfort<\/h3>\n

Many users overlook the importance of ergonomic design. A quality dryer<\/a> should not only be efficient but also comfortable to use. The Maxodo Blue Hair Dryer<\/strong> is designed with ergonomics in mind. Its lightweight body and well-balanced handle make it easy to hold, allowing you to style for longer periods without straining your arm.<\/p>\n

What Makes the Maxodo Blue Hair Dryer Special?<\/h2>\n

There are many blue hair dryers<\/strong> on the market, but Maxodo<\/strong> sets itself apart by combining high-quality features with a sleek and stylish design.<\/p>\n

1. High-Speed Brushless Motor<\/h3>\n

At the heart of the Maxodo Blue Hair Dryer<\/strong> is its high-speed brushless motor<\/strong> running at 110,000 RPM<\/strong>. This high-speed motor ensures powerful airflow, which significantly reduces the drying time. Unlike traditional hair dryers, the Maxodo<\/strong> motor operates more efficiently, allowing for a quieter yet more powerful drying experience.<\/p>\n

\"Maxodo

Maxodo hair dryer with high speed brushless motor for fast drying<\/p><\/div>\n

Benefits of a High-Speed Brushless Motor<\/h4>\n