acf
This commit is contained in:
		
							
								
								
									
										41
									
								
								plugins/fields/acfvideo/tmpl/providers/dailymotion.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								plugins/fields/acfvideo/tmpl/providers/dailymotion.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,41 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            http://www.tassos.gr | ||||
|  * @copyright       Copyright © 2019 Tassos Marinos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| if (!$videoURL = $field->value) | ||||
| { | ||||
| 	return; | ||||
| } | ||||
|  | ||||
| $payload = [ | ||||
| 	'value' => $videoURL, | ||||
| 	'width' => $fieldParams->get('width', '480px'), | ||||
| 	'height' => $fieldParams->get('height', '270px'), | ||||
| 	 | ||||
| 	'mute' => $fieldParams->get('mute', '0') === '1', | ||||
| 	'loop' => $fieldParams->get('loop', '0') === '1', | ||||
| 	'autopause' => $fieldParams->get('autopause', '0') === '1', | ||||
| 	'start' => $fieldParams->get('start', ''), | ||||
| 	'end' => $fieldParams->get('end', ''), | ||||
| 	'coverImageType' => $fieldParams->get('coverImageType', false), | ||||
| 	'coverImage' => $fieldParams->get('coverImage', ''), | ||||
| 	 | ||||
| ]; | ||||
|  | ||||
| // Set custom layout | ||||
| if ($field->params->get('acf_layout_override')) | ||||
| { | ||||
| 	$payload['layout'] = $field->params->get('acf_layout_override'); | ||||
| } | ||||
|  | ||||
| echo \NRFramework\Widgets\Helper::render('Dailymotion', $payload); | ||||
							
								
								
									
										39
									
								
								plugins/fields/acfvideo/tmpl/providers/facebookvideo.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								plugins/fields/acfvideo/tmpl/providers/facebookvideo.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,39 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            http://www.tassos.gr | ||||
|  * @copyright       Copyright © 2019 Tassos Marinos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| if (!$videoURL = $field->value) | ||||
| { | ||||
| 	return; | ||||
| } | ||||
|  | ||||
| $payload = [ | ||||
| 	'value' => $videoURL, | ||||
| 	'width' => $fieldParams->get('width', '480px'), | ||||
| 	'height' => null, | ||||
| 	 | ||||
| 	'fs' => $fieldParams->get('fs', '1') === '1', | ||||
| 	'autoplay' => $fieldParams->get('autoplay', '0') === '1', | ||||
| 	'autopause' => $fieldParams->get('autopause', '0') === '1', | ||||
| 	'show_text' => $fieldParams->get('show_text', '0') === '1', | ||||
| 	'show_captions' => $fieldParams->get('show_captions', '0') === '1', | ||||
| 	 | ||||
| ]; | ||||
|  | ||||
| // Set custom layout | ||||
| if ($field->params->get('acf_layout_override')) | ||||
| { | ||||
| 	$payload['layout'] = $field->params->get('acf_layout_override'); | ||||
| } | ||||
|  | ||||
| echo \NRFramework\Widgets\Helper::render('FacebookVideo', $payload); | ||||
							
								
								
									
										0
									
								
								plugins/fields/acfvideo/tmpl/providers/index.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								plugins/fields/acfvideo/tmpl/providers/index.php
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										40
									
								
								plugins/fields/acfvideo/tmpl/providers/selfhostedvideo.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								plugins/fields/acfvideo/tmpl/providers/selfhostedvideo.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,40 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            http://www.tassos.gr | ||||
|  * @copyright       Copyright © 2019 Tassos Marinos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| if (!$videoURL = $field->value) | ||||
| { | ||||
| 	return; | ||||
| } | ||||
|  | ||||
| $payload = [ | ||||
| 	'value' => $videoURL, | ||||
| 	'width' => $fieldParams->get('width', '480px'), | ||||
| 	'height' => $fieldParams->get('height', '270px'), | ||||
| 	'preload' => $fieldParams->get('preload', 'auto'), | ||||
| 	 | ||||
| 	'autopause' => $fieldParams->get('autopause', '0') === '1', | ||||
| 	 | ||||
| 	'autoplay' => $fieldParams->get('selfhostedvideo_autoplay', '0') === '1', | ||||
| 	'controls' => $fieldParams->get('selfhostedvideo_controls', '0') === '1', | ||||
| 	'loop' => $fieldParams->get('selfhostedvideo_loop', '0') === '1', | ||||
| 	'mute' => $fieldParams->get('selfhostedvideo_mute', '0') === '1' | ||||
| ]; | ||||
|  | ||||
| // Set custom layout | ||||
| if ($field->params->get('acf_layout_override')) | ||||
| { | ||||
| 	$payload['layout'] = $field->params->get('acf_layout_override'); | ||||
| } | ||||
|  | ||||
| echo \NRFramework\Widgets\Helper::render('SelfHostedVideo', $payload); | ||||
							
								
								
									
										51
									
								
								plugins/fields/acfvideo/tmpl/providers/vimeo.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								plugins/fields/acfvideo/tmpl/providers/vimeo.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,51 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            http://www.tassos.gr | ||||
|  * @copyright       Copyright © 2019 Tassos Marinos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| if (!$videoURL = $field->value) | ||||
| { | ||||
| 	return; | ||||
| } | ||||
|  | ||||
| $payload = [ | ||||
| 	'value' => $videoURL, | ||||
| 	'width' => $fieldParams->get('width', '480px'), | ||||
| 	'height' => $fieldParams->get('height', '270px'), | ||||
| 	'privacy' => $fieldParams->get('privacyMode', '0') === '1', | ||||
| 	 | ||||
| 	'controls' => $fieldParams->get('controls', '1') === '1', | ||||
| 	'loop' => $fieldParams->get('loop', '0') === '1', | ||||
| 	'mute' => $fieldParams->get('mute', '0') === '1', | ||||
| 	'autoplay' => $fieldParams->get('autoplay', '0') === '1', | ||||
| 	'autopause' => $fieldParams->get('autopause', '0') === '1', | ||||
| 	'title' => $fieldParams->get('title', '0') === '1', | ||||
| 	'byline' => $fieldParams->get('byline', '0') === '1', | ||||
| 	'portrait' => $fieldParams->get('portrait', '0') === '1', | ||||
| 	'pip' => $fieldParams->get('pip', '0') === '1', | ||||
| 	'speed' => $fieldParams->get('speed', '0') === '1', | ||||
| 	'color' => $fieldParams->get('vimeo_color'), | ||||
| 	'keyboard' => $fieldParams->get('disablekb', '0') === '0', | ||||
| 	'start' => $fieldParams->get('start', ''), | ||||
| 	'end' => $fieldParams->get('end', ''), | ||||
| 	'coverImageType' => $fieldParams->get('coverImageType', false), | ||||
| 	'coverImage' => $fieldParams->get('coverImage', ''), | ||||
| 	 | ||||
| ]; | ||||
|  | ||||
| // Set custom layout | ||||
| if ($field->params->get('acf_layout_override')) | ||||
| { | ||||
| 	$payload['layout'] = $field->params->get('acf_layout_override'); | ||||
| } | ||||
|  | ||||
| echo \NRFramework\Widgets\Helper::render('Vimeo', $payload); | ||||
							
								
								
									
										50
									
								
								plugins/fields/acfvideo/tmpl/providers/youtube.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								plugins/fields/acfvideo/tmpl/providers/youtube.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,50 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            http://www.tassos.gr | ||||
|  * @copyright       Copyright © 2019 Tassos Marinos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| if (!$videoURL = $field->value) | ||||
| { | ||||
| 	return; | ||||
| } | ||||
|  | ||||
| $payload = [ | ||||
| 	'value' => $videoURL, | ||||
| 	'width' => $fieldParams->get('width', '480px'), | ||||
| 	'height' => $fieldParams->get('height', '270px'), | ||||
| 	'privacy' => $fieldParams->get('privacyMode', '0') === '1', | ||||
| 	 | ||||
| 	'autoplay' => $fieldParams->get('autoplay', '0') === '1', | ||||
| 	'autopause' => $fieldParams->get('autopause', '0') === '1', | ||||
| 	'fs' => $fieldParams->get('fs', '1') === '1', | ||||
| 	'controls' => $fieldParams->get('controls', '1') === '1', | ||||
| 	'loop' => $fieldParams->get('loop', '0') === '1', | ||||
| 	'mute' => $fieldParams->get('mute', '0') === '1', | ||||
| 	'cc_load_policy' => $fieldParams->get('cc_load_policy', '0') === '1', | ||||
| 	'disablekb' => $fieldParams->get('disablekb', '0') === '1', | ||||
| 	'start' => $fieldParams->get('start', ''), | ||||
| 	'end' => $fieldParams->get('end', ''), | ||||
| 	'modestbranding' => $fieldParams->get('modestbranding', '0') === '1', | ||||
| 	'rel' => $fieldParams->get('rel', '') === '1' ? '1' : '0', | ||||
| 	'color' => $fieldParams->get('youtube_color', 'red'), | ||||
| 	'coverImageType' => $fieldParams->get('coverImageType', false), | ||||
| 	'coverImage' => $fieldParams->get('coverImage', ''), | ||||
| 	 | ||||
| ]; | ||||
|  | ||||
| // Set custom layout | ||||
| if ($field->params->get('acf_layout_override')) | ||||
| { | ||||
| 	$payload['layout'] = $field->params->get('acf_layout_override'); | ||||
| } | ||||
|  | ||||
| echo \NRFramework\Widgets\Helper::render('YouTube', $payload); | ||||
		Reference in New Issue
	
	Block a user