Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tak 6494762 lightbox for galleries option #85

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions controller/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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 ) {
Expand Down
4 changes: 2 additions & 2 deletions flowplayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

$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' );
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions view/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,17 @@ function fv_flowplayer_admin_integrations() {
</p>
</td>
</tr>
<tr>
<td><label for="wp_lightbox_video"><?php _e('Handle WP Lightbox Ultimate shortcodes', 'fv-wordpress-flowplayer'); ?>:</label></td>
<td>
<p class="description">
<input type="hidden" name="integrations[wp_lightbox_video]" value="false" />
<input type="checkbox" name="integrations[wp_lightbox_video]" id="wp_core_video" value="true" <?php if( isset($fv_fp->conf['integrations']['wp_lightbox_video']) && $fv_fp->conf['integrations']['wp_lightbox_video'] == 'true' ) echo 'checked="checked"'; ?> />
<?php _e('Handles the <code><small>[wp_lightbox_embed_protected_s3_video]</small></code> and <code><small>[wp_lightbox_protected_s3_video]</small></code> shortcodes.', 'fv-wordpress-flowplayer'); ?>

</p>
</td>
</tr>
<tr>
<td class="first"><label for="js-everywhere"><?php _e('Load FV Flowplayer JS everywhere', 'fv-wordpress-flowplayer'); ?>:</label></td>
<td>
Expand Down