Esempio n. 1
0
 public function __construct()
 {
     //load conf data into stack
     $this->_get_conf();
     if (is_admin()) {
         //  update notices
         $this->readme_URL = 'http://plugins.trac.wordpress.org/browser/fv-wordpress-flowplayer/trunk/readme.txt?format=txt';
         if (!has_action('in_plugin_update_message-fv-wordpress-flowplayer/flowplayer.php')) {
             add_action('in_plugin_update_message-fv-wordpress-flowplayer/flowplayer.php', array(&$this, 'plugin_update_message'));
         }
         //  pointer boxes
         parent::__construct();
     }
     // define needed constants
     if (!defined('FV_FP_RELATIVE_PATH')) {
         define('FV_FP_RELATIVE_PATH', flowplayer::get_plugin_url());
         $vid = 'http://' . $_SERVER['SERVER_NAME'];
         if (dirname($_SERVER['PHP_SELF']) != '/') {
             $vid .= dirname($_SERVER['PHP_SELF']);
         }
         define('VIDEO_DIR', '/videos/');
         define('VIDEO_PATH', $vid . VIDEO_DIR);
     }
     add_filter('fv_flowplayer_caption', array($this, 'get_duration_playlist'), 10, 3);
     add_filter('fv_flowplayer_inner_html', array($this, 'get_duration_video'), 10, 2);
     add_filter('fv_flowplayer_video_src', array($this, 'get_amazon_secure'), 10, 2);
     add_filter('fv_flowplayer_css_writeout', array($this, 'css_writeout_option'));
     add_action('wp_enqueue_scripts', array($this, 'css_enqueue'));
     add_action('admin_enqueue_scripts', array($this, 'css_enqueue'));
     add_filter('post_rewrite_rules', array($this, 'rewrite_embed'));
     add_filter('page_rewrite_rules', array($this, 'rewrite_embed'));
     add_filter('query_vars', array($this, 'rewrite_vars'));
     add_filter('init', array($this, 'rewrite_check'));
     add_action('template_redirect', array($this, 'template_embed'));
 }
Esempio n. 2
0
function fv_wp_flowplayer_admin_enqueue_scripts($page)
{
    if ($page !== 'post.php' && $page !== 'post-new.php') {
        return;
    }
    global $fv_wp_flowplayer_ver;
    wp_register_script('fvwpflowplayer-domwindow', flowplayer::get_plugin_url() . '/js/jquery.colorbox-min.js', array('jquery'), $fv_wp_flowplayer_ver);
    wp_enqueue_script('fvwpflowplayer-domwindow');
    wp_register_script('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url() . '/js/shortcode-editor.js', array('jquery'), $fv_wp_flowplayer_ver);
    wp_enqueue_script('fvwpflowplayer-shortcode-editor');
    wp_register_style('fvwpflowplayer-domwindow-css', flowplayer::get_plugin_url() . '/css/colorbox.css', '', '1.0', 'screen');
    wp_enqueue_style('fvwpflowplayer-domwindow-css');
}
Esempio n. 3
0
/**
 * Figure out if we need to include MediaElement.js
 */
function flowplayer_prepare_scripts()
{
    global $fv_fp, $fv_wp_flowplayer_ver;
    //  don't load script in Optimize Press 2 preview
    if (flowplayer::is_special_editor()) {
        return;
    }
    if (isset($GLOBALS['fv_fp_scripts']) || isset($fv_fp->conf['js-everywhere']) && strcmp($fv_fp->conf['js-everywhere'], 'true') == 0 || isset($_GET['fv_wp_flowplayer_check_template'])) {
        $aDependencies = array('jquery');
        if ($fv_fp->load_tabs) {
            wp_enqueue_script('jquery-ui-tabs', false, array('jquery', 'jquery-ui-core'), $fv_wp_flowplayer_ver, true);
            $aDependencies[] = 'jquery-ui-tabs';
        }
        wp_enqueue_script('flowplayer', flowplayer::get_plugin_url() . '/flowplayer/fv-flowplayer.min.js', $aDependencies, $fv_wp_flowplayer_ver, true);
        $sPluginUrl = preg_replace('~^.*://~', '//', FV_FP_RELATIVE_PATH);
        $sCommercialKey = isset($fv_fp->conf['key']) && $fv_fp->conf['key'] != 'false' && strlen($fv_fp->conf['key']) > 0 ? $fv_fp->conf['key'] : '';
        $sLogo = $sCommercialKey && isset($fv_fp->conf['logo']) && $fv_fp->conf['logo'] != 'false' && strlen($fv_fp->conf['logo']) > 0 ? $fv_fp->conf['logo'] : '';
        if ($fv_fp->load_mediaelement && !wp_script_is('wp-mediaelement')) {
            wp_enqueue_script('flowplayer-mediaelement', flowplayer::get_plugin_url() . '/mediaelement/mediaelement-and-player.min.js', array('jquery'), $fv_wp_flowplayer_ver, true);
        }
        $aConf = array('fullscreen' => true, 'swf' => $sPluginUrl . '/flowplayer/flowplayer.swf?ver=' . $fv_wp_flowplayer_ver, 'swfHls' => $sPluginUrl . '/flowplayer/flowplayerhls.swf?ver=' . $fv_wp_flowplayer_ver);
        if (!empty($fv_fp->conf['integrations']['embed_iframe']) && $fv_fp->conf['integrations']['embed_iframe'] == 'true') {
            $aConf['embed'] = false;
        } else {
            $aConf['embed'] = array('library' => $sPluginUrl . '/flowplayer/fv-flowplayer.min.js', 'script' => $sPluginUrl . '/flowplayer/embed.min.js', 'skin' => $sPluginUrl . '/css/flowplayer.css', 'swf' => $sPluginUrl . '/flowplayer/flowplayer.swf?ver=' . $fv_wp_flowplayer_ver, 'swfHls' => $sPluginUrl . '/flowplayer/flowplayerhls.swf?ver=' . $fv_wp_flowplayer_ver);
        }
        if ($sCommercialKey) {
            $aConf['key'] = $sCommercialKey;
        }
        if (apply_filters('fv_flowplayer_safety_resize', true) && !isset($fv_fp->conf['fixed_size']) || strcmp($fv_fp->conf['fixed_size'], 'true') != 0) {
            $aConf['safety_resize'] = true;
        }
        if (isset($fv_fp->conf['cbox_compatibility']) && strcmp($fv_fp->conf['cbox_compatibility'], 'true') == 0) {
            $aConf['cbox_compatibility'] = true;
        }
        if (current_user_can('manage_options') && $fv_fp->conf['disable_videochecker'] != 'true') {
            $aConf['video_checker_site'] = home_url();
        }
        if ($sLogo) {
            $aConf['logo'] = $sLogo;
        }
        $aConf['volume'] = floatval($fv_fp->conf['volume']);
        if ($aConf['volume'] > 1) {
            $aConf['volume'] = 1;
        }
        wp_localize_script('flowplayer', 'fv_flowplayer_conf', $aConf);
        if (current_user_can('manage_options')) {
            wp_localize_script('flowplayer', 'fv_flowplayer_admin_input', array(true));
            wp_localize_script('flowplayer', 'fv_flowplayer_admin_js_test', array(true));
        }
        wp_localize_script('flowplayer', 'fv_flowplayer_translations', fv_flowplayer_get_js_translations());
        wp_localize_script('flowplayer', 'fv_fp_ajaxurl', site_url() . '/wp-admin/admin-ajax.php');
        wp_localize_script('flowplayer', 'fv_flowplayer_playlists', $fv_fp->aPlaylists);
        if (count($fv_fp->aAds) > 0) {
            wp_localize_script('flowplayer', 'fv_flowplayer_ad', $fv_fp->aAds);
        }
        if (count($fv_fp->aPopups) > 0) {
            wp_localize_script('flowplayer', 'fv_flowplayer_popup', $fv_fp->aPopups);
        }
        if (count($GLOBALS['fv_fp_scripts']) > 0) {
            foreach ($GLOBALS['fv_fp_scripts'] as $sKey => $aScripts) {
                wp_localize_script('flowplayer', $sKey . '_array', $aScripts);
            }
        }
    }
}
Esempio n. 4
0
    ?>
		<div id="fv_flowplayer_ad">
			<div class="text-part">
				<h2>FV Wordpress<strong>Flowplayer</strong></h2>
				<span class="red-text">with your own branding</span>
					<ul>
					<li>Put up your own logo</li>
					<li>Or remove the logo completely</li>
					<li>The best video plugin for Wordpress</li>
					</ul>
						<a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download" class="red-button"><strong>Christmas sale!</strong><br />All Licenses 20% Off</a></p>
				</div>
				<div class="graphic-part">
					<a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/buy">
					<img width="297" height="239" border="0" src="<?php 
    echo flowplayer::get_plugin_url() . '/images/fv-wp-flowplayer-led-monitor.png';
    ?>
"> </a>
				</div>
		</div>
  <?php 
}
?>
	
  
  
		<div id="dashboard-widgets" class="metabox-holder columns-1">
			<div id='postbox-container-1' class='postbox-container'>    
				<?php 
do_meta_boxes('fv_flowplayer_settings', 'normal', false);
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);