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


PHP is_store_notice_showing函數代碼示例

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


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

示例1: wise_woocommerce_demo_store

 function wise_woocommerce_demo_store()
 {
     if (get_option('woocommerce_demo_store_notice') == null) {
         return;
     }
     $notice = get_option('woocommerce_demo_store_notice');
     if (function_exists('is_woocommerce') && is_woocommerce() && $notice != null && is_store_notice_showing()) {
         echo apply_filters('woocommerce_demo_store', '<div class="alert"><p class="demo_store">' . wp_kses_post($notice) . '<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a></p></div>');
     } else {
         echo apply_filters('woocommerce_demo_store', '<p class="demo_store" style="display:none;">' . wp_kses_post($notice) . '</p>');
     }
 }
開發者ID:Falkvinge,項目名稱:BlogTheme2016,代碼行數:12,代碼來源:additional-functions.php

示例2: woocommerce_demo_store

 /**
  * Adds a demo store banner to the site if enabled
  *
  * @access public
  * @return void
  */
 function woocommerce_demo_store()
 {
     if (!is_store_notice_showing()) {
         return;
     }
     $notice = get_option('woocommerce_demo_store_notice');
     if (empty($notice)) {
         $notice = __('This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce');
     }
     echo apply_filters('woocommerce_demo_store', '<p class="demo_store">' . $notice . '</p>');
 }
開發者ID:uwitec,項目名稱:findgreatmaster,代碼行數:17,代碼來源:wc-template-functions.php

示例3: test_is_store_notice_showing

 /**
  * Test is_store_notice_showing().
  *
  * @since 2.3.0
  */
 public function test_is_store_notice_showing()
 {
     $this->assertEquals(false, is_store_notice_showing());
 }
開發者ID:bitoncoin,項目名稱:woocommerce,代碼行數:9,代碼來源:conditional-functions.php

示例4: woocommerce_demo_store

 /**
  * Adds a demo store banner to the site if enabled.
  *
  */
 function woocommerce_demo_store()
 {
     if (!is_store_notice_showing()) {
         return;
     }
     $notice = get_option('woocommerce_demo_store_notice');
     if (empty($notice)) {
         $notice = __('This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce');
     }
     echo apply_filters('woocommerce_demo_store', '<p class="woocommerce-store-notice demo_store">' . wp_kses_post($notice) . ' <a href="#" class="woocommerce-store-notice__dismiss-link">' . __('Dismiss', 'woocommerce') . '</a></p>', $notice);
 }
開發者ID:woocommerce,項目名稱:woocommerce,代碼行數:15,代碼來源:wc-template-functions.php

示例5: woocommerce_site_note

 /**
  * Adds a demo store banner to the site if enabled
  *
  */
 function woocommerce_site_note()
 {
     if (!is_store_notice_showing()) {
         return;
     }
     $notice = get_option('woocommerce_demo_store_notice');
     if (empty($notice)) {
         $notice = __('This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce');
     }
     echo '<div class="alert alert-info">' . wp_kses_post($notice) . '</div>';
 }
開發者ID:ntngiri,項目名稱:Wordpress-dhaba,代碼行數:15,代碼來源:woocommerce.php

示例6: wp_get_sidebars_widgets

 * Used for single page.
 *
 * @package WordPress
 * @subpackage Krypton
 * @since Krypton 1.0
 */
global $krypton_config, $post;
$woocommerce = "";
$sidebars = wp_get_sidebars_widgets();
$sidebar = false;
if (isset($sidebars['krypton-sidebar']) && count($sidebars['krypton-sidebar'])) {
    $sidebar = 'krypton-sidebar';
} elseif (isset($sidebars['sidebar-1']) && !isset($sidebars['krypton-sidebar']) && count($sidebars['sidebar-1'])) {
    $sidebar = 'sidebar-1';
}
if (is_plugin_active('woocommerce/woocommerce.php') && (is_woocommerce() || is_checkout() || is_cart() || is_account_page() || is_store_notice_showing())) {
    $woocommerce = "shop";
    if (isset($sidebars['shop-sidebar']) && count($sidebars['shop-sidebar'])) {
        $sidebar = 'shop-sidebar';
    }
}
get_header($woocommerce);
$sidebar_position = get_post_meta(get_the_ID(), 'sidebar_position', true);
if (!isset($sidebar_position) || empty($sidebar_position) || $sidebar_position == 'default') {
    switch ($krypton_config['layout']) {
        case 1:
            $sidebar_position = "nosidebar";
            break;
        case 2:
            $sidebar_position = "sidebar-left";
            break;
開發者ID:estrategasdigitales,項目名稱:lactibox,代碼行數:31,代碼來源:page.php

示例7: is_store_notice_showing

 public static function is_store_notice_showing()
 {
     return self::exists() && is_store_notice_showing();
 }
開發者ID:brutalenemy666,項目名稱:wp-utils,代碼行數:4,代碼來源:class-wc.php


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