post->ID ); if( is_array( $cat_array ) === true ) { foreach( $cat_array as $value) { $keys .= esc_html( $value->cat_name ) . ', '; } $tag_array = get_the_tags( $wp_query->post->ID ); } if( is_array( $tag_array ) === true ) { foreach ( $tag_array as $value ) { $keys .= esc_html( $value->name ) . ', '; } } $keys = rtrim( $keys, ', ' ); } elseif( get_query_var('cat') ) { $keys .= single_cat_title( '', false ); } elseif( $_is['tag'] === true ) { $keys .= single_tag_title( '', false ); } elseif( is_month() === true ) { $keys .= get_the_date( __( 'F Y', 'luxeritas' ) ); } return $keys; } endif; /*--------------------------------------------------------------------------- * オリジナルディスクリプション挿入 *---------------------------------------------------------------------------*/ if( function_exists( 'thk_insert_description' ) === false ): function thk_insert_description() { global $luxe, $_is; $desc = apply_filters( 'thk_create_description', '' ); ?> ID, 'add-keywords', true ), ',' ); $keys = explode( ',', $k ); foreach( $keys as $val ) { $keywords .= trim( $val ) . ', '; } $keywords = trim( $keywords ); $keywords = trim( $keywords, ',' ); } if( $luxe['meta_keywords'] !== 'none' ) { if( $_is['single'] === true || $_is['category'] === true || $_is['tag'] === true || $_is['month'] === true ) { $keywords .= ', ' . tag_to_keywords( 'tags' ); } } if( !empty( $keywords ) ) { $keywords = ltrim( $keywords, ', ' ); ?> post_content; $preg = '//i'; $url = get_the_permalink(); $og_img = get_post_meta( $post->ID, 'og_img', true ); $post_thumbnail = has_post_thumbnail(); if( !empty( $og_img ) ) { $image = $og_img; $img_alt = get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ); } elseif( !empty( $post_thumbnail ) ) { $img_id = get_post_thumbnail_id(); $img_arr = wp_get_attachment_image_src( $img_id, 'full'); $img_alt = get_post_meta( $img_id, '_wp_attachment_image_alt', true ); $image = $img_arr[0]; } elseif( preg_match( $preg, $cont, $img_url ) ) { $image = $img_url[2]; } elseif( isset( $luxe['og_img'] ) ) { $image = $luxe['og_img']; } else { $uri = TURI === SURI ? TURI : SURI; $image = $uri . '/images/og.png'; } if( !empty( $img_alt ) ) $img_alt = esc_attr( $img_alt ); } else { $url = THK_HOME_URL; if( get_header_image() === true ){ $image = get_header_image(); } elseif( isset( $luxe['og_img'] ) ) { $image = $luxe['og_img']; } else { $uri = TURI === SURI ? TURI : SURI; $image = $uri . '/images/og.png'; } } $img_info = thk_get_image_size( $image ); if( is_array( $img_info ) === true ) { $width = $img_info[0]; $height = $img_info[1]; } $desc = apply_filters( 'thk_create_description', '', 90 ); } if( isset( $luxe['facebook_ogp_enable'] ) ) { require( INC . 'locale.php' ); $loc = new thk_locale(); $og_locale = $loc->thk_locale_wp_2_ogp( get_bloginfo('language') ); ?> ID )->post_date; $published_time = str_replace( ' ', 'T', $published_time ) . 'Z'; $modified_time = get_post( $post->ID )->post_modified; $modified_time = str_replace( ' ', 'T', $modified_time ) . 'Z'; if( !empty( $cat->cat_name ) ) { ?>