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; }
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(); 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)); }
<div class="chapter-image-column" style="background-image:url('<?php \UWAA\View\UI::getPostFeaturedImageURL(get_post_thumbnail_id($post->ID), 'original'); ?> ');"></div> <div class="chapter-logo"> <?php $regionalTags = $UWAA->RegionalTags->getRegionalTags(); $communitySlug = new \UWAA\View\GetCommunitySlug($post, $regionalTags); $finalSlug = $communitySlug->isCommunitiesContent(); $logo = new \UWAA\View\ChapterHeaderLogo($finalSlug); // $logo = new \UWAA\View\ChapterHeaderLogo(); // $logo->determineSlug($post); $logo->retriveSVG(); ?> </div>
<div class="chapter-image-column" style="background-image:url('<?php \UWAA\View\UI::getPostFeaturedImageURL(get_post_thumbnail_id($post->ID), 'chapterBrandingImage'); ?> ');"></div> <div class="chapter-logo"> <?php $regionalTags = $UWAA->RegionalTags->getRegionalTags(); $communitySlug = new \UWAA\View\GetCommunitySlug($post, $regionalTags); $finalSlug = $communitySlug->isCommunitiesContent(); $logo = new \UWAA\View\ChapterHeaderLogo($finalSlug); // $logo = new \UWAA\View\ChapterHeaderLogo(); // $logo->determineSlug($post); $logo->retriveSVG(); ?> </div>