Beispiel #1
0
 public function addFeaturedPostThumbnailToFeed()
 {
     $id = get_the_id();
     if (has_post_thumbnail($id)) {
         $imageID = get_post_thumbnail_id($id);
         $url = \UWAA\View\UI::returnPostFeaturedImageURL($imageID, 'thumbnail-large');
         echo "<uwaa_app:itemImage><![CDATA[{$url}]]></uwaa_app:itemImage>\n";
     }
 }
 protected function getArrayOfData()
 {
     $UI = new UI();
     $postPromotionSlugs = wp_get_post_terms(get_the_id(), 'uwaa_content_promotion', array("fields" => "slugs"));
     $targetedChapter = array_intersect($postPromotionSlugs, $this->allChapters);
     $chapterSlug = array_pop($targetedChapter);
     $chapter = get_page_by_path($chapterSlug, OBJECT, 'chapters');
     $output = array('id' => get_the_id(), 'title' => get_the_title(), 'image' => $UI->returnPostFeaturedImageURL(get_post_thumbnail_id($chapter->ID), 'original'), 'logo' => $chapterSlug, 'text' => get_the_excerpt(), 'link' => get_the_permalink(get_the_id()), 'header_text_color' => get_post_meta(get_the_ID(), 'mb_header_text_color', true), 'subtitle' => get_post_meta(get_the_ID(), 'mb_thumbnail_subtitle', true), 'date' => get_post_meta(get_the_ID(), 'mb_cosmetic_date', true), 'date' => get_post_meta(get_the_ID(), 'mb_cosmetic_date', true));
     return $output;
 }
Beispiel #3
0
 protected function getArrayOfData()
 {
     $UI = new UI();
     return array('id' => get_the_id(), 'title' => get_the_title(), 'image' => $UI->returnPostFeaturedImageURL(get_post_thumbnail_id(get_the_id()), 'original'), 'text' => get_the_excerpt(), 'link' => get_the_permalink(get_the_id()), 'header_text_color' => get_post_meta(get_the_ID(), 'mb_header_text_color', true), 'subtitle' => get_post_meta(get_the_ID(), 'mb_thumbnail_subtitle', true), 'date' => get_post_meta(get_the_ID(), 'mb_cosmetic_date', true));
 }