예제 #1
0
function add_feedlink($catfeed, $cat)
{
    //echo 'the cat feed is : '.$catfeed.' .<br />';
    $rssLink = "\n";
    if ($catfeed == 'text') {
        $rssLink .= '<a class="menuRss" href="' . get_category_feed_link($cat->term_id) . '">(RSS)</a>';
    } elseif ($catfeed == 'image') {
        $options = get_option('ssMenu_options');
        if (class_exists('ssBase')) {
            $baseoptions = get_option('ssBase_options');
            $ss_global_over_ride = $baseoptions[ss_global_over_ride];
            if ($ss_global_over_ride == 'on') {
                $options[css_load] = $baseoptions[css_load];
            }
        }
        if ($options[css_load] == 'default') {
            $rssPath = WP_PLUGIN_URL . '/superslider-menu/plugin-data/superslider/ssMenu/rss/rss_out.png';
        } elseif ($options[css_load] == 'pluginData') {
            $rssPath = WP_CONTENT_URL . '/plugin-data/superslider/ssMenu/rss/rss_out.png';
        } elseif ($options[css_load] == 'off') {
            $rssPath = get_option('siteurl') . '/wp-includes/images/rss.png';
        }
        $url = get_settings(siteurl);
        $rssLink .= '<a class="menuRss" href="' . get_category_feed_link($cat->term_id) . '"><img src="' . $rssPath . '" alt="rss" /></a>';
    } else {
        $rssLink = '';
    }
    $rssLink .= "\n";
    return $rssLink;
}
예제 #2
0
 /**
  * @see   Walker::start_el()
  * @since 2.1.0
  *
  * @param string $output   Passed by reference. Used to append additional content.
  * @param object $category Category data object.
  * @param int    $depth    Depth of category in reference to parents.
  * @param array  $args
  * @param int    $current_object_id
  */
 public function start_el(&$output, $category, $depth = 0, $args = array(), $current_object_id = 0)
 {
     $cat_name = apply_filters('list_cats', esc_attr($category->name), $category);
     // Don't generate an element if the category name is empty.
     if (!$cat_name) {
         return;
     }
     $link = '<div class="avhec-widget-line"><a href="' . get_category_link($category->term_id) . '" ';
     if ($args['use_desc_for_title'] && !empty($category->description)) {
         /**
          * Filter the category description for display.
          *
          * @since 1.2.0
          *
          * @param string $description Category description.
          * @param object $category    Category object.
          */
         $link .= 'title="' . esc_attr(strip_tags(apply_filters('category_description', $category->description, $category))) . '"';
     } else {
         $link .= 'title="' . sprintf(__('View all posts filed under %s'), $cat_name) . '"';
     }
     $link .= '>';
     $link .= $cat_name . '</a>';
     if (!empty($args['feed_image']) || !empty($args['feed'])) {
         $link .= '<div class="avhec-widget-rss"> ';
         if (empty($args['feed_image'])) {
             $link .= '(';
         }
         $link .= '<a href="' . get_category_feed_link($category->term_id, $args['feed_type']) . '"';
         if (empty($args['feed'])) {
             $alt = ' alt="' . sprintf(__('Feed for all posts filed under %s'), $cat_name) . '"';
         } else {
             $alt = ' alt="' . $args['feed'] . '"';
             $name = $args['feed'];
             $link .= ' title="';
             $link .= empty($args['title']) ? $args['feed'] : $args['title'];
             $link .= '"';
         }
         $link .= '>';
         if (empty($args['feed_image'])) {
             $link .= $name;
         } else {
             $link .= '<img src="' . $args['feed_image'] . '"' . $alt . '" />';
         }
         $link .= '</a>';
         if (empty($args['feed_image'])) {
             $link .= ')';
         }
         $link .= '</div>';
     }
     if (!empty($args['show_count'])) {
         $link .= '<div class="avhec-widget-count"> (' . number_format_i18n($category->count) . ')</div>';
     }
     if (!empty($args['$show_date'])) {
         $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
     }
     if ('list' == $args['style']) {
         // When on a single post get the post's category. This ensures that that category will be given the CSS style of "current category".
         if (is_single()) {
             $post_cats = get_the_category();
             $args['current_category'] = $post_cats[0]->term_id;
         }
         $output .= "\t" . '<li';
         $css_classes = array('cat-item', 'cat-item-' . $category->term_id);
         if (!empty($args['current_category'])) {
             $_current_category = get_term($args['current_category'], $category->taxonomy);
             if ($category->term_id == $args['current_category']) {
                 $css_classes[] = 'current-cat';
             } elseif ($category->term_id == $_current_category->parent) {
                 $css_classes[] = 'current-cat-parent';
             }
         }
         /**
          * Filter the list of CSS classes to include with each category in the list.
          *
          * @since 4.2.0
          * @see   wp_list_categories()
          *
          * @param array  $css_classes An array of CSS classes to be applied to each list item.
          * @param object $category    Category data object.
          * @param int    $depth       Depth of page, used for padding.
          * @param array  $args        An array of wp_list_categories() arguments.
          */
         $css_classes = implode(' ', apply_filters('category_css_class', $css_classes, $category, $depth, $args));
         $output .= ' class="' . $css_classes . '"';
         $output .= '>' . $link . '</div>' . "\n";
     } else {
         $output .= "\t" . $link . '</div><br />' . "\n";
     }
 }
 /**
  * Retrieve the list of categories on a given blog.
  *
  * @since 1.5.0
  *
  * @param array $args Method parameters.
  * @return array|IXR_Error
  */
 public function mw_getCategories($args)
 {
     $this->escape($args);
     $username = $args[1];
     $password = $args[2];
     if (!($user = $this->login($username, $password))) {
         return $this->error;
     }
     if (!current_user_can('edit_posts')) {
         return new IXR_Error(401, __('Sorry, you must be able to edit posts on this site in order to view categories.'));
     }
     /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
     do_action('xmlrpc_call', 'metaWeblog.getCategories');
     $categories_struct = array();
     if ($cats = get_categories(array('get' => 'all'))) {
         foreach ($cats as $cat) {
             $struct = array();
             $struct['categoryId'] = $cat->term_id;
             $struct['parentId'] = $cat->parent;
             $struct['description'] = $cat->name;
             $struct['categoryDescription'] = $cat->description;
             $struct['categoryName'] = $cat->name;
             $struct['htmlUrl'] = esc_html(get_category_link($cat->term_id));
             $struct['rssUrl'] = esc_html(get_category_feed_link($cat->term_id, 'rss2'));
             $categories_struct[] = $struct;
         }
     }
     return $categories_struct;
 }
예제 #4
0
/**
 * Display the links to the extra feeds such as category feeds.
 *
 * @since 2.8.0
 *
 * @param array $args Optional arguments.
 */
function feed_links_extra($args)
{
    $defaults = array('separator' => _x('&raquo;', 'feed link'), 'singletitle' => __('%1$s %2$s %3$s Comments Feed'), 'cattitle' => __('%1$s %2$s %3$s Category Feed'), 'tagtitle' => __('%1$s %2$s %3$s Tag Feed'), 'authortitle' => __('%1$s %2$s Posts by %3$s Feed'), 'searchtitle' => __('%1$s %2$s Search Results for &#8220;%3$s&#8221; Feed'));
    $args = wp_parse_args($args, $defaults);
    if (is_single() || is_page()) {
        $post =& get_post($id = 0);
        if (comments_open() || pings_open() || $post->comment_count > 0) {
            $title = esc_attr(sprintf($args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html(get_the_title())));
            $href = get_post_comments_feed_link($post->ID);
        }
    } elseif (is_category()) {
        $cat_id = intval(get_query_var('cat'));
        $title = esc_attr(sprintf($args['cattitle'], get_bloginfo('name'), $args['separator'], get_cat_name($cat_id)));
        $href = get_category_feed_link($cat_id);
    } elseif (is_tag()) {
        $tag_id = intval(get_query_var('tag_id'));
        $tag = get_tag($tag_id);
        $title = esc_attr(sprintf($args['tagtitle'], get_bloginfo('name'), $args['separator'], $tag->name));
        $href = get_tag_feed_link($tag_id);
    } elseif (is_author()) {
        $author_id = intval(get_query_var('author'));
        $title = esc_attr(sprintf($args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta('display_name', $author_id)));
        $href = get_author_feed_link($author_id);
    } elseif (is_search()) {
        $title = esc_attr(sprintf($args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query()));
        $href = get_search_feed_link();
    }
    if (isset($title) && isset($href)) {
        echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . $title . '" href="' . $href . '" />' . "\n";
    }
}
예제 #5
0
 function start_el(&$output, $category, $depth, $args)
 {
     extract($args);
     $cat_name = attribute_escape($category->name);
     $cat_name = apply_filters('list_cats', $cat_name, $category);
     $link = '<a href="' . get_category_link($category->term_id) . '" ';
     if ($use_desc_for_title == 0 || empty($category->description)) {
         $link .= 'title="' . sprintf(__('View all posts filed under %s'), $cat_name) . '"';
     } else {
         $link .= 'title="' . attribute_escape(apply_filters('category_description', $category->description, $category)) . '"';
     }
     $link .= '>';
     $link .= $cat_name . '</a>';
     if (!empty($feed_image) || !empty($feed)) {
         $link .= ' ';
         if (empty($feed_image)) {
             $link .= '(';
         }
         $link .= '<a href="' . get_category_feed_link($category->term_id, $feed_type) . '"';
         if (empty($feed)) {
             $alt = ' alt="' . sprintf(__('Feed for all posts filed under %s'), $cat_name) . '"';
         } else {
             $title = ' title="' . $feed . '"';
             $alt = ' alt="' . $feed . '"';
             $name = $feed;
             $link .= $title;
         }
         $link .= '>';
         if (empty($feed_image)) {
             $link .= $name;
         } else {
             $link .= "<img src='{$feed_image}'{$alt}{$title}" . ' />';
         }
         $link .= '</a>';
         if (empty($feed_image)) {
             $link .= ')';
         }
     }
     if (isset($show_count) && $show_count) {
         $link .= ' (' . intval($category->count) . ')';
     }
     if (isset($show_date) && $show_date) {
         $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
     }
     if (isset($current_category) && $current_category) {
         $_current_category = get_category($current_category);
     }
     if ('list' == $args['style']) {
         $output .= "\t<li";
         $class = 'cat-item cat-item-' . $category->term_id;
         if (isset($current_category) && $current_category && $category->term_id == $current_category) {
             $class .= ' current-cat';
         } elseif (isset($_current_category) && $_current_category && $category->term_id == $_current_category->parent) {
             $class .= ' current-cat-parent';
         }
         $output .= ' class="' . $class . '"';
         $output .= ">{$link}\n";
     } else {
         $output .= "\t{$link}<br />\n";
     }
 }
            echo esc_url(get_category_link($cat_name));
            ?>
" title="<?php 
            _e('More articles in this category', 'justwrite');
            ?>
"><?php 
            ac_icon('ellipsis-h');
            ?>
</a></li><?php 
        }
        ?>
            <?php 
        if ($srs) {
            ?>
<li><a href="<?php 
            echo esc_url(get_category_feed_link($cat_name, ''));
            ?>
" title="<?php 
            _e('RSS Feed', 'justwrite');
            ?>
"><?php 
            ac_icon('rss');
            ?>
</a></li><?php 
        }
        ?>
		</ul><?php 
    }
    ?>
	</header><!-- END .section-col-header -->
	
 /**
  * @see Walker::start_el()
  * @since 2.1.0
  *
  * @param string $output Passed by reference. Used to append additional content.
  * @param object $category Category data object.
  * @param int $depth Depth of category in reference to parents.
  * @param array $args
  */
 function start_el(&$output, $category, $depth, $args)
 {
     extract($args);
     $cat_name = esc_attr($category->name);
     $cat_name = apply_filters('list_cats', $cat_name, $category);
     $link = '<div class="avhec-widget-line"><a href="' . get_category_link($category->term_id) . '" ';
     if ($use_desc_for_title == 0 || empty($category->description)) {
         $link .= 'title="' . sprintf(__('View all posts filed under %s'), $cat_name) . '"';
     } else {
         $link .= 'title="' . esc_attr(strip_tags(apply_filters('category_description', $category->description, $category))) . '"';
     }
     $link .= '>';
     $link .= $cat_name . '</a>';
     if (!empty($feed_image) || !empty($feed)) {
         $link .= '<div class="avhec-widget-rss"> ';
         if (empty($feed_image)) {
             $link .= '(';
         }
         $link .= '<a href="' . get_category_feed_link($category->term_id, $feed_type) . '"';
         if (empty($feed)) {
             $alt = ' alt="' . sprintf(__('Feed for all posts filed under %s'), $cat_name) . '"';
         } else {
             $title = ' title="' . $feed . '"';
             $alt = ' alt="' . $feed . '"';
             $name = $feed;
             $link .= $title;
         }
         $link .= '>';
         if (empty($feed_image)) {
             $link .= $name;
         } else {
             $link .= '<img src="' . $feed_image . '"' . $alt . $title . ' />';
         }
         $link .= '</a>';
         if (empty($feed_image)) {
             $link .= ')';
         }
         $link .= '</div>';
     }
     if (isset($show_count) && $show_count) {
         $link .= '<div class="avhec-widget-count"> (' . intval($category->count) . ')</div>';
     }
     if (isset($show_date) && $show_date) {
         $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
     }
     if (isset($current_category) && $current_category) {
         $_current_category = get_category($current_category);
     }
     if ('list' == $args['style']) {
         $output .= "\t" . '<li';
         $class = 'cat-item cat-item-' . $category->term_id;
         if (isset($current_category) && $current_category && $category->term_id == $current_category) {
             $class .= ' current-cat';
         } elseif (isset($_current_category) && $_current_category && $category->term_id == $_current_category->parent) {
             $class .= ' current-cat-parent';
         }
         $output .= ' class="' . $class . '"';
         $output .= '>' . $link . '</div>' . "\n";
     } else {
         $output .= "\t" . $link . '</div><br />' . "\n";
     }
 }
function powerpress_admin_categoryfeeds()
{
    $General = powerpress_get_settings('powerpress_general');
    ?>
<h2><?php 
    echo __('Category Podcasting', 'powerpress');
    ?>
</h2>
<p>
	<?php 
    echo __('Category Podcasting adds custom podcast settings to specific blog category feeds, allowing you to organize episodes by topic.', 'powerpress');
    ?>
</p>
<p>
	<?php 
    echo sprintf(__('If you are looking to organize episodes by file or format, please use %s.', 'powerpress'), '<a href="' . admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php') . '" title="' . __('Custom Podcast Channels') . '">' . __('Custom Podcast Channels') . '</a>');
    ?>
</p><style type="text/css">
.column-url {
	width: 40%;
}
.column-name {
	width: 30%;
}
.column-feed-slug {
	width: 15%;
}
.column-episode-count {
	width: 15%;
}
.category-list {
	width: 100%;
}
</style>
<div id="col-container">

<div id="col-right">
<table class="widefat fixed" cellspacing="0">
	<thead>
	<tr>
<?php 
    print_column_headers('powerpressadmin_categoryfeeds');
    ?>
	</tr>
	</thead>

	<tfoot>
	<tr>
<?php 
    print_column_headers('powerpressadmin_categoryfeeds', false);
    ?>
	</tr>
	</tfoot>
	<tbody>
<?php 
    $Feeds = array();
    if (isset($General['custom_cat_feeds'])) {
        $Feeds = $General['custom_cat_feeds'];
    }
    $count = 0;
    while (list($null, $cat_ID) = each($Feeds)) {
        if (empty($cat_ID)) {
            continue;
        }
        $category = get_category_to_edit($cat_ID);
        if (is_wp_error($category)) {
            // $cat_ID does not existing
            continue;
        }
        //var_dump($category);
        $columns = powerpress_admin_customfeeds_columns();
        $hidden = array();
        if ($count % 2 == 0) {
            echo '<tr valign="middle" class="alternate">';
        } else {
            echo '<tr valign="middle">';
        }
        $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;action=powerpress-editcategoryfeed&amp;cat=') . $cat_ID;
        $feed_title = $category->name;
        $url = get_category_feed_link($cat_ID);
        $short_url = str_replace('http://', '', $url);
        $short_url = str_replace('www.', '', $short_url);
        if (strlen($short_url) > 35) {
            $short_url = substr($short_url, 0, 32) . '...';
        }
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"column-{$column_name}\"";
            //$short_url = '';
            switch ($column_name) {
                case 'feed-slug':
                    echo "<td {$class}>{$category->slug}";
                    echo "</td>";
                    break;
                case 'name':
                    echo '<td ' . $class . '><strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">' . esc_html($feed_title) . '</a></strong><br />';
                    $actions = array();
                    $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
                    $actions['remove'] = "<a class='submitdelete' href='" . admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;action=powerpress-delete-category-feed&amp;cat={$cat_ID}", 'powerpress-delete-category-feed-' . $cat_ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf(__("You are about to remove podcast settings for category feed '%s'\n  'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_html($feed_title))) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
                    $action_count = count($actions);
                    $i = 0;
                    echo '<div class="row-actions">';
                    foreach ($actions as $action => $linkaction) {
                        ++$i;
                        $i == $action_count ? $sep = '' : ($sep = ' | ');
                        echo '<span class="' . $action . '">' . $linkaction . $sep . '</span>';
                    }
                    echo '</div>';
                    echo '</td>';
                    break;
                case 'url':
                    echo "<td {$class}><a href='{$url}' title='" . esc_attr(sprintf(__('Visit %s', 'powerpress'), $feed_title)) . "' target=\"_blank\">{$short_url}</a>";
                    echo '<div class="row-actions">';
                    if (defined('POWERPRESS_FEEDVALIDATOR_URL')) {
                        echo '<span class="' . $action . '"><a href="' . POWERPRESS_FEEDVALIDATOR_URL . urlencode(str_replace('&amp;', '&', $url)) . '" target="_blank">' . __('Validate Feed', 'powerpress') . '</a></span>';
                    }
                    echo '</div>';
                    echo "</td>";
                    break;
                case 'episode-count':
                    echo "<td {$class}>{$episode_total}";
                    echo "</td>";
                    break;
                default:
                    break;
            }
        }
        echo "\n    </tr>\n";
        $count++;
    }
    ?>
	</tbody>
</table>
</div> <!-- col-right -->

<div id="col-left">
<div class="col-wrap">
<div class="form-wrap">
<h3><?php 
    echo __('Add Podcast Settings to existing Category Feed', 'powerpress');
    ?>
</h3>
<input type="hidden" name="action" value="powerpress-addcategoryfeed" />
<input type="hidden" name="taxonomy" value="category" />
<?php 
    //wp_original_referer_field(true, 'previous');
    wp_nonce_field('powerpress-add-taxonomy-feed');
    ?>

<div class="form-field form-required">
	<label for="feed_name"><?php 
    echo __('Category', 'powerpress');
    ?>
</label>
<?php 
    wp_dropdown_categories(array('class' => 'category-list', 'show_option_none' => __('Select Category', 'powerpress'), 'orderby' => 'name', 'hide_empty' => 0, 'hierarchical' => 1, 'name' => 'term', 'id' => 'term_id'));
    ?>
	
    
</div>

<p class="submit"><input type="submit" class="button" name="submit" value="<?php 
    echo __('Add Podcast Settings to Category Feed', 'powerpress');
    ?>
" /></p>

</div>
</div>

</div> <!-- col-left -->

</div> <!-- col-container -->

<h3><?php 
    echo __('Example Usage', 'powerpress');
    ?>
</h3>
<p>
	<?php 
    echo __('Example 1: You have a podcast that covers two topics that sometimes share same posts and sometimes do not. Use your main podcast feed as a combined feed of both topics 	and use category feeds to distribute topic specific episodes.', 'powerpress');
    ?>
</p>
<p>
	<?php 
    echo __('Example 2: You want to use categories to keep episodes separate from each other. Each category can be used to distribute separate podcasts with the main podcast feed combining all categories to provide a network feed.', 'powerpress');
    ?>
</p>

<?php 
}
 function start_el(&$output, $category, $depth = 0, $args = array(), $current_object_id = 0)
 {
     extract($args);
     $cat_name = esc_attr($category->name);
     $cat_name = apply_filters('list_cats', $cat_name, $category);
     $link = '<a href="#" data-value="' . strtolower(preg_replace('/\\s+/', '-', $cat_name)) . '" ';
     if ($use_desc_for_title == 0 || empty($category->description)) {
         $link .= 'title="' . sprintf(__('View all posts filed under %s', 'wpzoom'), $cat_name) . '"';
     } else {
         $link .= 'title="' . esc_attr(strip_tags(apply_filters('category_description', $category->description, $category))) . '"';
     }
     $link .= '>';
     // $link .= $cat_name . '</a>';
     $link .= $cat_name;
     if (!empty($category->description)) {
         $link .= ' <span>' . $category->description . '</span>';
     }
     $link .= '</a>';
     if (!empty($feed_image) || !empty($feed)) {
         $link .= ' ';
         if (empty($feed_image)) {
             $link .= '(';
         }
         $link .= '<a href="' . get_category_feed_link($category->term_id, $feed_type) . '"';
         if (empty($feed)) {
             $alt = ' alt="' . sprintf(__('Feed for all posts filed under %s', 'wpzoom'), $cat_name) . '"';
         } else {
             $title = ' title="' . $feed . '"';
             $alt = ' alt="' . $feed . '"';
             $name = $feed;
             $link .= $title;
         }
         $link .= '>';
         if (empty($feed_image)) {
             $link .= $name;
         } else {
             $link .= "<img src='{$feed_image}'{$alt}{$title}" . ' />';
         }
         $link .= '</a>';
         if (empty($feed_image)) {
             $link .= ')';
         }
     }
     if (isset($show_count) && $show_count) {
         $link .= ' (' . intval($category->count) . ')';
     }
     if (isset($show_date) && $show_date) {
         $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
     }
     if (isset($current_category) && $current_category) {
         $_current_category = get_category($current_category);
     }
     if ('list' == $args['style']) {
         $output .= '<li class="segment-' . rand(2, 99) . '"';
         $class = 'cat-item cat-item-' . $category->term_id;
         if (isset($current_category) && $current_category && $category->term_id == $current_category) {
             $class .= ' current-cat';
         } elseif (isset($_current_category) && $_current_category && $category->term_id == $_current_category->parent) {
             $class .= ' current-cat-parent';
         }
         $output .= '';
         $output .= ">{$link}\n";
     } else {
         $output .= "\t{$link}<br />\n";
     }
 }
			<p class="more"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title_attribute();
                ?>
"><?php 
                _e('Read Full Story', 'wpzoom');
                ?>
 &raquo;</a></p>
			
		</div><!-- end .post -->

		<div class="sep">&nbsp;</div>
		<p class="header"><a href="<?php 
                echo get_category_feed_link(option::get($activecat), $feed);
                ?>
"><img src="<?php 
                bloginfo('template_url');
                ?>
/images/icon_rss.png" width="16" height="16" alt="" /></a>
		<a href="<?php 
                echo "{$catlink}";
                ?>
"><?php 
                _e('More in', 'wpzoom');
                ?>
 <?php 
                echo "{$cat->name}";
                ?>
</a></p>
 function edit_category_form($input)
 {
     global $wp_version, $action;
     //~ echo "\n<pre>\n";
     //~ var_dump('in function edit_category_form');
     //~ var_dump($input);
     //~ var_dump($input->taxonomy);
     //~ var_dump($action);
     //~ var_dump($_GET['action']);
     //~ var_dump($wp_version);
     //~ echo "\n</pre>\n";
     if ('edit' == $_GET['action'] and TRUE == version_compare($wp_version, '2.7', '>=') or 'editedcat' == $action) {
         // show the following form only when an existing category is going to be edited.
         if (FALSE === isset($input->taxonomy) or TRUE === empty($input->taxonomy) or 'post_tag' !== $input->taxonomy and 'category' !== $input->taxonomy) {
             $taxonomy = 'misc';
             $taxonomy_str = __('Taxonomy', 'podpress');
         } else {
             $taxonomy = $input->taxonomy;
             switch ($taxonomy) {
                 case 'post_tag':
                     $taxonomy_str = __('Tag', 'podpress');
                     break;
                 case 'category':
                     $taxonomy_str = __('Category', 'podpress');
                     break;
             }
         }
         //~ printphpnotices_var_dump('print edit_'.$taxonomy.'_form');
         //~ printphpnotices_var_dump($input);
         $data = podPress_get_option('podPress_' . $taxonomy . '_' . $input->term_id);
         $blog_charset = get_bloginfo('charset');
         if (empty($data['podcastFeedURL'])) {
             if (TRUE == version_compare($wp_version, '2.9.3', '>')) {
                 // since WP 3.0 the cat_ID isreplaced by tag_ID
                 $data['podcastFeedURL'] = get_term_feed_link($input->term_id, $taxonomy);
             } elseif (TRUE == version_compare($wp_version, '2.9.3', '<=') and TRUE == version_compare($wp_version, '2.4', '>')) {
                 switch ($taxonomy) {
                     default:
                     case 'post_tag':
                         $data['podcastFeedURL'] = get_tag_feed_link($input->term_id);
                         break;
                     case 'category':
                         $data['podcastFeedURL'] = get_category_feed_link($input->term_id);
                         break;
                 }
             } else {
                 $data['podcastFeedURL'] = site_url() . '/?feed=rss2&cat=' . $input->term_id;
             }
         } else {
             $url_parts = parse_url($data['podcastFeedURL']);
             if (isset($url_parts['query'])) {
                 $output = '';
                 parse_str($url_parts['query'], $output);
                 if (TRUE === isset($output['cat']) and FALSE !== empty($output['cat'])) {
                     if (TRUE == version_compare($wp_version, '2.9.3', '>')) {
                         // since WP 3.0 the cat_ID isreplaced by tag_ID
                         $data['podcastFeedURL'] = get_term_feed_link($input->term_id, $taxonomy);
                     } elseif (TRUE == version_compare($wp_version, '2.9.3', '<=') and TRUE == version_compare($wp_version, '2.4', '>')) {
                         switch ($taxonomy) {
                             default:
                             case 'post_tag':
                                 $data['podcastFeedURL'] = get_tag_feed_link($input->term_id);
                                 break;
                             case 'category':
                                 $data['podcastFeedURL'] = get_category_feed_link($input->term_id);
                                 break;
                         }
                     } else {
                         $data['podcastFeedURL'] = site_url() . '/?feed=rss2&cat=' . $input->term_id;
                     }
                 }
             }
         }
         // some ids of category input fields have changed with WP 3.0
         $wp_version_parts = explode('.', $wp_version);
         if (is_array($wp_version_parts)) {
             $main_wp_version = $wp_version_parts[0];
         } else {
             $main_wp_version = 0;
         }
         echo '<div class="wrap">' . "\n";
         if (TRUE == version_compare($wp_version, '2.7', '>=')) {
             echo '<div id="podpress-icon" class="icon32"><br /></div>';
         }
         echo '	<h2>' . sprintf(__('podPress %1$s Casting', 'podpress'), $taxonomy_str) . '</h2>' . "\n";
         echo '	<label for="categoryCasting"><strong>' . sprintf(__('Enable %1$s Casting', 'podpress'), $taxonomy_str) . '</strong></label>  <a href="javascript:void(null);" onclick="javascript: podPressShowHideDiv(\'categoryCastingHelp\');">(?)</a>:';
         echo '	<input type="checkbox" name="categoryCasting" id="categoryCasting" ';
         if ($data['categoryCasting'] == 'true') {
             echo 'checked="checked"';
         }
         echo ' onclick="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');"/>' . "\n";
         echo '	<div id="categoryCastingHelp" style="display: none;">' . "\n";
         echo '		' . __('This feature is for cases in which you want to host more than one podcast in one blog or if you want to have different podcast feeds with different media files of certain file types per feed (e.g a feed which contains only .mp3 files).<br />Basically this feature gives you the opportunity to modify some of the feed elements and set them to other then as the general value from the Feed/iTunes Settings of podPress.<br/>For instance: If you organize your audio episodes in one category and the video episodes in a different category then you can modify the feed content describing values like the title or the description in the form below. This your category feeds will be more distinguishable from another.', 'podpress') . '<br />' . "\n";
         echo '	</div>' . "\n";
         echo '  <div class="wrap" id="iTunesSpecificSettings" style="display: none; border: 0;">' . "\n";
         podPress_DirectoriesPreview('edit_category_form');
         echo '		<fieldset class="options">' . "\n";
         echo '		<legend>' . sprintf(__('%1$s Feed Options', 'podpress'), $taxonomy_str) . '</legend>' . "\n";
         echo '		<h3>' . __('iTunes Settings', 'podpress') . '</h3>' . "\n";
         echo '		<table class="podpress_feed_gensettings">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesSubtitleChoice">' . __('iTunes:Subtitle', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesSubtitleChoice" name="iTunesSubtitleChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['iTunesSubtitleChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . '</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['iTunesSubtitleChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="iTunesSubtitleWrapper" style="display: none;">' . "\n";
         echo '						<textarea name="iTunesSubtitle" class="podpress_wide_text_field" rows="2" cols="40">' . stripslashes($data['iTunesSubtitle']) . '</textarea>' . "\n";
         echo '					</div>' . "\n";
         echo '					<div id="iTunesSubtitleHelp">' . "\n";
         echo '						' . __('A few words which describe the feed title a little bit more (max. 255 characters).', 'podpress') . ' ' . __('By default this is taken from the default iTunes:subtitle.', 'podpress') . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesSummaryChoice">' . __('iTunes:Summary', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesSummaryChoice" name="iTunesSummaryChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['iTunesSummaryChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . '</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['iTunesSummaryChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<input type="hidden" id="global_iTunesSummary" value="' . attribute_escape(stripslashes($this->settings['iTunes']['summary'])) . '" />' . "\n";
         echo '					<div id="iTunesSummaryWrapper" style="display: none;">' . "\n";
         echo '						<textarea name="iTunesSummary" id="iTunesSummary" class="podpress_wide_text_field" rows="6" cols="40" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . stripslashes($data['iTunesSummary']) . '</textarea>' . "\n";
         echo '					</div>' . "\n";
         echo '					<div id="iTunesSummaryHelp">' . "\n";
         echo '						' . __('The description of the podcast.', 'podpress') . ' ' . __('By default this is taken from the default iTunes:Summary or the default description.', 'podpress') . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesImageChoice">' . __('iTunes:Image', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					' . __('The iTunes image should be a square image with <a href="http://www.apple.com/itunes/podcasts/specs.html#image" target="_blank">at least 1400 x 1400 pixels</a> as Apple writes in "<a href="http://www.apple.com/itunes/podcasts/specs.html" target="_blank">Making a Podcast</a>" of their own Podcasting Resources. iTunes supports JPEG and PNG images (the file name extensions should ".jpg" or ".png").', 'podpress') . "\n";
         echo '					<br/>';
         echo '					<select id="iTunesImageChoice" name="iTunesImageChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['iTunesImageChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . '</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['iTunesImageChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="iTunesImageWrapper" style="display: none;">' . "\n";
         echo '						<br/>';
         echo '						<input id="iTunesImage" type="text" name="iTunesImage" value="' . $data['iTunesImage'] . '" class="podpress_wide_text_field" size="40" onchange="podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');"/>' . "\n";
         echo '						<input id="global_iTunesImage" type="hidden" value="' . $this->settings['iTunes']['image'] . '"/>' . "\n";
         echo '					</div>' . "\n";
         echo '					<br/>';
         echo '					<img id="itunes_image_display" style="width:300px; height:300px;" alt="' . __('Podcast Image - Big (If you can not see an image then the URL is wrong.)', 'podpress') . '" src="" /><br />' . "\n";
         echo '					<em>' . __('(This image is only a preview which is limited to 300 x 300 pixels.) ', 'podpress') . '</em>';
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesAuthorChoice">' . __('iTunes:Author/Owner', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesAuthorChoice" name="iTunesAuthorChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['iTunesAuthorChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . podPress_stringLimiter(ucfirst(stripslashes($this->settings['iTunes']['author'])), 40) . ')</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['iTunesAuthorChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="iTunesAuthorWrapper" style="display: none;">' . "\n";
         echo '						<input type="text" name="iTunesAuthor" class="podpress_wide_text_field" size="40" id="iTunesAuthor" value="' . attribute_escape(stripslashes($data['iTunesAuthor'])) . '" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');"/>';
         echo '						<input type="hidden" id="global_iTunesAuthor" value="' . attribute_escape(stripslashes($this->settings['iTunes']['author'])) . '" />' . "\n";
         echo '					</div>' . "\n";
         echo '					<div id="iTunesAuthorHelp">' . "\n";
         echo '						' . __('Used if this Author is different than the feeds author.', 'podpress') . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			<tr>' . "\n";
         echo '			</tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesAuthorEmailChoice">' . __('Owner E-mail address', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesAuthorEmailChoice" name="iTunesAuthorEmailChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['iTunesAuthorEmailChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . podPress_stringLimiter(ucfirst(stripslashes(get_option('admin_email'))), 40) . ')</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['iTunesAuthorEmailChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="iTunesAuthorEmailWrapper" style="display: none;">' . "\n";
         echo '						<input type="text" name="iTunesAuthorEmail" class="podpress_wide_text_field" size="40" id="iTunesAuthorEmail" value="' . attribute_escape(stripslashes($data['iTunesAuthorEmail'])) . '" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');"/>';
         echo '						<input type="hidden" id="global_iTunesAuthorEmail" value="' . attribute_escape(stripslashes(get_option('admin_email'))) . '" />' . "\n";
         echo '					</div>' . "\n";
         echo '					<div id="iTunesAuthorEmailHelp">' . "\n";
         echo '						' . __('Used if the owner of this category is different than the feeds owner.', 'podpress') . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesKeywordsChoice">' . __('iTunes:Keywords', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesKeywordsChoice" name="iTunesKeywordsChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['iTunesKeywordsChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . podPress_stringLimiter(stripslashes($this->settings['iTunes']['keywords']), 40) . ')</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['iTunesKeywordsChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="iTunesKeywordsWrapper">' . "\n";
         echo '						' . __('a list of max. 12 comma separated words', 'podpress') . '<br/><textarea name="iTunesKeywords" rows="4" cols="40">' . stripslashes($data['iTunesKeywords']) . '</textarea>' . "\n";
         echo '					</div>' . "\n";
         echo '					<div id="iTunesKeywordsHelp">' . "\n";
         echo '						' . __('Not visible in iTunes, but used for searches.', 'podpress') . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr> ' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesCategory_0">' . __('iTunes:Categories', 'podpress') . '</label>';
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesCategory_0" name="iTunesCategory[0]" onchange="podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<optgroup label="' . __('Select Primary', 'podpress') . '">' . "\n";
         if ('' == trim($this->settings['iTunes']['category'][0])) {
             $current_global = '[ ' . __('nothing', 'podpress') . ' ]';
         } else {
             $current_global = $this->settings['iTunes']['category'][0];
         }
         echo '						<option value="##Global##" ';
         if ($data['iTunesCategory'][0] == '##Global##' || empty($data['iTunesCategory'][0])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . $current_global . ')</option>' . "\n";
         if (empty($data['iTunesCategory'][0])) {
             podPress_itunesCategoryOptions('##Global##');
         } else {
             podPress_itunesCategoryOptions(stripslashes($data['iTunesCategory'][0]));
         }
         echo '						</optgroup>' . "\n";
         echo '					</select><br/>' . "\n";
         echo '					<input type="hidden" id="global_iTunesCategory" value="' . attribute_escape($this->settings['iTunes']['category'][0]) . '" />' . "\n";
         echo '					<select name="iTunesCategory[1]">' . "\n";
         echo '						<optgroup label="' . __('Select Second', 'podpress') . '">' . "\n";
         if ('' == trim($this->settings['iTunes']['category'][1])) {
             $current_global = '[ ' . __('nothing', 'podpress') . ' ]';
         } else {
             $current_global = $this->settings['iTunes']['category'][1];
         }
         echo '						<option value="##Global##" ';
         if ($data['iTunesCategory'][1] == '##Global##' || empty($data['iTunesCategory'][1])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . $current_global . ')</option>' . "\n";
         if (empty($data['iTunesCategory'][1])) {
             podPress_itunesCategoryOptions('##Global##');
         } else {
             podPress_itunesCategoryOptions(stripslashes($data['iTunesCategory'][1]));
         }
         echo '						</optgroup>' . "\n";
         echo '					</select><br/>' . "\n";
         echo '					<select name="iTunesCategory[2]">' . "\n";
         echo '						<optgroup label="' . __('Select Third', 'podpress') . '">' . "\n";
         if ('' == trim($this->settings['iTunes']['category'][2])) {
             $current_global = '[ ' . __('nothing', 'podpress') . ' ]';
         } else {
             $current_global = $this->settings['iTunes']['category'][2];
         }
         echo '						<option value="##Global##" ';
         if ($data['iTunesCategory'][2] == '##Global##' || empty($data['iTunesCategory'][2])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . $current_global . ')</option>' . "\n";
         if (empty($data['iTunesCategory'][2])) {
             podPress_itunesCategoryOptions('##Global##');
         } else {
             podPress_itunesCategoryOptions(stripslashes($data['iTunesCategory'][2]));
         }
         echo '						</optgroup>' . "\n";
         echo '					</select>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesExplicit">' . __('iTunes:Explicit', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesExplicit" name="iTunesExplicit" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="##Global##" ';
         if ($data['iTunesExplicit'] == '##Global##' || empty($data['iTunesExplicit'])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . $this->settings['iTunes']['explicit'] . ')</option>' . "\n";
         echo '						<option value="No" ';
         if ($data['iTunesExplicit'] == 'No') {
             echo 'selected="selected"';
         }
         echo '>' . __('No', 'podpress') . '</option>' . "\n";
         echo '						<option value="Yes" ';
         if ($data['iTunesExplicit'] == 'Yes') {
             echo 'selected="selected"';
         }
         echo '>' . __('Yes', 'podpress') . '</option>' . "\n";
         echo '						<option value="Clean" ';
         if ($data['iTunesExplicit'] == 'Clean') {
             echo 'selected="selected"';
         }
         echo '>' . __('Clean', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="iTunesExplicitHelp">' . "\n";
         echo '					' . __('Setting to indicate (in iTunes) whether or not your podcast contains explicit language or adult content', 'podpress') . "\n";
         echo '					<br/>' . __('"No" (default) - no indicator will show up', 'podpress') . "\n";
         echo '					<br/>' . __('"Yes" - an "EXPLICIT" parental advisory graphic will appear next to your podcast artwork or name in iTunes', 'podpress') . "\n";
         echo '					<br/>' . __('"Clean" - means that you are sure that no explicit language or adult content is included any of the episodes, and a "CLEAN" graphic will appear', 'podpress') . "\n";
         echo '					<p>' . __('You have also the possibility to adjust this option for each post or page with at least one podcast episode (in the post/page editor).', 'podpress') . '</p>' . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesBlock">' . __('iTunes:Block', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="iTunesBlock" name="iTunesBlock" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="##Global##" ';
         if ($data['iTunesBlock'] != '##Global##' || empty($data['itunesBlock'])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . $this->settings['iTunes']['block'] . ')</option>' . "\n";
         echo '						<option value="No" ';
         if ($data['iTunesBlock'] == 'No') {
             echo 'selected="selected"';
         }
         echo '>' . __('No', 'podpress') . '</option>' . "\n";
         echo '						<option value="Yes" ';
         if ($data['iTunesBlock'] == 'Yes') {
             echo 'selected="selected"';
         }
         echo '>' . __('Yes', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="itunesBlockHelp">' . "\n";
         echo '					' . __('Use this if you are no longer creating a podcast and you want it removed from the iTunes Store.', 'podpress') . "\n";
         echo '					<br/>' . __('"No" (default) - the podcast appears in the iTunes Podcast directory', 'podpress') . "\n";
         echo '					<br/>' . __('"Yes" - prevent the entire podcast from appearing in the iTunes Podcast directory', 'podpress') . "\n";
         echo '					<p>' . __('You can also use such an option for each of your podcast episodes (in the post/page editor).', 'podpress') . '</p>' . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr> ' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesFeedID">' . __('iTunes:FeedID', 'podpress') . '</label>';
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<input name="iTunesFeedID" id="iTunesFeedID" type="text" value="' . attribute_escape($data['iTunesFeedID']) . '" size="10" /> ' . __('(Only relevant for the podPress Feed Buttons widget)', 'podpress');
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr> ' . "\n";
         echo '				<th>';
         echo '					<label for="iTunesNewFeedURL">' . __('iTunes:New-Feed-Url', 'podpress') . '</label>';
         echo '				</th>';
         echo '				<td>';
         echo '					<select name="iTunesNewFeedURL" id="iTunesNewFeedURL">' . "\n";
         echo '						<option value="##Global##" ';
         if ($data['iTunesNewFeedURL'] == '##Global##' || empty($data['iTunesNewFeedURL'])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . '</option>' . "\n";
         echo '						<option value="Disable" ';
         if ($data['iTunesNewFeedURL'] == 'Disable') {
             echo 'selected="selected"';
         }
         echo '>' . __('Disable', 'podpress') . '</option>' . "\n";
         echo '						<option value="Enable" ';
         if ($data['iTunesNewFeedURL'] == 'Enable') {
             echo 'selected="selected"';
         }
         echo '>' . __('Enable', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '				</td>';
         echo '				<td>';
         echo '					' . __('If you want to change the URL of your podcast feed which you have used in the iTunes Store then change the "Podcast Feed URL" and set this option to "Enable" until the iTunes Store recognizes the new URL. This may take several days. "Enable" will add the <code>&lt;itunes:new-feed-url&gt;</code> tag to the RSS feeds and set the "Podcast Feed URL" as the new URL. For further information about "<a href="http://www.apple.com/itunes/podcasts/specs.html#changing" title="iTunes Podcasting Resources: Changing Your Feed URL" target="_blank">Changing Your Feed URL</a>" read on in the <a href="http://www.apple.com/itunes/podcasts/specs.html" target="_blank" title="iTunes Podcasting Resources: Making a Podcast">iTunes Podcasting Resources</a>.', 'podpress') . "\n";
         echo '					<p><label for="podcastFeedURL"><strong>' . __('the new Feed URL', 'podpress') . '</strong></label>';
         echo '					<br/>';
         echo '					<input type="text" id="podcastFeedURL" name="podcastFeedURL" class="podpress_wide_text_field" size="40" value="' . attribute_escape($data['podcastFeedURL']) . '" /><br />' . __('The URL of your Podcast Feed. If you want to register your podcast at the iTunes Store or if your podcast is already listed there then this input field should contain the same URL as in the iTunes Store settings. If you want change the URL at the iTunes Store then please read first the help text of the iTunes:New-Feed-Url option.', 'podpress');
         echo '					<br /><input type="button" value="' . __('Validate your Feed', 'podpress') . '" onclick="javascript: if(document.getElementById(\'podcastFeedURL\').value != \'\') { window.open(\'http://www.feedvalidator.org/check.cgi?url=\'+document.getElementById(\'podcastFeedURL\').value); }"/>' . "\n";
         echo '				</p></td>' . "\n";
         echo '			</tr>' . "\n";
         echo '		</table>' . "\n";
         echo '		<h3>' . __('General Feed Settings', 'podpress') . '</h3>' . "\n";
         echo '		<table class="podpress_feed_gensettings">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="blognameChoice">' . __('Podcast title / Feed title', 'podpress') . '</label>';
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="blognameChoice" name="blognameChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Append" ';
         if ($data['blognameChoice'] == 'Append' || empty($data['blognameChoice'])) {
             echo 'selected="selected"';
         }
         echo '>' . sprintf(__('Use the Site Title and append the name of the %1$s', 'podpress'), $taxonomy_str) . '</option>' . "\n";
         echo '						<option value="Global" ';
         if ($data['blognameChoice'] == 'Global') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use the Site Title', 'podpress') . '</option>' . "\n";
         echo '						<option value="CategoryName" ';
         if ($data['blognameChoice'] == 'CategoryName') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use the name of the category', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<input type="hidden" id="global_blogname" value="' . attribute_escape(stripslashes(get_option('blogname'))) . '" /></td>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="blogdescriptionChoice">' . __('Description (Tagline)', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="blogdescriptionChoice" name="blogdescriptionChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['blogdescriptionChoice'] != 'CategoryDescription') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . '</option>' . "\n";
         echo '						<option value="CategoryDescription" ';
         if ($data['blogdescriptionChoice'] == 'CategoryDescription') {
             echo 'selected="selected"';
         }
         echo '>' . sprintf(__('Use %1$s Description', 'podpress'), $taxonomy_str) . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<input type="hidden" id="global_blogdescription" value="' . attribute_escape(stripslashes(get_option('blogdescription'))) . '" />' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="rss_imageChoice">' . __('Blog/RSS Image (144 x 144 pixels)', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="rss_imageChoice" name="rss_imageChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['rss_imageChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . '</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['rss_imageChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="rss_imageWrapper" style="display: none;">' . "\n";
         echo '						<br/>';
         echo '						<input id="rss_image" type="text" name="rss_image" value="' . $data['rss_image'] . '" class="podpress_wide_text_field" size="40" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');"/>' . "\n";
         echo '						<input id="global_rss_image" type="hidden" value="' . get_option('rss_image') . '"/>' . "\n";
         echo '					</div>' . "\n";
         echo '					<br/>';
         echo '					<img id="rss_image_Display" style="width:144px; height:144px;" alt="' . __('Podcast Image - Small (If you can not see an image then the URL is wrong.)', 'podpress') . '" src="" />' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '					<label for="rss_language">' . __('Language', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         $langs = podPress_itunesLanguageArray();
         echo '					<select id="rss_language" name="rss_language" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<optgroup label="' . __('Select Language', 'podpress') . '">' . "\n";
         echo '						<option value="##Global##" ';
         if ($data['rss_language'] == '##Global##' || empty($data['rss_language'])) {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' - ' . $langs[get_option('rss_language')] . ' [' . get_option('rss_language') . ']</option>' . "\n";
         podPress_itunesLanguageOptions($data['rss_language']);
         echo '						</optgroup>' . "\n";
         echo '					</select>' . "\n";
         echo '					<input type="hidden" id="global_rss_language" value="' . $langs[get_option('rss_language')] . '[' . attribute_escape(get_option('rss_language')) . ']" /></td>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '		</table>' . "\n";
         echo '		<h3>' . __('Further Feed Settings', 'podpress') . '</h3>' . "\n";
         echo '		<table class="podpress_feed_gensettings">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>' . "\n";
         echo '					<label for="rss_copyrightChoice">' . __('Feed Copyright / license name', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="rss_copyrightChoice" name="rss_copyrightChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['rss_copyrightChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . podPress_stringLimiter(ucfirst(stripslashes($this->settings['rss_copyright'])), 40) . ')</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['rss_copyrightChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="rss_copyrightWrapper" style="display: none;">' . "\n";
         echo '						<input type="text" name="rss_copyright" class="podpress_wide_text_field" size="40" id="rss_copyright" value="' . attribute_escape(stripslashes($data['rss_copyright'])) . '" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');"/>';
         echo '					</div>' . "\n";
         echo '					<input type="hidden" id="global_rss_copyright" value="' . attribute_escape(stripslashes($this->settings['rss_copyright'])) . '" />' . "\n";
         echo '					<div id="rss_copyrightHelp">' . "\n";
         echo '						' . __('Enter the copyright string or license name. For example: Copyright &#169 by Jon Doe, 2009 OR <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" target="_blank">CreativeCommons Attribution-Noncommercial-Share Alike 2.5</a>', 'podpress') . "\n";
         echo '						<p>' . "\n";
         echo '						' . __('Used if this copyright phrase should be different than the global copyright phrase.', 'podpress') . "\n";
         echo '						</p>' . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>' . "\n";
         echo '					<label for="rss_license_urlChoice">' . __('URL to the full Copyright / license text', 'podpress') . '</label>' . "\n";
         echo '				</th>';
         echo '				<td colspan="2">';
         echo '					<select id="rss_license_urlChoice" name="rss_license_urlChoice" onchange="javascript: podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\');">' . "\n";
         echo '						<option value="Global" ';
         if ($data['rss_license_urlChoice'] != 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Use Global', 'podpress') . ' (' . podPress_stringLimiter(ucfirst(stripslashes($this->settings['rss_license_url'])), 40) . ')</option>' . "\n";
         echo '						<option value="Custom" ';
         if ($data['rss_license_urlChoice'] == 'Custom') {
             echo 'selected="selected"';
         }
         echo '>' . __('Insert custom value', 'podpress') . '</option>' . "\n";
         echo '					</select>' . "\n";
         echo '					<div id="rss_license_urlWrapper" style="display: none;">' . "\n";
         echo '						<input name="rss_license_url" type="text" id="rss_license_url" class="podpress_wide_text_field" value="' . attribute_escape($data['rss_license_url']) . '" size="65%" />' . "\n";
         echo '					</div>' . "\n";
         echo '					<input type="hidden" id="global_rss_license_url" value="' . attribute_escape($this->settings['rss_license_url']) . '" />' . "\n";
         echo '					<div id="rss_license_urlHelp">' . "\n";
         echo '						' . __('If you use a special license like a <a href="http://creativecommons.org/licenses" target="_blank" title="Creative Commons">Creative Commons</a> License for your news feeds then enter the complete URL (e.g. <a href="http://creativecommons.org/licenses/by-nc-sa/2.5/" target="_blank">http://creativecommons.org/licenses/by-nc-sa/2.5/</a>) to the full text of this particular license here.', 'podpress') . "\n";
         echo '						<p>' . __('Used if this license URL should be different than the global license URL.', 'podpress') . '</p>' . "\n";
         echo '					</div>' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         $filetypes = podPress_filetypes();
         $selected_types = $data['FileTypes'];
         if (FALSE === is_array($data['FileTypes'])) {
             $selected_types = array();
         }
         echo '				<th>';
         echo '				' . __('inlude only files of this(these) type(s)', 'podpress');
         echo '				</th>' . "\n";
         echo '				<td>';
         echo '					<select id="filenameextensionfilter" name="FileTypes[]" size="5" multiple="multiple" style="height:15em;">' . "\n";
         echo '					<optgroup label="' . attribute_escape(__('Select file types', 'podpress')) . '">' . "\n";
         foreach ($filetypes as $key => $value) {
             if (TRUE == in_array($key, $selected_types)) {
                 $selected = ' selected="selected"';
             } else {
                 $selected = '';
             }
             if ($key !== 'audio_mp4') {
                 echo '						<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
             }
         }
         echo '					</optgroup>' . "\n";
         echo '					</select>' . "\n";
         echo '				</td>' . "\n";
         echo '				<td>';
         echo '					' . __('You can select one or more media file types and limit by this choice the number of posts which will appear in the this Feed. For instance: if you select MP4 Video then this Feed will only contain posts (of this category) with MP4 files. If a post has also files of other types then only the files of the selected type will be attached in this feed. (This filter bypasses the "Included in:" selection.)', 'podpress') . '</p><p>' . __('Hold the key [SHIFT] or [CTRL] and use the left mouse button to select more than one value.<br />Hold [CTRL] and use the left mouse button to deselect values.', 'podpress');
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th>';
         echo '				<label for="show_only_podPress_podcasts">' . __('Include only posts with podPress attachments in this Feed', 'podpress') . '</label>' . "\n";
         echo '				</th>' . "\n";
         echo '				<td>';
         if (TRUE == isset($data['show_only_podPress_podcasts']) and FALSE === $data['show_only_podPress_podcasts']) {
             echo '					<input type="checkbox" name="show_only_podPress_podcasts" id="show_only_podPress_podcasts" value="yes" />' . "\n";
         } else {
             echo '					<input type="checkbox" name="show_only_podPress_podcasts" id="show_only_podPress_podcasts" value="yes" checked="checked" />' . "\n";
         }
         echo '				</td>' . "\n";
         echo '				<td>';
         echo '					' . __('works only while the File Type Filter is not in use', 'podpress');
         echo '				</td>' . "\n";
         echo '			</tr>' . "\n";
         echo '		</table>' . "\n";
         echo '		</fieldset>' . "\n";
         echo '	</div>' . "\n";
         echo '<script type="text/javascript">podPress_updateCategoryCasting(' . $main_wp_version . ', \'' . $taxonomy . '\'); </script>';
         echo '</div>' . "\n";
     }
 }
예제 #12
0
<?php

/**
 * Dieses Template wird für das Heftarchiv verwendet. 
 * Auf ihm basieren neben dem Bauchpressearchiv auch die Templates für die einzelnen Comicserien und teilweise die Redaktionsseite.
 */
get_header();
?>

<div class="box">
<?php 
if (have_posts()) {
    ?>
	<h1 class="page_title">Heftarchiv 
		<?php 
    echo '<a href="' . get_category_feed_link(get_query_var('cat')) . '"><img src="' . get_bloginfo('template_directory') . '/images/rss.png" alt=""/></a>';
    ?>
	</h1>
	<?php 
    //Anzeige einer Jahresübersicht
    $posts = $wp_query->posts;
    foreach ($posts as $p) {
        $dates[] = get_the_time('Y', $p->ID);
    }
    $dates = array_unique($dates);
    asort($dates);
    echo '<p class="interaction_box">';
    echo 'Das StudentenPACK';
    echo '<br>';
    foreach ($dates as $d) {
        echo ' &middot; <a href="#' . $d . '">' . $d . '</a>';
예제 #13
0
    
    <div id="content">
    
    	<div class="col-full">
    	
    		<?php 
woo_main_before();
?>
    		
    		<?php 
if (is_category()) {
    ?>
        		<header class="archive-header">
        			<span class="heading archive-rss"><?php 
    $cat_id = get_cat_ID(single_cat_title('', false));
    echo '<a href="' . get_category_feed_link($cat_id, '') . '">' . __('Subscribe', 'woothemes') . '</a>';
    ?>
</span>
        			<h1><?php 
    _e('Archive', 'woothemes');
    ?>
 | <?php 
    single_cat_title('', true);
    ?>
</h1> 
        		</header>        
        	
        	    <?php 
} elseif (is_day()) {
    ?>
        	    <header class="archive-header">
예제 #14
0
    ?>

		<header>
			<?php 
    if (is_category()) {
        ?>
			<h1 class="archive-header"><span class="cat"><?php 
        _e('Category Archives', 'nicethemes');
        ?>
 : <?php 
        echo single_cat_title();
        ?>
</span> <span class="fr rss"><?php 
        $cat_obj = $wp_query->get_queried_object();
        $cat_id = $cat_obj->cat_ID;
        echo '<a href="' . get_category_feed_link($cat_id, '') . '">';
        _e("RSS feed for this section", "nicethemes");
        echo '</a>';
        ?>
</span></h1>
			<?php 
    } elseif (is_day()) {
        ?>
			<h1 class="archive-header"><?php 
        _e('Daily Archives', 'nicethemes');
        ?>
: <?php 
        the_time(get_option('date_format'));
        ?>
</h1>
예제 #15
0
		<header>
			<?php 
    if (is_category()) {
        ?>
        	<h1 class="archive-header"><span class="cat"><?php 
        _e('Category Archives', 'nicethemes');
        ?>
 : <?php 
        echo single_cat_title();
        ?>
</span> <span class="fr rss"><?php 
        $cat_obj = $wp_query->get_queried_object();
        $cat_id = $cat_obj->cat_ID;
        echo '<a href="';
        get_category_feed_link(true, $cat, '');
        echo '">';
        _e("RSS feed for this section", "nicethemes");
        echo '</a>';
        ?>
</span></h1>
        	<?php 
    } elseif (is_day()) {
        ?>
            <h1 class="archive-header"><?php 
        _e('Daily Archives', 'nicethemes');
        ?>
: <?php 
        the_time(get_option('date_format'));
        ?>
</h1>
예제 #16
0
 /**
  * Retrieve the list of categories on a given blog.
  *
  * @since 1.5.0
  *
  * @param array $args Method parameters.
  * @return array
  */
 function mw_getCategories($args)
 {
     $this->escape($args);
     $blog_ID = (int) $args[0];
     $user_login = $args[1];
     $user_pass = $args[2];
     if (!$this->login_pass_ok($user_login, $user_pass)) {
         return $this->error;
     }
     set_current_user(0, $user_login);
     if (!current_user_can('edit_posts')) {
         return new IXR_Error(401, __('Sorry, you must be able to edit posts on this blog in order to view categories.'));
     }
     do_action('xmlrpc_call', 'metaWeblog.getCategories');
     $categories_struct = array();
     if ($cats = get_categories('get=all')) {
         foreach ($cats as $cat) {
             $struct['categoryId'] = $cat->term_id;
             $struct['parentId'] = $cat->parent;
             $struct['description'] = $cat->name;
             $struct['categoryDescription'] = $cat->description;
             $struct['categoryName'] = $cat->name;
             $struct['htmlUrl'] = wp_specialchars(get_category_link($cat->term_id));
             $struct['rssUrl'] = wp_specialchars(get_category_feed_link($cat->term_id, 'rss2'));
             $categories_struct[] = $struct;
         }
     }
     return $categories_struct;
 }
예제 #17
0
if (have_posts()) {
    ?>
    	    <header class="archive-header">
    	    	<?php 
    if (category_description()) {
        ?>
    	        	<div class="archive-meta">
    	        		<?php 
        echo category_description();
        ?>
    	        	</div>
	    		<?php 
    }
    ?>
	    		<a href="<?php 
    echo get_category_feed_link($cat);
    ?>
" title="<?php 
    _e('Subscribe to this category', 'panamazonica');
    ?>
" class="icon-alone feed-link"><span aria-hidden="true" data-icon="&#xf09e;"></span><span class="assistive-text"><?php 
    _e('Category feed', 'panamazonica');
    ?>
</span></a>
    	        <h1 class="archive-title"><?php 
    single_cat_title();
    ?>
</h1>
    	    </header><!-- /archive-header -->
    
            <?php 
예제 #18
0
function addFeedLink($feed, $cat)
{
    /* returns a link to the rss feed for a given category */
    if ($feed == 'text') {
        $rssLink = '<a href="' . get_category_feed_link($cat->term_id) . '">&nbsp;(RSS)</a>';
    } elseif ($feed == 'image') {
        $rssLink = '<a href="' . get_category_feed_link($cat->term_id) . '">&nbsp;<img src="' . get_settings(siteurl) . '/wp-includes/images/rss.png" /></a>';
    } else {
        $rssLink = '';
    }
    return $rssLink;
}
예제 #19
0
 public function getCategory()
 {
     $cid = (int) get_query_var('cat');
     $cat = get_category($cid);
     $wp_title = trim(wp_title('', false));
     $title = string_len($wp_title, 90);
     $pathway = array();
     //  rss
     $pathway['first'] = array('Category Feed', array('href' => get_category_feed_link($cid), 'type' => 'application/rss+xml', 'title' => __($title . ' | Subscribe to this feed', WPI_META), 'hreflang' => get_hreflang(), 'rel' => self::RSS_REL, 'class' => 'rtxt rss16', 'rev' => 'feed:rss2'));
     // home
     $pathway['home'] = $this->getFrontpage();
     // Topics
     $cat_base = str_rem('/', get_option('category_base'));
     if ($cat_base) {
         $cat_base = ucfirst($cat_base);
     } else {
         $cat_base = __('Topics', WPI_META);
     }
     $pathway['topics'] = array($cat_base, array('href' => '#content-top', 'title' => $cat_base . ' | Skip to content '));
     // Category
     if (is_object($cat)) {
         $pcid = $cat->category_parent;
         if ($pcid) {
             $pname = get_cat_name($pcid);
             $pathway['parent'] = array($pname, array('href' => get_category_link($pcid), 'title' => $cat_base . ' | ' . $pname, 'class' => $pname, 'rev' => 'site:archive'));
         }
         $pathway['last'] = array($cat->name, array('href' => '#content', 'title' => $cat_base . ' | ' . $cat->name, 'class' => self::CAT_LINK_CLASS . ' ' . self::DN_ARROW, 'rev' => 'site:archive'));
     }
     unset($cat);
     return $pathway;
 }
예제 #20
0
global $wp_query;
$total_results = $wp_query->found_posts;
?>

<?php 
get_header();
?>
   
<div class="main thatcamp-stream">

<?php 
if (is_category()) {
    $category = get_category(get_query_var('cat'));
    if (!empty($category)) {
        echo '<ul class="subscribe"><li><a href="' . get_category_feed_link($category->cat_ID) . '" title="' . sprintf(__('Subscribe to this category with RSS', 'thatcamp-proceedings'), $category->name) . '" rel="nofollow" class="subscribe-rss">' . __('Subscribe to this category with RSS', 'thatcamp-proceedings') . '</a></li></ul>';
    }
}
?>
 

<h1>Posts in the category '<?php 
single_cat_title();
?>
'&nbsp;&nbsp;(<?php 
echo $total_results;
?>
 found)</h1>

<?php 
if (have_posts()) {
function powerpressadmin_edit_itunes_general($FeedSettings, $General, $FeedAttribs = array())
{
    // Set default settings (if not set)
    if (!empty($FeedSettings)) {
        if (!isset($FeedSettings['itunes_url'])) {
            $FeedSettings['itunes_url'] = '';
        }
    }
    if (!isset($General['itunes_url'])) {
        $General['itunes_url'] = '';
    } else {
        if (!isset($FeedSettings['itunes_url'])) {
            // Should almost never happen
            $FeedSettings['itunes_url'] = $General['itunes_url'];
        }
    }
    $feed_slug = $FeedAttribs['feed_slug'];
    $cat_ID = $FeedAttribs['category_id'];
    if ($feed_slug == 'podcast' && $FeedAttribs['type'] == 'general') {
        if (empty($FeedSettings['itunes_url']) && !empty($General['itunes_url'])) {
            $FeedSettings['itunes_url'] = $General['itunes_url'];
        }
    }
    ?>
<h3><?php 
    echo __('iTunes Listing Information', 'powerpress');
    ?>
</h3>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php 
    echo __('iTunes Subscription URL', 'powerpress');
    ?>
</th> 
<td>
<input type="text" style="width: 80%;" name="Feed[itunes_url]" value="<?php 
    echo esc_attr($FeedSettings['itunes_url']);
    ?>
" maxlength="250" />
<p><?php 
    echo sprintf(__('e.g. %s', 'powerpress'), 'http://itunes.apple.com/podcast/title-of-podcast/id<strong>000000000</strong>');
    ?>
</p>

<p><?php 
    echo sprintf(__('Click the following link to %s.', 'powerpress'), '<a href="https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast" target="_blank">' . __('Publish a Podcast on iTunes', 'powerpress') . '</a>');
    ?>
 <?php 
    echo __('iTunes will email your Subscription URL to the <em>iTunes Email</em> entered below when your podcast is accepted into the iTunes Directory.', 'powerpress');
    ?>
</p>
<p>
<?php 
    echo __('Recommended feed to submit to iTunes: ', 'powerpress');
    switch ($FeedAttribs['type']) {
        case 'ttid':
        case 'category':
            echo get_category_feed_link($cat_ID);
            break;
        case 'channel':
            echo get_feed_link($feed_slug);
            break;
        case 'post_type':
            $url = get_post_type_archive_feed_link($FeedAttribs['post_type'], $feed_slug);
            echo $url;
            break;
        case 'general':
        default:
            echo get_feed_link('podcast');
    }
    ?>
</p>
</td>
</tr>
</table>
<?php 
}
예제 #22
0
function powerpresssubscribe_get_settings($ExtraData)
{
    $GeneralSettings = get_option('powerpress_general');
    $feed_slug = empty($ExtraData['feed']) ? 'podcast' : $ExtraData['feed'];
    $post_type = empty($ExtraData['post_type']) ? false : $ExtraData['post_type'];
    $category_id = empty($ExtraData['cat_id']) ? false : $ExtraData['cat_id'];
    $taxonomy_term_id = empty($ExtraData['taxonomy_term_id']) ? false : $ExtraData['taxonomy_term_id'];
    if (empty($ExtraData['subscribe_type'])) {
        // Make sure this value is set
        $ExtraData['subscribe_type'] = '';
    }
    switch ($ExtraData['subscribe_type']) {
        case 'post_type':
            $category_id = 0;
            $taxonomy_term_id = 0;
            break;
        case 'category':
            $feed_slug = 'podcast';
            $taxonomy_term_id = 0;
            $post_type = '';
            break;
        case 'ttid':
            $feed_slug = 'podcast';
            $category_id = 0;
            if (empty($post_type)) {
                $post_type = get_post_type();
            }
            break;
        case 'channel':
        case 'general':
        default:
            $category_id = 0;
            $post_type = '';
            $taxonomy_term_id = 0;
            break;
    }
    // We need to know if category podcasting is enabled, if it is then we may need to dig deeper for this info....
    if (!empty($GeneralSettings['cat_casting']) && $feed_slug == 'podcast' && (empty($ExtraData['subscribe_type']) || $ExtraData['subscribe_type'] == 'category')) {
        if (!$category_id && is_category()) {
            $category_id = get_query_var('cat');
        }
        if (!$category_id && is_single()) {
            $categories = wp_get_post_categories(get_the_ID());
            if (count($categories) == 1) {
                list($null, $category_id) = each($categories);
            }
        }
        if ($category_id) {
            $Settings = get_option('powerpress_cat_feed_' . $category_id);
            if (!empty($Settings)) {
                //$Settings['title'] = $Settings['title'];
                if (empty($Settings['title'])) {
                    $Settings['title'] = get_bloginfo('name') . get_wp_title_rss();
                }
                // Get category title
                if (!empty($Settings['feed_redirect_url'])) {
                    $Settings['feed_url'] = $Settings['feed_redirect_url'];
                } else {
                    $Settings['feed_url'] = get_category_feed_link($category_id);
                }
                // Get category feed URL
                $Settings['subscribe_page_url'] = powerpresssubscribe_get_subscribe_page($Settings);
                $Settings['itunes_url'] = powerpresssubscribe_get_itunes_url($Settings);
                $Settings['image_url'] = $Settings['itunes_image'];
                $Settings['subscribe_feature_email'] = !empty($GeneralSettings['subscribe_feature_email']);
                return $Settings;
            }
        }
        if ($ExtraData['subscribe_type'] == 'category') {
            return false;
        }
        // let fall through to find better settings
    }
    // Taxonomy
    if ($ExtraData['subscribe_type'] == 'ttid') {
        if (!empty($GeneralSettings['taxonomy_podcasting'])) {
            // TODO! Taxonomy Podcasting subscription options
        }
        return false;
    }
    // Post Type Podcasting
    if ($ExtraData['subscribe_type'] == 'post_type') {
        if (!empty($GeneralSettings['posttype_podcasting'])) {
            if (empty($post_type) && !empty($ExtraData['id'])) {
                $post_type = get_post_type($ExtraData['id']);
            }
            switch ($post_type) {
                case 'page':
                case 'post':
                    // SWEET, CARRY ON!
                    break;
                default:
                    $SettingsArray = get_option('powerpress_posttype_' . $post_type);
                    $Settings = false;
                    if (!empty($SettingsArray[$feed_slug])) {
                        $Settings = $SettingsArray[$feed_slug];
                    }
                    if (!empty($Settings)) {
                        $Settings['title'] = $Settings['title'];
                        if (empty($Settings['title'])) {
                            $Settings['title'] = get_bloginfo('name') . get_wp_title_rss();
                        }
                        // Get category title
                        if (!empty($Settings['feed_redirect_url'])) {
                            $Settings['feed_url'] = $Settings['feed_redirect_url'];
                        } else {
                            $Settings['feed_url'] = get_post_type_archive_feed_link($post_type, $feed_slug);
                        }
                        // Get category feed URL
                        $Settings['subscribe_page_url'] = powerpresssubscribe_get_subscribe_page($Settings);
                        $Settings['itunes_url'] = powerpresssubscribe_get_itunes_url($Settings);
                        $Settings['image_url'] = $Settings['itunes_image'];
                        $Settings['subscribe_feature_email'] = !empty($GeneralSettings['subscribe_feature_email']);
                        return $Settings;
                    }
                    break;
            }
        }
        return false;
    }
    // Podcast default and channel feed settings
    $FeedSettings = get_option('powerpress_feed_' . $feed_slug);
    if (empty($FeedSettings) && $feed_slug == 'podcast') {
        $FeedSettings = get_option('powerpress_feed');
    }
    // Get the main feed settings
    if (!empty($FeedSettings)) {
        $FeedSettings['title'] = $FeedSettings['title'];
        if (empty($FeedSettings['title'])) {
            $FeedSettings['title'] = get_bloginfo('name');
        }
        // Get blog title
        if (!empty($FeedSettings['feed_redirect_url'])) {
            $FeedSettings['feed_url'] = $FeedSettings['feed_redirect_url'];
        } else {
            $FeedSettings['feed_url'] = get_feed_link($feed_slug);
        }
        // Get Podcast RSS Feed
        $FeedSettings['subscribe_page_url'] = powerpresssubscribe_get_subscribe_page($FeedSettings);
        $FeedSettings['itunes_url'] = powerpresssubscribe_get_itunes_url($FeedSettings);
        $FeedSettings['image_url'] = $FeedSettings['itunes_image'];
        $FeedSettings['subscribe_feature_email'] = !empty($GeneralSettings['subscribe_feature_email']);
        return $FeedSettings;
    }
    return false;
}
예제 #23
0
 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $podPress, $wp_version;
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     $feed_icon = '<img src="' . get_option('siteurl') . '/' . WPINC . '/images/rss.png" class="podpress_feed_icon" alt="" />';
     echo $before_widget;
     echo $before_title . $title . $after_title;
     echo '<ul class="podpress_feed_buttons_list">' . "\n";
     switch ($instance['buttons-or-text']) {
         default:
         case 'buttons':
             if ($instance['itunes']) {
                 // for more info: http://www.apple.com/itunes/podcasts/specs.html#linking
                 if ($instance['iprot']) {
                     echo ' <li><a href="itpc://' . preg_replace('/^https?:\\/\\//i', '', $podPress->settings['podcastFeedURL']) . '"';
                 } else {
                     echo ' <li><a href="http://www.itunes.com/podcast?id=' . $podPress->settings['iTunes']['FeedID'] . '"';
                 }
                 if (FALSE == empty($instance['itunes_buttonurl'])) {
                     echo ' title="' . __('Subscribe to the Podcast Feed with iTunes', 'podpress') . '"><img src="' . $instance['itunes_buttonurl'] . '" class="podpress_feed_buttons" alt="' . __('Subscribe with iTunes', 'podpress') . '" /></a></li>' . "\n";
                 } else {
                     echo ' title="' . __('Subscribe to the Podcast Feed with iTunes', 'podpress') . '"><img src="' . podPress_url() . 'images/itunes.png" class="podpress_feed_buttons" alt="' . __('Subscribe with iTunes', 'podpress') . '" /></a></li>' . "\n";
                 }
             }
             // podPress feeds:
             if (is_array($instance['podpressfeeds']) and FALSE == empty($instance['podpressfeeds'])) {
                 foreach ($instance['podpressfeeds'] as $feed_slug => $feed_options) {
                     if ('yes' === $feed_options['use'] and is_array($podPress->settings['podpress_feeds'])) {
                         foreach ($podPress->settings['podpress_feeds'] as $feed) {
                             if ($feed_slug === $feed['slug'] and TRUE === $feed['use']) {
                                 if (FALSE == empty($feed_options['altfeedurl'])) {
                                     $feed_link = $feed_options['altfeedurl'];
                                 } else {
                                     $feed_link = get_feed_link($feed_slug);
                                 }
                                 if (FALSE == empty($feed['slug'])) {
                                     $descr = stripslashes($feed['descr']);
                                 } else {
                                     $descr = __('Subscribe to this Feed with any feed reader', 'podpress');
                                 }
                                 if (FALSE == empty($feed_options['buttonurl'])) {
                                     echo '	<li><a href="' . $feed_link . '" title="' . esc_attr($descr) . '"><img src="' . $feed_options['buttonurl'] . '" class="podpress_feed_buttons" alt="' . esc_attr(stripslashes($feed['name'])) . '" /></a></li>' . "\n";
                                 } else {
                                     echo '	<li><a href="' . $feed_link . '" title="' . esc_attr($descr) . '">' . $feed_icon . ' ' . stripslashes($feed['name']) . '</a></li>' . "\n";
                                 }
                             }
                         }
                     }
                 }
             }
             if ($instance['posts']) {
                 if (FALSE == empty($instance['posts_altfeedurl'])) {
                     $feedlink = $instance['posts_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('rss2_url');
                 }
                 if (FALSE == empty($instance['posts_buttonurl'])) {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the main RSS Feed with any feed reader', 'podpress') . '"><img src="' . $instance['posts_buttonurl'] . '" class="podpress_feed_buttons" alt="' . __('Subscribe to the RSS Feed', 'podpress') . '" /></a></li>' . "\n";
                 } else {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the main RSS Feed with any feed reader', 'podpress') . '"><img src="' . podPress_url() . 'images/feed_button-rss-blog.png" class="podpress_feed_buttons" alt="' . __('Subscribe to the RSS Feed', 'podpress') . '" /></a></li>' . "\n";
                 }
             }
             if ($instance['comments']) {
                 if (FALSE == empty($instance['comments_altfeedurl'])) {
                     $feedlink = $instance['comments_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('comments_rss2_url');
                 }
                 if (FALSE == empty($instance['comments_buttonurl'])) {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the comments RSS Feed with any feed reader', 'podpress') . '"><img src="' . $instance['comments_buttonurl'] . '" class="podpress_feed_buttons" alt="' . __('Subscribe to the comments RSS Feed', 'podpress') . '" /></a></li>' . "\n";
                 } else {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the comments RSS Feed with any feed reader', 'podpress') . '"><img src="' . podPress_url() . 'images/feed_button-rss-comments.png" class="podpress_feed_buttons" alt="' . __('Subscribe to the comments RSS Feed', 'podpress') . '" /></a></li>' . "\n";
                 }
             }
             if ($instance['entries-atom']) {
                 if (FALSE == empty($instance['entries-atom_altfeedurl'])) {
                     $feedlink = $instance['entries-atom_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('atom_url');
                 }
                 if (FALSE == empty($instance['entries-atom_buttonurl'])) {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the main ATOM Feed with any feed reader', 'podpress') . '"><img src="' . $instance['entries-atom_buttonurl'] . '" class="podpress_feed_buttons" alt="' . __('Subscribe to the ATOM Feed', 'podpress') . '" /></a></li>' . "\n";
                 } else {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the main ATOM Feed with any feed reader', 'podpress') . '"><img src="' . podPress_url() . 'images/feed_button-atom-blog.png" class="podpress_feed_buttons" alt="' . __('Subscribe to the ATOM Feed', 'podpress') . '" /></a></li>' . "\n";
                 }
             }
             if ($instance['comments-atom']) {
                 if (FALSE === empty($instance['comments-atom_altfeedurl'])) {
                     $feedlink = $instance['comments-atom_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('comments_atom_url');
                 }
                 if (FALSE == empty($instance['comments-atom_buttonurl'])) {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the comments ATOM Feed with any feed reader', 'podpress') . '"><img src="' . $instance['comments-atom_buttonurl'] . '" class="podpress_feed_buttons" alt="' . __('Subscribe to the comments ATOM Feed', 'podpress') . '" /></a></li>' . "\n";
                 } else {
                     echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the comments ATOM Feed with any feed reader', 'podpress') . '"><img src="' . podPress_url() . 'images/feed_button-atom-comments.png" class="podpress_feed_buttons" alt="' . __('Subscribe to the comments ATOM Feed', 'podpress') . '" /></a></li>' . "\n";
                 }
             }
             if (is_array($instance['catcast']) and FALSE == empty($instance['catcast'])) {
                 foreach ($instance['catcast'] as $cat_id => $catcast_options) {
                     if ('yes' === $catcast_options['use']) {
                         if (FALSE == empty($catcast_options['altfeedurl'])) {
                             $cat_feed_link = $catcast_options['altfeedurl'];
                         } else {
                             if (TRUE == version_compare($wp_version, '2.9.3', '>')) {
                                 $cat_feed_link = get_term_feed_link($cat_id);
                             } else {
                                 $cat_feed_link = get_category_feed_link($cat_id);
                             }
                         }
                         if (FALSE == empty($catcast_options['buttonurl'])) {
                             echo '	<li><a href="' . $cat_feed_link . '" title="' . __('Subscribe to this Category RSS Feed with any feed reader', 'podpress') . '"><img src="' . $catcast_options['buttonurl'] . '" class="podpress_feed_buttons" alt="' . esc_attr(sprintf(__('Category "%1$s" RSS Feed', 'podpress'), get_cat_name($cat_id))) . '" /></a></li>' . "\n";
                         } else {
                             echo '	<li><a href="' . $cat_feed_link . '" title="' . __('Subscribe to this Category RSS Feed with any feed reader', 'podpress') . '">' . $feed_icon . ' ' . sprintf(__('Category "%1$s" RSS Feed', 'podpress'), get_cat_name($cat_id)) . '</a></li>' . "\n";
                         }
                     }
                 }
             }
             break;
         case 'text':
             if ($instance['itunes']) {
                 // for more info: http://www.apple.com/itunes/podcasts/specs.html#linking
                 if ($instance['iprot']) {
                     echo ' <li><a href="itpc://' . preg_replace('/^https?:\\/\\//i', '', $podPress->settings['podcastFeedURL']) . '"';
                 } else {
                     echo ' <li><a href="http://www.itunes.com/podcast?id=' . $podPress->settings['iTunes']['FeedID'] . '"';
                 }
                 echo ' title="' . __('Subscribe to the Podcast Feed with iTunes', 'podpress') . '">' . $feed_icon . ' ' . __('Subscribe with iTunes', 'podpress') . '</a></li>' . "\n";
             }
             // podPress feeds:
             if (is_array($instance['podpressfeeds']) and FALSE == empty($instance['podpressfeeds'])) {
                 foreach ($instance['podpressfeeds'] as $feed_slug => $feed_options) {
                     if ('yes' === $feed_options['use'] and is_array($podPress->settings['podpress_feeds'])) {
                         foreach ($podPress->settings['podpress_feeds'] as $feed) {
                             if ($feed_slug === $feed['slug'] and TRUE === $feed['use']) {
                                 if (FALSE == empty($feed_options['altfeedurl'])) {
                                     $feed_link = $feed_options['altfeedurl'];
                                 } else {
                                     $feed_link = get_feed_link($feed_slug);
                                 }
                                 if (FALSE == empty($feed['slug'])) {
                                     $descr = stripslashes($feed['descr']);
                                 } else {
                                     $descr = __('Subscribe to this Feed with any feed reader', 'podpress');
                                 }
                                 echo '	<li><a href="' . $feed_link . '" title="' . esc_attr($descr) . '">' . $feed_icon . ' ' . stripslashes($feed['name']) . '</a></li>' . "\n";
                             }
                         }
                     }
                 }
             }
             if ($instance['posts']) {
                 if (FALSE == empty($instance['posts_altfeedurl'])) {
                     $feedlink = $instance['posts_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('rss2_url');
                 }
                 echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the main RSS Feed with any feed reader', 'podpress') . '">' . $feed_icon . ' ' . __('Entries RSS Feed', 'podpress') . '</a></li>' . "\n";
             }
             if ($instance['comments']) {
                 if (FALSE == empty($instance['comments_altfeedurl'])) {
                     $feedlink = $instance['comments_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('comments_rss2_url');
                 }
                 echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the comments RSS Feed with any feed reader', 'podpress') . '">' . $feed_icon . ' ' . __('Comments RSS Feed', 'podpress') . '</a></li>' . "\n";
             }
             if ($instance['entries-atom']) {
                 if (FALSE == empty($instance['entries-atom_altfeedurl'])) {
                     $feedlink = $instance['entries-atom_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('atom_url');
                 }
                 echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the main ATOM Feed with any feed reader', 'podpress') . '">' . $feed_icon . ' ' . __('Entries ATOM Feed', 'podpress') . '</a></li>' . "\n";
             }
             if ($instance['comments-atom']) {
                 if (FALSE === empty($instance['comments-atom_altfeedurl'])) {
                     $feedlink = $instance['comments-atom_altfeedurl'];
                 } else {
                     $feedlink = get_bloginfo('comments_atom_url');
                 }
                 echo '	<li><a href="' . $feedlink . '" title="' . __('Subscribe to the comments ATOM Feed with any feed reader', 'podpress') . '">' . $feed_icon . ' ' . __('Comments ATOM Feed', 'podpress') . '</a></li>' . "\n";
             }
             if (is_array($instance['catcast']) and FALSE == empty($instance['catcast'])) {
                 foreach ($instance['catcast'] as $cat_id => $catcast_options) {
                     if ('yes' === $catcast_options['use']) {
                         if (FALSE == empty($catcast_options['altfeedurl'])) {
                             $cat_feed_link = $catcast_options['altfeedurl'];
                         } else {
                             if (TRUE == version_compare($wp_version, '2.9.3', '>')) {
                                 $cat_feed_link = get_term_feed_link($cat_id);
                             } else {
                                 $cat_feed_link = get_category_feed_link($cat_id);
                             }
                         }
                         echo '	<li><a href="' . $cat_feed_link . '" title="' . __('Subscribe to this Category RSS Feed with any feed reader', 'podpress') . '">' . $feed_icon . ' ' . sprintf(__('Category "%1$s" RSS Feed', 'podpress'), get_cat_name($cat_id)) . '</a></li>' . "\n";
                     }
                 }
             }
             break;
     }
     echo "</ul>\n";
     echo $after_widget;
 }
예제 #24
0
    ?>
        
            <?php 
    if (is_category()) {
        ?>
			<span class="archive_header">
			<span class="fl cat"><?php 
        _e('Archive', 'woothemes');
        ?>
 | <?php 
        echo single_cat_title();
        ?>
</span>
			<span class="fr catrss"><?php 
        $cat_id = get_cat_ID(single_cat_title('', false));
        echo '<a href="' . get_category_feed_link($cat_id, '') . '">' . __("RSS feed for this section", "woothemes") . '</a>';
        ?>
</span>
			</span>  
			<div class="category-description">
				<?php 
        echo category_description();
        ?>
			</div>      
			
			<?php 
    } elseif (is_day()) {
        ?>
			<span class="archive_header"><?php 
        _e('Archive', 'woothemes');
        ?>
예제 #25
0
/**
 * Display the links to the extra feeds such as category feeds.
 *
 * @since 2.8.0
 *
 * @param array $args Optional arguments.
 */
function feed_links_extra($args = array())
{
    $defaults = array('separator' => _x('&raquo;', 'feed link'), 'singletitle' => __('%1$s %2$s %3$s Comments Feed'), 'cattitle' => __('%1$s %2$s %3$s Category Feed'), 'tagtitle' => __('%1$s %2$s %3$s Tag Feed'), 'authortitle' => __('%1$s %2$s Posts by %3$s Feed'), 'searchtitle' => __('%1$s %2$s Search Results for &#8220;%3$s&#8221; Feed'), 'posttypetitle' => __('%1$s %2$s %3$s Feed'));
    $args = wp_parse_args($args, $defaults);
    if (is_singular()) {
        $id = 0;
        $post = get_post($id);
        if (comments_open() || pings_open() || $post->comment_count > 0) {
            $title = sprintf($args['singletitle'], get_bloginfo('name'), $args['separator'], the_title_attribute(array('echo' => false)));
            $href = get_post_comments_feed_link($post->ID);
        }
    } elseif (is_post_type_archive()) {
        $post_type = get_query_var('post_type');
        if (is_array($post_type)) {
            $post_type = reset($post_type);
        }
        $post_type_obj = get_post_type_object($post_type);
        $title = sprintf($args['posttypetitle'], get_bloginfo('name'), $args['separator'], $post_type_obj->labels->name);
        $href = get_post_type_archive_feed_link($post_type_obj->name);
    } elseif (is_category()) {
        $term = get_queried_object();
        if ($term) {
            $title = sprintf($args['cattitle'], get_bloginfo('name'), $args['separator'], $term->name);
            $href = get_category_feed_link($term->term_id);
        }
    } elseif (is_tag()) {
        $term = get_queried_object();
        if ($term) {
            $title = sprintf($args['tagtitle'], get_bloginfo('name'), $args['separator'], $term->name);
            $href = get_tag_feed_link($term->term_id);
        }
    } elseif (is_author()) {
        $author_id = intval(get_query_var('author'));
        $title = sprintf($args['authortitle'], get_bloginfo('name'), $args['separator'], get_the_author_meta('display_name', $author_id));
        $href = get_author_feed_link($author_id);
    } elseif (is_search()) {
        $title = sprintf($args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query(false));
        $href = get_search_feed_link();
    } elseif (is_post_type_archive()) {
        $title = sprintf($args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title('', false));
        $post_type_obj = get_queried_object();
        if ($post_type_obj) {
            $href = get_post_type_archive_feed_link($post_type_obj->name);
        }
    }
    if (isset($title) && isset($href)) {
        echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr($title) . '" href="' . esc_url($href) . '" />' . "\n";
    }
}
예제 #26
0
function powerpressadmin_edit_itunes_feed($FeedSettings, $General, $FeedAttribs = array())
{
    $feed_slug = $FeedAttribs['feed_slug'];
    $cat_ID = $FeedAttribs['category_id'];
    $SupportUploads = powerpressadmin_support_uploads();
    if (!isset($FeedSettings['itunes_subtitle'])) {
        $FeedSettings['itunes_subtitle'] = '';
    }
    if (!isset($FeedSettings['itunes_summary'])) {
        $FeedSettings['itunes_summary'] = '';
    }
    if (!isset($FeedSettings['itunes_keywords'])) {
        $FeedSettings['itunes_keywords'] = '';
    }
    if (!isset($FeedSettings['itunes_cat_1'])) {
        $FeedSettings['itunes_cat_1'] = '';
    }
    if (!isset($FeedSettings['itunes_cat_2'])) {
        $FeedSettings['itunes_cat_2'] = '';
    }
    if (!isset($FeedSettings['itunes_cat_3'])) {
        $FeedSettings['itunes_cat_3'] = '';
    }
    if (!isset($FeedSettings['itunes_explicit'])) {
        $FeedSettings['itunes_explicit'] = 0;
    }
    if (!isset($FeedSettings['itunes_talent_name'])) {
        $FeedSettings['itunes_talent_name'] = '';
    }
    if (!isset($FeedSettings['email'])) {
        $FeedSettings['email'] = '';
    }
    if (!isset($FeedSettings['itunes_new_feed_url_podcast'])) {
        $FeedSettings['itunes_new_feed_url_podcast'] = '';
    }
    if (!isset($FeedSettings['itunes_new_feed_url'])) {
        $FeedSettings['itunes_new_feed_url'] = '';
    }
    $AdvancediTunesSettings = !empty($FeedSettings['itunes_summary']);
    if (!empty($FeedSettings['itunes_subtitle'])) {
        $AdvancediTunesSettings = true;
    }
    ?>

<h3><?php 
    echo __('iTunes Settings', 'powerpress');
    ?>
</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php 
    echo __('iTunes Program Subtitle', 'powerpress');
    ?>
 <br />
</th>
<td>
<input type="text" name="Feed[itunes_subtitle]" style="width: 60%;"  value="<?php 
    echo esc_attr($FeedSettings['itunes_subtitle']);
    ?>
" maxlength="250" />
</td>
</tr>

<tr valign="top">
<th scope="row">

<?php 
    echo __('iTunes Program Summary', 'powerpress');
    ?>
</th>
<td>
<p style="margin-top: 5px;"><?php 
    echo __('Your summary may not contain HTML and cannot exceed 4,000 characters in length.', 'powerpress');
    ?>
</p>

<textarea name="Feed[itunes_summary]" rows="5" style="width:80%;" ><?php 
    echo $FeedSettings['itunes_summary'];
    ?>
</textarea>
</td>
</tr>

<?php 
    if (!empty($General['advanced_mode_2'])) {
        ?>
<tr valign="top">
<th scope="row">

<?php 
        echo __('iTunes Episode Summary', 'powerpress');
        ?>
</th>
<td>
<div><input type="checkbox" name="Feed[enhance_itunes_summary]" value="1" <?php 
        echo !empty($FeedSettings['enhance_itunes_summary']) ? 'checked ' : '';
        ?>
/> <?php 
        echo __('Optimize iTunes Summary from Blog Posts', 'powerpress');
        ?>
</div>
<p>
	<?php 
        echo __('Creates a friendlier view of your post/episode content by converting web links and images to clickable links in the iTunes application.', 'powerpress');
        ?>
</p>
</td>
</tr>
</table>


<table class="form-table">
<?php 
        if (!empty($FeedSettings['itunes_keywords'])) {
            ?>
<tr valign="top">
<th scope="row">
<?php 
            echo __('iTunes Program Keywords', 'powerpress');
            ?>
 <br />
</th>
<td>
<input type="text" name="Feed[itunes_keywords]" style="width: 60%;"  value="<?php 
            echo esc_attr($FeedSettings['itunes_keywords']);
            ?>
" maxlength="250" />
<p><?php 
            echo __('Feature Deprecated by Apple. Keywords above are for your reference only.', 'powerpress');
            ?>
</p>
</td>
</tr>
<?php 
        }
        // End iTunes keywords
    }
    // end advanced mode
    ?>

<tr valign="top">
<th scope="row">
<?php 
    echo __('iTunes Category', 'powerpress');
    ?>
 
<span class="powerpress-required"><?php 
    echo __('Required', 'powerpress');
    ?>
</span>
</th>
<td>
<select name="Feed[itunes_cat_1]" class="bpp_input_med">
<?php 
    $MoreCategories = false;
    if (!empty($FeedSettings['itunes_cat_2'])) {
        $MoreCategories = true;
    } else {
        if (!empty($FeedSettings['itunes_cat_3'])) {
            $MoreCategories = true;
        }
    }
    $Categories = powerpress_itunes_categories(true);
    echo '<option value="">' . __('Select Category', 'powerpress') . '</option>';
    $UseCategories = powerpress_categories_strict($Categories, $FeedSettings['itunes_cat_1']);
    while (list($value, $desc) = each($UseCategories)) {
        echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_cat_1'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n";
    }
    reset($Categories);
    ?>
</select>
<?php 
    if (!$MoreCategories && empty($General['seo_itunes'])) {
        ?>
	<a href="#" onclick="document.getElementById('more_itunes_cats').style.display='block';return false;"><?php 
        echo __('more', 'powerpress');
        ?>
</a>
<?php 
    }
    ?>
	<p>
		<?php 
    echo __('The category above is where you will appear when browsing iTunes.', 'powerpress');
    ?>
	</p>
</td>
</tr>
</table>


<!-- start advanced features -->
<div id="more_itunes_cats" style="display: <?php 
    echo $MoreCategories || !empty($General['seo_itunes']) ? 'block' : 'none';
    ?>
;">
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php 
    echo __('iTunes Category 2', 'powerpress');
    ?>
 
</th>
<td>
<select name="Feed[itunes_cat_2]" class="bpp_input_med">
<?php 
    echo '<option value="">' . __('Select Category', 'powerpress') . '</option>';
    $UseCategories = powerpress_categories_strict($Categories, $FeedSettings['itunes_cat_2']);
    while (list($value, $desc) = each($UseCategories)) {
        echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_cat_2'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n";
    }
    reset($Categories);
    ?>
</select>
<?php 
    if (!empty($General['seo_itunes'])) {
        ?>
			<p>
				<em><?php 
        echo __('SEO Suggestion: Select a second category.', 'powerpress');
        ?>
</em>
			</p>
<?php 
    }
    ?>

</td>
</tr>

<tr valign="top">
<th scope="row">
<?php 
    echo __('iTunes Category 3', 'powerpress');
    ?>
 
</th>
<td>
<select name="Feed[itunes_cat_3]" class="bpp_input_med">
<?php 
    echo '<option value="">' . __('Select Category', 'powerpress') . '</option>';
    $UseCategories = powerpress_categories_strict($Categories, $FeedSettings['itunes_cat_3']);
    while (list($value, $desc) = each($UseCategories)) {
        echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_cat_3'] == $value ? ' selected' : '') . ">" . htmlspecialchars($desc) . "</option>\n";
    }
    reset($Categories);
    ?>
</select>
<?php 
    if (!empty($General['seo_itunes'])) {
        ?>
			<p>
				<em><?php 
        echo __('SEO Suggestion: Select a third category.', 'powerpress');
        ?>
</em>
			</p>
<?php 
    }
    ?>
</td>
</tr>
</table>
</div>
<!-- end advanced features -->


<table class="form-table">
<tr valign="top">
<th scope="row">
<?php 
    echo __('iTunes Explicit', 'powerpress');
    ?>
 
</th>
<td>
<select name="Feed[itunes_explicit]" class="bpp_input_med">
<?php 
    $explicit = array(0 => __('No - display nothing', 'powerpress'), 1 => __('Yes - explicit content', 'powerpress'), 2 => __('Clean - no explicit content', 'powerpress'));
    while (list($value, $desc) = each($explicit)) {
        echo "\t<option value=\"{$value}\"" . ($FeedSettings['itunes_explicit'] == $value ? ' selected' : '') . ">{$desc}</option>\n";
    }
    ?>
</select>
</td>
</tr>
<?php 
    if (!empty($General['advanced_mode_2'])) {
        ?>
<!-- start advanced features -->
<tr valign="top">
<th scope="row">
<?php 
        echo __('iTunes Author Name', 'powerpress');
        ?>
 
</th>
<td>
<input type="text" name="Feed[itunes_talent_name]" class="bpp_input_med" value="<?php 
        echo esc_attr($FeedSettings['itunes_talent_name']);
        ?>
" maxlength="250" /><br />
<div><input type="checkbox" name="Feed[itunes_author_post]" value="1" <?php 
        echo !empty($FeedSettings['itunes_author_post']) ? 'checked ' : '';
        ?>
/> <?php 
        echo __('Use blog post author\'s name for individual episodes.', 'powerpress');
        ?>
</div>

<?php 
        if (!empty($General['seo_itunes'])) {
            ?>
			<p>
				<em><?php 
            echo __('SEO Suggestion: Include talent names and slogans not mentioned in the show title.', 'powerpress');
            ?>
</em>
			</p>
<?php 
        }
        ?>
</td>
</tr>
<!-- end advanced features -->
<?php 
    }
    ?>

<tr valign="top">
<th scope="row">
<?php 
    echo __('iTunes Email', 'powerpress');
    ?>
 
<span class="powerpress-required"><?php 
    echo __('Required', 'powerpress');
    ?>
</span>
</th>
<td>
<input type="text" name="Feed[email]" class="bpp_input_med" value="<?php 
    echo esc_attr($FeedSettings['email']);
    ?>
" maxlength="250" />
<div>(<?php 
    echo __('iTunes will email this address when your podcast is accepted into the iTunes Directory.', 'powerpress');
    ?>
)</div>
</td>
</tr>
</table>

<?php 
    if (!empty($General['advanced_mode_2'])) {
        ?>
<!-- start advanced features -->
<table class="form-table">
	<tr valign="top">
	<th scope="row" >

<?php 
        echo __('iTunes New Feed URL', 'powerpress');
        ?>
</th> 
	<td>
		<div id="new_feed_url_step_1" style="display: <?php 
        echo !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ? 'none' : 'block';
        ?>
;">
			 <p style="margin-top: 5px;"><strong><a href="#" onclick="return powerpress_new_feed_url_prompt();"><?php 
        echo __('Set iTunes New Feed URL', 'powerpress');
        ?>
</a></strong></p>
			 <p><strong>
			 <?php 
        echo __('The iTunes New Feed URL option works primarily for Apple\'s iTunes application only, and should only be used if you are unable to implement a HTTP 301 redirect.', 'powerpress');
        ?>
			 <?php 
        echo __('A 301 redirect will route <u>all podcast clients including iTunes</u> to your new feed address.', 'powerpress');
        ?>
			 </strong> 
			 </p>
			 <p>
			 <?php 
        echo __('Learn more:', 'powerpress');
        ?>
 <a href="http://create.blubrry.com/manual/syndicating-your-podcast-rss-feeds/changing-your-podcast-rss-feed-address-url/" target="_blank"><?php 
        echo __('Changing Your Podcast RSS Feed Address (URL)', 'powerpress');
        ?>
</a>
			</p>
		</div>
		<div id="new_feed_url_step_2" style="display: <?php 
        echo !empty($FeedSettings['itunes_new_feed_url']) || !empty($FeedSettings['itunes_new_feed_url_podcast']) ? 'block' : 'none';
        ?>
;">
			<p style="margin-top: 5px;"><strong><?php 
        echo __('WARNING: Changes made here are permanent. If the New Feed URL entered is incorrect, you will lose subscribers and will no longer be able to update your listing in the iTunes Store.', 'powerpress');
        ?>
</strong></p>
			<p><strong><?php 
        echo __('DO NOT MODIFY THIS SETTING UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING.', 'powerpress');
        ?>
</strong></p>
			<p>
				<?php 
        echo htmlspecialchars(sprintf(__('Apple recommends you maintain the %s tag in your feed for at least two weeks to ensure that most subscribers will receive the new New Feed URL.', 'powerpress'), '<itunes:new-feed-url>'));
        ?>
			</p>
			<p>
			<?php 
        $FeedName = __('Main RSS2 feed', 'powerpress');
        $FeedURL = get_feed_link('rss2');
        if ($cat_ID) {
            $category = get_category_to_edit($cat_ID);
            $FeedName = sprintf(__('%s category feed', 'powerpress'), htmlspecialchars($category->name));
            $FeedURL = get_category_feed_link($cat_ID);
        } else {
            if ($feed_slug) {
                if (!empty($General['custom_feeds'][$feed_slug])) {
                    $FeedName = $General['custom_feeds'][$feed_slug];
                } else {
                    $FeedName = __('Podcast', 'powerpress');
                }
                $FeedName = trim($FeedName) . ' ' . __('feed', 'powerpress');
                $FeedURL = get_feed_link($feed_slug);
            } else {
                if ($FeedAttribs['type'] == 'ttid') {
                    $term_object = get_term_to_edit($FeedAttribs['term_id'], $FeedAttribs['taxonomy_type']);
                    $FeedName = sprintf(__('%s taxonomy term feed', 'powerpress'), htmlspecialchars($term_object->name));
                    $FeedURL = get_term_feed_link($FeedAttribs['term_id'], $FeedAttribs['taxonomy_type'], 'rss2');
                }
            }
        }
        echo sprintf(__('The New Feed URL value below will be applied to the %s (%s).', 'powerpress'), $FeedName, $FeedURL);
        ?>
			</p>
			<p style="margin-bottom: 0;">
				<label style="width: 25%; float:left; display:block; font-weight: bold;"><?php 
        echo __('New Feed URL', 'powerpress');
        ?>
</label>
				<input type="text" name="Feed[itunes_new_feed_url]" style="width: 55%;"  value="<?php 
        echo esc_attr($FeedSettings['itunes_new_feed_url']);
        ?>
" maxlength="250" />
			</p>
			<p style="margin-left: 25%;margin-top: 0;font-size: 90%;">(<?php 
        echo __('Leave blank for no New Feed URL', 'powerpress');
        ?>
)</p>
			
			<p><a href="http://www.apple.com/itunes/whatson/podcasts/specs.html#changing" target="_blank"><?php 
        echo __('More information regarding the iTunes New Feed URL is available here.', 'powerpress');
        ?>
</a></p>
			<p>
<?php 
        if (!$cat_ID && !$feed_slug) {
            if (empty($General['channels'])) {
                echo sprintf(__('Please activate the \'Custom Podcast Channels\' Advanced Option to set the new-feed-url for your podcast only feed (%s)', 'powerpress'), get_feed_link('podcast'));
            } else {
                echo sprintf(__('Please navigate to the \'Custom Podcast Channels\' section to set the new-feed-url for your podcast only feed (%s)', 'powerpress'), get_feed_link('podcast'));
            }
        }
        ?>
			</p>
		</div>
	</td>
	</tr>
</table>
<?php 
        if (defined('POWERPRESS_NOT_SUPPORTED')) {
            // start powerpress not supported features
            ?>
<fieldset style="border: 1px dashed #333333;">
<legend style="margin: 0 20px; padding: 0 5px; font-weight: bold;"><?php 
            echo __('Features Not Supported by PowerPress', 'powerpress');
            ?>
</legend>

	<div style="margin-left: 230px; margin-bottom: 10px;">
		<p>
			<strong style="color: #CC0000; font-weight: bold;"><?php 
            echo __('USE THE FOLLOWING SETTINGS AT YOUR OWN RISK.', 'powerpress');
            ?>
</strong>
		</p>
		<p style="margin-bottom: 0;">
			<?php 
            echo __('Feeds affected', 'powerpress');
            ?>
: 
		</p>
		<div style="margin-left: 20px;">
			<?php 
            // $General, $feed_slug=false, $cat_ID=false
            if ($feed_slug) {
                echo '<a href="';
                echo get_feed_link($feed_slug);
                echo '" target="_blank">';
                echo get_feed_link($feed_slug);
                echo '</a>';
            } else {
                if ($cat_ID) {
                    echo '<a href="';
                    echo get_category_feed_link($cat_ID);
                    echo '" target="_blank">';
                    echo get_category_feed_link($cat_ID);
                    echo '</a>';
                } else {
                    echo '<a href="';
                    echo get_feed_link('feed');
                    echo '" target="_blank">';
                    echo get_feed_link('feed');
                    echo '</a>';
                    if (empty($General['custom_feeds']['podcast'])) {
                        echo '<br /><a href="';
                        echo get_feed_link('podcast');
                        echo '" target="_blank">';
                        echo get_feed_link('podcast');
                        echo '</a>';
                    }
                }
            }
            ?>
		</div>
		
	</div>
<div id="permanent_itunes_settings">
<table class="form-table">
	
	<tr valign="top">
	<th scope="row" >

<?php 
            echo __('iTunes Block', 'powerpress');
            ?>
</th> 
	<td>
		<input type="checkbox" name="Feed[itunes_block]" value="1" <?php 
            if (!empty($FeedSettings['itunes_block'])) {
                echo 'checked';
            }
            ?>
 />
		<?php 
            echo __('Prevent the entire podcast from appearing in the iTunes Podcast directory.', 'powerpress');
            ?>
	</td>
	</tr>
	
	<tr valign="top">
	<th scope="row" >

<?php 
            echo __('iTunes Complete', 'powerpress');
            ?>
</th> 
	<td>
		<input type="checkbox" name="Feed[itunes_complete]" value="1" <?php 
            if (!empty($FeedSettings['itunes_complete'])) {
                echo 'checked';
            }
            ?>
 />
		<?php 
            echo __('Indicate the completion of a podcast. iTunes will no longer update your listing in the iTunes Podcast directory.', 'powerpress');
            ?>
	</td>
	</tr>
</table>
</div>
</fieldset>
<?php 
        }
        // End PowerPress not supported features
        ?>
<!-- end advanced features -->
<?php 
    }
    // end other advanced options
}
예제 #27
0
            <p class="np-section-title">
                <?php 
    ?>
                <a href="<?php 
    echo get_category_link($category);
    ?>
"
                   title="<?php 
    printf(__('View more posts from %s', 'swift'), get_cat_name($category));
    ?>
"><?php 
    echo get_cat_name($category);
    ?>
                </a>
                <a class="alignright fa-rss" href="<?php 
    echo get_category_feed_link($category, 'rss2');
    ?>
"></a>
            </p>

            <div class="clear"></div>
            <?php 
    $r = new WP_Query(array('posts_per_page' => 4, 'cat' => $category, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'post__not_in' => $swift_exclude_post_ids));
    if ($r->have_posts()) {
        while ($r->have_posts()) {
            $r->the_post();
            $swift_exclude_post_ids[] = get_the_ID();
            if ($post_count++ == 0) {
                ?>
            <div id="post-<?php 
                the_ID();
예제 #28
0
            } else {
                echo '<div class="crumb-icon"><i class="' . $cat_icon . '"></i></div>';
            }
        }
        ?>
                        <?php 
        mom_breadcrumb();
        ?>
                        
                        <?php 
        if (mom_option('cat_rss')) {
            $category = get_category(get_query_var('cat'));
            if (!empty($category)) {
                ?>
                        <span class="cat-feed"><a href="<?php 
                echo get_category_feed_link($category->cat_ID);
                ?>
" rel="nofollow"><i class="enotype-icon-rss"></i></a></span>
                        <?php 
            }
        }
        ?>
                    </div>
                    <?php 
    }
    ?>
                    <?php 
}
?>
                    
                    <?php 
예제 #29
0
/**
 * Print/Return link to category RSS2 feed.
 *
 * @since 1.2
 * @deprecated 2.5
 * @deprecated Use get_category_feed_link()
 * @see get_category_feed_link()
 *
 * @param bool $echo
 * @param int $cat_ID
 * @return string|null
 */
function get_category_rss_link($echo = false, $cat_ID = 1)
{
    _deprecated_function(__FUNCTION__, '2.5', 'get_category_feed_link()');
    $link = get_category_feed_link($cat_ID, 'rss2');
    if ($echo) {
        echo $link;
    }
    return $link;
}
/**
 * Debug Function
 *
 * 要开启本插件Debug, 去掉第一行 defined('WPCC_DEBUG', true')...注释.
 * Debug信息将输出在页面footer位置( wp_footer action)
 *
 */
function wpcc_debug()
{
    global $wpcc_noconversion_url, $wpcc_target_lang, $wpcc_langs_urls, $wpcc_deubg_data, $wpcc_langs, $wpcc_options, $wp_rewrite;
    echo '<!--';
    echo '<p style="font-size:20px;color:red;">';
    echo 'WP Chinese Conversion Plugin Debug Output:<br />';
    echo '默认URL: <a href="' . $wpcc_noconversion_url . '">' . $wpcc_noconversion_url . '</a><br />';
    echo '当前语言(空则是不转换): ' . $wpcc_target_lang . "<br />";
    echo 'Query String: ' . $_SERVER['QUERY_STRING'] . '<br />';
    echo 'Request URI: ' . $_SERVER['REQUEST_URI'] . '<br />';
    foreach ($wpcc_langs_urls as $key => $value) {
        echo $key . ' URL: <a href="' . $value . '">' . $value . '</a><br />';
    }
    echo 'Category feed link: ' . get_category_feed_link(1) . '<br />';
    echo 'Search feed link: ' . get_search_feed_link('test');
    echo 'Rewrite Rules: <br />';
    echo nl2br(htmlspecialchars(var_export($wp_rewrite->rewrite_rules(), true))) . '<br />';
    echo 'Debug Data: <br />';
    echo nl2br(htmlspecialchars(var_export($wpcc_deubg_data, true)));
    echo '</p>';
    echo '-->';
}