} echo $slidersrc . "\n"; if ($options['advanced_display_hero_credits'] == true && !empty($copyright)) { echo '<p class="credits">' . $copyright . "</p>"; } ?> <div class="hero-slide-text"> <div class="container"> <?php echo '<h2><a href="'; $link = get_post_meta($hero->ID, 'external_link', true); $external = 0; if (isset($link) && filter_var($link, FILTER_VALIDATE_URL)) { $external = 1; } else { $link = fau_esc_url(get_permalink($hero->ID)); } echo $link; echo '">' . get_the_title($hero->ID) . '</a></h2>' . "\n"; $abstract = get_post_meta($hero->ID, 'abstract', true); if (strlen(trim($abstract)) < 3) { $abstract = fau_custom_excerpt($hero->ID, $options['default_slider_excerpt_length'], false); } ?> <br><p><?php echo $abstract; ?> </p> </div> </div>
* @package WordPress * @subpackage FAU * @since FAU 1.0 */ global $options; get_header(); ?> <section id="hero" class="hero-small"> <div class="container"> <div class="row"> <div class="span12"> <div class="breadcrumbs"> <a href="<?php echo fau_esc_url(home_url('/')); ?> "><?php echo $options['breadcrumb_root']; ?> </a> </div> <div class="hero-meta-portal"> 404 </div> </div> </div> <div class="row"> <div class="span6"> <h1><?php
<div class="row"> <div class="span8"> <main> <article class="news-details"> <?php if (has_post_thumbnail() && !post_password_required()) { ?> <div class="post-image"> <?php $bildunterschrift = get_post_meta($post->ID, 'fauval_overwrite_thumbdesc', true); $post_thumbnail_id = get_post_thumbnail_id(); if ($post_thumbnail_id) { $full_image_attributes = wp_get_attachment_image_src($post_thumbnail_id, 'full'); echo '<a class="lightbox" href="' . fau_esc_url($full_image_attributes[0]) . '">'; $image_attributes = wp_get_attachment_image_src($post_thumbnail_id, 'post'); echo '<img src="' . fau_esc_url($image_attributes[0]) . '" class="attachment-post wp-post-image" width="' . $image_attributes[1] . '" height="' . $image_attributes[1] . '" ' . 'title="' . get_the_title() . '" alt="">'; echo '</a>'; if (isset($bildunterschrift) && strlen($bildunterschrift) > 1) { echo '<div class="post-image-caption">' . $bildunterschrift . '</div>'; } else { $imgdata = fau_get_image_attributs($post_thumbnail_id); $info = trim(strip_tags($imgdata['excerpt'])); $credits = ''; if ($options['advanced_display_postthumb_credits'] == true) { $credits = trim(strip_tags($imgdata['credits'])); } if (!empty($info) || !empty($credits)) { echo '<div class="post-image-caption">'; if (!empty($info)) { echo $info; }
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) { global $options; $indent = $depth ? str_repeat("\t", $depth) : ''; if (isset($this->count[$this->level])) { $this->count[$this->level]++; } else { $this->count[$this->level] = 1; } if ($this->level == 1) { $this->element = $item; } $item_output = ''; // Only show elements on the first level and only five on the second level, but only if showdescription == FALSE if ($this->level == 1 || $this->level == 2 && $this->count[$this->level] <= $this->maxsecondlevel && $this->showsub == 1) { $class_names = $value = ''; $externlink = false; $classes = empty($item->classes) ? array() : (array) $item->classes; $classes[] = 'menu-item-' . $item->ID; if ($this->level == 1 && isset($this->count[$this->level]) && ($this->count[$this->level] - 1) % $this->maxspalten == 0) { $classes[] = 'clear'; } if ($this->level == 1) { $classes[] = 'span3'; } // $classes[] = 'level'.$this->level; // $classes[] = 'count'.$this->count[$this->level]; $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args)); $class_names = $class_names ? ' class="' . esc_attr($class_names) . '"' : ''; $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args); $id = $id ? ' id="' . esc_attr($id) . '"' : ''; if ($this->level == 1) { $output .= $indent . '<li' . $id . $value . $class_names . '>'; } else { $output .= '<li>'; } $atts = array(); $atts['title'] = !empty($item->attr_title) ? $item->attr_title : ''; $atts['target'] = !empty($item->target) ? $item->target : ''; $atts['rel'] = !empty($item->xfn) ? $item->xfn : ''; $post = get_post($item->object_id); if ($post && $post->post_type != 'imagelink') { $atts['href'] = !empty($item->url) ? $item->url : ''; $targeturl = $atts['href']; } else { $targeturl = ''; } if ($this->level == 1) { $atts['class'] = 'subpage-item'; } $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args); $attributes = ''; foreach ($atts as $attr => $value) { if (!empty($value)) { $value = 'href' === $attr ? esc_url($value) : esc_attr($value); $attributes .= ' ' . $attr . '="' . $value . '"'; } } $item_output = $args->before; if ($post && $post->post_type == 'imagelink') { $protocol = get_post_meta($item->object_id, 'protocol', true); $link = get_post_meta($item->object_id, 'link', true); $targeturl = get_post_meta($item->object_id, 'fauval_imagelink_url', true); if (empty($targeturl) && isset($protocol) && isset($link)) { $targeturl = $protocol . $link; } $externlink = true; $link = '<a class="ext-link" data-wpel-link="internal" href="' . $targeturl . '">'; } else { $link = '<a' . $attributes . ' >'; } if ($this->level == 1) { if (!$this->nothumbnail) { $item_output .= '<a '; if ($externlink) { $item_output .= 'data-wpel-link="internal" '; } $item_output .= 'class="image'; if ($externlink) { $item_output .= ' ext-link'; } $item_output .= '" href="' . $targeturl . '">'; $post_thumbnail_id = get_post_thumbnail_id($item->object_id, 'page-thumb'); $imagehtml = ''; $imageurl = ''; if ($post_thumbnail_id) { $thisimage = wp_get_attachment_image_src($post_thumbnail_id, 'page-thumb'); $imageurl = $thisimage[0]; $item_output .= '<img src="' . fau_esc_url($imageurl) . '" width="' . $thisimage[1] . '" height="' . $thisimage[2] . '" alt="">'; } if ((!isset($imageurl) || strlen(trim($imageurl)) < 4) && !$this->nothumbnailfallback) { $imageurl = $options['default_submenuthumb_src']; $item_output .= '<img src="' . fau_esc_url($imageurl) . '" width="' . $options['default_submenuthumb_width'] . '" height="' . $options['default_submenuthumb_height'] . '" alt="">'; } $item_output .= '</a>'; // Anmerkdung: Leeres alt="", da dieses ansonsten redundant wäre zum darunter stehenden Titel. } $item_output .= $args->link_before . '<h3>'; $item_output .= $link; $item_output .= apply_filters('the_title', $item->title, $item->ID); $item_output .= '</a>'; $item_output .= '</h3>' . $args->link_after; } else { $item_output .= $link; $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after; $item_output .= '</a>'; } $item_output .= $args->after; if (!($this->showsub == 1) && $this->level == 1) { $desc = get_post_meta($item->object_id, 'portal_description', true); // Wird bei Bildlink definiert if ($desc) { $item_output .= '<p>' . $desc . '</p>'; } } } $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args); }
</div> </div> </div> </noscript> <?php } ?> <header id="header"> <div class="container"> <?php $header_image = get_header_image(); echo '<div class="branding" id="logo" role="banner" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">'; echo '<h1>'; if (!is_front_page()) { echo '<a itemprop="url" rel="home" href="' . fau_esc_url(home_url('/')) . '">'; } if (!empty($header_image)) { $customheader = get_custom_header(); $attachment_id = 0; if (isset($customheader->attachment_id)) { $attachment_id = $customheader->attachment_id; $srcset = esc_attr(wp_get_attachment_image_srcset($attachment_id, 'full')); } else { $srcset = ''; } echo '<img src="' . $header_image . '" width="' . get_custom_header()->width . '" height="' . get_custom_header()->height . '" alt="' . esc_attr(get_bloginfo('title')) . '"'; if ($srcset) { echo ' srcset="' . $srcset . '"'; } echo ">";
echo $titel; ?> </a></h2> <div class="row"> <?php $hideimage = get_post_meta($topevent->ID, 'topevent_hideimage', true); $imageid = get_post_meta($topevent->ID, 'topevent_image', true); $imagehtml = ''; if (isset($imageid) && $imageid > 0) { $image = wp_get_attachment_image_src($imageid, 'topevent-thumb'); if ($image && $image[0]) { $imagehtml = '<img src="' . fau_esc_url($image[0]) . '" width="' . $options['default_topevent_thumb_width'] . '" height="' . $options['default_topevent_thumb_height'] . '" alt="">'; } } if (empty($imagehtml)) { $imagehtml = '<img src="' . fau_esc_url($options['default_topevent_thumb_src']) . '" width="' . $options['default_topevent_thumb_width'] . '" height="' . $options['default_topevent_thumb_height'] . '" alt="">'; } if ($hideimage < 1 && isset($imagehtml)) { ?> <div class="span2"> <?php echo '<a href="' . $link . '">' . $imagehtml . '</a>'; ?> </div> <div class="span2"> <?php } else { ?> <div class="span4"> <?php }
<?php $copyright = ''; if (isset($options['startseite_banner_image_id']) && $options['startseite_banner_image_id'] > 0) { $imagedata = wp_get_attachment_image_src($options['startseite_banner_image_id'], 'herobanner'); $slidersrcset = wp_get_attachment_image_srcset($options['startseite_banner_image_id'], 'herobanner'); if ($imagedata) { $image = '<img src="' . fau_esc_url($imagedata[0]) . '" width="' . $imagedata[1] . '" height="' . $imagedata[2] . '" alt=""'; if ($slidersrcset) { $image .= 'srcset="' . $slidersrcset . '"'; } $image .= '>'; } $imgdata = fau_get_image_attributs($options['startseite_banner_image_id']); $copyright = trim(strip_tags($imgdata['credits'])); } elseif ($options['startseite_banner_usedefault']) { $image = '<img src="' . fau_esc_url($options['default_startseite-bannerbild-image_src']) . '" width="' . $options['default_startseite-bannerbild-image_width'] . '" height="' . $options['default_startseite-bannerbild-image_height'] . '" alt="">'; } else { $image = ''; } echo $image . "\n"; if ($options['advanced_display_hero_credits'] == true && !empty($copyright)) { echo '<p class="credits">' . $copyright . "</p>"; } ?> <div class="banner-text"> <div class="container"> <div class="row"> <div role="presentation" class="span9 infobar"> <?php $header_image = get_header_image(); if (!empty($header_image)) {
function fau_do_metabox_post_topevent($object, $box) { global $options; wp_nonce_field(basename(__FILE__), 'fau_metabox_post_topevent_nonce'); $post_type = get_post_type($object->ID); if ('post' == $post_type) { if (!current_user_can('edit_post', $object->ID)) { return; } } else { return; } $istopevent = get_post_meta($object->ID, 'topevent_active', true); fau_form_onoff('fauval_topevent_active', $istopevent, __('Diesen Artikel als Top-Event anzeigen.', 'fau')); if (!empty($options['start_topevents_tag'])) { echo '<p>' . __('Bitte beachten: Damit ein Artikel als Top-Event angezeigt wird, muss entweder obige Option gesetzt sein oder der Artikel muss ein gültiges Datum für einen Top-Event angegeben haben, welches noch nicht abgelaufen ist.', 'fau') . '</p>'; } $topevent_title = get_post_meta($object->ID, 'topevent_title', true); fau_form_text('fauval_topevent_title', $topevent_title, __('Titel', 'fau'), __('Titel wie er in der Sidebar erscheinen soll. Wenn leer, wird der normale Titel des Beitrags verwendet.', 'fau')); $topevent_desc = get_post_meta($object->ID, 'topevent_description', true); $help = __('Kurztext für die Sidebar. Wenn leer, wird der Anleser verwendet.', 'fau'); $help .= ' ' . __('Erlaubte Anzahl an Zeichen:', 'fau'); $help .= ' <span class="fauval_topevent_desc_signs">' . $options['default_topevent_excerpt_length'] . '</span>'; fau_form_textarea('fauval_topevent_desc', $topevent_desc, __("Kurzbeschreibung", 'fau'), 40, 5, $help); $topevent_date = get_post_meta($object->ID, 'topevent_date', true); $topevent_image = get_post_meta($object->ID, 'topevent_image', true); ?> <div class="optionseingabe"> <p> <label for="fauval_topevent_date"> <?php _e("Datum", 'fau'); ?> : </label> </p> <input type="date" name="fauval_topevent_date" id="fauval_topevent_date" class="text" value="<?php echo $topevent_date; ?> "> <br> <div class="howto"><?php echo __('Geben Sie hier das Datum des Events ein.', 'fau'); echo __('<br>Nutzen Sie das Format: "Tag-Monat-Jahr", wobei Sie Tage und Monate mit führenden Nullen schreiben und das Jahr vierstellig. Beispiel: 01-12-2016 für den ersten Dezember 2016.', 'fau'); ?> </div> <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#fauval_topevent_date" ).each(function(){ this.type="text"; }); jQuery("#fauval_topevent_date" ).datepicker(); jQuery("#fauval_topevent_date" ).datepicker( "option", "dateFormat", 'dd-mm-yy' ); <?php if (isset($topevent_date)) { ?> jQuery("#fauval_topevent_date" ).datepicker( "setDate", '<?php echo $topevent_date; ?> ' ); <?php } ?> }); </script> </div> <div class="optionseingabe"> <p> <label for="fauval_topevent_image"> <?php _e("Symbolbild", 'fau'); ?> : </label> </p> <?php $hideimage = get_post_meta($object->ID, 'topevent_hideimage', true); if (!isset($hideimage)) { $hideimage = $options['topevent_hideimage']; } fau_form_onoff('fauval_topevent_hideimage', $hideimage, __('Kein Symbolbild anzeigen.', 'fau')); echo '<div class="uploader">'; $image = ''; $imagehtml = ''; if (isset($topevent_image) && $topevent_image > 0) { $image = wp_get_attachment_image_src($topevent_image, 'topevent-thumb'); if (isset($image)) { $imagehtml = '<img class="image_show_topevent_image" src="' . $image[0] . '" width="' . $options['default_topevent_thumb_width'] . '" height="' . $options['default_topevent_thumb_height'] . '" alt="">'; } } echo '<div class="previewimage showimg_topevent_image">'; if (!empty($imagehtml)) { echo $imagehtml; } else { $imagehtml = '<img src="' . fau_esc_url($options['default_topevent_thumb_src']) . '" width="' . $options['default_topevent_thumb_width'] . '" height="' . $options['default_topevent_thumb_height'] . '" alt="">'; echo $imagehtml; echo "<br>"; _e('Kein Bild ausgewählt. Ersatzbild wird gezeigt.', 'fau'); } echo "</div>\n"; ?> <input type="hidden" name="fauval_topevent_image" id="fauval_topevent_image" value="<?php echo sanitize_key($topevent_image); ?> " /> <input class="button" name="image_button_topevent_image" id="image_button_topevent_image" value="<?php _e('Bild auswählen', 'fau'); ?> " /> <small><a href="#" class="image_remove_topevent_image"><?php _e("Entfernen", 'fau'); ?> </a></small> <br><div class="howto"><?php echo __('Hier können Sie ein Thumbnail auswählen für den Event. Wenn kein Bild gewählt wird, wird ein Ersatzbild angezeigt.', 'fau'); ?> </div><script> jQuery(document).ready(function() { jQuery('#image_button_topevent_image').click(function() { wp.media.editor.send.attachment = function(props, attachment) { jQuery('#fauval_topevent_image').val(attachment.id); htmlshow = "<img src=\""+attachment.url + "\" width=\"<?php echo $options['default_topevent_thumb_width']; ?> \" height=\"<?php echo $options['default_topevent_thumb_height']; ?> \">"; jQuery('.showimg_topevent_image').html(htmlshow); } wp.media.editor.open(this); return false; }); }); jQuery(document).ready(function() { jQuery('.image_remove_topevent_image').click(function() { jQuery('#fauval_topevent_image').val(''); jQuery('.showimg_topevent_image').html('<?php _e('Kein Bild ausgewählt.', 'fau'); ?> '); return false; }); }); </script> </div> </div> <?php }
function fau_display_search_resultitem($withsidebar = 1) { global $post; global $options; $output = ''; $withthumb = $options['search_display_post_thumbnails']; $withcats = $options['search_display_post_cats']; $withtypenote = $options['search_display_typenote']; $attachment = array(); if (isset($post) && isset($post->ID)) { $link = get_post_meta($post->ID, 'external_link', true); $external = 0; if (isset($link) && filter_var($link, FILTER_VALIDATE_URL)) { $external = 1; } else { $link = fau_make_link_relative(get_permalink($post->ID)); } $type = get_post_type(); $typeclass = "res-" . $type; $output .= '<article class="search-result ' . $typeclass . '">' . "\n"; $output .= "\t<h3><a "; if ($external == 1) { $output .= 'class="ext-link" '; } $output .= "href=\"" . $link . "\">" . get_the_title() . "</a></h3>\n"; $typeinfo = get_post_type_object($type); if ($type == 'post') { $typestr = '<div class="search-meta">'; if ($withtypenote == true) { $typestr .= '<span class="post-meta-news"> '; $typestr .= __('Beitrag', 'fau'); $typestr .= '</span>'; } $categories = get_the_category(); $separator = ', '; $thiscatstr = ''; if ($withcats == true && $categories) { $typestr .= '<span class="post-meta-category"> '; $typestr .= __('Kategorie', 'fau'); $typestr .= ': '; foreach ($categories as $category) { $thiscatstr .= '<a href="' . get_category_link($category->term_id) . '">' . $category->cat_name . '</a>' . $separator; } $typestr .= trim($thiscatstr, $separator); $typestr .= '</span> '; } $topevent_date = get_post_meta($post->ID, 'topevent_date', true); if ($topevent_date) { $typestr .= '<span class="post-meta-date"> '; $typestr .= date_i18n(get_option('date_format'), strtotime($topevent_date)); $typestr .= ' ('; $typestr .= __('Veranstaltungshinweis', 'fau'); $typestr .= ')'; $typestr .= '</span>'; } else { $typestr .= '<span class="post-meta-date"> '; $typestr .= get_the_date(); $typestr .= '</span>'; } $typestr .= '</div>' . "\n"; } elseif ($type == 'person') { $typestr = '<div class="search-meta">'; $typestr .= '<span class="post-meta-kontakt"> '; $typestr .= $typeinfo->labels->singular_name; $typestr .= '</span>'; $typestr .= '</div>' . "\n"; } elseif ($type == 'event') { $typestr = '<div class="search-meta">'; $typestr .= '<span class="post-meta-event"> '; $typestr .= __('Veranstaltungshinweis', 'fau'); $typestr .= '</span>'; $typestr .= '</div>' . "\n"; } elseif ($type == 'attachment') { $attachment = wp_prepare_attachment_for_js($post->ID); $filesize = isset($attachment['filesizeHumanReadable']) ? $attachment['filesizeHumanReadable'] : ''; $filesize = isset($attachment['filesize']) && !isset($filesize) ? $attachment['filesize'] : $filesize; $filesize = isset($attachment['filesizeInBytes']) && !isset($filesize) ? $attachment['filesizeInBytes'] . " Bytes" : $filesize; $filetype = wp_check_filetype($attachment['url']); $typestr = '<div class="search-meta">'; $typestr .= '<span class="post-meta-attachment">'; $typestr .= ' <span class="dateityp">' . $filetype['ext'] . '</span> '; $typestr .= __('Datei', 'fau'); $typestr .= '</span>'; $typestr .= ' <span class="post-meta-date"> '; $typestr .= get_the_date(); if (get_the_date() != get_the_modified_date()) { $typestr .= ' (' . __('Erstellungsdatum', 'fau') . ')'; $typestr .= '</span>'; $typestr .= ' <span class="post-meta-date"> '; $typestr .= get_the_modified_date(); $typestr .= ' (' . __('Letzte Änderung', 'fau') . ')'; } $typestr .= '</span>'; $typestr .= ' <span class="download">'; $typestr .= ' <a href="' . fau_esc_url($attachment['url']) . '">' . __('Download', 'fau') . '</a>'; $typestr .= ' <span class="filesize">(<span class="unsichtbar">'; $typestr .= __('Größe:', 'fau') . ' </span>' . $filesize; $typestr .= ')</span>'; $typestr .= '</span>'; $typestr .= '</div>' . "\n"; } elseif ($withtypenote == true) { $typestr = '<div class="search-meta">'; $typestr .= '<span class="post-meta-defaulttype"> '; $typestr .= $typeinfo->labels->singular_name; $typestr .= '</span>'; $typestr .= ' <span class="post-meta-date"> '; $typestr .= get_the_modified_date(); $typestr .= ' (' . __('Letzte Änderung', 'fau') . ')'; $typestr .= '</span>'; $typestr .= '</div>' . "\n"; } else { $typestr = ''; } if (!empty($typestr)) { $output .= "\t" . $typestr . "\n"; } $output .= "\t"; if ($type == 'person' && class_exists('FAU_Person_Shortcodes')) { if ($withthumb == true && has_post_thumbnail($post->ID)) { $output .= '<div class="row">' . "\n"; $output .= "\t\t" . '<div class="span3">' . "\n"; $output .= '<a href="' . $link . '" class="news-image"'; if ($external == 1) { $output .= ' ext-link'; } $output .= '">'; $post_thumbnail_id = get_post_thumbnail_id($post->ID, 'post-thumb'); $imagehtml = ''; $imgsrcset = ''; if ($post_thumbnail_id) { $sliderimage = wp_get_attachment_image_src($post_thumbnail_id, 'post-thumb'); $imgsrcset = wp_get_attachment_image_srcset($post_thumbnail_id, 'post-thumb'); $imageurl = $sliderimage[0]; } if (!isset($imageurl) || strlen(trim($imageurl)) < 4) { $imageurl = $options['default_postthumb_src']; } $output .= '<img src="' . fau_esc_url($imageurl) . '" width="' . $options['default_postthumb_width'] . '" height="' . $options['default_postthumb_height'] . '" alt=""'; if ($imgsrcset) { $output .= ' srcset="' . $imgsrcset . '"'; } $output .= '>'; $output .= '</a>'; $output .= "\t\t" . '</div>' . "\n"; if ($withsidebar) { $output .= "\t\t" . '<div class="span6">' . "\n"; } else { $output .= "\t\t" . '<div class="span9">' . "\n"; } } $output .= FAU_Person_Shortcodes::fau_person(array("id" => $post->ID, 'format' => 'kompakt', 'showlink' => 0, 'showlist' => 0, 'hide' => 'bild')); if ($withthumb == true && has_post_thumbnail($post->ID)) { $output .= "\t</div> <!-- /row -->\n"; } /* }elseif (($type == 'standort') && (function_exists('fau_standort'))) { $output .= fau_standort(array("id"=> $post->ID)); */ } elseif ($type == 'attachment') { if ($withthumb == true) { $output .= '<div class="row">' . "\n"; $output .= "\t\t" . '<div class="span1 span-small">' . "\n"; $output .= '<img src="' . fau_esc_url($attachment['icon']) . '" width="48" height="64" alt="">'; $output .= "\t\t" . '</div>' . "\n"; if ($withsidebar) { $output .= "\t\t" . '<div class="span7">' . "\n"; } else { $output .= "\t\t" . '<div class="span11">' . "\n"; } } $output .= "\t\t" . '<p><em>' . "\n"; $output .= "\t\t\t" . $attachment['caption']; $output .= "\t\t" . '</em></p>' . "\n"; $output .= "\t\t" . '<p>' . "\n"; $output .= "\t\t\t" . $attachment['description']; $output .= "\t\t" . '</p>' . "\n"; if ($withthumb == true) { $output .= "\t</div> <!-- /row -->\n"; } } else { if ($withthumb == true && has_post_thumbnail($post->ID)) { $output .= '<div class="row">' . "\n"; $output .= "\t\t" . '<div class="span3">' . "\n"; $output .= '<a href="' . $link . '" class="news-image"'; if ($external == 1) { $output .= ' ext-link'; } $output .= '">'; $post_thumbnail_id = get_post_thumbnail_id($post->ID, 'post-thumb'); $imagehtml = ''; $imgsrcset = ''; if ($post_thumbnail_id) { $sliderimage = wp_get_attachment_image_src($post_thumbnail_id, 'post-thumb'); $imgsrcset = wp_get_attachment_image_srcset($post_thumbnail_id, 'post-thumb'); $imageurl = $sliderimage[0]; } if (!isset($imageurl) || strlen(trim($imageurl)) < 4) { $imageurl = $options['default_postthumb_src']; } $output .= '<img src="' . fau_esc_url($imageurl) . '" width="' . $options['default_postthumb_width'] . '" height="' . $options['default_postthumb_height'] . '" alt=""'; if ($imgsrcset) { $output .= ' srcset="' . $imgsrcset . '"'; } $output .= '>'; $output .= '</a>'; $output .= "\t\t" . '</div>' . "\n"; if ($withsidebar) { $output .= "\t\t" . '<div class="span6">' . "\n"; } else { $output .= "\t\t" . '<div class="span9">' . "\n"; } } $output .= "\t\t" . '<p>' . "\n"; $output .= fau_custom_excerpt($post->ID, $options['default_search_excerpt_length'], false, '', true, $options['search_display_excerpt_morestring']); if ($options['search_display_continue_arrow']) { $output .= fau_create_readmore($link, '', $external, true); } $output .= "\t\t\t" . '</p>' . "\n"; if ($withthumb == true && has_post_thumbnail($post->ID)) { $output .= "\t</div> <!-- /row -->\n"; } } $output .= "</article>\n"; } else { $output .= "<!-- empty result -->\n"; } return $output; }