public function extractPostInformation($query) { while ($query->have_posts()) { $query->the_post(); $this->postTitle = strip_tags(get_the_title(get_the_ID())); $this->postURL = get_permalink(); $this->postCalloutText = strip_tags(get_post_meta(get_the_ID(), 'mb_thumbnail_callout', true)); $this->postImageThumbnailURL = $this->UI->returnPostFeaturedImageURL(get_post_thumbnail_id(get_the_ID()), 'isotopeGrid'); $this->postDate = strip_tags(get_post_meta(get_the_ID(), 'mb_cosmetic_date', true)); $this->postSubtitle = parent::getPostSubtitle($query); $this->postExcerpt = wp_kses($this->shortenExcerpt(get_the_excerpt(), 180), $this->allowedHTMLTags); $this->postTerms = strtolower(implode(" ", $this->getListOfTerms())); $this->alternateLink = esc_url(get_post_meta(get_the_ID(), 'mb_alternate_link', true)); $this->isPartnerEvent = get_post_meta(get_the_ID(), 'mb_isPartnerEvent', true); $this->postImageAltText = $this->UI->returnImageAltTag(get_the_ID()); echo $this->buildTemplate(); } wp_reset_postdata(); }
public function extractPostInformation($query) { while ($query->have_posts()) { $query->the_post(); if ($this->currentPostID == get_the_ID()) { continue; } $this->postTitle = htmlspecialchars(get_the_title(get_the_ID())); $this->postURL = get_permalink(); $this->postCalloutText = htmlspecialchars(get_post_meta(get_the_ID(), 'mb_thumbnail_callout', true)); $this->postImageThumbnailURL = $this->UI->returnPostFeaturedImageURL(get_post_thumbnail_id(get_the_ID()), 'gridViewNoSidebar'); $this->postDate = htmlspecialchars(get_post_meta(get_the_ID(), 'mb_cosmetic_date', true)); $this->postSubtitle = parent::getPostSubtitle($query); $this->postExcerpt = $this->shortenExcerpt(get_the_excerpt(), 100); $this->postImageAltText = $this->UI->returnImageAltTag(get_the_ID()); echo $this->buildTemplate(); } wp_reset_postdata(); }
public function extractPostInformation($query) { while ($query->have_posts()) { $query->the_post(); if ($this->currentPostID == get_the_ID()) { continue; } $this->postTitle = esc_html(get_the_title(get_the_ID())); $this->postURL = get_permalink(); $this->postCalloutText = esc_html(get_post_meta(get_the_ID(), 'mb_thumbnail_callout', true)); $this->postImageThumbnailURL = $this->UI->returnPostFeaturedImageURL(get_post_thumbnail_id(get_the_ID()), 'postExcerptRowOfFive'); $this->postDate = esc_html(get_post_meta(get_the_ID(), 'mb_cosmetic_date', true)); $this->postSubtitle = parent::getPostSubtitle($query); $this->postExcerpt = esc_html($this->shortenExcerpt(get_post_meta(get_the_ID(), 'mb_80_character_excerpt', true), 100)); $this->alternateLink = get_post_meta(get_the_ID(), 'mb_alternate_link', true); $this->postImageAltText = $this->UI->returnImageAltTag(get_the_ID()); echo $this->buildTemplate(); } wp_reset_postdata(); }