本文整理汇总了PHP中powerpress_get_root_url函数的典型用法代码示例。如果您正苦于以下问题:PHP powerpress_get_root_url函数的具体用法?PHP powerpress_get_root_url怎么用?PHP powerpress_get_root_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了powerpress_get_root_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: powerpress_admin_players_init
function powerpress_admin_players_init()
{
//wp_enqueue_script('jquery');
//echo "powerpres player init";
wp_enqueue_style('mediaelement');
wp_enqueue_style('wp-mediaelement');
wp_enqueue_script('mediaelement');
// wp_enqueue_script( 'wp-mediaelement' );
wp_enqueue_script('powerpress-mejs', powerpress_get_root_url() . 'powerpress-mejs.js');
$Settings = false;
// Important, never remove this
$Step = 1;
$action = isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : false);
//$type = (isset($_GET['type'])?$_GET['type']: (isset($_POST['type'])?$_POST['type']:'audio') );
if (!$action) {
return;
}
switch ($action) {
case 'powerpress-select-player':
$SaveSettings = array();
//$SaveSettings = $_POST['Player'];
if (isset($_POST['Player'])) {
$SaveSettings = $_POST['Player'];
}
if (isset($_POST['VideoPlayer'])) {
$SaveSettings += $_POST['VideoPlayer'];
}
powerpress_save_settings($SaveSettings, 'powerpress_general');
powerpress_page_message_add_notice(__('Player activated successfully.', 'powerpress'));
break;
case 'powerpress-audio-player':
$SaveSettings = $_POST['Player'];
powerpress_save_settings($SaveSettings, 'powerpress_audio-player');
powerpress_page_message_add_notice(__('Audio Player settings saved successfully.', 'powerpress'));
break;
case 'powerpress-flashmp3-maxi':
$SaveSettings = $_POST['Player'];
powerpress_save_settings($SaveSettings, 'powerpress_flashmp3-maxi');
powerpress_page_message_add_notice(__('Flash Mp3 Maxi settings saved successfully.', 'powerpress'));
break;
case 'powerpress-audioplay':
$SaveSettings = $_POST['Player'];
powerpress_save_settings($SaveSettings, 'powerpress_audioplay');
powerpress_page_message_add_notice(__('AudioPlay settings saved successfully.', 'powerpress'));
break;
//TODO: PowerPress 5.0
//case 'powerpress-mediaelement':
//{
// $SaveSettings = $_POST['Player'];
// powerpress_save_settings($SaveSettings, 'powerpress_mediaelement');
// powerpress_page_message_add_notice( __('MediaElement.js settings saved successfully.', 'powerpress') );
//}; break;
}
}
示例2: powerpress_meta_box
//.........这里部分代码省略.........
echo $FeedSlug;
?>
][url]"><?php
echo __('Media URL', 'powerpress');
?>
</label>
<div class="powerpress_row_content">
<input id="powerpress_url_<?php
echo $FeedSlug;
?>
" class="powerpress-url" name="Powerpress[<?php
echo $FeedSlug;
?>
][url]" value="<?php
echo $EnclosureURL;
?>
" <?php
echo !empty($ExtraData['hosting']) ? 'readOnly' : '';
?>
style="width: 70%; font-size: 90%;" />
<?php
if (!empty($GeneralSettings['blubrry_hosting']) && $GeneralSettings['blubrry_hosting'] !== 'false' || empty($GeneralSettings['no_media_url_folder'])) {
?>
<a href="<?php
echo admin_url('admin.php');
?>
?action=powerpress-jquery-media&podcast-feed=<?php
echo $FeedSlug;
?>
&KeepThis=true&TB_iframe=true&modal=true" title="<?php
echo __('Browse Media File', 'powerpress');
?>
" class="thickbox"><img src="<?php
echo powerpress_get_root_url();
?>
/images/blubrry_folder.png" alt="<?php
echo __('Browse Media Files', 'powerpress');
?>
" /></a>
<?php
}
?>
<input type="button" id="powerpress_check_<?php
echo $FeedSlug;
?>
_button" name="powerpress_check_<?php
echo $FeedSlug;
?>
_button" value="<?php
echo __('Verify', 'powerpress');
?>
" onclick="powerpress_get_media_info('<?php
echo $FeedSlug;
?>
');" alt="<?php
echo __('Verify Media', 'powerpress');
?>
" class="button" />
<img id="powerpress_check_<?php
echo $FeedSlug;
?>
" src="<?php
echo admin_url();
?>
images/loading.gif" style="vertical-align:text-top; display: none;" alt="<?php
echo __('Checking Media', 'powerpress');
示例3: powerpress_admin_jquery_header
function powerpress_admin_jquery_header($title, $jquery = false)
{
$other = false;
if ($jquery) {
add_thickbox();
}
// we use the thckbox for some settings
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php
do_action('admin_xml_ns');
?>
<?php
language_attributes();
?>
>
<head>
<meta http-equiv="Content-Type" content="<?php
bloginfo('html_type');
?>
; charset=<?php
echo get_option('blog_charset');
?>
" />
<title><?php
bloginfo('name');
?>
› <?php
echo $title;
?>
— <?php
echo __('WordPress', 'powerpress');
?>
</title>
<?php
// In case these functions haven't been included yet...
require_once ABSPATH . 'wp-admin/includes/admin.php';
wp_admin_css('css/global');
wp_admin_css();
if ($jquery) {
wp_enqueue_script('utils');
}
do_action('admin_print_styles');
do_action('admin_print_scripts');
do_action('admin_head');
echo '<!-- done adding extra stuff -->';
?>
<link rel="stylesheet" href="<?php
echo powerpress_get_root_url();
?>
css/jquery.css" type="text/css" media="screen" />
<?php
if ($other) {
echo $other;
}
?>
</head>
<body>
<div id="container">
<p style="text-align: right; position: absolute; top: 5px; right: 5px; margin: 0; padding: 0;"><a href="#" onclick="self.parent.tb_remove();" title="<?php
echo __('Cancel', 'powerpress');
?>
"><img src="<?php
echo admin_url();
?>
/images/no.png" /></a></p>
<?php
}
示例4: powerpressplayer_build_simpleflash
function powerpressplayer_build_simpleflash($media_url, $EpisodeData = array())
{
$autoplay = false;
if (isset($EpisodeData['autoplay']) && $EpisodeData['autoplay']) {
$autoplay = true;
}
// TODO: We need to handle this
$player_id = powerpressplayer_get_next_id();
$content = '';
$content .= '<div class="powerpress_player" id="powerpress_player_' . $player_id . '">';
$content .= '<object type="application/x-shockwave-flash" data="' . powerpress_get_root_url() . 'simple_mp3.swf" id="simple_mp3_' . $player_id . '" width="150" height="50">';
$content .= '<param name="movie" value="' . powerpress_get_root_url() . 'simple_mp3.swf" />';
$content .= '<param name="wmode" value="transparent" />';
$content .= '<param name="FlashVars" value="' . get_bloginfo('url') . '?url=' . urlencode($media_url) . '&autostart=' . ($autoplay ? 'true' : 'false') . '" />';
$content .= '<param name="quality" value="high" />';
$content .= '<embed wmode="transparent" src="' . get_bloginfo('url') . '?url=' . urlencode($media_url) . '&autostart=' . ($autoplay ? 'true' : 'false') . '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="50">';
// $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData, true); // Feature removed since it causes double players to be insrted in Safari/Firefox
$content .= powerpressplayer_build_playimageaudio($media_url);
$content .= '</embed>';
$content .= '</object>';
$content .= "</div>\n";
return $content;
}
示例5: powerpressadmin_edit_blubrry_services
function powerpressadmin_edit_blubrry_services($General, $action_url = false, $action = false)
{
$DisableStatsInDashboard = false;
if (!empty($General['disable_dashboard_stats'])) {
$DisableStatsInDashboard = true;
}
if ($action_url == false) {
$action_url = admin_url('admin.php?action=powerpress-jquery-account');
}
if ($action == false) {
$action = 'powerpress-jquery-account';
}
?>
<h3><?php
echo __('Integrate Blubrry Services', 'powerpress');
?>
</h3>
<ul><li><ul>
<li style="margin-left: 30px; font-size:115%;"><?php
echo sprintf(__('Track your podcast downloads with Blubrry\'s <a href="%s" target="_blank">FREE Basic Statistics</a> or <a href="%s" target="_blank">Professional Media Statistics</a>.', 'powerpress'), 'http://create.blubrry.com/resources/podcast-media-download-statistics/basic-statistics/', 'http://create.blubrry.com/resources/podcast-media-download-statistics/');
?>
</li>
<li style="margin-left: 30px; font-size:115%;"><?php
echo sprintf(__('Upload and publish podcast media directly from your blog with <a href="%s" target="_blank">Blubrry Media Hosting</a>.', 'powerpress'), 'http://create.blubrry.com/resources/podcast-media-hosting/');
?>
</li>
</ul></li></ul>
<div style="margin-left: 40px;">
<p style="font-size: 125%;">
<strong><a class="button-primary thickbox" title="<?php
echo esc_attr(__('Blubrry Services Integration', 'powerpress'));
?>
" href="<?php
echo wp_nonce_url($action_url, $action);
?>
&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php
echo __('Click here to configure Blubrry Statistics and Hosting services', 'powerpress');
?>
</a></strong>
</p>
<?php
if (!empty($General['blubrry_program_keyword'])) {
// Check that the redirect is in the settings...
$RedirectURL = 'http://media.blubrry.com/' . $General['blubrry_program_keyword'] . '/';
$Error = true;
if (stripos($General['redirect1'], $RedirectURL) !== false) {
$Error = false;
} else {
if (stripos($General['redirect2'], $RedirectURL) !== false) {
$Error = false;
} else {
if (stripos($General['redirect3'], $RedirectURL) !== false) {
$Error = false;
}
}
}
if ($Error) {
?>
<p style="font-weight: bold; color: #CC0000;">
<?php
echo __('Statistics are not implemented correctly on this blog. Please click the button above to re-configure your services.', 'powerpress');
?>
</p>
<?php
} else {
?>
<p style="font-weight: bold;">
<img src="<?php
echo powerpress_get_root_url();
?>
images/Check.png" style="width: 25px; height: 20px;" alt="<?php
echo __('Enabled!', 'powerpress');
?>
" />
<?php
if (empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false') {
echo __('Blubrry Statistics Enabled!', 'powerpress');
} else {
echo __('Blubrry Statistics and Media Hosting Enabled!', 'powerpress');
}
?>
</p>
<?php
}
if (empty($General['blubrry_hosting']) || $General['blubrry_hosting'] === 'false') {
?>
<p>
<?php
echo __('Recently upgraded to Blubrry Hosting?', 'powerpress');
?>
<a class="thickbox" title="<?php
echo esc_attr(__('Blubrry Services Integration', 'powerpress'));
?>
" href="<?php
echo admin_url();
echo wp_nonce_url("admin.php?action=powerpress-jquery-account", 'powerpress-jquery-account');
?>
&KeepThis=true&TB_iframe=true&width=600&height=400&modal=false" target="_blank"><?php
echo __('Click here to enter your account information.', 'powerpress');
//.........这里部分代码省略.........
示例6: 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();
}
//.........这里部分代码省略.........
示例7: css
function css()
{
?>
<style type="text/css">
/*
PowerPress subscribe sidebar widget
*/
.widget-area .widget_powerpress_subscribe h2,
.widget-area .widget_powerpress_subscribe h3,
.widget-area .widget_powerpress_subscribe h4,
.widget_powerpress_subscribe h2,
.widget_powerpress_subscribe h3,
.widget_powerpress_subscribe h4 {
margin-bottom: 0;
padding-bottom: 0;
}
.pp-ssb-widget {
width: 100%;
margin: 0 auto;
font-family: Sans-serif;
color: #FFFFFF;
}
body .pp-ssb-widget a.pp-ssb-btn {
width: 100% !important;
height: 48px;
padding: 0;
color: #FFFFFF;
display: inline-block;
margin: 10px 0 10px 0;
text-decoration: none;
text-align:left;
vertical-align: middle;
line-height: 48px;
font-size: 90% !important;
font-weight: bold !important;
overflow: hidden;
border-radius: 1px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
body .sidebar .widget .pp-ssb-widget a:link,
body .sidebar .widget .pp-ssb-widget a:visited,
body .sidebar .widget .pp-ssb-widget a:active,
body .sidebar .widget .pp-ssb-widget a:hover,
body .pp-ssb-widget a.pp-ssb-btn:link,
body .pp-ssb-widget a.pp-ssb-btn:visited,
body .pp-ssb-widget a.pp-ssb-btn:active,
body .pp-ssb-widget a.pp-ssb-btn:hover {
text-decoration: none !important;
color: #FFFFFF !important;
}
.pp-ssb-widget-dark a,
.pp-ssb-widget-modern a {
background-color: #222222;
}
.pp-ssb-widget-modern a.pp-ssb-itunes {
background-color: #732BBE;
}
.pp-ssb-widget-modern a.pp-ssb-email {
background-color: #337EC9;
}
.pp-ssb-widget-modern a.pp-ssb-android {
background-color: #6AB344;
}
.pp-ssb-widget-modern a.pp-ssb-rss {
background-color: #FF8800;
}
.pp-ssb-ic {
width: 48px;
height: 48px;
border: 0;
display: inline-block;
vertical-align: middle;
margin-right: 2px;
background-image: url(<?php
echo powerpress_get_root_url();
?>
images/spriteStandard.png);
background-repeat: no-repeat;
background-size: 294px;
}
.pp-ssb-itunes .pp-ssb-ic {
background-position: -49px 0;
}
.pp-ssb-rss .pp-ssb-ic {
background-position: 0 -49px;
}
.pp-ssb-email .pp-ssb-ic {
background-position: -196px -49px;
}
.pp-ssb-android .pp-ssb-ic {
background-position: -98px -98px;
}
.pp-ssb-more .pp-ssb-ic {
background-position: -49px -49px;
}
/* Retina-specific stuff here */
//.........这里部分代码省略.........
示例8: powerpressplayer_build_1pxoutplayer
function powerpressplayer_build_1pxoutplayer($media_url, $EpisodeData = array())
{
$content = '';
$autoplay = false;
if (isset($EpisodeData['autoplay']) && $EpisodeData['autoplay']) {
$autoplay = true;
}
// TODO: We need to handle this
$PlayerSettings = get_option('powerpress_audio-player');
if (!$PlayerSettings) {
$PlayerSettings = array('width' => '290', 'transparentpagebg' => 'yes', 'lefticon' => '#333333', 'leftbg' => '#CCCCCC', 'bg' => '#E5E5E5', 'voltrack' => '#F2F2F2', 'volslider' => '#666666', 'rightbg' => '#B4B4B4', 'rightbghover' => '#999999', 'righticon' => '#333333', 'righticonhover' => '#FFFFFF', 'loader' => '#009900', 'track' => '#FFFFFF', 'tracker' => '#DDDDDD', 'border' => '#CCCCCC', 'skip' => '#666666', 'text' => '#333333', 'pagebg' => '', 'noinfo' => 'yes', 'rtl' => 'no');
}
if (empty($PlayerSettings['titles'])) {
$PlayerSettings['titles'] = 'Blubrry PowerPress';
} else {
if (strtoupper($PlayerSettings['titles']) == __('TRACK', 'powerpress')) {
unset($PlayerSettings['titles']);
}
}
// Set player width
if (!isset($PlayerSettings['width'])) {
$PlayerSettings['width'] = 290;
}
if (!empty($EpisodeData['width']) && is_numeric($EpisodeData['width'])) {
$PlayerSettings['width'] = $EpisodeData['width'];
}
$transparency = '<param name="wmode" value="transparent" />';
$PlayerSettings['transparentpagebg'] = 'yes';
if (!empty($PlayerSettings['pagebg'])) {
$transparency = '<param name="bgcolor" value="' . $PlayerSettings['pagebg'] . '" />';
$PlayerSettings['transparentpagebg'] = 'no';
}
$flashvars = '';
while (list($key, $value) = each($PlayerSettings)) {
$flashvars .= '&' . $key . '=' . preg_replace('/\\#/', '', $value);
}
if ($autoplay) {
$flashvars .= '&autostart=yes';
}
// TODO: Add 1 px out audio-player player here
$player_id = powerpressplayer_get_next_id();
if (empty($EpisodeData['nodiv'])) {
$content .= '<div class="powerpress_player" id="powerpress_player_' . $player_id . '">';
}
$content .= '<object type="application/x-shockwave-flash" data="' . powerpress_get_root_url() . 'audio-player.swf" id="' . $player_id . '" height="24" width="' . $PlayerSettings['width'] . '">' . PHP_EOL;
$content .= '<param name="movie" value="' . powerpress_get_root_url() . 'audio-player.swf" />' . PHP_EOL;
$content .= '<param name="FlashVars" value="playerID=' . $player_id . '&soundFile=' . urlencode($media_url) . $flashvars . '" />' . PHP_EOL;
$content .= '<param name="quality" value="high" />' . PHP_EOL;
$content .= '<param name="menu" value="false" />' . PHP_EOL;
$content .= '<param name="wmode" value="transparent" />' . PHP_EOL;
// $content .= powerpressplayer_build_html5audio($media_url, $EpisodeData, true); // Feature removed since it causes double players to be insrted in Safari/Firefox
$content .= powerpressplayer_build_playimageaudio($media_url);
$content .= '</object>' . PHP_EOL;
if (empty($EpisodeData['nodiv'])) {
$content .= '</div>' . PHP_EOL;
}
return $content;
}
示例9: powerpress_do_subscribe_widget
function powerpress_do_subscribe_widget($settings)
{
if (empty($settings['feed_url'])) {
return '';
}
if (isset($settings['title']) && empty($settings['title'])) {
$settings['title'] = get_bloginfo('name');
}
if (empty($settings['itunes_url'])) {
$settings['itunes_url'] = powerpresssubscribe_get_itunes_url($settings);
}
if (empty($settings['style'])) {
$settings['style'] = 'modern';
}
if (empty($settings['image_url'])) {
$settings['image_url'] = powerpress_get_root_url() . 'itunes_default.jpg';
// Default PowerPress image used in this case.
}
$PowerPressSettings = get_option('powerpress_general');
$htmlX = '';
$html = '';
$html .= '<div class="pp-sub-widget pp-sub-widget-' . esc_attr($settings['style']) . '">';
if (!empty($settings['title'])) {
if (!isset($settings['heading'])) {
// If not specified in the shortcode
$settings['heading'] = __('Subscribe to', 'powerpress');
}
if (!empty($settings['heading'])) {
// If there is a value set for the heading, lets use it
$html .= '<div class="pp-sub-h">' . esc_html($settings['heading']) . '</div>';
}
$html .= '<h2 class="pp-sub-t">' . esc_html($settings['title']) . '</h2>';
} else {
$settings['title'] = '';
// Make sure it's an empty string
}
if (!empty($settings['subtitle'])) {
$html .= '<p class="pp-sub-st">' . esc_html($settings['subtitle']) . '</p>';
}
// Lets build the subscribe box...
$html .= '<div class="pp-sub-bx">';
$html .= '<img class="pp-sub-l" src="' . esc_url($settings['image_url']) . '" ' . (!empty($settings['title']) ? ' title="' . esc_attr($settings['title']) . '" ' : '') . '/>';
$html .= '<div class="pp-sub-btns">';
if (!empty($settings['itunes_url'])) {
$html .= '<a href="' . esc_url($settings['itunes_url']) . '" class="pp-sub-btn pp-sub-itunes" title="' . esc_attr(__('Subscribe on iTunes', 'powerpress')) . '"><span class="pp-sub-ic"></span>' . esc_html(__('on iTunes', 'powerpress')) . '</a>';
}
if (preg_match('/^(https?:\\/\\/)(.*)$/i', $settings['feed_url'], $matches)) {
$android_url = $matches[1] . 'subscribeonandroid.com/' . $matches[2];
$html .= '<a href="' . esc_url($android_url) . '" class="pp-sub-btn pp-sub-android" title="' . esc_attr(__('Subscribe on Android', 'powerpress')) . '"><span class="pp-sub-ic"></span>' . esc_html(__('on Android', 'powerpress')) . '</a>';
if (!empty($PowerPressSettings['subscribe_feature_email'])) {
$email_url = $matches[1] . 'subscribebyemail.com/' . $matches[2];
$html .= '<a href="' . esc_url($email_url) . '" class="pp-sub-btn pp-sub-email" title="' . esc_attr(__('Subscribe by Email', 'powerpress')) . '"><span class="pp-sub-ic"></span>' . esc_html(__('by Email', 'powerpress')) . '</a>';
}
}
$html .= '<a href="' . esc_url($settings['feed_url']) . '" class="pp-sub-btn pp-sub-rss" title="' . esc_attr(__('Subscribe via RSS', 'powerpress')) . '"><span class="pp-sub-ic"></span>' . esc_html(__('via RSS', 'powerpress')) . '</a>';
// May want these back, not sure.
//$html .= '<a href="'. esc_url( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-bp"><span class="pp-sub-ic"></span>'. esc_html( __('BeyondPod for Android', 'powerpress') ) .'</a>';
//$html .= '<a href="'. esc_url( $settings['feed_url'] ) .'" class="pp-sub-btn pp-sub-pr"><span class="pp-sub-ic"></span>'. esc_html( __('Podcast Republic for Android', 'powerpress') ) .'</a>';
$html .= '</div>';
$html .= '</div>';
$html .= '<div class="pp-sub-m">';
$html .= '<p class="pp-sub-m-p">' . esc_html(__('Or subscribe with your favorite app by using the address below', 'powerpress')) . '</p>';
$html .= '<input class="pp-sub-m-i" type="text" name="NULL' . rand(0, 9999) . '" value="' . esc_attr($settings['feed_url']) . '" onclick="this.focus();this.select();" />';
$html .= '</div>';
$html .= '</div>';
return $html;
}
示例10: powerpress_dashboard_head
function powerpress_dashboard_head()
{
echo "<script type=\"text/javascript\" src=\"" . powerpress_get_root_url() . "player.min.js\"></script>\n";
?>
<style type="text/css">
#blubrry_stats_summary {
}
#blubrry_stats_summary label {
width: 40%;
max-width: 150px;
float: left;
}
#blubrry_stats_summary h2 {
font-size: 14px;
margin: 0;
padding: 0;
}
.blubrry_stats_ul {
padding-left: 20px;
margin-top: 5px;
margin-bottom: 10px;
}
.blubrry_stats_ul li {
list-style-type: none;
margin: 0px;
padding: 0px;
}
#blubrry_stats_media {
display: none;
}
#blubrry_stats_media_show {
text-align: right;
font-size: 85%;
}
#blubrry_stats_media h4 {
margin-bottom: 10px;
}
.blubrry_stats_title {
margin-left: 10px;
}
.blubrry_stats_updated {
font-size: 80%;
}
.powerpress-news-dashboard {
/* background-image:url(http://images.blubrry.com/powerpress/blubrry_logo.png);
background-repeat: no-repeat;
background-position: top right; */
}
.powerpress-news-dashboard .powerpressNewsPlayer {
margin-top: 5px;
}
</style>
<script type="text/javascript"><!--
jQuery(document).ready(function($) {
jQuery('.powerpress-dashboard-notice').click( function(e) {
e.preventDefault();
var dash_id = jQuery(this).parents('.postbox').attr('id');
jQuery( '#' + dash_id + '-hide' ).prop('checked', false).triggerHandler('click');
jQuery.ajax( {
type: 'POST',
url: '<?php
echo admin_url();
?>
admin-ajax.php',
data: { action: 'powerpress_dashboard_dismiss', dismiss_dash_id : dash_id },
success: function(response) {
}
});
});
});
// --></script>
<?php
}
示例11: 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) {
//.........这里部分代码省略.........
示例12: powerpressadmin_community_news
function powerpressadmin_community_news($items = 3)
{
require_once POWERPRESS_ABSPATH . '/powerpress-player.php';
// Include, if not included already
$rss_items = powerpress_get_news(POWERPRESS_FEED_NEWS, $items);
echo '<div class="powerpress-news-dashboard">';
echo '<ul>';
if (!$rss_items) {
echo '<li>' . __('Error occurred retrieving news.', 'powerpress') . '</li>';
} else {
$first_item = true;
while (list($null, $item) = each($rss_items)) {
$enclosure = $item->get_enclosure();
echo '<li>';
echo '<a class="rsswidget" href="' . esc_url($item->get_permalink(), $protocolls = null, 'display') . '" target="_blank">' . esc_html($item->get_title()) . '</a>';
echo ' <span class="rss-date">' . $item->get_date('F j, Y') . '</span>';
echo '<div class="rssSummary">' . esc_html(powerpress_feed_text_limit(strip_tags($item->get_description()), 150)) . '</div>';
if ($enclosure && !empty($enclosure->link)) {
$poster_image = '';
$poster_tag = $item->get_item_tags('http://www.rawvoice.com/rawvoiceRssModule/', 'poster');
if ($poster_tag && !empty($poster_tag[0]['attribs']['']['url'])) {
$poster_image = $item->sanitize($poster_tag[0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT);
}
$embed = '';
$embed_tag = $item->get_item_tags('http://www.rawvoice.com/rawvoiceRssModule/', 'embed');
if ($embed_tag && !empty($embed_tag[0]['data'])) {
$embed = $embed_tag[0]['data'];
}
// Only show an episode with the latest item
if ($first_item && $embed) {
if (preg_match('/width="(\\d{1,4})"/i', $embed, $matches) && count($matches) > 1) {
$max_width = $matches[1];
$embed = preg_replace('/width="/i', 'style="max-width: ' . $max_width . 'px;" width="', $embed);
}
$embed = preg_replace('/width="(\\d{1,4})"/i', 'width="100%"', $embed);
echo '<div class="powerpressNewsPlayer">';
echo $embed;
echo '</div>';
} else {
if ($first_item) {
$EpisodeData = array();
$EpisodeData['type'] = $enclosure->type;
$EpisodeData['duration'] = $enclosure->duration;
$EpisodeData['poster'] = $poster_image;
$EpisodeData['width'] = '100%';
$EpisodeData['custom_play_button'] = powerpress_get_root_url() . 'play_audio.png';
$ext = powerpressplayer_get_extension($enclosure->link);
switch ($ext) {
case 'mp4':
case 'm4v':
case 'webm':
echo '<div class="powerpressNewsPlayer powerpressadmin-mejs-video">';
echo powerpressplayer_build_mediaelementvideo($enclosure->link, $EpisodeData);
echo '</div>';
break;
case 'mp3':
case 'm4a':
echo '<div class="powerpressNewsPlayer">';
echo powerpressplayer_build_mediaelementaudio($enclosure->link, $EpisodeData);
echo '</div>';
break;
}
}
}
//echo '<div style="clear: both;"></div>';
}
echo '</li>';
$first_item = false;
}
}
echo '</ul>';
echo '<br class="clear"/>';
echo '<div style="margin-top:10px;border-top: 1px solid #ddd; padding-top: 10px; text-align:center;">';
echo __('Subscribe:', 'powerpress');
echo ' ';
echo '<a href="http://www.powerpresspodcast.com/feed/"><img src="' . get_bloginfo('wpurl') . '/wp-includes/images/rss.png" alt="' . __('Blog', 'powerpress') . '" /> ' . __('Blog', 'powerpress') . '</a>';
echo ' ';
echo '<a href="http://www.powerpresspodcast.com/feed/podcast/"><img src="' . get_bloginfo('wpurl') . '/wp-includes/images/rss.png" alt="' . __('Podcast', 'powerpress') . '" /> ' . __('Podcast', 'powerpress') . '</a>';
echo ' ';
echo '<a href="https://itunes.apple.com/us/podcast/blubrry-powerpress-community/id430248099/"><img src="' . powerpress_get_root_url() . '/images/itunes_modern.png" alt="' . __('iTunes', 'powerpress') . '" /> ' . __('iTunes', 'powerpress') . '</a>';
//echo ' ';
echo '</div>';
echo '</div>';
}
示例13: powerpress_init
function powerpress_init()
{
$GeneralSettings = get_option('powerpress_general');
if (empty($GeneralSettings['disable_appearance']) || $GeneralSettings['disable_appearance'] == false) {
require_once POWERPRESS_ABSPATH . '/powerpress-player.php';
powerpressplayer_init($GeneralSettings);
}
// Enable the playlist feature for PowerPress
if (!empty($GeneralSettings['playlist_player'])) {
require_once POWERPRESS_ABSPATH . '/powerpress-playlist.php';
}
if (defined('PODPRESS_VERSION') || isset($GLOBALS['podcasting_player_id']) || isset($GLOBALS['podcast_channel_active']) || defined('PODCASTING_VERSION')) {
return false;
}
// Another podcasting plugin is enabled...
// If we are to process podpress data..
if (!empty($GeneralSettings['process_podpress'])) {
powerpress_podpress_redirect_check();
}
// Add the podcast feeds;
if (!defined('POWERPRESS_NO_PODCAST_FEED')) {
add_feed('podcast', 'powerpress_do_podcast_feed');
}
if ($GeneralSettings && isset($GeneralSettings['custom_feeds']) && is_array($GeneralSettings['custom_feeds'])) {
while (list($feed_slug, $feed_title) = each($GeneralSettings['custom_feeds'])) {
if ($feed_slug != 'podcast') {
add_feed($feed_slug, 'powerpress_do_podcast_feed');
}
}
}
if (!empty($GeneralSettings['posttype_podcasting'])) {
// Loop through the posttype podcasting settings and set the feeds for the custom post type slugs...
global $wp_rewrite;
$FeedSlugPostTypesArray = get_option('powerpress_posttype-podcasting');
// Changed field slightly so it does not conflict with a post type "podcasting"
if ($FeedSlugPostTypesArray === false) {
// Simple one-time fix...
$FeedSlugPostTypesArray = get_option('powerpress_posttype_podcasting');
if (empty($FeedSlugPostTypesArray)) {
$FeedSlugPostTypesArray = array();
}
update_option('powerpress_posttype-podcasting', $FeedSlugPostTypesArray);
if (!array_key_exists('title', $FeedSlugPostTypesArray)) {
// AS long as it doesn't have post type specific settings...
delete_option('powerpress_posttype_podcasting');
}
}
if (empty($FeedSlugPostTypesArray)) {
$FeedSlugPostTypesArray = array();
}
while (list($feed_slug, $FeedSlugPostTypes) = each($FeedSlugPostTypesArray)) {
if (!in_array($feed_slug, $wp_rewrite->feeds)) {
add_feed($feed_slug, 'powerpress_do_podcast_feed');
}
}
}
if (defined('GAWP_VERSION')) {
add_filter('the_content', 'powerpress_yoast_gawp_fix', 120);
}
if (!empty($GeneralSettings['subscribe_links'])) {
// 2 Subscribe page shortocde [powerpress_subscribe feedslug="podcast"]
// 3 Subscribe sidebar widget: iTunes, RSS
add_filter('powerpress_player_subscribe_links', 'powerpressplayer_link_subscribe_pre', 1, 3);
add_filter('powerpress_player_subscribe_links', 'powerpressplayer_link_subscribe_post', 1000, 3);
}
wp_register_style('powerpress-subscribe-style', powerpress_get_root_url() . 'css/subscribe.css', array(), '20141021', 'all');
}
示例14: powerpress_rss2_head
function powerpress_rss2_head()
{
global $powerpress_feed;
if (!powerpress_is_podcast_feed()) {
return;
}
// Not a feed we manage
$feed_slug = get_query_var('feed');
$cat_ID = get_query_var('cat');
$Feed = get_option('powerpress_feed');
// Get the main feed settings
if (!empty($powerpress_feed['category'])) {
$CustomFeed = get_option('powerpress_cat_feed_' . $powerpress_feed['category']);
// Get the custom podcast feed settings saved in the database
if ($CustomFeed) {
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed);
}
} else {
if (!empty($powerpress_feed['term_taxonomy_id'])) {
$CustomFeed = get_option('powerpress_taxonomy_' . $powerpress_feed['term_taxonomy_id']);
// Get the taxonomy podcast settings saved in the database
if ($CustomFeed) {
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed);
}
} else {
if (powerpress_is_custom_podcast_feed()) {
$CustomFeed = get_option('powerpress_feed_' . $feed_slug);
// Get the custom podcast feed settings saved in the database
$Feed = powerpress_merge_empty_feed_settings($CustomFeed, $Feed);
}
}
}
if (!isset($Feed['url']) || trim($Feed['url']) == '') {
if (is_category()) {
$Feed['url'] = get_category_link($cat_ID);
} else {
$Feed['url'] = get_bloginfo('url');
}
}
$General = get_option('powerpress_general');
// We made it this far, lets write stuff to the feed!
echo '<!-- podcast_generator="Blubrry PowerPress/' . POWERPRESS_VERSION . '" ';
if (isset($General['advanced_mode_2']) && empty($General['advanced_mode_2'])) {
echo 'mode="simple" ';
} else {
echo 'mode="advanced" ';
}
echo '-->' . PHP_EOL;
// add the itunes:new-feed-url tag to feed
if (powerpress_is_custom_podcast_feed()) {
if (!empty($Feed['itunes_new_feed_url'])) {
$Feed['itunes_new_feed_url'] = str_replace('&', '&', $Feed['itunes_new_feed_url']);
echo "\t<itunes:new-feed-url>" . htmlspecialchars(trim($Feed['itunes_new_feed_url'])) . '</itunes:new-feed-url>' . PHP_EOL;
}
} else {
if (!empty($Feed['itunes_new_feed_url']) && ($feed_slug == 'feed' || $feed_slug == 'rss2')) {
$Feed['itunes_new_feed_url'] = str_replace('&', '&', $Feed['itunes_new_feed_url']);
echo "\t<itunes:new-feed-url>" . htmlspecialchars(trim($Feed['itunes_new_feed_url'])) . '</itunes:new-feed-url>' . PHP_EOL;
}
}
if (!empty($Feed['itunes_summary'])) {
echo "\t" . '<itunes:summary>' . powerpress_format_itunes_value($Feed['itunes_summary'], 'summary') . '</itunes:summary>' . PHP_EOL;
} else {
echo "\t" . '<itunes:summary>' . powerpress_format_itunes_value(get_bloginfo('description'), 'summary') . '</itunes:summary>' . PHP_EOL;
}
if (!empty($powerpress_feed['itunes_talent_name'])) {
echo "\t<itunes:author>" . esc_html($powerpress_feed['itunes_talent_name']) . '</itunes:author>' . PHP_EOL;
}
if (!empty($powerpress_feed['explicit'])) {
echo "\t" . '<itunes:explicit>' . $powerpress_feed['explicit'] . '</itunes:explicit>' . PHP_EOL;
}
if (!empty($Feed['itunes_block'])) {
echo "\t<itunes:block>yes</itunes:block>" . PHP_EOL;
}
if (!empty($Feed['itunes_complete'])) {
echo "\t<itunes:complete>yes</itunes:complete>" . PHP_EOL;
}
if (!empty($Feed['itunes_image'])) {
echo "\t" . '<itunes:image href="' . esc_html(str_replace(' ', '+', $Feed['itunes_image']), 'double') . '" />' . PHP_EOL;
} else {
echo "\t" . '<itunes:image href="' . powerpress_get_root_url() . 'itunes_default.jpg" />' . PHP_EOL;
}
if (!empty($Feed['email'])) {
echo "\t" . '<itunes:owner>' . PHP_EOL;
echo "\t\t" . '<itunes:name>' . esc_html($powerpress_feed['itunes_talent_name']) . '</itunes:name>' . PHP_EOL;
echo "\t\t" . '<itunes:email>' . esc_html($Feed['email']) . '</itunes:email>' . PHP_EOL;
echo "\t" . '</itunes:owner>' . PHP_EOL;
echo "\t" . '<managingEditor>' . esc_html($Feed['email'] . ' (' . $powerpress_feed['itunes_talent_name'] . ')') . '</managingEditor>' . PHP_EOL;
}
if (!empty($Feed['copyright'])) {
// In case the user entered the copyright html version or the copyright UTF-8 or ASCII symbol or just (c)
$Feed['copyright'] = str_replace(array('©', '(c)', '(C)', chr(194) . chr(169), chr(169)), '©', $Feed['copyright']);
echo "\t" . '<copyright>' . esc_html($Feed['copyright']) . '</copyright>' . PHP_EOL;
}
if (!empty($Feed['itunes_subtitle'])) {
echo "\t" . '<itunes:subtitle>' . powerpress_format_itunes_value($Feed['itunes_subtitle'], 'subtitle') . '</itunes:subtitle>' . PHP_EOL;
} else {
echo "\t" . '<itunes:subtitle>' . powerpress_format_itunes_value(get_bloginfo('description'), 'subtitle') . '</itunes:subtitle>' . PHP_EOL;
}
if (!empty($Feed['itunes_keywords'])) {
//.........这里部分代码省略.........
示例15: powerpresspartner_clammr_info
function powerpresspartner_clammr_info($Settings = true)
{
if (defined('POWERPRESS_DISABLE_PARTNERS') && POWERPRESS_DISABLE_PARTNERS == true) {
return;
}
$ClammrPluginEnabled = false;
if (!empty($GLOBALS['ClammrPlayer'])) {
$ClammrPluginEnabled = is_object($GLOBALS['ClammrPlayer']);
}
?>
<h3 style="position: relative;margin-left: 30px; margin-bottom: 5px;">
<img src="<?php
echo powerpress_get_root_url();
?>
images/clammr.png" style="width: 30px; height: 30px; position: absolute; top: 0; left: -34px;" />
<?php
echo __('Clammr Player PowerPress Add-on', 'powerpress');
?>
<?php
echo powerpressadmin_new();
?>
</h3>
<p style="margin-left: 50px;">
<?php
echo __('Blubrry has partnered with Clammr to enable a social-themed audio player for your site. As visitors listen to your podcast, they can tap the integrated Clammr Button to tag their favorite highlights and share them to Facebook and Twitter. The shared highlights contain links back to your full audio and site, driving additional audience and traffic to you.', 'powerpress');
?>
</p>
<?php
if ($Settings) {
if ($ClammrPluginEnabled == false) {
$plugin_link = '<a href="' . esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=' . 'audio-player-by-clammr' . '&TB_iframe=true&width=640&height=662')) . '" class="thickbox" title="' . esc_attr__('Install Plugin') . '">' . __('Install Clammr Audio Player add-on plugin', 'powerpress') . '</a>';
?>
<p style="margin-left: 50px;"><strong><?php
echo $plugin_link;
?>
</strong></p><?php
} else {
$PowerPressClammr = get_option('powerpress_clammr');
?>
<p style="margin-bottom: 20px; margin-left: 50px;">
<input type="hidden" name="PowerPressClammr" value="0" />
<input type="checkbox" name="PowerPressClammr" value="1" <?php
if (!empty($PowerPressClammr)) {
echo 'checked';
}
?>
/>
<strong><?php
echo __('Enable Clammr Audio Player with PowerPress', 'powerpress');
?>
</strong>
</p>
<?php
}
}
}