当前位置: 首页>>代码示例>>PHP>>正文


PHP powerpress_get_settings函数代码示例

本文整理汇总了PHP中powerpress_get_settings函数的典型用法代码示例。如果您正苦于以下问题:PHP powerpress_get_settings函数的具体用法?PHP powerpress_get_settings怎么用?PHP powerpress_get_settings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了powerpress_get_settings函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: powerpress_get_program_title_by_taxonomy

function powerpress_get_program_title_by_taxonomy($term_id, $taxonomy = 'category')
{
    $General = get_option('powerpress_general');
    // Efficiently get the taxonomy program titles from WordPress
    if (!isset($GLOBALS['powerpress'][$taxonomy])) {
        $GLOBALS['powerpress'][$taxonomy] = array();
        // SELECT all the caegory podcasting / taxonomy podasting feeds...
        if ($taxonomy == 'category' && isset($General['custom_cat_feeds'])) {
            $Feeds = $General['custom_cat_feeds'];
            // Walk through the categories...
            while (list($null, $cat_id) = each($Feeds)) {
                $FeedSettings = get_option('powerpress_cat_feed_' . $cat_id);
                if (!empty($FeedSettings['title'])) {
                    $GLOBALS['powerpress'][$taxonomy][$cat_id] = $FeedSettings['title'];
                }
            }
        } else {
            $PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
            if (!empty($PowerPressTaxonomies)) {
                $query_in = '';
                while (list($tt_id, $null) = each($PowerPressTaxonomies)) {
                    if (!empty($query_in)) {
                        $query_in .= ',';
                    }
                    $query_in .= $tt_id;
                }
                if (!empty($query_in)) {
                    $terms = $wpdb->get_results("SELECT term_taxonomy_id, term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id IN ({$query_in})", ARRAY_A);
                    while (list($index, $term_info) = each($terms)) {
                        // TODO: We need to get term by the term_id and taxonomy
                        $FeedSettings = powerpress_get_settings('powerpress_taxonomy_' . $term_info['term_taxonomy_id']);
                        if (!empty($FeedSettings['title'])) {
                            $GLOBALS['powerpress'][$term_info['taxonomy']][$term_info['term_id']] = $FeedSettings['title'];
                        }
                    }
                }
            }
        }
    }
    if (!empty($GLOBALS['powerpress'][$taxonomy][$term_id])) {
        return $GLOBALS['powerpress'][$taxonomy][$term_id];
    }
    if (!empty($General['program_title'])) {
        return $General['program_title'];
    }
    // Get the default podcast title
    return '';
    // REturn the blog title last resort
}
开发者ID:ryan2407,项目名称:Vision,代码行数:49,代码来源:powerpress-playlist.php

示例2: powerpress_strip_redirect_urls

function powerpress_strip_redirect_urls($url)
{
    $Settings = powerpress_get_settings('powerpress_general');
    for ($x = 1; $x <= 3; $x++) {
        $field = sprintf('redirect%d', $x);
        if (!empty($Settings[$field])) {
            $redirect_no_http = str_replace('http://', '', $Settings[$field]);
            if (substr($redirect_no_http, -1, 1) != '/') {
                $redirect_no_http .= '/';
            }
            $url = str_replace($redirect_no_http, '', $url);
        }
    }
    return $url;
}
开发者ID:KimcoBlogSC,项目名称:Blog,代码行数:15,代码来源:powerpressadmin-jquery.php

示例3: powerpress_admin_posttypefeeds

function powerpress_admin_posttypefeeds()
{
    $General = powerpress_get_settings('powerpress_general');
    $post_types = powerpress_admin_get_post_types(false);
    ?>
<h2><?php 
    echo __('Post Type Podcasting', 'powerpress');
    ?>
</h2>
<p>
	<?php 
    echo __('Post Type Podcasting adds custom podcast settings to specific Post Type feeds.', 'powerpress');
    ?>
</p>
<style type="text/css">
.column-url {
	width: 40%;
}
.column-name {
	width: 30%;
}
.column-feed-slug {
	width: 15%;
}
.column-post-type {
	width: 15%;
}
.column-episode-count {
	width: 15%;
}
.category-list {
	width: 100%;
}
.form-field select {
	width: 95%;
}
</style>
<div id="col-container">

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

	<tfoot>
	<tr>
<?php 
    print_column_headers('powerpressadmin_posttypefeeds', false);
    ?>
	</tr>
	</tfoot>
	<tbody>
<?php 
    $count = 0;
    while (list($null, $post_type) = each($post_types)) {
        $PostTypeSettingsArray = get_option('powerpress_posttype_' . $post_type);
        if (!$PostTypeSettingsArray) {
            continue;
        }
        while (list($feed_slug, $PostTypeSettings) = each($PostTypeSettingsArray)) {
            $feed_title = !empty($PostTypeSettings['title']) ? $PostTypeSettings['title'] : '(blank)';
            // $post_type
            // $feed_slug
            //global $wpdb;
            //	var_dump($term_info);
            //$category = get_category_to_edit($cat_ID);
            $columns = powerpress_admin_posttypefeeds_columns();
            $hidden = array();
            if ($count % 2 == 0) {
                echo '<tr valign="middle" class="alternate">';
            } else {
                echo '<tr valign="middle">';
            }
            $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_posttypefeeds.php&amp;action=powerpress-editposttypefeed&amp;feed_slug=' . $feed_slug . '&podcast_post_type=' . $post_type);
            $url = get_post_type_archive_feed_link($post_type, $feed_slug);
            $short_url = str_replace('http://', '', $url);
            $short_url = str_replace('www.', '', $short_url);
            if (strlen($short_url) > 35) {
                $short_url = substr($short_url, 0, 32) . '...';
            }
            foreach ($columns as $column_name => $column_display_name) {
                $class = "class=\"column-{$column_name}\"";
                switch ($column_name) {
                    case 'feed-slug':
                        echo "<td {$class}>{$feed_slug}";
                        echo "</td>";
                        break;
                    case 'name':
                        echo '<td ' . $class . '><strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">' . $feed_title . '</a></strong><br />';
                        $actions = array();
                        $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
                        $actions['remove'] = "<a class='submitdelete' href='" . admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_posttypefeeds.php&amp;action=powerpress-delete-posttype-feed&amp;podcast_post_type={$post_type}&amp;feed_slug={$feed_slug}", 'powerpress-delete-posttype-feed-' . $post_type . '_' . $feed_slug) . "' onclick=\"if ( confirm('" . esc_js(sprintf(__("You are about to remove podcast settings for Post Type '%s'\n  'Cancel' to stop, 'OK' to delete.", 'powerpress'), $feed_title)) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
                        $action_count = count($actions);
                        $i = 0;
                        echo '<div class="row-actions">';
//.........这里部分代码省略.........
开发者ID:KimcoBlogSC,项目名称:Blog,代码行数:101,代码来源:powerpressadmin-posttypefeeds.php

示例4: powerpress_admin_players

function powerpress_admin_players($type = 'audio')
{
    $General = powerpress_get_settings('powerpress_general');
    if (version_compare($GLOBALS['wp_version'], '3.6-beta', '<') && empty($General['player'])) {
        $General['player'] = 'default';
    } else {
        if (empty($General['player'])) {
            $General['player'] = 'mediaelement-audio';
        }
    }
    if (version_compare($GLOBALS['wp_version'], '3.6-beta', '<') && empty($General['player'])) {
        $General['video_player'] = '';
    } else {
        if (empty($General['video_player'])) {
            $General['video_player'] = 'mediaelement-video';
        }
    }
    if (empty($General['audio_custom_play_button'])) {
        $General['audio_custom_play_button'] = '';
    }
    $select_player = false;
    if (isset($_GET['sp'])) {
        $select_player = true;
    }
    if ($type == 'video') {
        if (!isset($General['video_player'])) {
            $select_player = true;
        }
    } else {
        if (!isset($General['player'])) {
            $select_player = true;
        }
    }
    $Audio = array();
    $Audio['default'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlowPlayerClassic.mp3';
    $Audio['audio-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/1_Pixel_Out_Flash_Player.mp3';
    $Audio['flashmp3-maxi'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Flash_Maxi_Player.mp3';
    $Audio['simple_flash'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/Simple_Flash_MP3_Player.mp3';
    $Audio['audioplay'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3';
    $Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp3';
    $Audio['mediaelement-audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_audio.mp3';
    $Video = array();
    $Video['flare-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/FlarePlayer.mp4';
    $Video['flow-player-classic'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/flow.mp4';
    $Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp4';
    $Video['videojs-html5-video-player-for-wordpress'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4';
    $Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_video.mp4';
    //$Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4';
    /*
    <div><
    object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="30" height="30">
    <PARAM NAME=movie VALUE="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent><embed src="http://www.strangecube.com/audioplay/online/audioplay.swf?file=http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/AudioPlay.mp3&auto=no&sendstop=yes&repeat=1&buttondir=http://www.strangecube.com/audioplay/online/alpha_buttons/negative&bgcolor=0xffffff&mode=playpause" quality=high wmode=transparent width="30" height="30" align="" TYPE="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object></div><!-- End of generated code -->
    */
    if ($type == 'video' && function_exists('add_videojs_header')) {
        add_videojs_header();
    }
    ?>
<link rel="stylesheet" href="<?php 
    echo powerpress_get_root_url();
    ?>
3rdparty/colorpicker/css/colorpicker.css" type="text/css" />
<script type="text/javascript" src="<?php 
    echo powerpress_get_root_url();
    ?>
3rdparty/colorpicker/js/colorpicker.js"></script>
<script type="text/javascript" src="<?php 
    echo powerpress_get_root_url();
    ?>
player.min.js"></script>
<script type="text/javascript"><!--

powerpress_url = '<?php 
    echo powerpress_get_root_url();
    ?>
';

function rgb2hex(rgb) {
 
 rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
 function hex(x) {
  hexDigits = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
  return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];
 }
 
 if( rgb )
	return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
 return '';
}

function UpdatePlayerPreview(name, value)
{
	if( typeof(generator) != "undefined" ) // Update the Maxi player...
	{
		generator.updateParam(name, value);
		generator.updatePlayer();
	}
	
	if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player...
		update_audio_player();
}
//.........这里部分代码省略.........
开发者ID:KimcoBlogSC,项目名称:Blog,代码行数:101,代码来源:powerpressadmin-player-page.php

示例5: powerpress_admin_editfeed

function powerpress_admin_editfeed($type = '', $type_value = '', $feed_slug = false)
{
    $SupportUploads = powerpressadmin_support_uploads();
    $General = powerpress_get_settings('powerpress_general');
    $FeedAttribs = array('type' => $type, 'feed_slug' => '', 'category_id' => 0, 'term_taxonomy_id' => 0, 'term_id' => 0, 'taxonomy_type' => '', 'post_type' => '');
    $cat_ID = false;
    $term_taxonomy_id = false;
    $FeedTitle = __('Feed Settings', 'powerpress');
    switch ($type) {
        case 'channel':
            $feed_slug = $type_value;
            $FeedAttribs['feed_slug'] = $type_value;
            $FeedSettings = powerpress_get_settings('powerpress_feed_' . $feed_slug);
            if (!$FeedSettings) {
                $FeedSettings = array();
                $FeedSettings['title'] = '';
                if (!empty($General['custom_feeds'][$feed_slug])) {
                    $FeedSettings['title'] = $General['custom_feeds'][$feed_slug];
                }
            }
            $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
            if (!isset($General['custom_feeds'][$feed_slug])) {
                $General['custom_feeds'][$feed_slug] = __('Podcast (default)', 'powerpress');
            }
            $FeedTitle = sprintf('Podcast Settings for Channel: %s', htmlspecialchars($General['custom_feeds'][$feed_slug]));
            echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
            echo '<input type="hidden" name="action" value="powerpress-save-channel" />';
            break;
        case 'category':
            $cat_ID = $type_value;
            $FeedAttribs['category_id'] = $type_value;
            $FeedSettings = powerpress_get_settings('powerpress_cat_feed_' . $cat_ID);
            $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
            $category = get_category_to_edit($cat_ID);
            $FeedTitle = sprintf(__('Podcast Settings for Category: %s', 'powerpress'), htmlspecialchars($category->name));
            echo sprintf('<input type="hidden" name="cat" value="%s" />', $cat_ID);
            echo '<input type="hidden" name="action" value="powerpress-save-category" />';
            break;
        case 'ttid':
            $term_taxonomy_id = $type_value;
            $FeedAttribs['term_taxonomy_id'] = $type_value;
            $FeedSettings = powerpress_get_settings('powerpress_taxonomy_' . $term_taxonomy_id);
            $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed_custom');
            global $wpdb;
            $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id = {$term_taxonomy_id}", ARRAY_A);
            if (!empty($term_info[0]['term_id'])) {
                $term_ID = $term_info[0]['term_id'];
                $taxonomy_type = $term_info[0]['taxonomy'];
                $FeedAttribs['term_id'] = $term_ID;
                $FeedAttribs['taxonomy_type'] = $taxonomy_type;
                $term_object = get_term_to_edit($term_ID, $taxonomy_type);
                $FeedTitle = sprintf(__('Podcast Settings for Taxonomy Term: %s', 'powerpress'), htmlspecialchars($term_object->name));
            } else {
                $FeedTitle = sprintf(__('Podcast Settings for Taxonomy Term: %s', 'powerpress'), 'Term ID ' . htmlspecialchars($term_taxonomy_id));
            }
            echo sprintf('<input type="hidden" name="ttid" value="%s" />', $term_taxonomy_id);
            echo '<input type="hidden" name="action" value="powerpress-save-ttid" />';
            break;
        case 'post_type':
            $FeedAttribs['post_type'] = $type_value;
            $FeedAttribs['feed_slug'] = $feed_slug;
            $FeedSettingsArray = powerpress_get_settings('powerpress_posttype_' . $FeedAttribs['post_type']);
            if (!is_array($FeedSettingsArray[$feed_slug])) {
                $FeedSettingsArray[$feed_slug] = array();
            }
            $FeedSettings = powerpress_default_settings($FeedSettingsArray[$feed_slug], 'editfeed_custom');
            //$category = get_category_to_edit($cat_ID);
            $PostTypeTitle = $FeedAttribs['post_type'];
            // TODO: Get readable title of post type
            $FeedTitle = sprintf(__('Podcast Settings for Post Type %s with slug %s', 'powerpress'), htmlspecialchars($PostTypeTitle), htmlspecialchars($feed_slug));
            echo sprintf('<input type="hidden" name="podcast_post_type" value="%s" />', $FeedAttribs['post_type']);
            echo sprintf('<input type="hidden" name="feed_slug" value="%s" />', $feed_slug);
            echo '<input type="hidden" name="action" value="powerpress-save-post_type" />';
            break;
        default:
            $FeedSettings = powerpress_get_settings('powerpress_feed');
            $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
            echo '<input type="hidden" name="action" value="powerpress-save-settings" />';
            break;
    }
    echo '<h2>' . $FeedTitle . '</h2>';
    if ($cat_ID && (isset($_GET['from_categories']) || isset($_POST['from_categories']))) {
        echo '<input type="hidden" name="from_categories" value="1" />';
    }
    ?>
<div id="powerpress_settings_page" class="powerpress_tabbed_content"> 
  <ul class="powerpress_settings_tabs">
		<li><a href="#feed_tab_feed"><span><?php 
    echo htmlspecialchars(__('Feed Settings', 'powerpress'));
    ?>
</span></a></li>
		<li><a href="#feed_tab_itunes"><span><?php 
    echo htmlspecialchars(__('iTunes Settings', 'powerpress'));
    ?>
</span></a></li>
		<li><a href="#feed_tab_artwork"><span><?php 
    echo htmlspecialchars(__('Artwork', 'powerpress'));
    ?>
</span></a></li>
	<?php 
//.........这里部分代码省略.........
开发者ID:ajay786singh,项目名称:emc,代码行数:101,代码来源:powerpressadmin-editfeed.php

示例6: powerpress_admin_players

function powerpress_admin_players($type = 'audio')
{
    $General = powerpress_get_settings('powerpress_general');
    $select_player = false;
    if (isset($_GET['sp'])) {
        $select_player = true;
    } else {
        if ($type == 'video') {
            if (empty($General['video_player'])) {
                $select_player = true;
            } else {
                switch ($General['video_player']) {
                    case 'mediaelement-video':
                    case 'videojs-html5-video-player-for-wordpress':
                    case 'html5video':
                        break;
                    default:
                        $select_player = true;
                }
            }
        } else {
            if (empty($General['player'])) {
                $select_player = true;
            } else {
                switch ($General['player']) {
                    case 'mediaelement-audio':
                    case 'html5audio':
                    case 'audio-player':
                        break;
                    default:
                        $select_player = true;
                }
            }
        }
    }
    if (empty($General['player'])) {
        $General['player'] = 'mediaelement-audio';
    }
    if (empty($General['player'])) {
        $General['video_player'] = 'mediaelement-video';
    }
    if (empty($General['audio_custom_play_button'])) {
        $General['audio_custom_play_button'] = '';
    }
    $Audio = array();
    $Audio['audio-player'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/1_Pixel_Out_Flash_Player.mp3';
    $Audio['html5audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp3';
    $Audio['mediaelement-audio'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_audio.mp3';
    $Video = array();
    $Video['html5video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/html5.mp4';
    $Video['videojs-html5-video-player-for-wordpress'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/videojs.mp4';
    $Video['mediaelement-video'] = 'http://media.blubrry.com/blubrry/content.blubrry.com/blubrry/MediaElement_video.mp4';
    wp_enqueue_style('wp-color-picker');
    if ($type == 'video' && function_exists('add_videojs_header')) {
        add_videojs_header();
    }
    ?>
<link rel="stylesheet" href="<?php 
    echo powerpress_get_root_url();
    ?>
3rdparty/colorpicker/css/colorpicker.css" type="text/css" />
<script type="text/javascript" src="<?php 
    echo powerpress_get_root_url();
    ?>
3rdparty/colorpicker/js/colorpicker.js"></script>
<script type="text/javascript" src="<?php 
    echo powerpress_get_root_url();
    ?>
player.min.js"></script>
<script type="text/javascript"><!--

function rgb2hex(rgb) {
 
 rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
 function hex(x) {
  hexDigits = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");
  return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];
 }
 
 if( rgb )
	return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
 return '';
}

function UpdatePlayerPreview(name, value)
{
	if( typeof(generator) != "undefined" ) // Update the Maxi player...
	{
		generator.updateParam(name, value);
		generator.updatePlayer();
	}
	
	if( typeof(update_audio_player) != "undefined" ) // Update the 1 px out player...
		update_audio_player();
}
				
jQuery(document).ready(function($) {
	
	jQuery('.color_preview').ColorPicker({
		onSubmit: function(hsb, hex, rgb, el) {
//.........这里部分代码省略.........
开发者ID:nickandersonr,项目名称:FriedMagazine,代码行数:101,代码来源:powerpressadmin-player-page.php

示例7: powerpress_admin_mt

function powerpress_admin_mt()
{
    $results = powerpress_get_mt_episodes();
    $Settings = powerpress_get_settings('powerpress_general', false);
    if (!isset($Settings['custom_feeds']['podcast']) && !empty($Settings['custom_feeds'])) {
        $Settings['custom_feeds'] = array_merge(array('podcast' => __('Podcast Feed (default)', 'powerpress')), $Settings['custom_feeds']);
    } else {
        if (empty($Settings['custom_feeds'])) {
            $Settings['custom_feeds'] = array('podcast' => __('Podcast Feed (default)', 'powerpress'));
        }
    }
    if ($results) {
        if ($results['feeds_required'] > count($Settings['custom_feeds'])) {
            powerpress_page_message_add_error(sprintf(__('We found blog posts that have as many as %d media files. You may need to create %d more Custom Feeds in order to import all of the media.', 'powerpress'), $results['feeds_required'], $results['feeds_required'] - count($Settings['custom_feeds'])));
            powerpress_page_message_print();
        }
    }
    powerpressadmin_mt_import_print_log();
    ?>
<style type="text/css">
.column-exclude {
	width: 80px;
}
.column-post-date {
	width: 80px;
}
.error-mt {
	background-color: #ffebe8;
	border-color: #c00;
	border-width: 1px;
	border-style: solid;
	padding: 0 0.6em;
	margin: 5px 15px 2px;
	-moz-border-radius: 3px;
	-khtml-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
}
label {
	float: left;
	width: 160px;
}
</style>
<script language="javascript"><!--

function check_radio_selection(obj, PostID, FileIndex)
{
	if( obj.value == '' ) // Users can select the no feed option as much as they want
		return true;
	
	var Field = obj.id;
	while( Field.charAt( Field.length-1 ) >= "0" &&  Field.charAt( Field.length-1 ) <= "9" ) // ( chr < "0" ) || ( chr > "9" )
	{
		Field = Field.substring(0, Field.length-1);
	}
	
	var Pos = 0;
	var CheckObj = document.getElementsByName( "Import["+PostID+"]["+Pos+"]" );
	while( CheckObj )
	{
		if( CheckObj.length == 0 )
			break;
			
		if( Pos != FileIndex )
		{
			for (var i = 0; i < CheckObj.length; i++)
			{
				if (CheckObj[i].type == 'radio' && CheckObj[i].checked && CheckObj[i].value == obj.value )
				{
					alert("<?php 
    echo __('Sorry, you may only select one media file per post per feed.', 'powerpress');
    ?>
");
					return false;
				}
			}
		}
		Pos++;
		var CheckObj = document.getElementsByName( "Import["+PostID+"]["+Pos+"]" );
	}
	
	return true;
}

function no_import_all()
{
	if( !confirm('<?php 
    echo __('Select "No Import" option for all media files?', 'powerpress');
    ?>
') )
		return;
		
	var Inputs = document.getElementsByTagName('input');
	for (var i = 0; i < Inputs.length; i++)
	{
		var Elem = Inputs[i];
		if( Elem.type == 'radio' && Elem.value == '' )
			Elem.checked = true;
	}
}
//.........这里部分代码省略.........
开发者ID:ryan2407,项目名称:Vision,代码行数:101,代码来源:powerpressadmin-mt.php

示例8: powerpress_admin_init


//.........这里部分代码省略.........
            $imageInfo = @getimagesize($temp);
            if ($imageInfo && $imageInfo[0] == $imageInfo[1] && $imageInfo[0] == 60) {
                if (!move_uploaded_file($temp, $upload_path . $filename)) {
                    powerpress_page_message_add_error(__('Error saving Video Play icon image', 'powerpress') . ':	' . htmlspecialchars($_FILES['itunes_image_file']['name']) . ' - ' . __('An error occurred saving the Video Play icon image on the server.', 'powerprss') . ' ' . sprintf(__('Local folder: %s; File name: %s', 'powerpress'), $upload_path, $filename));
                } else {
                    $General['video_custom_play_button'] = $upload_url . $filename;
                }
            } else {
                if ($imageInfo) {
                    powerpress_page_message_add_error(__('Invalid play icon image size', 'powerpress') . ': ' . htmlspecialchars($_FILES['video_custom_play_button_file']['name']));
                } else {
                    powerpress_page_message_add_error(__('Invalid play icon image', 'powerpress') . ': ' . htmlspecialchars($_FILES['video_custom_play_button_file']['name']));
                }
            }
        }
        if (isset($_POST['UpdateDisablePlayer'])) {
            $player_feed_slug = $_POST['UpdateDisablePlayer'];
            $General['disable_player'] = array();
            $GeneralPrev = get_option('powerpress_general');
            if (isset($GeneralPrev['disable_player'])) {
                $General['disable_player'] = $GeneralPrev['disable_player'];
            }
            if (isset($_POST['DisablePlayerFor'])) {
                $General['disable_player'][$player_feed_slug] = 1;
            } else {
                unset($General['disable_player'][$player_feed_slug]);
            }
        }
        if (isset($_POST['PlayerScaleCustom']) && isset($General['player_scale']) && $General['player_scale'] != 'tofit' && $General['player_scale'] != 'aspect') {
            $General['player_scale'] = $_POST['PlayerScaleCustom'];
        }
        // Check to see if we need to update the feed title
        if ($FeedSlug && !$podcast_post_type) {
            $GeneralSettingsTemp = powerpress_get_settings('powerpress_general', false);
            if (!isset($GeneralSettingsTemp['custom_feeds'][$FeedSlug]) || $GeneralSettingsTemp['custom_feeds'][$FeedSlug] != $Feed['title']) {
                if (!$General) {
                    $General = array();
                }
                if (!empty($GeneralSettingsTemp['custom_feeds'])) {
                    $General['custom_feeds'] = $GeneralSettingsTemp['custom_feeds'];
                } else {
                    $General['custom_feeds'] = array();
                }
                $General['custom_feeds'][$FeedSlug] = $Feed['title'];
            }
        }
        // Update the settings in the database:
        if ($General) {
            if (!empty($_POST['action']) && $_POST['action'] == 'powerpress-save-settings') {
                if (!isset($General['display_player_excerpt'])) {
                    // If we are modifying appearance settings but this option was not checked...
                    $General['display_player_excerpt'] = 0;
                }
                // Set it to zero.
                //if( !isset($General['display_player_disable_mobile']) )
                //	$General['display_player_disable_mobile'] = 0;
                $General['disable_dashboard_stats'] = 0;
                if (!empty($_POST['DisableStatsInDashboard'])) {
                    $General['disable_dashboard_stats'] = 1;
                }
                if (!isset($General['disable_dashboard_news'])) {
                    $General['disable_dashboard_news'] = 0;
                }
                if (!isset($General['episode_box_mode'])) {
                    // Default not set, 1 = no duration/file size, 2 = yes duration/file size (default if not set)
                    $General['episode_box_mode'] = 1;
开发者ID:KimcoBlogSC,项目名称:Blog,代码行数:67,代码来源:powerpressadmin.php

示例9: powerpress_admin_categoryfeeds

function powerpress_admin_categoryfeeds()
{
    $General = powerpress_get_settings('powerpress_general');
    ?>
<h2><?php 
    echo __('Category Podcasting', 'powerpress');
    ?>
</h2>
<p>
	<?php 
    echo __('Category Podcasting adds custom podcast settings to specific blog category feeds, allowing you to organize episodes by topic.', 'powerpress');
    ?>
</p>
<p>
	<?php 
    echo sprintf(__('If you are looking to organize episodes by file or format, please use %s.', 'powerpress'), '<a href="' . admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php') . '" title="' . __('Custom Podcast Channels') . '">' . __('Custom Podcast Channels') . '</a>');
    ?>
</p><style type="text/css">
.column-url {
	width: 40%;
}
.column-name {
	width: 30%;
}
.column-feed-slug {
	width: 15%;
}
.column-episode-count {
	width: 15%;
}
.category-list {
	width: 100%;
}
</style>
<div id="col-container">

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

	<tfoot>
	<tr>
<?php 
    print_column_headers('powerpressadmin_categoryfeeds', false);
    ?>
	</tr>
	</tfoot>
	<tbody>
<?php 
    $Feeds = array();
    if (isset($General['custom_cat_feeds'])) {
        $Feeds = $General['custom_cat_feeds'];
    }
    $count = 0;
    while (list($null, $cat_ID) = each($Feeds)) {
        if (empty($cat_ID)) {
            continue;
        }
        $category = get_category_to_edit($cat_ID);
        if (is_wp_error($category)) {
            // $cat_ID does not existing
            continue;
        }
        //var_dump($category);
        $columns = powerpress_admin_customfeeds_columns();
        $hidden = array();
        if ($count % 2 == 0) {
            echo '<tr valign="middle" class="alternate">';
        } else {
            echo '<tr valign="middle">';
        }
        $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;action=powerpress-editcategoryfeed&amp;cat=') . $cat_ID;
        $feed_title = $category->name;
        $url = get_category_feed_link($cat_ID);
        $short_url = str_replace('http://', '', $url);
        $short_url = str_replace('www.', '', $short_url);
        if (strlen($short_url) > 35) {
            $short_url = substr($short_url, 0, 32) . '...';
        }
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"column-{$column_name}\"";
            //$short_url = '';
            switch ($column_name) {
                case 'feed-slug':
                    echo "<td {$class}>{$category->slug}";
                    echo "</td>";
                    break;
                case 'name':
                    echo '<td ' . $class . '><strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">' . esc_html($feed_title) . '</a></strong><br />';
                    $actions = array();
                    $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', 'powerpress') . '</a>';
                    $actions['remove'] = "<a class='submitdelete' href='" . admin_url() . wp_nonce_url("admin.php?page=powerpress/powerpressadmin_categoryfeeds.php&amp;action=powerpress-delete-category-feed&amp;cat={$cat_ID}", 'powerpress-delete-category-feed-' . $cat_ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf(__("You are about to remove podcast settings for category feed '%s'\n  'Cancel' to stop, 'OK' to delete.", 'powerpress'), esc_html($feed_title))) . "') ) { return true;}return false;\">" . __('Remove', 'powerpress') . "</a>";
                    $action_count = count($actions);
                    $i = 0;
//.........这里部分代码省略.........
开发者ID:mattsims,项目名称:powerpress,代码行数:101,代码来源:powerpressadmin-categoryfeeds.php

示例10: powerpress_admin_defaults

function powerpress_admin_defaults()
{
    $FeedAttribs = array('type' => 'general', 'feed_slug' => '', 'category_id' => 0, 'term_taxonomy_id' => 0, 'term_id' => 0, 'taxonomy_type' => '', 'post_type' => '');
    $General = powerpress_get_settings('powerpress_general');
    $General = powerpress_default_settings($General, 'basic');
    $FeedSettings = powerpress_get_settings('powerpress_feed');
    $FeedSettings = powerpress_default_settings($FeedSettings, 'editfeed');
    // Make sure variables are set
    if (empty($FeedSettings['title'])) {
        $FeedSettings['title'] = '';
    }
    $Step = 0;
    if (!empty($FeedSettings['itunes_cat_1']) && !empty($FeedSettings['email']) && !empty($FeedSettings['itunes_image'])) {
        $Step = 1;
    }
    $episode_total = 0;
    if ($Step == 1) {
        $episode_total = powerpress_admin_episodes_per_feed('podcast');
        if ($episode_total > 0) {
            $Step = 2;
        }
    }
    if ($Step == 2 && !empty($FeedSettings['itunes_url'])) {
        $Step = 3;
    }
    $MultiSiteServiceSettings = false;
    if (is_multisite()) {
        $MultiSiteSettings = get_site_option('powerpress_multisite');
        if (!empty($MultiSiteSettings['services_multisite_only'])) {
            $MultiSiteServiceSettings = true;
        }
    }
    ?>
<script type="text/javascript"><!--


jQuery(document).ready(function($) {
	jQuery('#powerpress_advanced_mode_button').click( function(event) {
		event.preventDefault();
		jQuery('#powerpress_advanced_mode').val('1');
		jQuery(this).closest("form").submit();
	} );
} );
//-->
</script>
<input type="hidden" name="action" value="powerpress-save-defaults" />
<input type="hidden" id="powerpress_advanced_mode" name="General[advanced_mode_2]" value="0" />

<div id="powerpress_admin_header">
<h2><?php 
    echo __('Blubrry PowerPress Settings', 'powerpress');
    ?>
</h2> 
<span class="powerpress-mode"><?php 
    echo __('Simple Mode', 'powerpress');
    ?>
	&nbsp; <a href="<?php 
    echo admin_url("admin.php?page=powerpress/powerpressadmin_basic.php&amp;mode=advanced");
    ?>
" id="powerpress_advanced_mode_button" class="button-primary"><?php 
    echo __('Switch to Advanced Mode', 'powerpress');
    ?>
</a>
</span>
</div>

<?php 
    powerpressadmin_default_steps($FeedSettings, $General, $Step);
    if ($MultiSiteServiceSettings && defined('POWERPRESS_MULTISITE_VERSION')) {
        PowerPressMultiSitePlugin::edit_blubrry_services($General);
    } else {
        powerpressadmin_edit_blubrry_services($General);
    }
    ?>
<h3><?php 
    echo __('Podcast Settings', 'powerpress');
    ?>
</h3>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php 
    echo __('Program Title', 'powerpress');
    ?>
</th>
<td>
<input type="text" name="Feed[title]" style="width: 60%;"  value="<?php 
    echo esc_attr($FeedSettings['title']);
    ?>
" maxlength="255" />
(<?php 
    echo __('leave blank to use blog title', 'powerpress');
    ?>
)
<p><?php 
    echo __('Blog title:', 'powerpress') . ' ' . get_bloginfo_rss('name');
    ?>
</p>
</td>
</tr>
//.........这里部分代码省略.........
开发者ID:nickandersonr,项目名称:FriedMagazine,代码行数:101,代码来源:powerpressadmin-defaults.php

示例11: powerpress_admin_taxonomyfeeds

function powerpress_admin_taxonomyfeeds()
{
    $General = powerpress_get_settings('powerpress_general');
    ?>
<h2><?php 
    echo __('Taxonomy Podcasting', 'powerpress');
    ?>
</h2>
<p>
	<?php 
    echo __('Taxonomy Podcasting adds custom podcast settings to specific taxonomy feeds.', 'powerpress');
    ?>
</p>
<style type="text/css">
.column-url {
	width: 40%;
}
.column-name {
	width: 30%;
}
.column-feed-slug {
	width: 15%;
}
.column-episode-count {
	width: 15%;
}
.category-list {
	width: 100%;
}
.form-field select {
	width: 95%;
}
</style>
<div id="col-container">

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

	<tfoot>
	<tr>
<?php 
    print_column_headers('powerpressadmin_taxonomyfeeds', false);
    ?>
	</tr>
	</tfoot>
	<tbody>
<?php 
    $PowerPressTaxonomies = get_option('powerpress_taxonomy_podcasting');
    if (empty($PowerPressTaxonomies)) {
        $PowerPressTaxonomies = array();
    }
    $count = 0;
    while (list($tt_id, $null) = each($PowerPressTaxonomies)) {
        $taxonomy_type = '';
        $term_ID = '';
        global $wpdb;
        $term_info = $wpdb->get_results("SELECT term_id, taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id = {$tt_id}", ARRAY_A);
        if (!empty($term_info[0]['term_id'])) {
            $term_ID = $term_info[0]['term_id'];
            $taxonomy_type = $term_info[0]['taxonomy'];
        } else {
            continue;
            // we didn't find this taxonomy relationship
        }
        //	var_dump($term_info);
        //$category = get_category_to_edit($cat_ID);
        $term_object = get_term($term_ID, $taxonomy_type, OBJECT, 'edit');
        $columns = powerpress_admin_taxonomyfeeds_columns();
        $hidden = array();
        if ($count % 2 == 0) {
            echo '<tr valign="middle" class="alternate">';
        } else {
            echo '<tr valign="middle">';
        }
        $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_taxonomyfeeds.php&amp;action=powerpress-edittaxonomyfeed&amp;term=' . $term_ID . '&taxonomy=' . $taxonomy_type . '&amp;ttid=' . $tt_id);
        $feed_title = $term_object->name;
        $url = get_term_feed_link($term_ID, $taxonomy_type, 'rss2');
        $short_url = str_replace('http://', '', $url);
        $short_url = str_replace('www.', '', $short_url);
        if (strlen($short_url) > 35) {
            $short_url = substr($short_url, 0, 32) . '...';
        }
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"column-{$column_name}\"";
            //$short_url = '';
            switch ($column_name) {
                case 'feed-slug':
                    echo "<td {$class}>{$term_object->slug}";
                    echo "</td>";
                    break;
                case 'name':
                    echo '<td ' . $class . '><strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">' . esc_attr($feed_title) . '</a></strong><br />';
                    $actions = array();
//.........这里部分代码省略.........
开发者ID:mattsims,项目名称:powerpress,代码行数:101,代码来源:powerpressadmin-taxonomyfeeds.php

示例12: powerpress_admin_search

function powerpress_admin_search()
{
    $General = powerpress_get_settings('powerpress_general');
    if (empty($General['seo_feed_title'])) {
        $General['seo_feed_title'] = '';
    }
    ?>
<script language="javascript"><!--

jQuery(document).ready(function() {
	
<?php 
    if (empty($General['seo_append_show_title'])) {
        echo "\tjQuery('#powerpress_example_show_title').hide();\n";
    }
    if (!empty($General['seo_feed_title']) && $General['seo_feed_title'] == 1) {
        echo "\tjQuery('#powerpress_example_post_title').hide();\n";
    }
    ?>
	jQuery('#seo_feed_title').change( function() {
		if( this.checked )
			jQuery('#powerpress_seo_feed_title_1').prop('checked', true);
		else
			jQuery('.powerpress_seo_feed_title').prop('checked', false);
	});
	jQuery('#seo_append_show_title').change( function() {
		if( jQuery(this).prop('checked') )
			jQuery('#powerpress_example_show_title').show();
		else
			jQuery('#powerpress_example_show_title').hide();
	});
	jQuery('.powerpress_seo_feed_title').change( function() {
		
		jQuery('#seo_feed_title').prop('checked', true);
		switch( this.value )
		{
			case '1':
			case 1: {
				jQuery('#powerpress_example_post_title').hide();
			}; break;
			case '2':
			case 2: {
				jQuery('#powerpress_example_post_title').show();
				
				var p_title_html = jQuery('#powerpress_example_post_title')[0].outerHTML;
				var e_title_html = jQuery('#powerpress_example_episode_title')[0].outerHTML;
				jQuery('#powerpress_example_post_episode_title').html( e_title_html + p_title_html);
			}; break;
			case '3':
			case 3: {
				jQuery('#powerpress_example_post_title').show();
				
				var p_title_html = jQuery('#powerpress_example_post_title')[0].outerHTML;
				var e_title_html = jQuery('#powerpress_example_episode_title')[0].outerHTML;
				jQuery('#powerpress_example_post_episode_title').html( p_title_html + e_title_html);
			}; break;
			default: {
				
			}
		}
	});
});
//-->
</script>
<input type="hidden" name="action" value="powerpress-save-search" />
<h2><?php 
    echo __('Podcasting SEO', 'powerpress');
    ?>
</h2>

<p><?php 
    echo __('Enable features to help with podcasting search engine optimization (SEO). The following options can assist your web and podcasting SEO strategies.', 'powerpress');
    ?>
</p>
<p>
	<a href="http://create.blubrry.com/resources/powerpress/advanced-tools-and-options/podcasting-seo-settings/"  target="_blank"><?php 
    echo __('Learn More', 'powerpress');
    ?>
</a>
</p>


<table class="form-table">
<tr valign="top">
<th scope="row"><?php 
    echo __('Episode Titles', 'powerpress');
    ?>
</th> 
<td>
	<p>
		<label for="seo_feed_title">
		<input name="PowerPressSearchToggle[seo_feed_title]" type="hidden" value="0" />
		<input id="seo_feed_title" name="PowerPressSearchToggle[seo_feed_title]" type="checkbox" value="1" <?php 
    if (!empty($General['seo_feed_title'])) {
        echo 'checked ';
    }
    ?>
 /> 
		<?php 
    echo __('Specify custom episode titles for podcast feeds.', 'powerpress');
//.........这里部分代码省略.........
开发者ID:mattsims,项目名称:powerpress,代码行数:101,代码来源:powerpressadmin-search.php

示例13: powerpress_edit_post


//.........这里部分代码省略.........
                    if (isset($Powerpress['embed']) && trim($Powerpress['embed']) != '') {
                        $ToSerialize['embed'] = stripslashes($Powerpress['embed']);
                    }
                    // we have to strip slahes if they are present befure we serialize the data
                    if (isset($Powerpress['image']) && trim($Powerpress['image']) != '') {
                        $ToSerialize['image'] = stripslashes($Powerpress['image']);
                    }
                    if (isset($Powerpress['no_player']) && $Powerpress['no_player']) {
                        $ToSerialize['no_player'] = 1;
                    }
                    if (isset($Powerpress['no_links']) && $Powerpress['no_links']) {
                        $ToSerialize['no_links'] = 1;
                    }
                    if (isset($Powerpress['ishd']) && $Powerpress['ishd']) {
                        $ToSerialize['ishd'] = 1;
                    }
                    if (isset($Powerpress['width']) && trim($Powerpress['width'])) {
                        $ToSerialize['width'] = stripslashes(trim($Powerpress['width']));
                    }
                    if (isset($Powerpress['height']) && trim($Powerpress['height'])) {
                        $ToSerialize['height'] = stripslashes(trim($Powerpress['height']));
                    }
                    if (!empty($Powerpress['feed_title']) && trim($Powerpress['feed_title'])) {
                        $ToSerialize['feed_title'] = stripslashes(trim($Powerpress['feed_title']));
                    }
                    if (isset($Powerpress['no_player_and_links']) && $Powerpress['no_player_and_links']) {
                        $ToSerialize['no_player'] = 1;
                        $ToSerialize['no_links'] = 1;
                    }
                    // WebM Support:
                    if (!empty($Powerpress['webm_src'])) {
                        $WebMSrc = $Powerpress['webm_src'];
                        if (!empty($GeneralSettings['default_url']) && strpos($WebMSrc, 'http://') !== 0) {
                            $WebMSrc = rtrim($GeneralSettings['default_url'], '/') . '/' . ltrim($WebMSrc, '/');
                        }
                        $ToSerialize['webm_src'] = $WebMSrc;
                        $MediaInfo = powerpress_get_media_info_local($WebMSrc, 'video/webm', 0, '');
                        if (isset($MediaInfo['error'])) {
                            $error = __('Error', 'powerpress') . " ({$WebMSrc}): {$MediaInfo['error']}";
                            powerpress_add_error($error);
                        } else {
                            if (empty($MediaInfo['length'])) {
                                $error = __('Error', 'powerpress') . " ({$WebMSrc}): " . __('Unable to obtain size of media.', 'powerpress');
                                powerpress_add_error($error);
                            } else {
                                $ToSerialize['webm_length'] = $MediaInfo['length'];
                            }
                        }
                    }
                    if ($Powerpress['set_duration'] == -1) {
                        unset($ToSerialize['duration']);
                    }
                    if (count($ToSerialize) > 0) {
                        // Lets add the serialized data
                        $EnclosureData .= "\n" . serialize($ToSerialize);
                    }
                    if (!empty($Powerpress['new_podcast'])) {
                        add_post_meta($post_ID, $field, $EnclosureData, true);
                    } else {
                        update_post_meta($post_ID, $field, $EnclosureData);
                        if ($feed_slug == 'podcast') {
                            delete_post_meta($post_ID, 'itunes:duration');
                        }
                        // Simple cleanup, we're storing the duration in the enclosure as serialized value
                    }
                }
            }
        }
        // Loop through posted episodes...
        // Check for PowerpressFeature for each channel...
        if (isset($_POST['PowerpressFeature'])) {
            $FeatureEpisodes = powerpress_get_settings('powerpress_itunes_featured');
            if (empty($FeatureEpisodes) && !is_array($FeatureEpisodes)) {
                $FeatureEpisodes = array();
            }
            $PowerpressFeature = $_POST['PowerpressFeature'];
            while (list($feed_slug, $set_featured) = each($PowerpressFeature)) {
                if (!empty($set_featured)) {
                    $FeatureEpisodes[$feed_slug] = $post_ID;
                } else {
                    unset($FeatureEpisodes[$feed_slug]);
                }
            }
            powerpress_save_settings($FeatureEpisodes, 'powerpress_itunes_featured');
        }
        if (!empty($GeneralSettings['metamarks'])) {
            require_once POWERPRESS_ABSPATH . '/powerpressadmin-metamarks.php';
            powerpress_metabox_save($post_ID);
        }
    }
    // Anytime the post is marked published, private or scheduled for the future we need to make sure we're making the media available for hosting
    if ($post->post_status == 'publish' || $post->post_status == 'private' || $post->post_status == 'future') {
        if (!empty($GeneralSettings['blubrry_hosting']) && $GeneralSettings['blubrry_hosting'] !== 'false') {
            powerpress_process_hosting($post_ID, $post->post_title);
        }
        // Call anytime blog post is in the published state
    }
    // And we're done!
    return $post_ID;
}
开发者ID:briancfeeney,项目名称:portigal,代码行数:101,代码来源:powerpressadmin.php

示例14: powerpressadmin_appearance

function powerpressadmin_appearance($General = false)
{
    if ($General === false) {
        $General = powerpress_get_settings('powerpress_general');
    }
    $General = powerpress_default_settings($General, 'appearance');
    if (!isset($General['player_function'])) {
        $General['player_function'] = 1;
    }
    if (!isset($General['player_aggressive'])) {
        $General['player_aggressive'] = 0;
    }
    if (!isset($General['new_window_width'])) {
        $General['new_window_width'] = '';
    }
    if (!isset($General['new_window_height'])) {
        $General['new_window_height'] = '';
    }
    if (!isset($General['player_width'])) {
        $General['player_width'] = '';
    }
    if (!isset($General['player_height'])) {
        $General['player_height'] = '';
    }
    if (!isset($General['player_width_audio'])) {
        $General['player_width_audio'] = '';
    }
    if (!isset($General['disable_appearance'])) {
        $General['disable_appearance'] = false;
    }
    $Players = array('podcast' => __('Default Podcast (podcast)', 'powerpress'));
    if (isset($General['custom_feeds'])) {
        while (list($podcast_slug, $podcast_title) = each($General['custom_feeds'])) {
            if ($podcast_slug == 'podcast') {
                continue;
            }
            $Players[$podcast_slug] = sprintf('%s (%s)', $podcast_title, $podcast_slug);
        }
    }
    ?>

<!-- start advanced features -->
<?php 
    if (!empty($General['advanced_mode_2'])) {
        ?>
<h3><?php 
        echo __('Media Appearance Settings', 'powerpress');
        ?>
</h3>
<div id="enable_presentation_settings">
<table class="form-table">
<tr valign="top">
<th scope="row">&nbsp;	</th> 
<td>
	<ul>
		<li><p><label><input type="radio" name="General[disable_appearance]" value="0" <?php 
        if ($General['disable_appearance'] == 0) {
            echo 'checked';
        }
        ?>
 onclick="javascript: jQuery('#presentation_settings').css('display', (this.checked?'block':'none') );" /> <?php 
        echo __('Enable PowerPress Media Players and Links', 'powerpress');
        ?>
</label> (<?php 
        echo __('default', 'powerpress');
        ?>
)</p>
			<ul><li>
				<p class="description"><?php 
        echo __('PowerPress will add media players and links to your site.', 'powerpress');
        ?>
</p>
			</li></ul>
		</li>
		
		<li><p><label><input type="radio" name="General[disable_appearance]" value="1" <?php 
        if ($General['disable_appearance'] == 1) {
            echo 'checked';
        }
        ?>
 onclick="javascript: jQuery('#presentation_settings').css('display', (this.checked?'none':'block') );" /> <?php 
        echo __('Disable PowerPress Media Players and Links', 'powerpress');
        ?>
</label></p>
			<ul><li>
				<p class="description"><?php 
        echo __('PowerPress will <u>not</u> add any media players or media links to your site. PowerPress will only be used to add podcasting support to your feeds.', 'powerpress');
        ?>
</p>
			</li></ul>
		</li>
	</ul>
</td>
</tr>
</table>
</div>
<div id="presentation_settings"<?php 
        if ($General['disable_appearance']) {
            echo ' style="display: none;"';
        }
//.........这里部分代码省略.........
开发者ID:KimcoBlogSC,项目名称:Blog,代码行数:101,代码来源:powerpressadmin-basic.php

示例15: powerpress_admin_customfeeds

function powerpress_admin_customfeeds()
{
    $General = powerpress_get_settings('powerpress_general');
    ?>
<h2><?php 
    echo __('Custom Podcast Channels', 'powerpress');
    ?>
</h2>
<p>
	<?php 
    echo __('Custom podcast Channels allow you to associate multiple media files and/or formats to one blog post.', 'powerpress');
    ?>
</p>
<p>
	<?php 
    echo sprintf(__('If you are looking to organize episodes by topic, please use %s.', 'powerpress'), '<a href="' . admin_url('admin.php?page=powerpress/powerpressadmin_categoryfeeds.php') . '" title="' . __('Category Podcast Feeds', 'powerpress') . '">' . __('Category Podcast Feeds', 'powerpress') . '</a>');
    ?>
</p>

<style type="text/css">

.column-url {
	width: 40%;
}
.column-name {
	width: 30%;
}
.column-feed-slug {
	width: 15%;
}
.column-episode-count {
	width: 15%;
}
</style>
<div id="col-container">

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

	<tfoot>
	<tr>
<?php 
    print_column_headers('powerpressadmin_customfeeds', false);
    ?>
	</tr>
	</tfoot>
	<tbody>
<?php 
    $Feeds = array('podcast' => __('Podcast', 'powerpress'));
    if (isset($General['custom_feeds']['podcast'])) {
        $Feeds = $General['custom_feeds'];
    } else {
        if (is_array($General['custom_feeds'])) {
            $Feeds += $General['custom_feeds'];
        }
    }
    asort($Feeds, SORT_STRING);
    // Sort feeds
    $count = 0;
    while (list($feed_slug, $feed_title) = each($Feeds)) {
        $feed_slug = esc_attr($feed_slug);
        // Precaution
        $episode_total = powerpress_admin_episodes_per_feed($feed_slug);
        $columns = powerpress_admin_customfeeds_columns();
        $hidden = array();
        if ($feed_slug == 'podcast') {
            $feed_title = __('Podcast', 'powerpress');
        }
        if ($count % 2 == 0) {
            echo '<tr valign="middle" class="alternate">';
        } else {
            echo '<tr valign="middle">';
        }
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"column-{$column_name}\"";
            $edit_link = admin_url('admin.php?page=powerpress/powerpressadmin_customfeeds.php&amp;action=powerpress-editfeed&amp;feed_slug=') . $feed_slug;
            $url = get_feed_link($feed_slug);
            $short_url = str_replace('http://', '', $url);
            $short_url = str_replace('www.', '', $short_url);
            //if ('/' == substr($short_url, -1))
            //	$short_url = substr($short_url, 0, -1);
            if (strlen($short_url) > 35) {
                $short_url = substr($short_url, 0, 32) . '...';
            }
            //$short_url = '';
            switch ($column_name) {
                case 'feed-slug':
                    echo "<td {$class}>{$feed_slug}";
                    echo "</td>";
                    break;
                case 'name':
                    echo '<td ' . $class . '><strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit "%s"', 'powerpress'), $feed_title)) . '">' . esc_html($feed_title) . '</a></strong>' . ($feed_slug == 'podcast' ? ' (' . __('default channel', 'powerpress') . ')' : '') . '<br />';
                    $actions = array();
//.........这里部分代码省略.........
开发者ID:ryan2407,项目名称:Vision,代码行数:101,代码来源:powerpressadmin-customfeeds.php


注:本文中的powerpress_get_settings函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。