if (!get_terms_meta($catID, 'feed', true)) { $subscriptionOptions['RSS'] = site_URL() . '/' . $catNice . '/feed/'; } if (get_terms_meta($catID, 'itunes', true)) { $subscriptionOptions['iTunes'] = get_terms_meta($catID, 'itunes', true); } if (get_terms_meta($catID, 'goodreads', true)) { $subscriptionOptions['Goodreads'] = get_terms_meta($catID, 'goodreads', true); } if (get_terms_meta($catID, 'facebookurl', true)) { $subscriptionOptions['Facebook'] = get_terms_meta($catID, 'facebookurl', true); } if (get_terms_meta($catID, 'twitterid', true)) { $subscriptionOptions['Twitter'] = "https://twitter.com/" . get_terms_meta($catID, 'twitterid', true); } echo 'Subscribe: ' . andListKeyed($subscriptionOptions) . '.<br />'; /* End Subscription Block */ } ?> </p> <?php if (get_terms_meta($catID, 'sponsor1', true)) { ?> <div class="light"> <strong> Sponsored by: </strong> <ul> <?php echo '<li>' . get_terms_meta($catID, 'sponsor1', true) . '</li>';
/** * Creates andListKeyed output of social media locations for a specific user. * Still not 100% happy with Twitter solution, needs work! * @param [type] $userID The ID of the user in question. * @return [type] Sentence string with info about where to find the * author in question. */ function socialPlaces($userID) { $hostPlaces = array("Twitter" => "twitter", "Facebook" => "facebook_profile", "GitHub" => "github_profile", "Instagram" => "instagram_profile", "the web" => "user_url"); foreach ($hostPlaces as $name => $key) { if (get_the_author_meta($key, $userID)) { $socialPlace[$name] = get_the_author_meta($key, $userID); } if (get_the_author_meta('twitter', $userID)) { $socialPlace['Twitter'] = 'http://www.twitter.com/' . get_the_author_meta('twitter', $userID); } } $theAuthor = get_userdata($userID); if (isset($socialPlace)) { return $theAuthor->first_name . ' can be found on ' . andListKeyed($socialPlace) . '.<br />'; } }