mirror of
https://github.com/Frumph/comic-easel.git
synced 2026-07-19 13:29:13 -04:00
Comic Locations injection adjustment
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
@@ -305,15 +305,6 @@ function ceo_pluginfo($whichinfo = null) {
|
||||
return $ceo_pluginfo;
|
||||
}
|
||||
|
||||
function ceo_feed_request($requests) {
|
||||
if (isset($requests['feed']))
|
||||
$requests['post_type'] = get_post_types();
|
||||
return $requests;
|
||||
}
|
||||
|
||||
add_filter('request', 'ceo_feed_request');
|
||||
|
||||
|
||||
/**
|
||||
* This functions is to display test information on the dashboard, instead of dumping it out to everyone.
|
||||
* This is so that a plugin doesn't generate errors on output of the var_dump() to the end user.
|
||||
|
||||
@@ -80,16 +80,10 @@ add_action('easel-post-info', 'ceo_display_comic_locations');
|
||||
|
||||
function ceo_display_comic_locations() {
|
||||
global $post;
|
||||
$allterms = get_the_terms( $post->ID, 'locations');
|
||||
if (!empty($allterms) && !isset($allterms->errors)) {
|
||||
foreach ($allterms as $term) {
|
||||
$term_list_locations[] = '<a href="'.home_url(ceo_clean_filename('/wp-admin/edit.php?post_type=comic&locations='.$term->name)).'">'.$term->name.'</a>';
|
||||
}
|
||||
$output_locations = 'None Set';
|
||||
if (!empty($term_list_locations))
|
||||
$output_locations = join(', ', $term_list_locations );
|
||||
}
|
||||
$output = '<div class="comic-locations">Locations: '.$output_locations."</div>\r\n";
|
||||
$before = '<div class="comic-locations">Locations: ';
|
||||
$sep = ', ';
|
||||
$after = '</div>';
|
||||
$output = get_the_term_list( $post->ID, 'locations', $before, $sep, $after );
|
||||
echo apply_filters('ceo_display_comic_locations', $output);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user