Skip to content

Commit

Permalink
Merge pull request #283 from vektor-inc/develop
Browse files Browse the repository at this point in the history
1.9.14
  • Loading branch information
kurudrive committed Apr 27, 2017
2 parents a5df4da + 405054a commit ef673df
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions functions.php
Expand Up @@ -196,7 +196,7 @@ function biz_vektor_maincontent_widgetarea_init() {
'name' => __( 'After main image(Homepage)', 'biz-vektor' ),
'id' => 'top-after-image-widget-area',
'description' => __( 'This widget area appears at after main image on homepage.', 'biz-vektor' ),
'before_widget' => '<div id="%1$s">',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
Expand All @@ -206,7 +206,7 @@ function biz_vektor_maincontent_widgetarea_init() {
'name' => __( 'Main content(Homepage)', 'biz-vektor' ),
'id' => 'top-main-widget-area',
'description' => __( 'This widget area appears on the front page main content area only.', 'biz-vektor' ),
'before_widget' => '<div id="%1$s">',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
Expand Down
11 changes: 10 additions & 1 deletion index.php
Expand Up @@ -97,7 +97,16 @@
<?php endif; ?>
<?php pagination(); ?>
<?php else: ?>
<div class="sectionFrame"><p><?php _e('No posts.','biz-vektor');?></p></div>
<div class="sectionFrame">
<?php
// 記事が0件の時のメッセージ
$message = __('No posts.','biz-vektor');
// 外部から書き換えられるようにフックを設定
$message = apply_filters('biz_vektor_no_posts_message', $message );
// the_content でエスケープして出力
echo apply_filters('the_content', $message);
?>
</div>
<?php endif; // have_post() ?>
</div><!-- [ /.infoList ] -->
<?php biz_vektor_archive_loop_after();?>
Expand Down
8 changes: 4 additions & 4 deletions module_pageTit.php
Expand Up @@ -22,26 +22,26 @@
$biz_vektor_options = biz_vektor_get_theme_options();
$pageTitle = '';

if (is_page() || is_attachment()){
if ( is_page() || is_attachment() ){
$pageTitle = get_the_title();
} else if ( is_category() || is_tag() || is_tax() || is_home() || is_author() || is_archive() || is_single() ) {
// get post type
$postType = get_post_type();
// 標準の投稿タイプ(post)の場合は、管理画面で設定した名前を取得
// 投稿が0件の場合はget_post_typeが効かないので is_category()とis_tag()も追加
if ( $postType == 'post' || is_category() || is_tag() ) {
if ( $postType == 'post' || is_category() || is_tag() || is_home() ) {
$pageTitle = esc_html($biz_vektor_options['postLabelName']);
// 標準の投稿タイプでない場合は、カスタム投稿タイプ名を取得
} else {
// 普通のポストタイプが取得出来る場合
if ($postType) {
$pageTitle = get_post_type_object($postType)->labels->name;
// 該当記事が0件の場合に投稿タイプ名が取得出来ないので$wp_query経由で取得する
} elseif (is_category() || is_tag()){
} elseif ( is_category() || is_tag()){
global $wp_query;
$pageTitle = $wp_query->queried_object->name;
}
elseif(is_archive()) {
elseif( is_archive( )) {
global $wp_query;
$pageTitle = $wp_query->queried_object->label;
}
Expand Down
11 changes: 3 additions & 8 deletions module_panList.php
Expand Up @@ -7,7 +7,6 @@
<div id="panList">
<div id="panListInner" class="innerBox">
';

global $wp_query;
$biz_vektor_options = biz_vektor_get_theme_options();

Expand Down Expand Up @@ -247,13 +246,9 @@
$current_post_type = get_post_type_object( $post_type );
$panListHtml .= '<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="' . home_url() . '/' . $post_type . '/" itemprop="url"><span itemprop="title">' . $current_post_type->label . '</span></a> &raquo; </li>';
}
$details = $wp_query->query_vars;
if (is_year()){
$panListHtml .= '<li><span>' . sprintf( __( 'Yearly Archives: %s', 'biz-vektor' ), date( _x( 'Y', 'yearly archives date format', 'biz-vektor' ), strtotime( $details['year'] .'-01-01' ) ) ) . '</span></li>';
} else if (is_month()){
$month = ( $details['monthnum'] < 10 ) ? '0' . $details['monthnum'] : $details['monthnum'];
$panListHtml .= '<li><span>' . sprintf( __( 'Monthly Archives: %s', 'biz-vektor' ), date( _x( 'F Y', 'monthly archives date format', 'biz-vektor' ), strtotime( $details['year'] . '-' . $month . '-01' ) ) ) . '</span></li>';
}

$panListHtml .= '<li><span>' . esc_html( get_the_archive_title() ) . '</span></li>';

} elseif(is_day()) {
//is_dayの場合
$query = $wp_query->query_vars;
Expand Down
2 changes: 1 addition & 1 deletion style.css
Expand Up @@ -5,7 +5,7 @@ Theme URI: http://bizvektor.com
Description: BizVektor theme will allow you to build a high-quality web site. It is possible to change the color, to switch to a completely different design. In addition, it is also possible to increase the number of designs by plug-ins.
Author: Vektor,Inc.
Author URI: http://www.vektor-inc.co.jp
Version: 1.9.13
Version: 1.9.14
Tags: white, red, blue, black, green, orange, purple, two-columns, right-sidebar, left-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style,theme-options
Text Domain: biz-vektor
Expand Down

0 comments on commit ef673df

Please sign in to comment.