当前位置: 首页>>代码示例>>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;未经允许,请勿转载。