break; case 'listen': $content .= 'p-listen'; break; case 'watch': $content .= 'p-watch'; break; case 'game': $content .= 'p-play'; break; case 'wish': $content .= 'p-wish'; break; } $content .= '">'; $content .= kind_icon($kind); $content .= self::get_cite_title($meta->get_cite(), $meta->get_url()); $author = self::get_hcard($meta->get_author()); if ($author) { $content .= ' ' . __('by', 'Post kinds') . ' ' . $author; } $site_name = self::get_site_name($meta->get_cite(), $meta->get_url()); if ($site_name) { $content .= '<em>(' . $site_name . ')</em>'; } if ($cite) { $embed = self::get_embed($meta->get_url()); if ($embed) { $content .= sprintf('<blockquote class="e-summary">%1s</blockquote>', $embed); } else { if (array_key_exists('summary', $cite)) {
public static function select_metabox($post) { $strings = self::get_strings(); $option = get_option('iwt_options', array()); $include = array(); if (array_key_exists('termslists', $option)) { $include = $option['termslists']; } $include = array_merge($include, array('note', 'reply', 'article')); // If Simple Location is Enabled, include the check-in type // Filter Kinds $include = array_unique(apply_filters('kind_include', $include)); // Note cannot be removed or disabled without hacking the code if (!in_array('note', $include)) { $include[] = 'note'; } if (isset($_GET['kind'])) { $default = get_term_by('slug', $_GET['kind'], 'kind'); } else { $default = get_term_by('slug', 'note', 'kind'); } $terms = get_terms('kind', array('hide_empty' => 0)); $postterms = get_the_terms($post->ID, 'kind'); $current = $postterms ? array_pop($postterms) : false; $current = $current ? $current->term_id : $default->term_id; echo '<div id="kind-all">'; echo '<ul id="taxonomy-kind" class="list:kind category-tabs form-no-clear">'; foreach ($terms as $term) { $id = 'kind-' . $term->term_id; $slug = $term->slug; if (in_array($slug, $include)) { echo "<li id='{$id}' class='kind-{$slug}'><label class='selectit'>"; echo "<input type='radio' id='in-{$id}' name='tax_input[kind]'" . checked($current, $term->term_id, false) . "value='{$slug}' />"; echo kind_icon($slug); echo "{$strings[$slug]}<br />"; echo '</label></li>'; } } echo '</ul></div>'; }