classes as $key => $value) {
$menu_class .= ' ' . $value;
}
if (in_array('menu-item-has-children', $item->classes)) {
// parent
$input_id = "nav-".$item->ID;
$caption = $item->title;
$label = '';
if($args->theme_location === 'primary'){
$label = "\n" .'';
if($depth !== 0){
$label .= "\n" . ' ';
}else{
$label .= "\n" . ' ';
}
$label .= "\n" . ' ' . "\n" ;
}
$output .= "\n" . '
';
}
else {
// child
$output .= "\n".'' ."\n" ;
}
}
private function create_a_tag($item, $depth, $args , $label) {
// link attributes
$attributes = ' class="menu_s_a f_box ai_c"';
$attributes .= ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : '';
//$attributes .= ' class="menu-link ' . ( $depth > 0 ? 'sub-menu-link' : 'main-menu-link' ) . '"';
$item_output = sprintf( '%1$s%3$s%4$s%5$s%6$s %7$s',
$args->before,
$attributes,
$args->link_before,
apply_filters( 'the_title', $item->title, $item->ID ),
$args->link_after,
$label,
$args->after
);
return apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}
}
if ( ! function_exists( 'simple_days_site_title_text' ) ) :
/**
* Displays the site title in the header area
*/
function simple_days_site_title_text() {
$site_title_effects = '';
if((get_theme_mod( 'simple_days_font_site_title_google_jp', 'none' ) !== 'none' || get_theme_mod( 'simple_days_font_body_google_jp', 'none' ) !== 'none' || get_theme_mod( 'simple_days_font_headings_google_jp', 'none' ) !== 'none') && get_theme_mod( 'simple_days_font_site_title_google_jp_effects_1', 'none' ) !== 'none'){
$site_title_effects = ' font-effect-'.get_theme_mod( 'simple_days_font_site_title_google_jp_effects_1');
}elseif((get_theme_mod( 'simple_days_font_site_title_google', 'none' ) !== 'none' || get_theme_mod( 'simple_days_font_body_google', 'none' ) !== 'none' || get_theme_mod( 'simple_days_font_headings_google', 'none' ) !== 'none') && get_theme_mod( 'simple_days_font_site_title_google_effects_1', 'none' ) !== 'none'){
$site_title_effects = ' font-effect-'.get_theme_mod( 'simple_days_font_site_title_google_effects_1');
}
echo '';
}
endif;
if ( ! function_exists( 'simple_days_tag_line' ) ) :
/**
* Displays the tag line in the header area
*/
function simple_days_tag_line() {
echo ''.get_bloginfo('description').'
';
}
endif;
if ( ! function_exists( 'simple_days_sub_menu' ) ) :
/**
* Displays the sub menu in the header area
*/
function simple_days_sub_menu() { ?>
'sub',
'menu_class' => 'menu_i menu_s o_s_t f_box ai_c lsn m0',
'menu_id' => '',
'container' => 'ul',
'fallback_cb' => '__return_false'
));
?>
';
wp_nav_menu( array(
'theme_location' => 'secondary',
'menu_class' => 'menu_i menu_s o_s_t f_box ai_c m0 lsn',
'menu_id' => 'menu_footer',
'container' => 'ul',
'fallback_cb' => '__return_false'
));
echo ' ';
}
endif;
if ( ! function_exists( 'simple_days_get_logo' ) ) :
function simple_days_get_logo() {
if ( has_custom_logo() ){
$logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' );
}else{
$logo[0] = SIMPLE_DAYS_THEME_URI .'assets/images/logo.png';
$logo[1] = '1280';
$logo[1] = '960';
}
return $logo;
}
endif;
if ( ! function_exists( 'simple_days_menu_box' ) ) :
function simple_days_menu_box() {
if ( has_nav_menu('primary')) {
echo '';
}
}
endif;
if ( ! function_exists( 'simple_days_search_box' ) ) :
function simple_days_search_box() {
if(is_active_sidebar( 'search_widget' )){
echo '';
}
}
endif;
if ( ! function_exists( 'simple_days_primary_menu' ) ) :
function simple_days_primary_menu() {?>
'primary',
'menu_class' => 'menu_h menu_i lsn m0 f_box f_col110 menu_h menu_a f_box f_wrap f_col100 ai_c lsn',
'menu_id' => 'menu_h',
'container' => 'ul',
'fallback_cb' => '__return_false',
'walker' => new SIMPLE_DAYS_WALKER_NAV_MENU,
));
?>
';
$icon_image = get_theme_mod( 'simple_days_header_icon','');
if( '' !== $icon_image){
$icon_image_width = get_theme_mod( 'simple_days_icon_image_width',32);
$icon_image_height = get_theme_mod( 'simple_days_icon_image_height',32);
echo '';
echo ' ';
}
if ( has_custom_logo() ) {
$image = simple_days_get_logo();
echo ' ';
}else{
simple_days_site_title_text();
}
echo '';
if($mod == "bottom" || $mod == "right") simple_days_tag_line();
}
endif;
if ( ! function_exists( 'simple_days_get_thumbnail' ) ) :
function simple_days_get_thumbnail($post_id , $size , $post_data) {
/*
* @param string $post_id Post ID.
* @param string $size thumbnail, middle ,large etc.
* @param string $post_data $post.
*/
$thumbnail = array();
if(has_post_thumbnail($post_id)) {
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($post_id) , $size );
$thumbnail['has_image'] = true;
return $thumbnail;
}elseif(isset($post_data->post_content)){
$thumbnail[1] = 640;
$thumbnail[2] = 480;
preg_match_all("/ ]+src=[\"'](s?https?:\/\/[\-_\.!~\*'()a-z0-9;\/\?:@&=\+\$,%#]+\.(jpg|jpeg|png|gif))[\"'][^>]+>/i", $post_data->post_content, $thumurl);
if(isset($thumurl [1] [0])){
$thumbnail[0] = $thumurl[1][0];
$thumbnail['has_image'] = true;
return $thumbnail;
}
$thumbnail[0] = get_theme_mod( 'simple_days_no_img' , SIMPLE_DAYS_THEME_URI .'assets/images/no_image.png');
$thumbnail['has_image'] = false;
return $thumbnail;
}else{
$thumbnail[0] = get_theme_mod( 'simple_days_ogp_logo_img', SIMPLE_DAYS_THEME_URI .'assets/images/ogp.jpg');
$thumbnail['has_image'] = true;
return $thumbnail;
}
}
endif;
if ( ! function_exists( 'simple_days_document_title_separator' ) ) :
function simple_days_document_title_separator( $separator ) {
return esc_html( ' '.get_theme_mod( 'simple_days_title_separator','|').' ' );
}
endif;
add_filter( 'document_title_separator', 'simple_days_document_title_separator' );
if ( ! function_exists( 'simple_days_remove_hentry' ) ) :
function simple_days_remove_hentry( $hentry ) {
return array_diff($hentry, array('hentry'));
}
endif;
add_filter('post_class', 'simple_days_remove_hentry');
if ( ! function_exists( 'simple_days_comment_author_anchor' ) ) :
function simple_days_comment_author_anchor( $author_link ){
return str_replace( " ', false );
}elseif ( is_tag() ) {
$title = single_tag_title( ' ', false );
} elseif ( is_author() ) {
$title = ' '. get_the_author();
} elseif ( is_year() || is_month() || is_day() ) {
$title = ' '. $title;
}
return $title;
}
endif;
add_filter( 'get_the_archive_title', 'simple_days_get_the_archive_title');
if ( ! function_exists( 'simple_days_credit_area' ) ) :
function simple_days_credit_area() {
$reverse = get_theme_mod( 'simple_days_footer_credit_reverse',false);
$column = get_theme_mod( 'simple_days_footer_credit_column',false);
if($reverse){
$left_side = 'simple_days_copyright_site';
$right_side = 'simple_days_copyright_info';
}else{
$left_side = 'simple_days_copyright_info';
$right_side = 'simple_days_copyright_site';
}
if($column){
$vertical = 'f_col';
$credit['left'] = '';
$credit['right'] = '';
}else{
$vertical = 'f_col100';
$credit['left'] = ' jc_fs011';
$credit['right'] = ' jc_fe011';
}
?>
';
}
if ( function_exists( 'the_privacy_policy_link' ) && get_privacy_policy_url() && !get_theme_mod( 'simple_days_footer_privacy_policy',false) ) {
echo '';
the_privacy_policy_link( '', '
' );
echo '';
if(!get_theme_mod( 'simple_days_sitemap_footer',false) || get_theme_mod( 'simple_days_sitemap_page_post_name','') == '')echo '
';
}else{
echo '
';
}
?>
' : ''); ?>
'.esc_html($description).'';
$blog_name = get_bloginfo('name');
$url = get_theme_mod( 'simple_days_footer_logo_img' , '');
if($url != ''){
$size = getimagesize($url);
$width = $size[0];
$height = $size[1];
?>
';
?>
';
echo esc_html( $blog_name );
echo '';
?>
comment_type ) :
case 'pingback':
case 'trackback':
?>
', '' ); ?>