%PDF- %PDF-
Direktori : /home/eirtvhdf/makkitrust.org/wp-content/themes/alhambra/templates/ |
Current File : /home/eirtvhdf/makkitrust.org/wp-content/themes/alhambra/templates/widgets-posts.php |
<?php /** * The template to display posts in widgets and/or in the search results * * @package WordPress * @subpackage ALHAMBRA * @since ALHAMBRA 1.0 */ $alhambra_post_id = get_the_ID(); $alhambra_post_date = alhambra_get_date(); $alhambra_post_title = get_the_title(); $alhambra_post_link = get_permalink(); $alhambra_post_author_id = get_the_author_meta('ID'); $alhambra_post_author_name = get_the_author_meta('display_name'); $alhambra_post_author_url = get_author_posts_url($alhambra_post_author_id, ''); $alhambra_args = get_query_var('alhambra_args_widgets_posts'); $alhambra_show_date = isset($alhambra_args['show_date']) ? (int) $alhambra_args['show_date'] : 1; $alhambra_show_image = isset($alhambra_args['show_image']) ? (int) $alhambra_args['show_image'] : 1; $alhambra_show_author = isset($alhambra_args['show_author']) ? (int) $alhambra_args['show_author'] : 1; $alhambra_show_counters = isset($alhambra_args['show_counters']) ? (int) $alhambra_args['show_counters'] : 1; $alhambra_show_categories = isset($alhambra_args['show_categories']) ? (int) $alhambra_args['show_categories'] : 1; $alhambra_output = alhambra_storage_get('alhambra_output_widgets_posts'); $alhambra_post_counters_output = ''; if ( $alhambra_show_counters ) { $alhambra_post_counters_output = '<span class="post_info_item post_info_counters">' . alhambra_get_post_counters('comments') . '</span>'; } $alhambra_output .= '<article class="post_item with_thumb">'; if ($alhambra_show_image) { $alhambra_post_thumb = get_the_post_thumbnail($alhambra_post_id, alhambra_get_thumb_size('tiny'), array( 'alt' => the_title_attribute( array( 'echo' => false ) ) )); if ($alhambra_post_thumb) $alhambra_output .= '<div class="post_thumb">' . ($alhambra_post_link ? '<a href="' . esc_url($alhambra_post_link) . '">' : '') . ($alhambra_post_thumb) . ($alhambra_post_link ? '</a>' : '') . '</div>'; } $alhambra_output .= '<div class="post_content">' . ($alhambra_show_categories ? '<div class="post_categories">' . alhambra_get_post_categories() . $alhambra_post_counters_output . '</div>' : '') . '<h6 class="post_title">' . ($alhambra_post_link ? '<a href="' . esc_url($alhambra_post_link) . '">' : '') . ($alhambra_post_title) . ($alhambra_post_link ? '</a>' : '') . '</h6>' . apply_filters('alhambra_filter_get_post_info', '<div class="post_info">' . ($alhambra_show_date ? '<span class="post_info_item post_info_posted">' . ($alhambra_post_link ? '<a href="' . esc_url($alhambra_post_link) . '" class="post_info_date">' : '') . esc_html($alhambra_post_date) . ($alhambra_post_link ? '</a>' : '') . '</span>' : '') . ($alhambra_show_author ? '<span class="post_info_item post_info_posted_by">' . esc_html__('by', 'alhambra') . ' ' . ($alhambra_post_link ? '<a href="' . esc_url($alhambra_post_author_url) . '" class="post_info_author">' : '') . esc_html($alhambra_post_author_name) . ($alhambra_post_link ? '</a>' : '') . '</span>' : '') . (!$alhambra_show_categories && $alhambra_post_counters_output ? $alhambra_post_counters_output : '') . '</div>') . '</div>' . '</article>'; alhambra_storage_set('alhambra_output_widgets_posts', $alhambra_output); ?>