本文整理汇总了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">×</a></p></div>');
} else {
echo apply_filters('woocommerce_demo_store', '<p class="demo_store" style="display:none;">' . wp_kses_post($notice) . '</p>');
}
}
示例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 — no orders shall be fulfilled.', 'woocommerce');
}
echo apply_filters('woocommerce_demo_store', '<p class="demo_store">' . $notice . '</p>');
}
示例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());
}
示例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 — 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);
}
示例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 — no orders shall be fulfilled.', 'woocommerce');
}
echo '<div class="alert alert-info">' . wp_kses_post($notice) . '</div>';
}
示例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;
示例7: is_store_notice_showing
public static function is_store_notice_showing()
{
return self::exists() && is_store_notice_showing();
}