From c934fa3ece3a8825500727852a0fb4ef2ee353ff Mon Sep 17 00:00:00 2001 From: TheYurry Date: Mon, 12 Dec 2016 17:41:31 +0100 Subject: [PATCH 1/3] wp_lightbox shortcodes --- controller/shortcodes.php | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/controller/shortcodes.php b/controller/shortcodes.php index 071b3dacf..333d4b0e5 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_shortode' ); + add_shortcode('flowplayer','flowplayer_content_handle'); add_shortcode('fvplayer','flowplayer_content_handle'); @@ -522,6 +524,49 @@ function fv_flowplayer_shortcode_playlist( $output ) { } +function fvp_overtake_shortode(){ + + 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 ) { From 895ef361e4c846bc7d46fac7c6208ff19fa15004 Mon Sep 17 00:00:00 2001 From: TheYurry Date: Mon, 12 Dec 2016 18:27:00 +0100 Subject: [PATCH 2/3] settings --- controller/shortcodes.php | 14 +++++++++----- view/admin.php | 11 +++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/controller/shortcodes.php b/controller/shortcodes.php index 333d4b0e5..6a39d1118 100755 --- a/controller/shortcodes.php +++ b/controller/shortcodes.php @@ -20,7 +20,7 @@ if (!class_exists('flowplayer_frontend')) require_once dirname( __FILE__ ) . '/../models/flowplayer-frontend.php'; -add_action( 'plugins_loaded', 'fvp_overtake_shortode' ); +add_action( 'plugins_loaded', 'fvp_overtake_shortodes' ); add_shortcode('flowplayer','flowplayer_content_handle'); @@ -524,11 +524,15 @@ function fv_flowplayer_shortcode_playlist( $output ) { } -function fvp_overtake_shortode(){ +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'); + } - 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'); - } diff --git a/view/admin.php b/view/admin.php index 7f71a62b4..abb5c6d15 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] [wp_lightbox_protected_s3_video] shortcodes.', 'fv-wordpress-flowplayer'); ?> + +

+ + From fa98540e07c670691e9a96591635e3061a75cbd6 Mon Sep 17 00:00:00 2001 From: Martin FV Date: Tue, 13 Dec 2016 13:49:51 +0100 Subject: [PATCH 3/3] Fixing typos. --- flowplayer.php | 4 ++-- readme.txt | 4 ++++ view/admin.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) 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 abb5c6d15..5a9e9356f 100644 --- a/view/admin.php +++ b/view/admin.php @@ -672,12 +672,12 @@ 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] [wp_lightbox_protected_s3_video] shortcodes.', 'fv-wordpress-flowplayer'); ?> + [wp_lightbox_embed_protected_s3_video] and [wp_lightbox_protected_s3_video] shortcodes.', 'fv-wordpress-flowplayer'); ?>