function//function.phpを参考に
function get_welcart_system_information() {
global $usces, $usces_settings;
$options = get_option( 'usces', array() );
$options_ex = get_option( 'usces_ex', array() );
$indi_item_name_text = array(
'item_name' => 'item name',
'item_code' => 'item code',
'sku_name' => 'SKU name',
'sku_code' => 'SKU code',
);
return array(
'version' => USCES_VERSION,
'total_items' => $usces->get_items_num(),
'total_sku' => array_sum( usces_get_stocs() ),
'maintenance_mode' => ( isset( $options['display_mode'] ) && $options['display_mode'] == 'Maintenancemode' ) ? true : false,
'campaign_schedule' => $options['campaign_schedule'],
'order_mail' => $options['order_mail'],
'sender_mail' => $options['sender_mail'],
・・・
<?php //メンテナンスモードか判断 $welcart_options = get_option( 'usces', array() ); $my_display_mode = $welcart_options['display_mode']; if($my_display_mode == 'Maintenancemode' && !is_user_logged_in())://メンテナンスモードで、かつログインしていない場合 ?> <p class="center"><br>只今<br>ショップメンテナンス中です。<br> もうしばらくお待ち下さい。<br><br></p><!-- /.center --> <?php else: //通常営業?> <?php endif; ?>
the_content(); 全てメンテナンスになるため、ブログも表示されなくなるため
shingle_blog_con.phpに分岐
<?php //welcart メンテナンスモードか判断 $welcart_options = get_option( 'usces', array() ); $my_display_mode = $welcart_options['display_mode']; if($my_display_mode == 'Maintenancemode' && !is_user_logged_in())://メンテナンスモードで、かつログインしていない場合 ?> <?php //the_content(); // 本文を取得 $content = get_the_content(); // $content = apply_filters( 'the_content', $content ); // $content = str_replace( ']]>', ']]>', $content ); // the_content()と同じフィルターを適用済み echo $content; ?> <?php else: //通常営業?> <?php the_content(); ?> <?php endif; ?>