diff --git a/controller/shortcodes.php b/controller/shortcodes.php index 071b3dacf..6a39d1118 100755 --- a/controller/shortcodes.php +++ b/controller/shortcodes.php @@ -20,6 +20,8 @@ if (!class_exists('flowplayer_frontend')) require_once dirname( __FILE__ ) . '/../models/flowplayer-frontend.php'; +add_action( 'plugins_loaded', 'fvp_overtake_shortodes' ); + add_shortcode('flowplayer','flowplayer_content_handle'); add_shortcode('fvplayer','flowplayer_content_handle'); @@ -522,6 +524,53 @@ function fv_flowplayer_shortcode_playlist( $output ) { } +function fvp_overtake_shortodes(){ + global $fv_fp; + + + if(isset($fv_fp->conf['integrations']['wp_lightbox_video']) && $fv_fp->conf['integrations']['wp_lightbox_video'] === 'true' ){ + add_shortcode('wp_lightbox_embed_protected_s3_video','fv_flowplayer_shortcode_ultimate_lightbox_video'); + add_shortcode('wp_lightbox_protected_s3_video','fv_flowplayer_shortcode_ultimate_lightbox_video'); + } + +} + + + +function fv_flowplayer_shortcode_ultimate_lightbox_video( $atts ) { + global $fv_fp; + + $bridge_atts = array(); + if( isset($atts['name']) ) { + $region = $fv_fp->conf['amazon_region'][0] === 'us-east-1' ? '' : '.' . $fv_fp->conf['amazon_region'][0] ; + $bridge_atts['src'] = 'https://s3' . $region . '.amazonaws.com/' . $fv_fp->conf['amazon_bucket'][0] . '/' . $atts['name']; + } + + if( isset($atts['width']) ) { + $bridge_atts['width'] = $atts['width']; + } + + if( isset($atts['height']) ) { + $bridge_atts['height'] = $atts['height']; + } + + if( isset($atts['source']) ) { + $bridge_atts['splash'] = $atts['source']; + } + + $shortcode = func_get_args(); + + switch($shortcode[2]){ + case 'wp_lightbox_protected_s3_video' : + $bridge_atts['lightbox'] = 'true;'; + break; + } + + + return flowplayer_content_handle( $bridge_atts, false, 'video' ); +} + + add_filter( 'fv_flowplayer_shortcode', 'fv_flowplayer_shortcode_fix_fancy_quotes' ); function fv_flowplayer_shortcode_fix_fancy_quotes( $aArgs ) { diff --git a/flowplayer.php b/flowplayer.php index 89397696f..910a72dba 100644 --- a/flowplayer.php +++ b/flowplayer.php @@ -3,7 +3,7 @@ Plugin Name: FV Player Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer Description: Formerly FV WordPress Flowplayer. Embed videos (MP4, WEBM, OGV, FLV) into posts or pages. Uses Flowplayer 6. -Version: 6.0.5.12 +Version: 6.0.5.12.1 Author URI: http://foliovision.com/ License: GPL-3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.txt @@ -26,7 +26,7 @@ along with this program. If not, see . */ -$fv_wp_flowplayer_ver = '6.0.5.12'; +$fv_wp_flowplayer_ver = '6.0.5.12.1'; $fv_wp_flowplayer_core_ver = '6.0.5'; include( dirname( __FILE__ ) . '/includes/extra-functions.php' ); diff --git a/readme.txt b/readme.txt index 79c84f778..8dd403e5a 100644 --- a/readme.txt +++ b/readme.txt @@ -338,6 +338,10 @@ Thank you for being part of the HMTL 5 mobile video revolution! == Changelog == += 6.0.5.13 - 2016/12/13 = + +* Feature - WP Lightbox Ultimate support - check "Integrations/Compatibility" + = 6.0.5.12 - 2016/12/08 = * Feature - Google Analytics - added tracking of playback errors diff --git a/view/admin.php b/view/admin.php index 7f71a62b4..5a9e9356f 100644 --- a/view/admin.php +++ b/view/admin.php @@ -671,6 +671,17 @@ function fv_flowplayer_admin_integrations() {

+ + + +

+ + conf['integrations']['wp_lightbox_video']) && $fv_fp->conf['integrations']['wp_lightbox_video'] == 'true' ) echo 'checked="checked"'; ?> /> + [wp_lightbox_embed_protected_s3_video] and [wp_lightbox_protected_s3_video] shortcodes.', 'fv-wordpress-flowplayer'); ?> + +

+ +