__( 'Кейс', 'bitwms-child' ), 'webinar' => __( 'Вебинар', 'bitwms-child' ), 'course' => __( 'Курс', 'bitwms-child' ), 'event' => __( 'Мероприятие', 'bitwms-child' ), 'material' => __( 'Материал', 'bitwms-child' ), ); $post_type = get_post_type(); $badge_text = ''; if ( 'post' === $post_type ) { if ( has_category( 'news' ) ) { $badge_text = __( 'Новость', 'bitwms-child' ); } else { $badge_text = __( 'Статья', 'bitwms-child' ); } } elseif ( isset( $type_labels[ $post_type ] ) ) { $badge_text = $type_labels[ $post_type ]; } // Trim excerpt to 15 words. $excerpt = get_the_excerpt(); if ( $excerpt ) { $words = explode( ' ', $excerpt ); $excerpt = implode( ' ', array_slice( $words, 0, 15 ) ); if ( count( $words ) > 15 ) { $excerpt .= '…'; } } ?>
esc_attr( get_the_title() ) ) ); ?>