Exemplo n.º 1
0
 /**
  * @ticket 25380
  */
 function test_pre_posts_per_page()
 {
     self::factory()->post->create_many(10);
     add_action('pre_get_posts', array($this, 'filter_posts_per_page'));
     $this->go_to(get_feed_link());
     $this->assertEquals(30, get_query_var('posts_per_page'));
 }
Exemplo n.º 2
0
function cap_podcast_change_archive_title($title)
{
    if (is_post_type_archive('cap_podcast')) {
        $title = $title . '<div class="rss-feed"><a href="' . get_feed_link() . '?post_type=cap_podcast"><span class="dashicons dashicons-rss"></span> Subscribe to Podcast</a></div>';
    }
    return $title;
}
Exemplo n.º 3
0
 public static function add_feed_links()
 {
     global $wpz_default_feed;
     $wpz_default_feed = get_feed_link();
     add_theme_support('automatic-feed-links');
     add_filter('feed_link', array(__CLASS__, 'custom_feed_links'), 1);
 }
Exemplo n.º 4
0
/**
 * Retrieves default setting fields for theme options.
 * @since 1.6
 */
function ar2_theme_options_default_fields()
{
    global $ar2_image_sizes, $ar2_styles;
    $_defaults = array('theme_version' => array('type' => 'static', 'title' => __('Version', 'ar2'), 'section' => 'ar2_general_site_info', 'content' => '<strong>' . wp_get_theme()->get('Version') . '</strong>', 'description' => __('If you have recently upgraded Project AR2 to a new release, it is <span style="color: red">highly recommended</span> that you reset your theme options, clear your browser cache and restart your browser before proceeding.', 'ar2')), 'site_rss_feed' => array('type' => 'static', 'title' => __('RSS Feed', 'ar2'), 'section' => 'ar2_general_social', 'content' => '<code>' . get_feed_link('rss2') . '</code>', 'description' => __('Custom feed URLs are no longer allowed due to support for automatic feed links.', 'ar2')), 'social_twitter' => array('type' => 'input', 'title' => __('Twitter Username', 'ar2'), 'section' => 'ar2_general_social'), 'social_facebook' => array('type' => 'input', 'title' => __('Facebook Username', 'ar2'), 'section' => 'ar2_general_social'), 'social_flickr' => array('type' => 'input', 'title' => __('Flickr ID', 'ar2'), 'section' => 'ar2_general_social'), 'social_gplus' => array('type' => 'input', 'title' => __('Google+ ID', 'ar2'), 'section' => 'ar2_general_social'), 'social_youtube' => array('type' => 'input', 'title' => __('YouTube Channel ID', 'ar2'), 'section' => 'ar2_general_social'), 'footer_message' => array('type' => 'textarea_html', 'title' => __('Footer Message', 'ar2'), 'section' => 'ar2_general_footer', 'description' => __("Usually your website's copyright information would go here.<br /> It would be great if you could include a link to WordPress or the theme website. :)", 'ar2'), 'extras' => 'class="code"'), 'nodebased_show_excerpts' => array('type' => 'switch', 'title' => __('Show Excerpts', 'ar2'), 'section' => 'ar2_layout_excerpts'), 'excerpt_limit' => array('type' => 'input', 'title' => __('Excerpt Limit', 'ar2'), 'section' => 'ar2_layout_excerpts', 'extras' => 'style="width: 50px" maxlength="2"', 'description' => __('Excerpts will only be trimmed to the limit if no excerpt is specified for the respective post.', 'ar2')), 'archive_display' => array('type' => 'dropdown', 'title' => __('Display Type', 'ar2'), 'section' => 'ar2_layout_archive', 'options' => ar2_get_archive_display_types()), 'single_posts_display' => array('type' => 'custom', 'title' => __('Display in Single Posts', 'ar2'), 'section' => 'ar2_layout_single', 'callback' => 'ar2_render_single_form_field', 'setting' => 'ar2_theme_options[post_display]'), 'relative_dates' => array('type' => 'checkbox', 'title' => __('Display Relative Post Dates', 'ar2'), 'section' => 'ar2_layout_single', 'description' => __('Check this to display post dates relative to current time (eg. 2 days ago ).', 'ar2')), 'auto_thumbs' => array('type' => 'checkbox', 'title' => __('Auto Thumbnails', 'ar2'), 'section' => 'ar2_thumbnails_options', 'description' => __('Check this to allow the theme to automatically retrieve the first attached image from the post as featured image when no image is specified.', 'ar2')), 'layout' => array('type' => 'dropdown', 'title' => __('No of Columns', 'ar2'), 'section' => 'ar2_design_overall', 'options' => $ar2_styles->get_layouts()), 'import_theme_options' => array('type' => 'textarea', 'title' => __('Import Theme Options', 'ar2'), 'section' => 'ar2_tools_port', 'description' => __('Import your theme settings by pasting the exported code in the textbox above.', 'ar2'), 'extras' => 'class="code"'), 'export_theme_options' => array('type' => 'textarea', 'title' => __('Export Theme Options', 'ar2'), 'section' => 'ar2_tools_port', 'description' => __('You can save the code above into a text file and use it when you need to import them into another installation. Note that not all options (custom background, child theme settings, etc.) will be exported.', 'ar2'), 'extras' => 'class="code"', 'value' => json_encode(ar2_flush_theme_options())));
    foreach ($ar2_image_sizes as $id => $args) {
        $_defaults[$id] = array('type' => 'thumbnail-size', 'title' => $args['name'], 'setting' => 'ar2_theme_options[thumbnails][' . $id . ']', 'section' => 'ar2_thumbnails_sizes', 'width' => $args['w'], 'height' => $args['h'], 'd_width' => $args['dw'], 'd_height' => $args['dh']);
    }
    if (AR2_ALLOW_CUSTOM_STYLES) {
        $_defaults['style'] = array('type' => 'dropdown', 'title' => __('Custom Stylesheet', 'ar2'), 'section' => 'ar2_design_overall', 'options' => ar2_get_custom_css_files(), 'description' => sprintf(__('Stylesheets can be placed in %s.', 'ar2'), '<code>wp-content/themes/' . get_stylesheet() . '/css/styles/</code>'));
    }
    // Allow developers to add more fields
    $_defaults = apply_filters('ar2_theme_options_fields', $_defaults);
    // Process the fields
    $sections = ar2_theme_options_default_sections();
    $_default_args = array('title' => '', 'type' => 'static', 'section' => 'ar2_general_site_info', 'page' => 'ar2_general', 'content' => '', 'extras' => '');
    foreach ($_defaults as $id => &$args) {
        if (!isset($args['setting'])) {
            $args['setting'] = 'ar2_theme_options[' . $id . ']';
        }
        // Parse the ID for array keys (adapted from WP_Customize_Setting class).
        $args['_id_data']['keys'] = preg_split('/\\[/', str_replace(']', '', $args['setting']));
        $args['_id_data']['base'] = array_shift($args['_id_data']['keys']);
        if (isset($sections[$args['section']])) {
            $args['page'] = $sections[$args['section']]['page'];
        }
        $args = wp_parse_args($args, $_default_args);
    }
    return $_defaults;
}
Exemplo n.º 5
0
 public function loadOptions()
 {
     global $wpdb, $shortname;
     $themeOptions = array();
     if (!empty($this->options)) {
         foreach ($this->options as $option) {
             if (isset($option["id"]) && $option["id"] != '' && $option["id"] != $shortname . '_code') {
                 $themeOptions[$option["id"]] = "";
             }
         }
         $themeKeys = '"';
         $themeKeys .= join('","', array_keys($themeOptions));
         $themeKeys .= '"';
         $optionValues = $wpdb->get_results('SELECT option_name, option_value FROM wp_options WHERE option_name IN (' . $themeKeys . ')');
         foreach ($optionValues as $optionValue) {
             $themeOptions[$optionValue->option_name] = $optionValue->option_value;
         }
         wp_reset_query();
         $wpdb->flush();
     }
     $themeOptions['feed'] = get_feed_link();
     $themeOptions['site_name'] = get_bloginfo('name');
     $themeOptions['site_link'] = esc_url(home_url('/'));
     return $themeOptions;
 }
Exemplo n.º 6
0
/**
 * Clean up wp_head()
 *
 * Remove unnecessary <link>'s
 * Remove inline CSS and JS from WP emoji support
 * Remove inline CSS used by Recent Comments widget
 * Remove inline CSS used by posts with galleries
 * Remove self-closing tag and change ''s to "'s on rel_canonical()
 *
 * You can enable/disable this feature in functions.php (or lib/setup.php if you're using Sage):
 * add_theme_support('soil-clean-up');
 */
function head_cleanup()
{
    // Originally from http://wpengineer.com/1438/wordpress-header/
    remove_action('wp_head', 'feed_links_extra', 3);
    add_action('wp_head', 'ob_start', 1, 0);
    add_action('wp_head', function () {
        $pattern = '/.*' . preg_quote(esc_url(get_feed_link('comments_' . get_default_feed())), '/') . '.*[\\r\\n]+/';
        echo preg_replace($pattern, '', ob_get_clean());
    }, 3, 0);
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
    remove_action('wp_head', 'print_emoji_detection_script', 7);
    remove_action('admin_print_scripts', 'print_emoji_detection_script');
    remove_action('wp_print_styles', 'print_emoji_styles');
    remove_action('admin_print_styles', 'print_emoji_styles');
    remove_action('wp_head', 'wp_oembed_add_discovery_links');
    remove_action('wp_head', 'wp_oembed_add_host_js');
    remove_action('wp_head', 'rest_output_link_wp_head', 10, 0);
    remove_filter('the_content_feed', 'wp_staticize_emoji');
    remove_filter('comment_text_rss', 'wp_staticize_emoji');
    remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
    add_filter('use_default_gallery_style', '__return_false');
    global $wp_widget_factory;
    if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {
        remove_action('wp_head', [$wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style']);
    }
    if (!class_exists('WPSEO_Frontend')) {
        remove_action('wp_head', 'rel_canonical');
        add_action('wp_head', __NAMESPACE__ . '\\rel_canonical');
    }
}
Exemplo n.º 7
0
 /**
  * Feed link variations.
  *
  * @since 150218 Refactoring cache clear/purge routines.
  *
  * @param string $type_prefix A feed type prefix; optional.
  *
  * @return array An array of all feed link variations.
  */
 public function feed_link_variations($type_prefix = '')
 {
     $variations = array();
     // Initialize.
     foreach ($this->feed_types as $_feed_type) {
         $variations[] = get_feed_link((string) $type_prefix . $_feed_type);
     }
     unset($_feed_type);
     // Housekeeping.
     return $variations;
 }
Exemplo n.º 8
0
function ping_feevy()
{
    $url = "http://*****:*****@fopen($url, 'rb', false, $ctx);
    if (!$fp) {
        throw new Exception("Problem with {$url}, {$php_errormsg}");
    }
}
Exemplo n.º 9
0
    public function wpHead()
    {
        ?>
        <link rel="alternate" type="application/atom+xml" title="<?php 
        echo esc_attr(get_bloginfo('name'));
        ?>
 Feed" href="<?php 
        echo esc_attr(get_feed_link('atom'));
        ?>
">
        <?php 
    }
Exemplo n.º 10
0
function govsite_core_behaviour_wp_head()
{
    ?>
    <link rel="alternate" type="application/atom+xml" title="<?php 
    echo get_bloginfo('name');
    ?>
 Feed" href="<?php 
    echo esc_attr(get_feed_link('atom'));
    ?>
">
    <?php 
}
Exemplo n.º 11
0
<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="alternate" type="application/rss+xml" title="<?php echo get_bloginfo('name'); ?> Feed" href="<?php echo esc_url(get_feed_link()); ?>">

  <?php wp_head(); ?>
  <!--[if lt IE 9]>
    <script type="text/javascript" src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script type="text/javascript" src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
  <!--[if lt IE 9]>
    <link rel="stylesheet" href="<?php bloginfo('template_url')?>/assets/css/ie8-style.css" type="text/css" />
  <![endif]-->
  <script src='https://www.google.com/recaptcha/api.js'></script>
</head>
Exemplo n.º 12
0
 function test_main_feed()
 {
     self::factory()->post->create();
     // @test_404
     $types = array('rss2', 'rss', 'atom');
     foreach ($types as $type) {
         $this->go_to(get_feed_link($type));
         $this->assertQueryTrue('is_feed');
     }
 }
Exemplo n.º 13
0
function jw_baiping($post_id)
{
    $baiduXML = 'weblogUpdates.extendedPing' . get_option('blogname') . ' ' . home_url() . ' ' . get_permalink($post_id) . ' ' . get_feed_link() . ' ';
    $wp_http_obj = new WP_Http();
    $return = $wp_http_obj->post('http://ping.baidu.com/ping/RPC2', array('body' => $baiduXML, 'headers' => array('Content-Type' => 'text/xml')));
    if (isset($return['body'])) {
        if (strstr($return['body'], '0')) {
            $noff_log = 'succeeded!';
        } else {
            $noff_log = 'failed!';
        }
    } else {
        $noff_log = 'failed!';
    }
}
Exemplo n.º 14
0
/**
 * Display the links to the general feeds.
 *
 * @since 2.8.0
 *
 * @param array $args Optional arguments.
 */
function feed_links($args = array())
{
    if (!current_theme_supports('automatic-feed-links')) {
        return;
    }
    $defaults = array('separator' => _x('&raquo;', 'feed link'), 'feedtitle' => __('%1$s %2$s Feed'), 'comstitle' => __('%1$s %2$s Comments Feed'));
    $args = wp_parse_args($args, $defaults);
    /**
     * Filter whether to display the posts feed link.
     *
     * @since 4.4.0
     *
     * @param bool $show Whether to display the posts feed link. Default true.
     */
    if (apply_filters('feed_links_show_posts_feed', true)) {
        echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf($args['feedtitle'], get_bloginfo('name'), $args['separator'])) . '" href="' . esc_url(get_feed_link()) . "\" />\n";
    }
    /**
     * Filter whether to display the comments feed link.
     *
     * @since 4.4.0
     *
     * @param bool $show Whether to display the comments feed link. Default true.
     */
    if (apply_filters('feed_links_show_comments_feed', true)) {
        echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf($args['comstitle'], get_bloginfo('name'), $args['separator'])) . '" href="' . esc_url(get_feed_link('comments_' . get_default_feed())) . "\" />\n";
    }
}
Exemplo n.º 15
0
 static function ajax_read_url()
 {
     return add_query_arg('p2ajax', 'true', get_feed_link('p2.ajax'));
 }
Exemplo n.º 16
0
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 
}
function get_bloginfo($show='') {

	switch($show) {
	case 'url' :
	case 'home' : 
	case 'siteurl' :
		$output = get_settings('home');
		break;
	case 'wpurl' :
		$output = get_settings('siteurl');
		break;
	case 'description':
		$output = get_settings('blogdescription');
		break;
	case 'rdf_url':
		$output = get_feed_link('rdf');
		break;
	case 'rss_url':
		$output = get_feed_link('rss');
		break;
	case 'rss2_url':
		$output = get_feed_link('rss2');
		break;
	case 'atom_url':
		$output = get_feed_link('atom');
		break;        
	case 'comments_rss2_url':
		$output = get_feed_link('comments_rss2');
		break;
	case 'pingback_url':
		$output = get_settings('siteurl') .'/xmlrpc.php';
		break;
	case 'stylesheet_url':
		$output = get_stylesheet_uri();
		break;
	case 'stylesheet_directory':
		$output = get_stylesheet_directory_uri();
		break;
	case 'template_directory':
	case 'template_url':
		$output = get_template_directory_uri();
		break;
	case 'admin_email':
		$output = get_settings('admin_email');
		break;
	case 'charset':
		$output = get_settings('blog_charset');
		if ('' == $output) $output = 'UTF-8';
		break;
	case 'html_type' :
		$output = get_option('html_type');
		break;
	case 'version':
		global $wp_version;
		$output = $wp_version;
		break;
	case 'name':
	default:
		$output = get_settings('blogname');
		break;
	}
	return $output;
}
function podPress_xspf_playlist()
{
    global $podPress, $more, $posts, $post, $m;
    header('HTTP/1.0 200 OK');
    header('Content-type: application/xspf+xml; charset=' . get_bloginfo('charset'), true);
    header('Content-Disposition: attachment; filename="playlist.xspf"');
    header('Cache-Control: no-cache, must-revalidate');
    // HTTP/1.1
    header('Expires: Wed, 28 Oct 2010 05:00:00 GMT');
    // Date in the past
    $more = 1;
    echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '" ?' . ">\n";
    echo '<playlist version="1" xmlns="http://xspf.org/ns/0/">' . "\n";
    echo "\t" . '<title>' . podPress_feedSafeContent(get_bloginfo('blogname')) . '</title>' . "\n";
    echo "\t" . '<annotation><![CDATA[' . $podPress->settings['iTunes']['summary'] . ']]></annotation>' . "\n";
    if (empty($podPress->settings['iTunes']['author'])) {
        $creator = get_bloginfo('blogname');
    } else {
        $creator = $podPress->settings['iTunes']['author'];
    }
    echo "\t" . '<creator>' . podPress_feedSafeContent($creator) . '</creator>' . "\n";
    echo "\t" . '<location>' . get_feed_link('playlist.xspf') . '</location>' . "\n";
    if (!empty($podPress->settings['rss_license_url'])) {
        echo "\t" . '<license>' . $podPress->settings['rss_license_url'] . '</license>' . "\n";
    }
    echo "\t" . '<trackList>' . "\n";
    if (isset($posts)) {
        foreach ($posts as $post) {
            start_wp();
            /* This is a call to a very very old function and it seems to be not necessary if $post is global. */
            $enclosureTag = podPress_getEnclosureTags('xspf');
            if ($enclosureTag != '') {
                // if no enclosure tag, no need for track tags
                $is_password_protected = podpress_post_is_password_protected();
                if (FALSE === $is_password_protected) {
                    echo $enclosureTag;
                }
            }
        }
    }
    echo "\t" . '</trackList>' . "\n";
    echo '</playlist>' . "\n";
    exit;
}
Exemplo n.º 19
0
/**
 * Display the links to the general feeds.
 *
 * @since 2.8.0
 *
 * @param array $args Optional arguments.
 */
function feed_links($args = array())
{
    if (!current_theme_supports('automatic-feed-links')) {
        return;
    }
    $defaults = array('separator' => _x('&raquo;', 'feed link'), 'feedtitle' => __('%1$s %2$s Feed'), 'comstitle' => __('%1$s %2$s Comments Feed'));
    $args = wp_parse_args($args, $defaults);
    echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf($args['feedtitle'], get_bloginfo('name'), $args['separator'])) . '" href="' . esc_url(get_feed_link()) . "\" />\n";
    echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf($args['comstitle'], get_bloginfo('name'), $args['separator'])) . '" href="' . esc_url(get_feed_link('comments_' . get_default_feed())) . "\" />\n";
}
Exemplo n.º 20
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;
 }
 function settings_general_edit()
 {
     global $wpdb, $wp_rewrite, $wp_version;
     podPress_isAuthorized();
     if (isset($_GET['updated']) && $_GET['updated'] == 'true') {
         echo '<div id="message" class="updated fade"><p>' . __('Settings Saved', 'podpress') . '</p></div>';
     } elseif (isset($_GET['updated']) && $_GET['updated'] != 'true') {
         echo '<div id="message" class="error fade"><p>' . __('<strong>Error:</strong> Unable to save the settings', 'podpress') . '</p></div>';
     }
     // ntm: where is the check? some times this message appears despite the fact that the theme has the necessary functions and hooks
     // Because it is not a hundred percent reliable I deactivate it for now
     //~ if(!$this->settings['compatibilityChecks']['wp_head'] || !$this->settings['compatibilityChecks']['wp_footer']) {
     //~ echo '<div class="wrap">'."\n";
     //~ if($this->settings['compatibilityChecks']['themeTested']) {
     //~ echo '	<h2>'.__('Theme Compatibility Problem', 'podpress').'</h2>'."\n";
     //~ } else {
     //~ echo '	<h2>'.__('Theme Compatibility Check Required', 'podpress').'</h2>'."\n";
     //~ }
     //~ echo '	<fieldset class="options">'."\n";
     //~ if($this->settings['compatibilityChecks']['themeTested']) {
     //~ echo '		<legend>'.__('Current Theme is not compliant', 'podpress').'</legend>'."\n";
     //~ } else {
     //~ echo '		<legend>'.__('Current Theme needs to be tested', 'podpress').'</legend>'."\n";
     //~ }
     //~ echo '		<table width="100%" cellspacing="2" cellpadding="5" class="editform">'."\n";
     //~ echo '			<tr>'."\n";
     //~ echo '				<td>'."\n";
     //~ if($this->settings['compatibilityChecks']['themeTested']) {
     //~ echo '				podPress has found the "'.get_current_theme().'" theme fails to meet important requirements.<br /><br />'."\n";
     //~ } else {
     //~ echo '				podPress has not yet detected the "'.get_current_theme().'" theme to be compliant. Please visit your <a href="'.podPress_siteurl().'">main blog page</a> for podPress to re-check.<br /><br />'."\n";
     //~ }
     //~ if(!$this->settings['compatibilityChecks']['wp_head']) {
     //~ echo '				The header.php in your theme needs to be calling wp_head(); before the closing head tag.<br />'."\n";
     //~ echo '				Change this:<br />'."\n";
     //~ echo '				<code>&lt;head&gt;</code><br />'."\n";
     //~ echo '				To this:<br />'."\n";
     //~ echo '				<code>&lt;?php wp_head(); ?&gt;'."<br />\n".'&lt;head&gt;</code><br />'."\n";
     //~ echo '				<br />'."\n";
     //~ }
     //~ if(!$this->settings['compatibilityChecks']['wp_footer']) {
     //~ echo '				The footer.php in your theme needs to be calling wp_footer(); before the closing body tag.<br />'."\n";
     //~ echo '				Change this:<br />'."\n";
     //~ echo '				<code>&lt;/body&gt;</code><br />'."\n";
     //~ echo '				To this:<br />'."\n";
     //~ echo '				<code>&lt;?php wp_footer(); ?&gt;'."<br />\n".'&lt;/body&gt;</code><br />'."\n";
     //~ }
     //~ echo '				Look at the default theme files for example.<br />'."\n";
     //~ echo '				</td>'."\n";
     //~ echo '			</tr> '."\n";
     //~ echo '		</table>'."\n";
     //~ echo '	</fieldset>'."\n";
     //~ echo '</div>'."\n";
     //~ }
     echo '<div class="wrap">' . "\n";
     if (TRUE == version_compare($wp_version, '2.7', '>=')) {
         echo '<div id="podpress-icon" class="icon32"><br /></div>';
     }
     if (TRUE == version_compare($wp_version, '2.8', '>=')) {
         echo '	<h2>' . __('General Settings', 'podpress') . '</h2>' . "\n";
         // get the plugins version information via the WP plugins version check
         if (TRUE == version_compare($wp_version, '2.9', '>=')) {
             $versioninfo = get_site_transient('update_plugins');
         } else {
             $versioninfo = get_transient('update_plugins');
         }
         // If there is a new version then there is a 'response'. This is the method from the plugins page.
         if (FALSE !== isset($versioninfo->response[plugin_basename(dirname(__FILE__) . '/podpress.php')]->new_version)) {
             echo '<div class="podpress_notice"><p><a href="http://wordpress.org/extend/plugins/podpress/" target="_blank">' . __('a new podPress version is available', 'podpress') . '</a></p></div>';
         }
     } else {
         echo '	<h2>' . __('General Settings', 'podpress') . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.mightyseek.com/podpress/#download" target="_new"><img src="http://www.mightyseek.com/podpress_downloads/versioncheck.php?current=' . PODPRESS_VERSION . '" alt="' . __('Checking for updates... Failed.', 'podpress') . '" border="0" /></a></h2>' . "\n";
     }
     echo '	<form method="post">' . "\n";
     if (function_exists('wp_nonce_field')) {
         // since WP 2.0.4
         wp_nonce_field('podPress_general_options_nonce');
     }
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Location of the Media Files', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="mediaWebPath">' . __('URL of the media files directory', 'podpress') . '</label> <a href="javascript:void(null);" onclick="javascript: podPressShowHideRow(\'mediaWebPathHelp\');">(?)</a>:</th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="text" id="mediaWebPath" name="mediaWebPath" class="podpress_wide_text_field" size="40" value="' . attribute_escape(stripslashes($this->settings['mediaWebPath'])) . '" /><br />' . "\n";
     if (!isset($this->settings['mediaWebPath']) || empty($this->settings['mediaWebPath'])) {
         echo "<br />\n";
         echo __('Suggested', 'podpress') . ': <code>' . $this->uploadurl . '</code>' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr>' . "\n";
     echo '			<tr id="mediaWebPathHelp" style="display: none;">' . "\n";
     echo '				<th>&nbsp;</th>' . "\n";
     echo '				<td>';
     echo '					' . sprintf(__('Point this to the full URL where you put your media files. It can be an URL to a local or remote location. The default value is the URL of the upload folder of this blog for example: <code>%1$s</code>', 'podpress'), $this->uploadurl) . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="mediaFilePath">' . __('Absolute path of the media files directory (optional)', 'podpress') . '</label> <a href="javascript:void(null);" onclick="javascript: podPressShowHideRow(\'mediaFilePathHelp\');">(?)</a>:</th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="text" id="mediaFilePath" name="mediaFilePath" class="podpress_wide_text_field" size="40" value="' . attribute_escape(stripslashes($this->settings['mediaFilePath'])) . '" /><br />' . "\n";
     $this->checkLocalPathToMediaFiles();
     if (!empty($this->settings['autoDetectedMediaFilePath']) and !empty($this->settings['mediaFilePath'])) {
         echo __('This directory is not valid or not accessible.', 'podpress') . '<br /> ' . __('Suggested', 'podpress') . ': <code>' . $this->settings['autoDetectedMediaFilePath'] . '</code>' . "\n";
     } elseif (empty($this->settings['mediaFilePath'])) {
         echo __('e.g.', 'podpress') . ': <code>' . $this->settings['autoDetectedMediaFilePath'] . '</code>' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="mediaFilePathHelp" style="display: none;">' . "\n";
     echo '				<th>&nbsp;</th>' . "\n";
     echo '				<td>';
     echo '					' . sprintf(__('This is an optional feature which is used to speed up the time/duration detection process, and is only possible if you host the media files on the same server as your website. Instead of having to go download a file, it can read e.g. the ID3 information of a media file directly.<br />Insert the full path name of the folder which includes the media files. The URL and this path needs to point to the same directory. This path name could look like <code>/home/yoursite/http/wp-content/files/</code> or can be the path of the upload folder of this blog: <code>%1$s</code>.', 'podpress'), $this->uploadpath) . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     $home_path = get_home_path();
     $trac_folder_exists = is_dir(ABSPATH . 'podpress_trac');
     $trac_htaccess_exists = file_exists(ABSPATH . 'podpress_trac/.htaccess');
     $trac_index_exists = file_exists(ABSPATH . 'podpress_trac/index.php');
     if (TRUE == $trac_htaccess_exists and TRUE == $trac_htaccess_exists and TRUE == $trac_htaccess_exists) {
         $podpress_trac_in_place = TRUE;
         $podpress_trac_str = '<input type="hidden" id="podpress_trac_folder_in_place" value="true" />';
     } else {
         $podpress_trac_in_place = FALSE;
         $podpress_trac_str = '<input type="hidden" id="podpress_trac_folder_in_place" value="false" />' . "\n";
         $podpress_trac_str .= "\t\t\t\t\t" . '<input type="hidden" id="podpress_trac_folder_exists" value="' . var_export($trac_folder_exists, TRUE) . '" />' . "\n";
         $podpress_trac_str .= "\t\t\t\t\t" . '<input type="hidden" id="podpress_trac_index_exists" value="' . var_export($trac_index_exists, TRUE) . '" />' . "\n";
         $podpress_trac_str .= "\t\t\t\t\t" . '<input type="hidden" id="podpress_trac_htaccess_exists" value="' . var_export($trac_htaccess_exists, TRUE) . '" />';
     }
     if (FALSE === $podpress_trac_in_place and $this->settings['statMethod'] == 'podpress_trac_dir') {
         $showpodpress_tracWarning = 'style="display: block;"';
     } else {
         $showpodpress_tracWarning = 'style="display: none;"';
     }
     $permalink_structure = get_option('permalink_structure');
     if (FALSE === empty($permalink_structure)) {
         $usingpi = TRUE;
         $usingpi_str = '<input type="hidden" id="podpress_usingpermalinks" value="true" />';
     } else {
         $usingpi = FALSE;
         $usingpi_str = '<input type="hidden" id="podpress_usingpermalinks" value="false" />';
     }
     //if (!$usingpi && !$hasHtaccess && $this->settings['statMethod'] == 'permalinks') {
     if (!$usingpi && $this->settings['statMethod'] == 'permalinks') {
         $showPermalinksWarning = 'style="display: block;"';
     } else {
         $showPermalinksWarning = 'style="display: none;"';
     }
     if (function_exists('get_admin_url')) {
         $adminurl = get_admin_url();
         // since WP 3.0
     } elseif (function_exists('admin_url')) {
         $adminurl = admin_url();
         // since WP 2.6
     } else {
         $adminurl = get_option('siteurl') . '/wp-admin';
     }
     $permalinksettingsurl = trailingslashit($adminurl) . 'options-permalink.php';
     if (!$this->settings['enableStats']) {
         $showStatsOptions = 'style="display: none;"';
     }
     if (TRUE == defined('MULTISITE') and TRUE === constant('MULTISITE') and function_exists('get_blog_count')) {
         // get_blog_count exists only if it is a multi site installation
         $multisite_permalink_msg = '<p class="podpress_notice">' . sprintf(__('<strong>Notice:</strong> This blog is part of a multi site blog installation. It might be possible that the method "Use WP Permalinks" works without changing the permalink setting of this particular blog to something other than the default setting. Use the stats method test and control whether it is possible to download and play the media files in your posts. If those tests are not successful then adjust the <a href="%1$s">Permalink Settings of this blog</a>.', 'podpress'), $permalinksettingsurl) . '</p>';
         $podpress_trac_msg = '<p class="podpress_notice">' . __('<strong>Notice:</strong> This blog is part of a multi site blog installation. It might be possible that the method "Optional Files podpress_trac directory" works without copying the podpress_trac folder and its files. Use the stats method test and control whether it is possible to download and play the media files in your posts. If those tests are not successful then follow the explanation of this method (see below).', 'podpress') . '</p>';
     } else {
         $multisite_permalink_msg = '';
         $podpress_trac_msg = '';
     }
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Download Statistics', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enableStats">' . __('Enable Statistics', 'podpress') . ':</label></th>' . "\n";
     echo '				<td class="podpress_settings_narrow_col">' . "\n";
     echo '					<input type="checkbox" name="enableStats" id="enableStats" ';
     if ($this->settings['enableStats']) {
         echo 'checked="checked"';
     }
     echo " onclick=\"javascript: podPressShowHideRow('statWarning'); podPressShowHideRow('statMethodWrapper'); podPressShowHideRow('statMethodHelp'); podPressShowHideRow('statsmethodtest'); podPressShowHideRow('statsmethodtesthelp'); podPressShowHideRow('statLoggingWrapper'); podPressShowHideRow('statLoggingHelp'); podPressShowHideRow('3rdpartyinfo'); podPressShowHideRow('podtracrow'); podPressShowHideRow('blubrryrow'); podPressShowHideRow('statBluBrryWrapper'); podPressShowHideRow('3rdpartystatsrow'); podPressShowHideRow('3rdpartystatsnoticerow'); podPressShowHideRow('disabledashboardwidgetrow'); \"/>\n";
     echo '					' . $usingpi_str . "\n";
     echo '					' . $podpress_trac_str . "\n";
     echo '				</td>' . "\n";
     echo '				<td>' . __('This will enable the podPress statistics features.', 'podpress') . ' ' . $perm . '</td>' . "\n";
     //echo '				<td>'.__('This will enable the podPress statistics features and give possibility to use the statistics from <a href="http://www.blubrry.com/podpress/" target="_blank">blubrry</a> or <a href="http://www.podtrac.com/" target="_blank">Podtrac</a> the included stats support in podPress.', 'podpress').' '.$perm.'</td>'."\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statWarning" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2">' . "\n";
     echo '					<div id="permalinksWarning" ' . $showPermalinksWarning . '>' . "\n";
     echo '						<p class="podpress_error">' . sprintf(__('<strong>Warning:</strong> It appears you are not using WordPress permalinks or at least not a non-default permalink setting. If you want to use this statistic method, you need to choose a permalink structure which is different to the default setting. Go to the <a href="%1$s">Permalink Settings of your blog</a> and change that first. Otherwise enabling this statistics feature will most likely cause downloads of media files which were added with podPress to fail.', 'podpress'), $permalinksettingsurl) . '</p>' . "\n";
     echo '						' . $multisite_permalink_msg . "\n";
     echo '					</div>' . "\n";
     echo '					<div id="podpress_trac_dirWarning" ' . $showpodpress_tracWarning . '>' . "\n";
     echo '						<p class="podpress_error">' . __('<strong>Warning:</strong> The "Optional Files podpress_trac directory" statistic method will not work. Because the podpress_trac folder or the files are not in the right place:', 'podpress');
     echo '						<br />' . __('- podpress_trac folder exists at the right place:', 'podpress');
     if (TRUE === $trac_folder_exists) {
         echo ' ' . __('true', 'podpress') . "\n";
     } else {
         echo ' <strong>' . __('false', 'podpress') . '</strong>' . "\n";
     }
     echo '						<br />' . __('- the .htacces file in the podpress_trac folder exists:', 'podpress');
     if (TRUE === $trac_htaccess_exists) {
         echo ' ' . __('true', 'podpress') . "\n";
     } else {
         echo ' <strong>' . __('false', 'podpress') . '</strong>' . "\n";
     }
     echo '						<br />' . __('- the index.php file in the podpress_trac folder exists:', 'podpress');
     if (TRUE === $trac_index_exists) {
         echo ' ' . __('true', 'podpress') . "\n";
     } else {
         echo ' <strong>' . __('false', 'podpress') . '</strong>' . "\n";
     }
     echo '						</p>' . "\n";
     echo '						' . $podpress_trac_msg . "\n";
     echo '					</div>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statMethodWrapper" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="statMethod">' . __('Stat Method', 'podpress') . ':</label></th>' . "\n";
     echo '				<td colspan="2">';
     echo '					<select name="statMethod" id="statMethod" onchange="podpress_check_method_requirements(this.value);">' . "\n";
     echo '						<option value="permalinks" ';
     if ($this->settings['statMethod'] == 'permalinks') {
         echo 'selected="selected"';
     }
     echo '>' . __('Use WP Permalinks (recommended)', 'podpress') . '</option>' . "\n";
     echo '						<option value="podpress_trac_dir" ';
     if ($this->settings['statMethod'] == 'podpress_trac_dir') {
         echo 'selected="selected"';
     }
     echo '>' . __('Optional Files podpress_trac directory', 'podpress') . '</option>' . "\n";
     echo '						<option value="download.mp3" ';
     if ($this->settings['statMethod'] == 'download.mp3') {
         echo 'selected="selected"';
     }
     echo '>' . __('Use download.mp3', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statMethodHelp" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">';
     echo '				<ul>' . "\n";
     echo '				<li>' . sprintf(__('"Use WP Permalinks" (recommended) - Requires a non-default permalink structure (go to <a href="%1$s">Settings > Permalinks</a>). Activating any non-default permalink setting in Wordpress will create an <a href="http://en.wikipedia.org/wiki/.htaccess" target="_blank" title="en.Wikipedia: .htaccess">.htaccess</a> file (or <a href="http://en.wikipedia.org/wiki/Web.config" target="_blank" title="en.Wikipedia: Web.config">web.config</a> file on some web-servers) in the base directory of your blog which podpress needs to support tracking statistics. If enabling permalinks in Wordpress breaks your download links or results in a "File not found" error when using the media player, then you should look into using one of the other methods for tracking statistics.', 'podpress'), $permalinksettingsurl) . '</li>';
     echo '				<li>' . __('"Optional Files podpress_trac directory" - If you cannot use WP permalinks and you run <a href="http://en.wikipedia.org/wiki/Apache_HTTP_Server" target="_blank" title="en.Wikipedia: Apache HTTP Server">Apache</a>, this option may work (depending on the webserver configuration - see details below*). If you choose this option then you need to copy the folder podpress_trac/ including the two files (index.php and .htaccess) to the root folder of your blog. After copying these files the root folder should contain wp-config.php and four subdirectories; wp-admin, wp-content, wp-includes and podpress_trac. The podpress_trac folder contains an .htaccess file and an index.php file which enable podpress to resolve URLs of the media files which will be tracked by the statistics features in podPress. The copied folder and the files should be given the same filesystem permissions as the other folders and files in your WordPress install.<br />*If this method fails after copying the required files and setting the permissions it could be that your server is configured to ignore directory-level .htaccess files. Shared hosting users may need to contact their support to allow these files. If you are configuring your own Apache server the podpress_trac folder needs to have <code>AllowOverride FileInfo Options</code> or <code>AllowOverride All</code>. You can find the necessary configuration details here: <a href="http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride" target="_blank">http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride</a>.', 'podpress') . '</li>';
     echo '				<li>' . __('"Use download.mp3" - This is an alternative to using an .htaccess file. This is provided for sites which run webservers that do not use the .htaccess file for configuration, such as Microsoft Internet Information Server (IIS).<br />To use this option, you will need to configure your web server to process .mp3 files the same way it does .php files. This is only necessary for the podPress directory, so that the download.mp3 file will be processed as a .php file.<br />If you do not know the type or version of the webserver you are using you can retrieve the information by using WP plugins like <a href="http://wordpress.org/extend/plugins/wp-system-health/" target="_blank">WP System Health</a> or <a href="http://wordpress.org/extend/plugins/system-information/" target="_blank">System information</a>.', 'podpress') . '</li>';
     echo '				<ul>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statsmethodtest" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="statsmethodtest">' . __('Test the stat method', 'podpress') . ':</label></th>' . "\n";
     echo '				<td colspan="2">' . "\n";
     echo '					<input type="button" name="statTest" value="' . __('start the test', 'podpress') . '" onclick="podPressTestStats(\'' . get_bloginfo('home') . '/podpress_trac/web/0/0/podPressStatTest.txt\')"/>' . "\n";
     // WP 3.0 compatible
     echo '					<input type="text" name="statTestResult" id="statTestResult" size="30" value="" readonly="readonly" />' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statsmethodtesthelp" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">';
     echo '				' . __('This test can help you to determine whether your podPress statistics method setting will work under the current circumstances or not.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statLoggingWrapper" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="statLogging">' . __('Stat Logging', 'podpress') . ':</label></th>' . "\n";
     echo '				<td colspan="2">';
     echo '					<select name="statLogging" id="statLogging">' . "\n";
     echo '						<option value="Counts" ';
     if ($this->settings['statLogging'] == 'Counts') {
         echo 'selected="selected"';
     }
     echo '>' . __('Counts Only (recommended)', 'podpress') . '</option>' . "\n";
     echo '						<option value="Full" ';
     if ($this->settings['statLogging'] == 'Full') {
         echo 'selected="selected"';
     }
     echo '>' . __('Full', 'podpress') . '</option>' . "\n";
     echo '						<option value="FullPlus" ';
     if ($this->settings['statLogging'] == 'FullPlus') {
         echo 'selected="selected"';
     }
     echo '>' . __('Full+', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     unset($x);
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="statLoggingHelp" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">';
     echo '				<ul>' . "\n";
     echo '				<li>' . __('"Counts Only" (recommended) - podPress counts only how many times a media was downloaded from the website, the feeds and how often the player of this file was started. Your media files should have unique file names. (The db table name is e.g. wp_podpress_statcounts.)', 'podpress') . '</li>';
     echo '				<li>' . __('"Full" - With this option podPress will log how many times a media was downloaded from the website, the feeds and how often the player of this file was started. It will also log on each download the ID of the post (or page), the IP address, the referrer, the browser type (User Agent) and the time of the download. Furthermore podPress parses the referer and user agent information and store the information in separate columns in the database.<br />Full includes also the posssibility to mark downloads on the basis of user agent names and IP addresses as downloads of <a href="http://en.wikipedia.org/wiki/Internet_bot" target="_blank" title="en.Wikipedia: Internet bot">Internets bots</a> and filter the statistic tables and graphs. (The db table name is e.g. wp_podpress_stats.) If you add more than one media file to a post (with podPress) then these files should have different file names.', 'podpress') . '</li>';
     echo '				<li>' . __('"Full+" (experimental) - If you would like to know all the information "Full" gives you and additionally whether a download has been completed or not. podPress can only try to find out whether a file transfer was complete, if the file is on the same server as your blog (if it is a local file for the script). If you add more than one media file to a post (with podPress) then these files should have different file names. In order to get the information whetehr a download was complete or not podPress (or at least a PHP script of podPress) needs to run during the whole download. But this may lead to problems if the file is relative big or the maximum execution time for PHP scripts is relative short on the server of your blog. If the time limit is reached the download stops. So if you are not allowed to change the max_execution_time setting of the PHP configuration on the server of your blog or if you are unsure what this all means then please use the "Full" method (as recommended).', 'podpress') . '</li>';
     echo '				<ul>' . "\n";
     echo '				' . __('Note that if you enable the statistics, the Counts Only counter counts always even if you choose Full or Full+ but not vice versa.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     if (TRUE == version_compare($wp_version, '2.5', '>=') and TRUE == version_compare($wp_version, '2.7', '<')) {
         $this->settings['disabledashboardwidget'] = TRUE;
         $descwidget_disabled = ' disabled = "disabled"';
         $descwidget_notice = __('podPress offers no Dashboard Widget for WP 2.5.x and WP 2.6.x.', 'podpress');
     } else {
         $descwidget_disabled = '';
         $descwidget_notice = '';
     }
     echo '			<tr id="disabledashboardwidgetrow" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="disabledashboardwidget">' . __('Disable the dashboard widget', 'podpress') . ':</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="disabledashboardwidget" id="disabledashboardwidget" value="yes"';
     if (isset($this->settings['disabledashboardwidget']) and TRUE === $this->settings['disabledashboardwidget']) {
         echo 'checked="checked"';
     }
     echo $descwidget_disabled . ' />' . "\n";
     echo '				</td>' . "\n";
     echo '				<td>' . $descwidget_notice . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_3RD_PARTY_STATS in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_3RD_PARTY_STATS') and TRUE === constant('PODPRESS_ACTIVATE_3RD_PARTY_STATS')) {
         switch ($this->settings['enable3rdPartyStats']) {
             case 'PodTrac':
                 $podtrac_checked = ' checked="checked"';
                 $blubrry_checked = '';
                 $disable3rdparty_checked = '';
                 break;
             case 'Blubrry':
                 $podtrac_checked = '';
                 $blubrry_checked = ' checked="checked"';
                 $disable3rdparty_checked = '';
                 break;
             default:
                 $podtrac_checked = '';
                 $blubrry_checked = '';
                 $disable3rdparty_checked = ' checked="checked"';
                 break;
         }
         $podtrac_disabled = '';
         $blubrry_disabled = '';
         $blubrry_readonly = '';
     } else {
         $podtrac_disabled = ' disabled = "disabled"';
         $blubrry_disabled = ' disabled = "disabled"';
         $blubrry_readonly = 'readonly = "readonly"';
         $podtrac_checked = '';
         $blubrry_checked = '';
         $disable3rdparty_checked = ' checked="checked"';
     }
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_3RD_PARTY_STATS in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_3RD_PARTY_STATS') and TRUE === constant('PODPRESS_ACTIVATE_3RD_PARTY_STATS')) {
         echo '			<tr id="3rdpartyinfo" class="podpress_settings_headerrow" ' . $showStatsOptions . '>' . "\n";
         echo '				<th colspan="3"' . $thirdpartystats_class . '>' . __('In addition to the podPress own counter mechanisms, you can use one from a company:', 'podpress') . '</th>' . "\n";
         echo '			</tr> ' . "\n";
         echo '			<tr id="podtracrow" ' . $showStatsOptions . '>' . "\n";
         echo '				<th><label for="enablePodTracStats">' . __('Enable Podtrac Statistics', 'podpress') . ':</label></th>' . "\n";
         echo '				<td>' . "\n";
         echo '					<input type="radio" name="enable3rdPartyStats" id="enablePodTracStats" value="PodTrac"' . $podtrac_checked . $podtrac_disabled . ' />' . "\n";
         echo '				</td>' . "\n";
         echo '				<td>' . __('This will use the Podtrac service. <a href="http://www.podtrac.com/" target="_new">More info ...</a>', 'podpress') . '</td>' . "\n";
         echo '			</tr> ' . "\n";
         echo '			<tr id="blubrryrow" ' . $showStatsOptions . '>' . "\n";
         echo '				<th><label for="enableBlubrryStats">' . __('Enable blubrry Statistics', 'podpress') . ':</label></th>' . "\n";
         echo '				<td>' . "\n";
         echo '					<input type="radio" name="enable3rdPartyStats" id="enableBlubrryStats" value="Blubrry"' . $blubrry_checked . $blubrry_disabled . ' />' . "\n";
         echo '				</td>' . "\n";
         echo '				<td>' . __('This will use the blubrry service. (You need use a non-default Permalink scheme.) <a href="http://www.blubrry.com/podpress/" target="_new">More info ...</a>', 'podpress') . '</td>' . "\n";
         echo '			</tr> ' . "\n";
         echo '			<tr id="statBluBrryWrapper" ' . $showStatsOptions . '>' . "\n";
         echo '				<th></th>' . "\n";
         echo '				<td></td>' . "\n";
         echo '				<td>';
         echo '					<label for="statBluBrryProgramKeyword">' . __('Program Keyword', 'podpress') . '</label>:';
         echo '					<input type="input" name="statBluBrryProgramKeyword" id="statBluBrryProgramKeyword" ' . $blubrry_readonly . ' value="' . $this->settings['statBluBrryProgramKeyword'] . '"/>';
         echo '				</td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     echo '			<tr id="3rdpartystatsrow" ' . $showStatsOptions . '>' . "\n";
     echo '				<th><label for="disable3rdPartyStats">' . __('Disable 3rd Party Statistics', 'podpress') . ':</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="radio" name="enable3rdPartyStats" id="disable3rdPartyStats" value="No"' . $disable3rdparty_checked . ' />' . "\n";
     echo '				</td>' . "\n";
     echo '				<td></td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr id="3rdpartystatsnoticerow" ' . $showStatsOptions . '>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td colspan="2">' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_3RD_PARTY_STATS in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_3RD_PARTY_STATS') and TRUE === constant('PODPRESS_ACTIVATE_3RD_PARTY_STATS')) {
         echo '					' . __('You can use only one of these services together with the podPress statistics at the same time. If you want to have more or different statistics then you could use the service of e.g. Feedburner or eventually Libsyn.', 'podpress') . "\n";
     } else {
         echo '					<span class="nonessential">' . __('This feature is deactivated and will maybe be removed in one of a future versions. If you want to activate this feature then ask for help in <a href="http://wordpress.org/tags/podpress?forum_id=10" target="_blank">this WP.org Forum</a>.', 'podpress') . '</span>' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Post Editing', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="maxMediaFiles">' . __('max. number of media files', 'podpress') . ':</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="text" maxlength="3" size="3" name="maxMediaFiles" id="maxMediaFiles" value="' . $this->settings['maxMediaFiles'] . '"' . " />\n";
     echo '				</td>' . "\n";
     echo '				<td>' . __('which you want to add to single posts (or pages). The higher the number, the bigger the performance impact when loading the Posts editor. (default: 10)', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     if (TRUE == version_compare($wp_version, '2.9', '>=')) {
         $selected_types = $this->settings['metaboxforcustomposttypes'];
         if (FALSE === is_array($selected_types)) {
             $selected_types = array();
         }
         $args = array('public' => true, '_builtin' => false);
         $output = 'objects';
         // names or objects
         $post_types = get_post_types($args, $output);
         echo '			<tr>' . "\n";
         echo '				<th>' . "\n";
         echo ' 					' . __('podPress meta box for custom post types', 'podpress');
         echo '				</th>' . "\n";
         echo '				<td>' . "\n";
         if (TRUE == is_array($post_types) and FALSE == empty($post_types)) {
             echo '				<select name="metaboxforcustomposttypes[]" size="4" multiple="multiple" class="podpress_customposttype_select">' . "\n";
             echo '					<optgroup label="' . esc_attr(__('public custom post types:', 'podpress')) . '">' . "\n";
             foreach ($post_types as $post_type) {
                 if (TRUE == in_array($post_type->name, $selected_types)) {
                     $selected = ' selected="selected"';
                 } else {
                     $selected = '';
                 }
                 echo '				<option value="' . $post_type->name . '"' . $selected . '>' . $post_type->label . ' (' . $post_type->name . ')</option>';
             }
             echo '					</optgroup>' . "\n";
             echo '				</select>' . "\n";
         } else {
             echo '				<em class="nonessential">(' . __('Currently are no custom post types defined.', 'podpress') . ')</em>' . "\n";
         }
         echo '				</td>' . "\n";
         echo '				<td class="podpress_settings_description_cell">' . "\n";
         echo ' 					' . __('Show a podPress meta box below or at the side of the editor of post of a custom post type. This makes it possbile to add podcasts with podPress to posts of a custom post type.', 'podpress');
         echo '					<br /><span class="podpress_description">' . __('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') . '</span>';
         echo '				</td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Blog Search', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="activate_podpressmedia_search">' . __('expand the search to podPress media files', 'podpress') . ':</label></th>' . "\n";
     echo '				<td class="podpress_settings_narrow_col">' . "\n";
     if (TRUE == isset($this->settings['activate_podpressmedia_search']) and TRUE === $this->settings['activate_podpressmedia_search']) {
         echo '					<input type="checkbox" name="activate_podpressmedia_search" id="activate_podpressmedia_search" value="true" checked="checked" />' . "\n";
     } else {
         echo '					<input type="checkbox" name="activate_podpressmedia_search" id="activate_podpressmedia_search" value="true" />' . "\n";
     }
     echo '				</td>' . "\n";
     echo '				<td>' . __('Expand the blog search (which searches by default only through titles and content of posts, pages and attachments) to the titles and URLs (location) of the media files which have been attached with podPress.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_PODANGO_INTEGRATION in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_PODANGO_INTEGRATION') and TRUE === constant('PODPRESS_ACTIVATE_PODANGO_INTEGRATION')) {
         echo '	<fieldset class="options">' . "\n";
     } else {
         echo '	<fieldset class="options nonessential">' . "\n";
     }
     echo '		<legend>' . __('Podango Integration', 'podpress') . '</legend>' . "\n";
     echo '          	<p class="podpress_error">' . __('Podango Integration does not work anymore and causes probably long page loading times e.g. on the post/page editor pages of this blog. Since 2008/2009 Podango <a href="http://sites.google.com/site/podangohibernate/">is currently on vacation</a> and the API which podPress tries to use is unavailable. That is why it is most likely that you will experience a lot of warning and error messages if you activate this feature.', 'podpress') . '</p>';
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enablePodangoIntegration">' . __('Enable Podango Integration', 'podpress') . ':</label></th>' . "\n";
     echo '				<td class="podpress_settings_narrow_col">' . "\n";
     // ntm: reactivate this feature with the constant PODPRESS_ACTIVATE_PODANGO_INTEGRATION in the podpress.php files
     if (TRUE == defined('PODPRESS_ACTIVATE_PODANGO_INTEGRATION') and TRUE === constant('PODPRESS_ACTIVATE_PODANGO_INTEGRATION')) {
         echo '					<input type="checkbox" name="enablePodangoIntegration" id="enablePodangoIntegration" ';
         if ($this->settings['enablePodangoIntegration']) {
             echo 'checked="checked"';
         }
         echo " />\n";
     } else {
         echo '					<input type="checkbox" name="enablePodangoIntegration" id="enablePodangoIntegration" disabled="disabled" />' . "\n";
     }
     echo '				</td>' . "\n";
     echo '				<td>';
     if (TRUE == defined('PODPRESS_ACTIVATE_PODANGO_INTEGRATION') and TRUE === constant('PODPRESS_ACTIVATE_PODANGO_INTEGRATION')) {
         echo '					' . __('podPress users can gain additional functionality when used in combination with Podango hosting.', 'podpress') . '<br />' . "\n";
     } else {
         echo '					<span class="nonessential">' . __('This feature is deactivated and will maybe be removed in one of a future versions. If you want to activate this feature despite the absence of the Podango platform then ask for help in <a href="http://wordpress.org/tags/podpress?forum_id=10" target="_blank">this WP.org Forum</a>.', 'podpress') . '</span><br />' . "\n";
     }
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     if (FALSE == defined('PODPRESS_DEACTIVATE_PREMIUM') or FALSE === constant('PODPRESS_DEACTIVATE_PREMIUM')) {
         echo '	<fieldset class="options">' . "\n";
         echo '		<legend>' . __('Premium Content', 'podpress') . '</legend>' . "\n";
         if (!$this->settings['enablePremiumContent']) {
             $showPremiumOptions = 'style="display: none;"';
         }
         $premiumcontenthelp = '		<tr id="premiumPodcastingHelp" ' . $showPremiumOptions . '>' . "\n";
         $premiumcontenthelp .= '			<th>&nbsp;</th>' . "\n";
         $premiumcontenthelp .= '			<td colspan="2">';
         $premiumcontenthelp .= '				' . sprintf(__('<p>If you want use this part of the plugin then you should <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">read more about roles and capabilities</a> and you need to get and install a roles and capabilities management plugin like <a href="http://wordpress.org/extend/plugins/members/" target="_blank">Members</a> or <a href="http://wordpress.org/extend/plugins/capsman/" target="_blank">Capability Manager</a> (The former recommendation was the <a href="http://redalt.com/wiki/Role+Manager" target="_blank">Role Manager</a> plugin. But it is unclear whether it works with current WP version or not.)</p><p>Anyone that should have access to the premium podcasting files need to have the Premium Content role, which can be done by making them Premium Subscribers.<br />Then just in each post set the media file as premium content and normal visitors will not be able to see the content via the web or from the feed.</p><p>If you are using a WordPress version which is newer than v2.1, then users can just use <a href="%1$s">%1$s</a> for their premium content needs. User will be asked for their user/pass before giving the RSS feed. For instance Juice and iTunes support this fine.</p><p>Keep in mind, that this does NOT protect your content if someone discovers the URLs, it only hides the location from showing up on the site or in the feed. To fully protect your files you can use this feature in combination with an external service like the one from <a href="http://www.amember.com/" target="_blank">aMemberPro</a> which should work with podPress. aMemberPro will protect the files from being downloaded at all, unless authorized. It also handles monthly subscription issues through <a href="http://en.wikipedia.org/wiki/Paypal" target="_blank" title="en.Wikipedia: PayPal">PayPal</a> and such. If you combine such a service with WordPress and podPress you can have your own premium content podcasting service.</p>', 'podpress'), get_feed_link('premium')) . "\n";
         // ntm: Parts of this text are obviously aut dated and I took the chance to modify it
         //$premiumcontenthelp .= '				'.__('Full documentation is still under development on <a href="http://podcasterswiki.com/index.php?title=PodPress_Documentation#Premium_Podcasting">the wiki</a><br /><br />This is the short of it is that you need to get and install the <a href="http://redalt.com/wiki/Role+Manager">Role Manager plugin</a><br />Anyone that should have access to the premium podcasting files need to have the Premium Content role, which can be done by making them Premium Subscribers<br /><br />Then just in each post set the media file as premium content and normal visitors will not be able to see the content via the web or from the feed.<br />If your using Wordpress 2.1, then users can just use http://www.yoursite.com/?feed=premium for their premium content needs.<br />If your using WP 1.5 or 2.0.x, then you need to put premiumcast.php in your main wordpress dir and then have your subscribers use this file as their rss feed.<br />These will cause the site to ask for their user/pass before giving the RSS feed. Juice and iTunes supports this fine.<br /><br />Keep in mine, that this does NOT protect your content if someone discovers the URLS, it only hides the location from showing up on the site or in the feed. To fully protect your files I have also been able to get this working with <a href="http://www.amember.com/">aMemberPro</a><br />aMemberPro will protect the files from being downloaded at all, unless authorized. It also handles monthly subscription issues thru paypal and such. Its a great tool, and combines with WordPress and podPress you can have a full blown premium content podcasting service.', 'podpress')."\n";
         $premiumcontenthelp .= '			</td>' . "\n";
         $premiumcontenthelp .= '		</tr> ' . "\n";
         echo '		<table class="editform podpress_settings_table">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th><label for="enablePremiumContent">' . __('Enable Premium Content:', 'podpress') . '</label></th>' . "\n";
         if (!podPress_WPVersionCheck('2.0.0')) {
             echo '			<td>&nbsp;</td>' . "\n";
             echo '			<td>' . __('Only available in WordPress 2.0.0 or greater', 'podpress') . '</td>' . "\n";
             echo '		</tr> ' . "\n";
             echo $premiumcontenthelp;
         } else {
             echo '			<td colspan="2">' . "\n";
             echo '				<input type="checkbox" name="enablePremiumContent" id="enablePremiumContent" ';
             if ($this->settings['enablePremiumContent']) {
                 echo 'checked="checked"';
             }
             echo " onclick=\"javascript: podPressShowHideRow('premiumPodcastingHelp'); podPressShowHideRow('premiumMethodWrapper'); podPressShowHideRow('premiumContentFakeEnclosureWrapper');\" />\n";
             //ntm: with the podPressShowHideRow('protectedMediaFilePathWrapper'); podPressShowHideRow('protectedMediaFilePathHelp');
             //~ echo '				<input type="checkbox" name="enablePremiumContent" id="enablePremiumContent" '; if($this->settings['enablePremiumContent']) { echo 'checked="checked"'; } echo " onclick=\"javascript: podPressShowHideRow('premiumPodcastingHelp'); podPressShowHideRow('protectedMediaFilePathWrapper'); podPressShowHideRow('protectedMediaFilePathHelp'); podPressShowHideRow('premiumMethodWrapper'); podPressShowHideRow('premiumContentFakeEnclosureWrapper');\" />\n";
             echo '			</td>' . "\n";
             echo '		</tr> ' . "\n";
             echo $premiumcontenthelp;
             // ntm: there is nothing behind this input that is why is deactivated
             //~ echo '		<tr id="protectedMediaFilePathWrapper" '.$showPremiumOptions.'>'."\n";
             //~ echo '			<th><label for="protectedMediaFilePath">'.__('Absolute path to protected media', 'podpress').':</label></th>'."\n";
             //~ echo '			<td colspan="2">'."\n";
             //~ echo '				<input type="text" id="protectedMediaFilePath" name="protectedMediaFilePath" class="podpress_wide_text_field" size="40" value="'.attribute_escape($this->settings['protectedMediaFilePath']).'" />'."\n";
             //~ echo '			</td>'."\n";
             //~ echo '		</tr>'."\n";
             //~ echo '		<tr id="protectedMediaFilePathHelp" '.$showPremiumOptions.'>'."\n";
             //~ echo '			<th>&nbsp;</th>'."\n";
             //~ echo '			<td colspan="2">';
             //~ echo '				'.sprintf(__('Insert here the complete path name of the folder which contains the premium meda files. This folder needs to be on the same server as your blog. But it should NOT be in a dir under your web root. It should be a dir outside of the web root so that users cannot simply browse to the dir and get access to the files. For example this could be <code>%1$s/premium_mp3s/</code> or maybe with random number as folder name: <code>%1$s/%2$s/premium_mp3s/</code>. Create this folder before you start to use this feature.', 'podpress'), $this->uploadpath, rand(10000, 99999))."\n";
             //~ echo '			</td>'."\n";
             //~ echo '		</tr> '."\n";
             echo '		<tr id="premiumMethodWrapper" ' . $showPremiumOptions . '>' . "\n";
             echo '			<th><label for="premiumMethod">' . __('Method', 'podpress') . ':</label></th>' . "\n";
             echo '			<td>' . "\n";
             echo '				<select name="premiumMethod" id="premiumMethod">' . "\n";
             echo '					<option value="Digest" ';
             if ($this->settings['premiumMethod'] != 'Basic') {
                 echo 'selected="selected"';
             }
             echo '>' . __('Digest', 'podpress') . '</option>' . "\n";
             echo '					<option value="Basic" ';
             if ($this->settings['premiumMethod'] == 'Basic') {
                 echo 'selected="selected"';
             }
             echo '>' . __('Basic', 'podpress') . '</option>' . "\n";
             echo '				</select>' . "\n";
             echo '			</td>' . "\n";
             echo '			<td>' . __('Digest auth is MUCH better than Basic, which is easily unencrypted.', 'podpress') . '</td>' . "\n";
             echo '		</tr> ' . "\n";
             echo '		<tr id="premiumContentFakeEnclosureWrapper" ' . $showPremiumOptions . '>' . "\n";
             echo '			<th><label for="premiumContentFakeEnclosure">' . __('Use fake enclosure', 'podpress') . ':</label></th>' . "\n";
             echo '			<td>' . "\n";
             echo '				<input type="checkbox" name="premiumContentFakeEnclosure" id="premiumContentFakeEnclosure" ';
             if ($this->settings['premiumContentFakeEnclosure']) {
                 echo 'checked="checked"';
             }
             echo "/>\n";
             echo '			</td>' . "\n";
             echo '			<td>' . __('If you want the <a href="http://en.wikipedia.org/wiki/RSS_enclosure" target="_blank" title="en.Wikipedia: RSS enclosures">enclosures</a> (elements of the news feeds which contain usually links to the media files) to always exist (so the feed will show up in iTunes) then check this. A fake enclosure contains a place holder URL and not the real one.', 'podpress') . '</td>' . "\n";
             echo '		</tr> ' . "\n";
         }
         echo '		</table>' . "\n";
         echo '	</fieldset>' . "\n";
     }
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Post Content', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentLocation">' . __('Location:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentLocation" id="contentLocation">' . "\n";
     echo '						<option value="start" ';
     if ($this->settings['contentLocation'] == 'start') {
         echo 'selected="selected"';
     }
     echo '>' . __('Start', 'podpress') . '</option>' . "\n";
     echo '						<option value="end" ';
     if ($this->settings['contentLocation'] != 'start') {
         echo 'selected="selected"';
     }
     echo '>' . __('End', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Part of the Post where the podPress content (Player, and links) will go. Default is at the end.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentPlayer">' . __('Player:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentPlayer" id="contentPlayer">' . "\n";
     echo '						<option value="both" ';
     if ($this->settings['contentPlayer'] == 'both') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="inline" ';
     if ($this->settings['contentPlayer'] == 'inline') {
         echo 'selected="selected"';
     }
     echo '>' . __('Inline Only', 'podpress') . '</option>' . "\n";
     echo '						<option value="popup" ';
     if ($this->settings['contentPlayer'] == 'popup') {
         echo 'selected="selected"';
     }
     echo '>' . __('Popup Only', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentPlayer'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Allow users to make use of the web players for your content / Popup Only - Only the Popup Player is available and it is not possible to use the player in the posts. / Inline Only - The Popup player is not available and it is only possible to use the player in the posts.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentImage">' . __('Image:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentImage" id="contentImage">' . "\n";
     echo '						<option value="button" ';
     if ($this->settings['contentImage'] == 'button') {
         echo 'selected="selected"';
     }
     echo '>' . __('Button', 'podpress') . '</option>' . "\n";
     echo '						<option value="icon" ';
     if ($this->settings['contentImage'] == 'icon') {
         echo 'selected="selected"';
     }
     echo '>' . __('Icon', 'podpress') . '</option>' . "\n";
     echo '						<option value="none" ';
     if ($this->settings['contentImage'] == 'none') {
         echo 'selected="selected"';
     }
     echo '>' . __('None', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('The image that shows up before links for the media file.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentHidePlayerPlayNow">' . __('Hide Player/Play Now:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentHidePlayerPlayNow" id="contentHidePlayerPlayNow">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentHidePlayerPlayNow'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Show', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentHidePlayerPlayNow'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Hide', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Show the Hide Player/Play Now link', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDownload">' . __('Download:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentDownload" id="contentDownload">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentDownload'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentDownload'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Allow users to download the media files directly from the website.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDownloadText">' . __('Show Download Text:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentDownloadText" id="contentDownloadText">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentDownloadText'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentDownloadText'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('If disabled, users can still download using the icon link.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDownloadStats">' . __('Show Download Stats:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentDownloadStats" id="contentDownloadStats">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentDownloadStats'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if ($this->settings['contentDownloadStats'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Display download stats for each media file for everyone to see at the end of the podPress line. This will cause a performance hit of 2 extra SQL queries per post being displayed. Disable this feature if your site is slowing down when podpress is enabled.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentDuration">' . __('Show Duration:', 'podpress') . '</label></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">' . "\n";
     echo '					<select name="contentDuration" id="contentDuration">' . "\n";
     if ($this->settings['contentDuration'] == 'enabled') {
         $this->settings['contentDuration'] = 'h:m:s';
     }
     $duration_schemes = array('h:m:s' => __('1:23:45 (h:m:s)', 'podpress'), 'm:s' => __('83:45 (m:s)', 'podpress'), 'h:m:s:ms' => __('1:23:45:30 (h:m:s:ms)', 'podpress'), 'm:s:ms' => __('83:45:30 (m:s:ms)', 'podpress'), 's:ms' => __('5025:30 (s:ms)', 'podpress'), 'h' => __('1.40 (h)', 'podpress'), 'm' => __('83.75 (m)', 'podpress'), 's' => __('5025.03 (s)', 'podpress'), 'ms' => __('5025030 (ms)', 'podpress'));
     foreach ($duration_schemes as $duration_scheme => $scheme_name) {
         if ($this->settings['contentDuration'] == $duration_scheme) {
             echo '						<option value="' . $duration_scheme . '" selected="selected">' . $scheme_name . '</option>' . "\n";
         } else {
             echo '						<option value="' . $duration_scheme . '">' . $scheme_name . '</option>' . "\n";
         }
     }
     echo '						<option value="disabled" ';
     if ($this->settings['contentDuration'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				' . __('Display the duration for each media file. (The milliseconds value will only be visible if it is bigger than zero.)', 'podpress');
     echo '					<br /><label for="contentDurationdivider">' . __('Choose a duration format:', 'podpress') . '</label> <select name="contentDurationdivider" id="contentDurationdivider">' . "\n";
     if (version_compare($wp_version, '2.8', '<')) {
         $duration_dividers = array('colon' => '1:23:45:30', 'hminsms' => '1 ' . __('h', 'podpress') . ' 23 ' . __('min', 'podpress') . ' 45 ' . __('s', 'podpress') . ' 30 ' . __('ms', 'podpress'), 'hrminsecmsec' => '1 ' . __('hr.', 'podpress') . ' 23 ' . __('min.', 'podpress') . ' 45 ' . __('sec.', 'podpress') . ' 30 ' . __('msec.', 'podpress'), 'hoursminutessecondsmilliseconds' => '1 ' . __ngettext('hour', 'hours', 1, 'podpress') . ' 23 ' . __ngettext('minute', 'minutes', 23, 'podpress') . ' 45 ' . __ngettext('second', 'seconds', 45, 'podpress') . ' 30 ' . __ngettext('millisecond', 'milliseconds', 30, 'podpress'));
     } else {
         $duration_dividers = array('colon' => '1:23:45:30', 'hminsms' => '1 ' . __('h', 'podpress') . ' 23 ' . __('min', 'podpress') . ' 45 ' . __('s', 'podpress') . ' 30 ' . __('ms', 'podpress'), 'hrminsecmsec' => '1 ' . __('hr.', 'podpress') . ' 23 ' . __('min.', 'podpress') . ' 45 ' . __('sec.', 'podpress') . ' 30 ' . __('msec.', 'podpress'), 'hoursminutessecondsmilliseconds' => '1 ' . _n('hour', 'hours', 1, 'podpress') . ' 23 ' . _n('minute', 'minutes', 23, 'podpress') . ' 45 ' . _n('second', 'seconds', 45, 'podpress') . ' 30 ' . _n('millisecond', 'milliseconds', 30, 'podpress'));
     }
     //			$duration_dividers = Array('colon' => '1:23:45:30', 'hminsms' => __('1 h 23 min 45 s 30 ms', 'podpress'), 'hrminsecmsec' => __('1 hr 23 min 45 sec 30 msec', 'podpress'), 'hoursminutessecondsmilliseconds' => __('1 hour 23 minutes 45 seconds 30 milliseconds', 'podpress'));
     if (FALSE == isset($this->settings['contentDurationdivider'])) {
         $this->settings['contentDurationdivider'] = 'colon';
     }
     foreach ($duration_dividers as $duration_divider => $divider_name) {
         if ($this->settings['contentDurationdivider'] == $duration_divider) {
             echo '						<option value="' . $duration_divider . '" selected="selected">' . $divider_name . '</option>' . "\n";
         } else {
             echo '						<option value="' . $duration_divider . '">' . $divider_name . '</option>' . "\n";
         }
     }
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentfilesize">' . __('Show File Size:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<select name="contentfilesize" id="contentfilesize">' . "\n";
     echo '						<option value="enabled" ';
     if ($this->settings['contentfilesize'] == 'enabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Enabled', 'podpress') . '</option>' . "\n";
     echo '						<option value="disabled" ';
     if (FALSE == isset($this->settings['contentfilesize']) or $this->settings['contentfilesize'] == 'disabled') {
         echo 'selected="selected"';
     }
     echo '>' . __('Disabled', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Display the file size (in MB) for each media file.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="contentBeforeMore">' . __('Always before the &lt;!- More -&gt; tag:', 'podpress') . '</label></th>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . "\n";
     echo '					<select name="contentBeforeMore" id="contentBeforeMore">' . "\n";
     echo '						<option value="yes" ';
     if ($this->settings['contentBeforeMore'] == 'yes') {
         echo 'selected="selected"';
     }
     echo '>' . __('Yes', 'podpress') . '</option>' . "\n";
     echo '						<option value="no" ';
     if ($this->settings['contentBeforeMore'] != 'yes') {
         echo 'selected="selected"';
     }
     echo '>' . __('No', 'podpress') . '</option>' . "\n";
     echo '					</select>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('This defines that the player and the download links will always be visible on the short version of a post.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     $incontentandexcerpt_vals = array('in_content_and_excerpt' => __('in content sections and excerpts', 'podpress'), 'in_content_only' => __('in content sections only', 'podpress'), 'in_excerpt_only' => __('in excerpts only', 'podpress'));
     echo '			<tr>' . "\n";
     echo '				<th><label for="incontentandexcerpt">' . __('Show the podPress elements in the content sections and the excerpts?', 'podpress') . '</label></th>' . "\n";
     echo '				<td colspan="2" class="podpress_settings_description_cell">' . "\n";
     echo '					<select name="incontentandexcerpt" id="incontentandexcerpt">' . "\n";
     foreach ($incontentandexcerpt_vals as $value => $optiontext) {
         if ($this->settings['incontentandexcerpt'] == $value) {
             echo '						<option value="' . $value . '" selected="selected">' . $optiontext . '</option>' . "\n";
         } else {
             echo '						<option value="' . $value . '">' . $optiontext . '</option>' . "\n";
         }
     }
     echo '					</select>' . "\n";
     echo '				' . sprintf(__('Determine whether the podPress elements (player or player preview, download link, icon, etc.) should be visible in the content sections and the excerpts of posts and pages. (default: %1$s)', 'podpress'), __('in content sections and excerpts', 'podpress')) . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     if (TRUE == isset($this->settings['do_not_use_the_target_attribute']) and TRUE === $this->settings['do_not_use_the_target_attribute']) {
         $checked = ' checked="checked"';
     } else {
         $checked = '';
     }
     echo '			<tr>' . "\n";
     echo '				<th><label for="do_not_use_the_target_attribute">' . __('do not use the <code>target="new"</code> attribute in links of podPress', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="do_not_use_the_target_attribute" id="do_not_use_the_target_attribute" value="yes"' . $checked . ' />' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('If your theme uses a <a href="http://en.wikipedia.org/wiki/Document_Type_Declaration" target="_blank" title="en.Wikipedia: Document Type Declaration">DOCTYPE</a> which does not allow "target" attributes in hyper links (e.g. XHTML 1.0 Strict) then you can use this option to prompt podPress to create valid code for your theme. (default: not checked)', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     /*
     echo '	<fieldset class="options">'."\n";
     echo '		<legend>'.__('TorrentCasting', 'podpress').'</legend>'."\n";
     echo '		<table class="editform podpress_settings_table">'."\n";
     echo '			<tr>'."\n";
     echo '				<th><label for="enableTorrentCasting">'.__('Enable TorrentCasting', 'podpress').':</label></th>'."\n";
     echo '				<td>'."\n";
     echo '					<input type="checkbox" name="enableTorrentCasting" id="enableTorrentCasting" '; if($this->settings['enableTorrentCasting']) { echo 'checked="checked"'; } echo "/>\n";
     echo '				</td>'."\n";
     echo '			</tr> '."\n";
     echo '			<tr>'."\n";
     echo '				<td colspan="2">This just allows for you to define a location to the .torrent file for you content. If you enable this you should copy the torrentcast.php file from plugins/podpress/optional_files and into your main wordpress directory.</td>'."\n";
     echo '			</tr> '."\n";
     echo '		</table>'."\n";
     echo '	</fieldset>'."\n";
     */
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('System Information', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th>' . "\n";
     echo ' 					' . __('Feed Caching', 'podpress');
     echo '				</th>' . "\n";
     echo '				<td>' . "\n";
     echo ' 					' . __('Feedcache files will be stored in the follow directory:', 'podpress') . '<br /><code>' . $this->tempfilesystempath . '</code> ' . $this->checkWritableTempFileDir(TRUE);
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th></th>' . "\n";
     echo '				<td>' . __('If you are using the index.php from optional_files in your main WordPress directory then you should set this value to match the $podPressFeedCacheDir value.', 'podpress') . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th>PODPRESS_DEBUG_LOG</th>' . "\n";
     if (defined('PODPRESS_DEBUG_LOG') and TRUE === constant('PODPRESS_DEBUG_LOG')) {
         $result = '';
         $result = podPress_var_dump('podPress - general settings - permissions test');
         if (!empty($result)) {
             $errormsg = '<p class="podpress_error">' . $result . '</p>';
         } else {
             $errormsg = '';
         }
         echo '				<td><p>' . sprintf(__('is defined and set to: %1$s.', 'podpress'), 'TRUE');
     } elseif (defined('PODPRESS_DEBUG_LOG') and FALSE === constant('PODPRESS_DEBUG_LOG')) {
         echo '				<td><p>' . sprintf(__('is defined and set to: %1$s.', 'podpress'), 'FALSE');
     } else {
         echo '				<td><p>' . sprintf(__('is not defined or set to something other than %1$s or %2$s.', 'podpress'), 'TRUE', 'FALSE');
     }
     echo ' ' . sprintf(__('By default this constant is set to %2$s and is defined in the podpress.php file. If it is defined as %1$s then podPress logs its activities during the process of the detection of the file size, duration and ID3 tag information to a file with the name podpress_log.dat in the podPress folder.', 'podpress'), 'TRUE', 'FALSE') . '</p>' . $errormsg . '</td>' . "\n";
     echo '			</tr> ' . "\n";
     $version_from_db = get_option('podPress_version');
     if (TRUE == version_compare($version_from_db, constant('PODPRESS_VERSION'), '>')) {
         $set_version_back_to = '8.8.9';
         echo '			<tr>' . "\n";
         echo '				<th><span class="podpress_error">' . __('Version Conflict', 'podpress') . '</span></th>' . "\n";
         echo '				<td>' . sprintf(__('The current podPress version is smaller than the version number which has been stored previously in the db: %1$s &lt; %2$s. You have had probably installed a podPress version with a higher version number. (Maybe you have tested a Development Version.) The difference between these two version numbers indicates that maybe some db entries are not up to date or settings are not right because the update procedure has not been started. This may cause various problems with the Feeds and the appearance of the podcast episodes in the posts.', 'podpress'), constant('PODPRESS_VERSION'), $version_from_db) . '<br /><label for="version_set_back_to">' . sprintf(__('Set the version number in the db back to %1$s (to start possibly necessary upgrade actions):', 'podpress'), $set_version_back_to) . '</label> <input type="checkbox" id="version_set_back_to" name="podpress_version_set_back_to" value="' . $set_version_back_to . '" /></td>' . "\n";
         echo '			</tr> ' . "\n";
     } elseif (TRUE == version_compare($version_from_db, constant('PODPRESS_VERSION'), '<')) {
         echo '			<tr>' . "\n";
         echo '				<th><span class="podpress_error">' . __('Version Conflict', 'podpress') . '</span></th>' . "\n";
         echo '				<td>' . sprintf(__('The version number in the db is smaller than the current podPress version: %1$s &lt; %2$s. That means most likely that the upgrade process is uncomplete. Because of that, it is possible that you experience problems with the Feeds and the appearance of the podcast episode in the posts. You may ask in the <a href="http://wordpress.org/tags/podpress" target="_blank">WordPress.org Forum</a> for help (Please, use "podpress" as a tag).', 'podpress'), $version_from_db, constant('PODPRESS_VERSION')) . '</td>' . "\n";
         echo '			</tr> ' . "\n";
     } else {
         echo '			<tr>' . "\n";
         echo '				<th>' . __('current podPress version', 'podpress') . '</th>' . "\n";
         echo '				<td>' . constant('PODPRESS_VERSION') . '</td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     $all_plugins = get_plugins();
     $podpress_version = $all_plugins[plugin_basename(dirname(__FILE__) . '/podpress.php')]['Version'];
     if (TRUE == version_compare($podpress_version, '8.8.10', '>=')) {
         $nr_old_meta_keys_podPressMedia = intval($wpdb->get_var($wpdb->prepare("SELECT COUNT(*) as old_meta_keys FROM " . $wpdb->prefix . "postmeta WHERE meta_key = 'podPressMedia'")));
         $nr_old_meta_keys_podPressPostSpecific = intval($wpdb->get_var($wpdb->prepare("SELECT COUNT(*) as old_meta_keys FROM " . $wpdb->prefix . "postmeta WHERE meta_key = 'podPressPostSpecific'")));
         if ($nr_old_meta_keys_podPressMedia + $nr_old_meta_keys_podPressPostSpecific > 0) {
             echo '			<tr>' . "\n";
             echo '				<th><span class="podpress_error">' . __('old meta_key names detected', 'podpress') . '</span></th>' . "\n";
             echo '				<td><p>podPressMedia: ' . $nr_old_meta_keys_podPressMedia . '<br />podPressPostSpecific: ' . $nr_old_meta_keys_podPressPostSpecific . '</p><input type="checkbox" id="add_underscore_to_old_meta_keys" name="podpress_add_underscore_to_old_meta_keys" value="yes" /> <label for="add_underscore_to_old_meta_keys">' . sprintf(__('Rename all meta_keys with the values podPressMedia to _podPressMedia and podPressPostSpecific to _podPressPostSpecific', 'podpress'), $set_version_back_to) . '</label></td>' . "\n";
             echo '			</tr> ' . "\n";
         }
     }
     if (TRUE == version_compare($podpress_version, constant('PODPRESS_VERSION'), '!=')) {
         echo '			<tr>' . "\n";
         echo '				<th><span class="podpress_error">' . __('Version Conflict', 'podpress') . '</span></th>' . "\n";
         echo '				<td><p>' . sprintf(__('podPress version: %1$s', 'podpress'), $podpress_version) . '<br />PODPRESS_VERSION: ' . constant('PODPRESS_VERSION') . '<br />' . sprintf(__('version number from the db: %1$s', 'podpress'), $version_from_db) . '</p></td>' . "\n";
         echo '			</tr> ' . "\n";
     }
     echo '		</table>' . "\n";
     echo '	</fieldset>' . "\n";
     echo '	<input type="hidden" name="podPress_submitted" value="general" />' . "\n";
     echo '	<p class="submit"> ' . "\n";
     echo '		<input class="button-primary" type="submit" name="Submit" value="' . __('Update Options', 'podpress') . ' &raquo;" /> ' . "\n";
     echo '	</p> ' . "\n";
     echo '	<fieldset class="options">' . "\n";
     echo '		<legend>' . __('Credit', 'podpress') . '</legend>' . "\n";
     echo '		<table class="editform podpress_settings_table">' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enableFooter">' . __('Show podPress footer:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="enableFooter" id="enableFooter" ';
     if ($this->settings['enableFooter']) {
         echo 'checked="checked"';
     }
     echo '/>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Enabling this allows you to give us credit for making this plugin, and lets other podcasters find out what your using to publish your podcasts. If this feature makes your site look bad, please add in podPress with all the other credits, such as the ones in place for WordPress.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="enableVersionInFeeds">' . __('Add podPress version information to the feeds:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="enableVersionInFeeds" id="enableVersionInFeeds" ';
     if ($this->settings['enableVersionInFeeds']) {
         echo 'checked="checked"';
     }
     echo '/>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Enabling this will add a comment with the name of this plugin and maybe the current version number to all Feeds of this blog. This comment is usually only visible if you look into the source code of the Feeds and may e.g. help to debug problems.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="disableVersionNumber">' . __('Do not show the version number:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<input type="checkbox" name="disableVersionNumber" id="disableVersionNumber" ';
     if ($this->settings['disableVersionNumber']) {
         echo 'checked="checked"';
     }
     echo '/>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('Do not show the current version number in the footer nor in the Feeds of this blog.', 'podpress') . "\n";
     echo '				</td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '			<tr>' . "\n";
     echo '				<th><label for="donation_button">' . __('Donations Appreciated:', 'podpress') . '</label></th>' . "\n";
     echo '				<td>' . "\n";
     echo '					<a id="donation_button" href="http://www.mightyseek.com/podpress_donate.php" title="' . __('Donation button of the original author of this project Dan Kuykendall (seek3r)', 'podpress') . '" target="_blank"><img alt="' . __('Donation button of the original author of this project Dan Kuykendall (seek3r)', 'podpress') . '" border="0" src="' . PODPRESS_URL . '/images/x-click-but04.gif" /></a>' . "\n";
     echo '				</td>' . "\n";
     echo '				<td class="podpress_settings_description_cell">' . __('This project is a labor of love, feel no obligation what-so-ever to donate. For those that want to, here ya go.', 'podpress') . ' <span class="nonessential">(' . __('Donation button of the original author of this project Dan Kuykendall (seek3r)', 'podpress') . ')</span></td>' . "\n";
     echo '			</tr> ' . "\n";
     echo '		</table>' . "\n";
     //~ ntm: Frappr.com seems to be down since 01/2010
     //~ echo '		<table class="editform podpress_settings_table">'."\n";
     //~ echo '			<tr>'."\n";
     //~ echo '				<th><label for="frapprmaplink">'.__('Frapper Map:', 'podpress').'</label></th>'."\n";
     //~ echo '				<td>'."\n";
     //~ echo '					<a id="frapprmaplink" href="http://www.frappr.com/mightyseek"><img src="http://www.frappr.com/i/frapper_sticker.gif" alt="Check out our Frappr!" title="Check out our Frappr!" border="0"></a>'."\n";
     //~ echo '				</td>'."\n";
     //~ echo '			</tr> '."\n";
     //~ echo '			<tr>'."\n";
     //~ echo '				<td colspan="2">Let us know where you are!</td>'."\n";
     //~ echo '			</tr> '."\n";
     //~ echo '		</table>'."\n";
     echo '	</fieldset>' . "\n";
     echo '	</form> ' . "\n";
     $sql = "SELECT * FROM " . $wpdb->prefix . "postmeta WHERE meta_key IN('podPress_podcastStandardAudio',\n\t\t\t                                                                 'podPress_podcastStandardAudioSize',\n\t\t\t                                                                 'podPress_podcastStandardAudioDuration',\n\t\t\t                                                                 'podPress_podcastEnhancedAudio',\n\t\t\t                                                                 'podPress_podcastEnhancedAudioSize',\n\t\t\t                                                                 'podPress_podcastEnhancedAudioDuration',\n\t\t\t                                                                 'podPress_podcastVideo',\n\t\t\t                                                                 'podPress_podcastVideoSize',\n\t\t\t                                                                 'podPress_podcastVideoDuration',\n\t\t\t                                                                 'podPress_podcastVideoDimension',\n\t\t\t                                                                 'podPress_webVideo',\n\t\t\t                                                                 'podPress_webVideoSize',\n\t\t\t                                                                 'podPress_webVideoDuration',\n\t\t\t                                                                 'podPress_webVideoDimension',\n\t\t\t                                                                 'podPress_podcastEbook',\n\t\t\t                                                                 'podPress_podcastEbookSize',\n\t\t\t                                                                 'itunes:duration')";
     $stats = $wpdb->get_results($sql);
     if ($stats) {
         echo '	<form method="post">' . "\n";
         echo '	<fieldset class="options">' . "\n";
         echo '		<legend>' . __('Complete Upgrade Process', 'podpress') . '</legend>' . "\n";
         echo '		<table width="100%" cellspacing="2" cellpadding="5" class="editform">' . "\n";
         echo '			<tr>' . "\n";
         echo '				<th><label for="cleanupOldMetaKeys">' . __('Remove Pre v.40 database clutter.', 'podpress') . ':</label></th>' . "\n";
         echo '				<td>' . "\n";
         echo '					<input type="checkbox" name="cleanupOldMetaKeys" id="cleanupOldMetaKeys" />' . "\n";
         echo '				</td>' . "\n";
         echo '			</tr> ' . "\n";
         echo '		</table>' . "\n";
         echo '	</fieldset>' . "\n";
         echo '	<input type="hidden" name="podPress_submitted" value="general" />' . "\n";
         echo '	<p class="submit"> ' . "\n";
         echo '		<input class="button-primary" type="submit" name="Submit" value="' . __('Update Options', 'podpress') . ' &raquo;" /> ' . "\n";
         echo '	</p> ' . "\n";
         echo '	</form> ' . "\n";
     }
     echo '</div>' . "\n";
 }
Exemplo n.º 22
0
		        </div>
		      </div>
		    <?php 
    }
}
?>
		  
		    <?php 
$post_bak = $post;
// Get all TOPs
$loop = new WP_Query(array('post_type' => 'cvtx_top', 'orderby' => 'meta_value', 'meta_key' => 'cvtx_sort', 'nopaging' => true, 'order' => 'ASC'));
if ($loop->have_posts()) {
    ?>
		      <ul id="antraege">
		      	<?php 
    $rss_url = add_query_arg(array('post_type' => 'cvtx_antrag'), get_feed_link('rss2'));
    ?>
		      	<li class="rss top"><h3>RSS-Feed</h3><?php 
    printf('<p>' . __('Um immer über neue Anträge auf dem Laufenden zu bleiben, abonniere doch einfach den %1$s!', 'cvtx') . '</p>', '<a href="' . $rss_url . '">RSS-Feed</a>');
    ?>
</li>
		        <li class="top overview"><h3>Übersicht</h3>
		          <ul>
		            <?php 
    while ($loop->have_posts()) {
        $loop->the_post();
        ?>
		              <li class="antrag">
		                <a href="#<?php 
        print get_post_meta($post->ID, 'cvtx_top_short', true);
        ?>
Exemplo n.º 23
0
 /**
  * Flushes post cache
  *
  * @param integer $post_id
  * @return boolean
  */
 function flush_post($post_id = null)
 {
     if (!$post_id) {
         $post_id = $this->_detect_post_id();
     }
     if ($post_id) {
         $uris = array();
         $domain_url = w3_get_domain_url();
         $feeds = $this->_config->get_array('pgcache.purge.feed.types');
         if ($this->_config->get_boolean('pgcache.purge.terms') || $this->_config->get_boolean('pgcache.purge.feed.terms')) {
             $taxonomies = get_post_taxonomies($post_id);
             $terms = nxt_get_post_terms($post_id, $taxonomies);
         }
         switch (true) {
             case $this->_config->get_boolean('pgcache.purge.author'):
             case $this->_config->get_boolean('pgcache.purge.archive.daily'):
             case $this->_config->get_boolean('pgcache.purge.archive.monthly'):
             case $this->_config->get_boolean('pgcache.purge.archive.yearly'):
             case $this->_config->get_boolean('pgcache.purge.feed.author'):
                 $post = get_post($post_id);
         }
         /**
          * Home URL
          */
         if ($this->_config->get_boolean('pgcache.purge.home')) {
             $home_path = w3_get_home_path();
             $site_path = w3_get_site_path();
             $uris[] = $home_path;
             if ($site_path != $home_path) {
                 $uris[] = $site_path;
             }
         }
         /**
          * Post URL
          */
         if ($this->_config->get_boolean('pgcache.purge.post')) {
             $post_link = post_permalink($post_id);
             $post_uri = str_replace($domain_url, '', $post_link);
             $uris[] = $post_uri;
         }
         /**
          * Post comments URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.comments') && function_exists('get_comments_pagenum_link')) {
             $comments_number = get_comments_number($post_id);
             $comments_per_page = get_option('comments_per_page');
             $comments_pages_number = @ceil($comments_number / $comments_per_page);
             for ($pagenum = 1; $pagenum <= $comments_pages_number; $pagenum++) {
                 $comments_pagenum_link = $this->_get_comments_pagenum_link($post_id, $pagenum);
                 $comments_pagenum_uri = str_replace($domain_url, '', $comments_pagenum_link);
                 $uris[] = $comments_pagenum_uri;
             }
         }
         /**
          * Post author URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.author') && $post) {
             $posts_number = count_user_posts($post->post_author);
             $posts_per_page = get_option('posts_per_page');
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $author_link = get_author_link(false, $post->post_author);
             $author_uri = str_replace($domain_url, '', $author_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $author_pagenum_link = $this->_get_pagenum_link($author_uri, $pagenum);
                 $author_pagenum_uri = str_replace($domain_url, '', $author_pagenum_link);
                 $uris[] = $author_pagenum_uri;
             }
         }
         /**
          * Post terms URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.terms')) {
             $posts_per_page = get_option('posts_per_page');
             foreach ($terms as $term) {
                 $term_link = get_term_link($term, $term->taxonomy);
                 $term_uri = str_replace($domain_url, '', $term_link);
                 $posts_pages_number = @ceil($term->count / $posts_per_page);
                 for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                     $term_pagenum_link = $this->_get_pagenum_link($term_uri, $pagenum);
                     $term_pagenum_uri = str_replace($domain_url, '', $term_pagenum_link);
                     $uris[] = $term_pagenum_uri;
                 }
             }
         }
         /**
          * Daily archive URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.archive.daily') && $post) {
             $post_date = strtotime($post->post_date);
             $post_year = gmdate('Y', $post_date);
             $post_month = gmdate('m', $post_date);
             $post_day = gmdate('d', $post_date);
             $posts_per_page = get_option('posts_per_page');
             $posts_number = $this->_get_archive_posts_count($post_year, $post_month, $post_day);
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $day_link = get_day_link($post_year, $post_month, $post_day);
             $day_uri = str_replace($domain_url, '', $day_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $day_pagenum_link = $this->_get_pagenum_link($day_uri, $pagenum);
                 $day_pagenum_uri = str_replace($domain_url, '', $day_pagenum_link);
                 $uris[] = $day_pagenum_uri;
             }
         }
         /**
          * Monthly archive URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.archive.monthly') && $post) {
             $post_date = strtotime($post->post_date);
             $post_year = gmdate('Y', $post_date);
             $post_month = gmdate('m', $post_date);
             $posts_per_page = get_option('posts_per_page');
             $posts_number = $this->_get_archive_posts_count($post_year, $post_month);
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $month_link = get_month_link($post_year, $post_month);
             $month_uri = str_replace($domain_url, '', $month_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $month_pagenum_link = $this->_get_pagenum_link($month_uri, $pagenum);
                 $month_pagenum_uri = str_replace($domain_url, '', $month_pagenum_link);
                 $uris[] = $month_pagenum_uri;
             }
         }
         /**
          * Yearly archive URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.archive.yearly') && $post) {
             $post_date = strtotime($post->post_date);
             $post_year = gmdate('Y', $post_date);
             $posts_per_page = get_option('posts_per_page');
             $posts_number = $this->_get_archive_posts_count($post_year);
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $year_link = get_year_link($post_year);
             $year_uri = str_replace($domain_url, '', $year_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $year_pagenum_link = $this->_get_pagenum_link($year_uri, $pagenum);
                 $year_pagenum_uri = str_replace($domain_url, '', $year_pagenum_link);
                 $uris[] = $year_pagenum_uri;
             }
         }
         /**
          * Feed URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.feed.blog')) {
             foreach ($feeds as $feed) {
                 $feed_link = get_feed_link($feed);
                 $feed_uri = str_replace($domain_url, '', $feed_link);
                 $uris[] = $feed_uri;
             }
         }
         if ($this->_config->get_boolean('pgcache.purge.feed.comments')) {
             foreach ($feeds as $feed) {
                 $post_comments_feed_link = get_post_comments_feed_link($post_id, $feed);
                 $post_comments_feed_uri = str_replace($domain_url, '', $post_comments_feed_link);
                 $uris[] = $post_comments_feed_uri;
             }
         }
         if ($this->_config->get_boolean('pgcache.purge.feed.author') && $post) {
             foreach ($feeds as $feed) {
                 $author_feed_link = get_author_feed_link($post->post_author, $feed);
                 $author_feed_uri = str_replace($domain_url, '', $author_feed_link);
                 $uris[] = $author_feed_uri;
             }
         }
         if ($this->_config->get_boolean('pgcache.purge.feed.terms')) {
             foreach ($terms as $term) {
                 foreach ($feeds as $feed) {
                     $term_feed_link = get_term_feed_link($term->term_id, $term->taxonomy, $feed);
                     $term_feed_uri = str_replace($domain_url, '', $term_feed_link);
                     $uris[] = $term_feed_uri;
                 }
             }
         }
         /**
          * Flush cache
          */
         if (count($uris)) {
             $cache =& $this->_get_cache();
             $mobile_groups = $this->_get_mobile_groups();
             $referrer_groups = $this->_get_referrer_groups();
             $encryptions = $this->_get_encryptions();
             $compressions = $this->_get_compressions();
             foreach ($uris as $uri) {
                 foreach ($mobile_groups as $mobile_group) {
                     foreach ($referrer_groups as $referrer_group) {
                         foreach ($encryptions as $encryption) {
                             foreach ($compressions as $compression) {
                                 $page_key = $this->_get_page_key($uri, $mobile_group, $referrer_group, $encryption, $compression);
                                 $cache->delete($page_key);
                             }
                         }
                     }
                 }
             }
             /**
              * Purge varnish servers
              */
             if ($this->_config->get_boolean('varnish.enabled')) {
                 $varnish =& w3_instance('W3_Varnish');
                 foreach ($uris as $uri) {
                     $varnish->purge($uri);
                 }
             }
         }
         return true;
     }
     return false;
 }
Exemplo n.º 24
0
 /**
  * Build public url where the feed can be subscribed at.
  *
  * @return string
  */
 public function get_subscribe_url()
 {
     return $this->with_blog_scope(function () {
         return apply_filters('podlove_subscribe_url', get_feed_link($this->slug));
     });
 }
Exemplo n.º 25
0
/**
 * Display the permalink for the feed type.
 *
 * @since 3.0.0
 *
 * @param string $anchor The link's anchor text.
 * @param string $feed Optional, defaults to default feed. Feed type.
 */
function the_feed_link($anchor, $feed = '')
{
    $link = '<a href="' . esc_url(get_feed_link($feed)) . '">' . $anchor . '</a>';
    echo apply_filters('the_feed_link', $link, $feed);
}
Exemplo n.º 26
0
function dsq_bloginfo_url($url)
{
    if (get_feed_link('comments_rss2') == $url && dsq_can_replace()) {
        return 'https://' . strtolower(get_option('disqus_forum_url')) . '.disqus.com' . DISQUS_RSS_PATH;
    } else {
        return $url;
    }
}
Exemplo n.º 27
0
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php 
wp_title('|', true, 'right');
?>
</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  
  <?php 
wp_head();
?>

  <link rel="alternate" type="application/rss+xml" title="<?php 
echo get_bloginfo('name');
?>
 Feed" href="<?php 
echo esc_url(get_feed_link());
?>
">
</head>
<body <?php 
body_class();
?>
>

  <!--[if lt IE 8]>
    <div class="alert alert-warning">
      <?php 
_e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'roots');
?>
    </div>
  <![endif]-->
 function woo_display_social_icons()
 {
     $html = '';
     $name = get_bloginfo('name');
     $social_icons = array('rss' => __('Subscribe to our RSS feed', 'woothemes'), 'twitter' => sprintf(__('Follow %s on Twitter', 'woothemes'), $name), 'facebook' => sprintf(__('Like %s on Facebook', 'woothemes'), $name), 'youtube' => sprintf(__('Watch %s on YouTube', 'woothemes'), $name), 'flickr' => sprintf(__('Follow %s on Flickr', 'woothemes'), $name), 'linkedin' => sprintf(__('Connect with %s on LinkedIn', 'woothemes'), $name), 'delicious' => sprintf(__('Follow %s on Delicious', 'woothemes'), $name), 'googleplus' => sprintf(__('Friend %s on Google+', 'woothemes'), $name));
     $social_icons = (array) apply_filters('woo_contact_social_icons', $social_icons);
     $settings_keys = array();
     foreach (array_keys($social_icons) as $k => $v) {
         $settings_keys['connect_' . $v] = '';
     }
     $settings = woo_get_dynamic_values($settings_keys);
     if ('true' == $settings['connect_rss']) {
         $settings['connect_rss'] = get_feed_link();
     } else {
         $settings['connect_rss'] = '';
     }
     $html .= '<div id="connect">' . "\n";
     $html .= '<div class="social">' . "\n";
     foreach ($social_icons as $k => $v) {
         $class = $k;
         if ('rss' == $k) {
             $class = 'subscribe';
         }
         if ('' != $settings['connect_' . $k]) {
             $html .= '<a href="' . esc_url($settings['connect_' . $k]) . '" title="' . esc_attr($v) . '" class="' . $class . '"><span>' . $v . '</span></a>' . "\n";
         }
     }
     $html .= '</div>' . "\n";
     $html .= '</div>' . "\n";
     echo $html;
 }
Exemplo n.º 29
0
/**
 * Display the permalink for the feed type.
 *
 * @since 3.0.0
 *
 * @param string $anchor The link's anchor text.
 * @param string $feed   Optional, defaults to default feed. Feed type.
 */
function the_feed_link($anchor, $feed = '')
{
    $link = '<a href="' . esc_url(get_feed_link($feed)) . '">' . $anchor . '</a>';
    /**
     * Filter the feed link anchor tag.
     *
     * @since 3.0.0
     *
     * @param string $link The complete anchor tag for a feed link.
     * @param string $feed The feed type, or an empty string for the
     *                     default feed type.
     */
    echo apply_filters('the_feed_link', $link, $feed);
}
Exemplo n.º 30
0
]" value="1" <?php 
echo $Checked;
?>
 /> <?php 
_e('Hide');
?>
</label>
												<p class="description"><?php 
_e('Extra feed', $this->ltd);
?>
</p>
												<p class="description"><?php 
_e('Tag to be output', $this->ltd);
?>
 : <code><?php 
echo esc_html('<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr(sprintf(__('%1$s %2$s Comments Feed'), get_bloginfo('name'), '&amp;raquo&#059;')) . '" href="' . get_feed_link(get_default_feed() . '&#038;p=***') . ' />');
?>
</code></p>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>

					</div>

				</div>

				<div id="postbox-container-2" class="postbox-container">