當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wc_hex_darker函數代碼示例

本文整理匯總了PHP中wc_hex_darker函數的典型用法代碼示例。如果您正苦於以下問題:PHP wc_hex_darker函數的具體用法?PHP wc_hex_darker怎麽用?PHP wc_hex_darker使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wc_hex_darker函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_option

 * @author  WooThemes
 * @package WooCommerce/Templates/Emails
 * @version 2.3.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
// Load colours
$bg = get_option('woocommerce_email_background_color');
$body = get_option('woocommerce_email_body_background_color');
$base = get_option('woocommerce_email_base_color');
$base_text = wc_light_or_dark($base, '#202020', '#ffffff');
$text = get_option('woocommerce_email_text_color');
$bg_darker_10 = wc_hex_darker($bg, 10);
$body_darker_10 = wc_hex_darker($body, 10);
$base_lighter_20 = wc_hex_lighter($base, 20);
$base_lighter_40 = wc_hex_lighter($base, 40);
$text_lighter_20 = wc_hex_lighter($text, 20);
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
?>
#wrapper {
    background-color: <?php 
echo esc_attr($bg);
?>
;
    margin: 0;
    padding: 70px 0 70px 0;
    -webkit-text-size-adjust: none !important;
    width: 100%;
}
開發者ID:coderkevin,項目名稱:woocommerce,代碼行數:31,代碼來源:email-styles.php

示例2: get_option

 *
 * @author  WooThemes
 * @package WooCommerce/Templates/Emails
 * @version 2.3.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
// Load colours
$bg = get_option('woocommerce_email_background_color');
$body = get_option('woocommerce_email_body_background_color');
$base = get_option('woocommerce_email_base_color');
$base_text = wc_light_or_dark($base, '#202020', '#ffffff');
$text = get_option('woocommerce_email_text_color');
$bg_darker_10 = wc_hex_darker($bg, 10);
$base_lighter_20 = wc_hex_lighter($base, 20);
$text_lighter_20 = wc_hex_lighter($text, 20);
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
?>
#wrapper {
    background-color: <?php 
echo esc_attr($bg);
?>
;
    margin: 0;
    padding: 70px 0 70px 0;
    -webkit-text-size-adjust: none !important;
    width: 100%;
}
開發者ID:MMariscal,項目名稱:Medefis,代碼行數:30,代碼來源:email-styles.php

示例3: test_wc_hex_darker

 /**
  * Test wc_hex_darker().
  *
  * @since 2.2
  */
 public function test_wc_hex_darker()
 {
     $this->assertEquals('#004178', wc_hex_darker('005dab'));
     $this->assertEquals('#004178', wc_hex_darker('#005dab'));
 }
開發者ID:jimlove7273,項目名稱:woocommerce,代碼行數:10,代碼來源:functions.php

示例4: woocommerce_hex_darker

 /**
  * @deprecated
  */
 function woocommerce_hex_darker($color, $factor = 30)
 {
     return wc_hex_darker($color, $factor);
 }
開發者ID:nayemDevs,項目名稱:woocommerce,代碼行數:7,代碼來源:wc-deprecated-functions.php

示例5: esc_attr

.wrapper { font-family: Arial, sans-serif; font-size: <?php 
echo $body_text_size;
?>
px; color: <?php 
echo $body_text_color;
?>
; background-color: <?php 
echo esc_attr($back_bg_color);
?>
; width:100%; -webkit-text-size-adjust:none !important; margin:0; padding: 50px 0 50px 0;}
.main-body { font-family: Arial, sans-serif; box-shadow: 0 3px 9px rgba(0, 0, 0, 0.03); border-radius: <?php 
echo $email_border_radius;
?>
px !important; overflow: hidden; background-color: #ffffff; border: 1px solid <?php 
echo wc_hex_darker($back_bg_color, 10);
?>
; width: <?php 
echo $email_width;
?>
px;}

.template_header { font-family: Arial, sans-serif; background-color:<?php 
echo esc_attr($header_bg_color);
?>
; color: <?php 
echo $header_text_color;
?>
; border-top-left-radius:2px !important; border-top-right-radius:2px !important; border-bottom: 1px solid <?php 
echo $header_border_bottom_color;
?>
開發者ID:seoduda,項目名稱:Patua,代碼行數:30,代碼來源:email-header-deluxe.php


注:本文中的wc_hex_darker函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。