/
var
/
www
/
vhosts
/
ihelp.ro
/
ajutam.ro
/
wp-content
/
plugins
/
trx_utils
/
shortcodes
/
trx_basic
/
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/trx_utils/shortcodes/trx_basic
mkdir
upload
Name
Size
Mode
Actions
anchor.php
6505
0644
edit
dl
rm
audio.php
10401
0644
edit
dl
rm
blogger.php
34038
0644
edit
dl
rm
br.php
2192
0644
edit
dl
rm
call_to_action.php
17687
0644
edit
dl
rm
chat.php
7204
0644
edit
dl
rm
columns.php
17172
0644
edit
dl
rm
content.php
5246
0644
edit
dl
rm
events.php
32946
0644
edit
dl
rm
form.php
25504
0644
edit
dl
rm
give.php
25787
0644
edit
dl
rm
googlemap.php
14010
0644
edit
dl
rm
hide.php
2488
0644
edit
dl
rm
image.php
9470
0644
edit
dl
rm
infobox.php
8710
0644
edit
dl
rm
intro.php
18718
0644
edit
dl
rm
line.php
10195
0644
edit
dl
rm
list.php
14609
0644
edit
dl
rm
price_block.php
12241
0644
edit
dl
rm
promo.php
15176
0644
edit
dl
rm
quote.php
6266
0644
edit
dl
rm
reviews.php
5079
0644
edit
dl
rm
search.php
8518
0644
edit
dl
rm
section.php
27083
0644
edit
dl
rm
skills.php
34872
0644
edit
dl
rm
slider.php
38659
0644
edit
dl
rm
socials.php
13118
0644
edit
dl
rm
support.clients.php
42769
0644
edit
dl
rm
support.services.php
46778
0644
edit
dl
rm
support.team.php
53876
0644
edit
dl
rm
support.testimonials.php
41669
0644
edit
dl
rm
table.php
6415
0644
edit
dl
rm
title.php
16329
0644
edit
dl
rm
twitter.php
19109
0644
edit
dl
rm
video.php
15728
0644
edit
dl
rm
woocommerce.php
73656
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/trx_utils/shortcodes/trx_basic/video.php
(15728B)
<?php /* Theme setup section -------------------------------------------------------------------- */ if (!function_exists('charity_is_hope_sc_video_theme_setup')) { add_action( 'charity_is_hope_action_before_init_theme', 'charity_is_hope_sc_video_theme_setup' ); function charity_is_hope_sc_video_theme_setup() { add_action('charity_is_hope_action_shortcodes_list', 'charity_is_hope_sc_video_reg_shortcodes'); if (function_exists('charity_is_hope_exists_visual_composer') && charity_is_hope_exists_visual_composer()) add_action('charity_is_hope_action_shortcodes_list_vc','charity_is_hope_sc_video_reg_shortcodes_vc'); } } /* Shortcode implementation -------------------------------------------------------------------- */ //[trx_video id="unique_id" url="http://player.vimeo.com/video/20245032?title=0&byline=0&portrait=0" width="" height=""] if (!function_exists('charity_is_hope_sc_video')) { function charity_is_hope_sc_video($atts, $content = null) { if (charity_is_hope_in_shortcode_blogger()) return ''; extract(charity_is_hope_html_decode(shortcode_atts(array( // Individual params "url" => '', "src" => '', "image" => '', "ratio" => '16:9', "autoplay" => 'off', "align" => '', "bg_image" => '', "bg_top" => '', "bg_bottom" => '', "bg_left" => '', "bg_right" => '', "frame" => "on", // Common params "id" => "", "class" => "", "animation" => "", "css" => "", "width" => '', "height" => '', "top" => "", "bottom" => "", "left" => "", "right" => "" ), $atts))); if (empty($autoplay)) $autoplay = 'off'; $ratio = empty($ratio) ? "16:9" : str_replace(array('/','\\','-'), ':', $ratio); $ratio_parts = explode(':', $ratio); if (empty($height) && empty($width)) { $width='100%'; if (charity_is_hope_param_is_off(charity_is_hope_get_custom_option('substitute_video'))) $height="400"; } $ed = charity_is_hope_substr($width, -1); if (empty($height) && !empty($width) && $ed!='%') { $height = round($width / $ratio_parts[0] * $ratio_parts[1]); } if (!empty($height) && empty($width)) { $width = round($height * $ratio_parts[0] / $ratio_parts[1]); } $class .= ($class ? ' ' : '') . charity_is_hope_get_css_position_as_classes($top, $right, $bottom, $left); $css_dim = charity_is_hope_get_css_dimensions_from_values($width, $height); $css_bg = charity_is_hope_get_css_paddings_from_values($bg_top, $bg_right, $bg_bottom, $bg_left); if ($src=='' && $url=='' && isset($atts[0])) { $src = $atts[0]; } $url = $src!='' ? $src : $url; if ($image!='' && charity_is_hope_param_is_off($image)) $image = ''; else { if (charity_is_hope_param_is_on($autoplay) && is_singular() && !charity_is_hope_storage_get('blog_streampage')) $image = ''; else { if ($image > 0) { $attach = wp_get_attachment_image_src( $image, 'full' ); if (isset($attach[0]) && $attach[0]!='') $image = $attach[0]; } if ($bg_image) { $thumb_sizes = charity_is_hope_get_thumb_sizes(array( 'layout' => 'grid_3' )); if (!is_single() || !empty($image)) $image = charity_is_hope_get_resized_image_url(empty($image) ? get_the_ID() : $image, $thumb_sizes['w'], $thumb_sizes['h'], null, false, false, false); } else if (!is_single() || !empty($image)) $image = charity_is_hope_get_resized_image_url(empty($image) ? get_the_ID() : $image, $ed!='%' ? $width : null, $height); if (empty($image) && (!is_singular() || charity_is_hope_storage_get('blog_streampage'))) // || charity_is_hope_param_is_off($autoplay))) $image = charity_is_hope_get_video_cover_image($url); } } if ($bg_image > 0) { $attach = wp_get_attachment_image_src( $bg_image, 'full' ); if (isset($attach[0]) && $attach[0]!='') $bg_image = $attach[0]; } if ($bg_image) { $css_bg .= $css . 'background-image: url('.esc_url($bg_image).');'; $css = $css_dim; } else { $css .= $css_dim; } $url = charity_is_hope_get_video_player_url($src!='' ? $src : $url); $video = '<video' . ($id ? ' id="' . esc_attr($id) . '"' : '') . ' class="sc_video"' . ' src="' . esc_url($url) . '"' . ' width="' . esc_attr($width) . '" height="' . esc_attr($height) . '"' . ' data-width="' . esc_attr($width) . '" data-height="' . esc_attr($height) . '"' . ' data-ratio="'.esc_attr($ratio).'"' . ($image ? ' poster="'.esc_attr($image).'" data-image="'.esc_attr($image).'"' : '') . (!charity_is_hope_param_is_off($animation) ? ' data-animation="'.esc_attr(charity_is_hope_get_animation_classes($animation)).'"' : '') . ($align && $align!='none' ? ' data-align="'.esc_attr($align).'"' : '') . ($class ? ' data-class="'.esc_attr($class).'"' : '') . ($bg_image ? ' data-bg-image="'.esc_attr($bg_image).'"' : '') . ($css_bg!='' ? ' data-style="'.esc_attr($css_bg).'"' : '') . ($css!='' ? ' style="'.esc_attr($css).'"' : '') . (($image && charity_is_hope_param_is_on(charity_is_hope_get_custom_option('substitute_video'))) || (charity_is_hope_param_is_on($autoplay) && is_singular() && !charity_is_hope_storage_get('blog_streampage')) ? ' autoplay="autoplay"' : '') . ' controls="controls" loop="loop"' . '>' . '</video>'; if (charity_is_hope_param_is_off(charity_is_hope_get_custom_option('substitute_video'))) { if (charity_is_hope_param_is_on($frame)) $video = charity_is_hope_get_video_frame($video, $image, $css, $css_bg); } else { if ((isset($_GET['vc_editable']) && $_GET['vc_editable']=='true') && (isset($_POST['action']) && $_POST['action']=='vc_load_shortcode')) { $video = charity_is_hope_substitute_video($video, $width, $height, false); } } if (charity_is_hope_get_theme_option('use_mediaelement')=='yes') wp_enqueue_script('wp-mediaelement'); return apply_filters('charity_is_hope_shortcode_output', $video, 'trx_video', $atts, $content); } add_shortcode("trx_video", "charity_is_hope_sc_video"); } /* Register shortcode in the internal SC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'charity_is_hope_sc_video_reg_shortcodes' ) ) { //add_action('charity_is_hope_action_shortcodes_list', 'charity_is_hope_sc_video_reg_shortcodes'); function charity_is_hope_sc_video_reg_shortcodes() { charity_is_hope_sc_map("trx_video", array( "title" => esc_html__("Video", 'trx_utils'), "desc" => wp_kses_data( __("Insert video player", 'trx_utils') ), "decorate" => false, "container" => false, "params" => array( "url" => array( "title" => esc_html__("URL for video file", 'trx_utils'), "desc" => wp_kses_data( __("Select video from media library or paste URL for video file from other site", 'trx_utils') ), "readonly" => false, "value" => "", "type" => "media", "before" => array( 'title' => esc_html__('Choose video', 'trx_utils'), 'action' => 'media_upload', 'type' => 'video', 'multiple' => false, 'linked_field' => '', 'captions' => array( 'choose' => esc_html__('Choose video file', 'trx_utils'), 'update' => esc_html__('Select video file', 'trx_utils') ) ), "after" => array( 'icon' => 'icon-cancel', 'action' => 'media_reset' ) ), "ratio" => array( "title" => esc_html__("Ratio", 'trx_utils'), "desc" => wp_kses_data( __("Ratio of the video", 'trx_utils') ), "value" => "16:9", "type" => "checklist", "dir" => "horizontal", "options" => array( "16:9" => esc_html__("16:9", 'trx_utils'), "4:3" => esc_html__("4:3", 'trx_utils') ) ), "autoplay" => array( "title" => esc_html__("Autoplay video", 'trx_utils'), "desc" => wp_kses_data( __("Autoplay video on page load", 'trx_utils') ), "value" => "off", "type" => "switch", "options" => charity_is_hope_get_sc_param('on_off') ), "align" => array( "title" => esc_html__("Align", 'trx_utils'), "desc" => wp_kses_data( __("Select block alignment", 'trx_utils') ), "value" => "none", "type" => "checklist", "dir" => "horizontal", "options" => charity_is_hope_get_sc_param('align') ), "image" => array( "title" => esc_html__("Cover image", 'trx_utils'), "desc" => wp_kses_data( __("Select or upload image or write URL from other site for video preview", 'trx_utils') ), "readonly" => false, "value" => "", "type" => "media" ), "bg_image" => array( "title" => esc_html__("Background image", 'trx_utils'), "desc" => wp_kses_data( __("Select or upload image or write URL from other site for video background. Attention! If you use background image - specify paddings below from background margins to video block in percents!", 'trx_utils') ), "divider" => true, "readonly" => false, "value" => "", "type" => "media" ), "bg_top" => array( "title" => esc_html__("Top offset", 'trx_utils'), "desc" => wp_kses_data( __("Top offset (padding) inside background image to video block (in percent). For example: 3%", 'trx_utils') ), "dependency" => array( 'bg_image' => array('not_empty') ), "value" => "", "type" => "text" ), "bg_bottom" => array( "title" => esc_html__("Bottom offset", 'trx_utils'), "desc" => wp_kses_data( __("Bottom offset (padding) inside background image to video block (in percent). For example: 3%", 'trx_utils') ), "dependency" => array( 'bg_image' => array('not_empty') ), "value" => "", "type" => "text" ), "bg_left" => array( "title" => esc_html__("Left offset", 'trx_utils'), "desc" => wp_kses_data( __("Left offset (padding) inside background image to video block (in percent). For example: 20%", 'trx_utils') ), "dependency" => array( 'bg_image' => array('not_empty') ), "value" => "", "type" => "text" ), "bg_right" => array( "title" => esc_html__("Right offset", 'trx_utils'), "desc" => wp_kses_data( __("Right offset (padding) inside background image to video block (in percent). For example: 12%", 'trx_utils') ), "dependency" => array( 'bg_image' => array('not_empty') ), "value" => "", "type" => "text" ), "width" => charity_is_hope_shortcodes_width(), "height" => charity_is_hope_shortcodes_height(), "top" => charity_is_hope_get_sc_param('top'), "bottom" => charity_is_hope_get_sc_param('bottom'), "left" => charity_is_hope_get_sc_param('left'), "right" => charity_is_hope_get_sc_param('right'), "id" => charity_is_hope_get_sc_param('id'), "class" => charity_is_hope_get_sc_param('class'), "animation" => charity_is_hope_get_sc_param('animation'), "css" => charity_is_hope_get_sc_param('css') ) )); } } /* Register shortcode in the VC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'charity_is_hope_sc_video_reg_shortcodes_vc' ) ) { //add_action('charity_is_hope_action_shortcodes_list_vc', 'charity_is_hope_sc_video_reg_shortcodes_vc'); function charity_is_hope_sc_video_reg_shortcodes_vc() { vc_map( array( "base" => "trx_video", "name" => esc_html__("Video", 'trx_utils'), "description" => wp_kses_data( __("Insert video player", 'trx_utils') ), "category" => esc_html__('Content', 'trx_utils'), 'icon' => 'icon_trx_video', "class" => "trx_sc_single trx_sc_video", "content_element" => true, "is_container" => false, "show_settings_on_create" => true, "params" => array( array( "param_name" => "url", "heading" => esc_html__("URL for video file", 'trx_utils'), "description" => wp_kses_data( __("Paste URL for video file", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "ratio", "heading" => esc_html__("Ratio", 'trx_utils'), "description" => wp_kses_data( __("Select ratio for display video", 'trx_utils') ), "class" => "", "value" => array( esc_html__('16:9', 'trx_utils') => "16:9", esc_html__('4:3', 'trx_utils') => "4:3" ), "type" => "dropdown" ), array( "param_name" => "autoplay", "heading" => esc_html__("Autoplay video", 'trx_utils'), "description" => wp_kses_data( __("Autoplay video on page load", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => array("Autoplay" => "on" ), "type" => "checkbox" ), array( "param_name" => "align", "heading" => esc_html__("Alignment", 'trx_utils'), "description" => wp_kses_data( __("Select block alignment", 'trx_utils') ), "class" => "", "value" => array_flip(charity_is_hope_get_sc_param('align')), "type" => "dropdown" ), array( "param_name" => "image", "heading" => esc_html__("Cover image", 'trx_utils'), "description" => wp_kses_data( __("Select or upload image or write URL from other site for video preview", 'trx_utils') ), "class" => "", "value" => "", "type" => "attach_image" ), array( "param_name" => "bg_image", "heading" => esc_html__("Background image", 'trx_utils'), "description" => wp_kses_data( __("Select or upload image or write URL from other site for video background. Attention! If you use background image - specify paddings below from background margins to video block in percents!", 'trx_utils') ), "group" => esc_html__('Background', 'trx_utils'), "class" => "", "value" => "", "type" => "attach_image" ), array( "param_name" => "bg_top", "heading" => esc_html__("Top offset", 'trx_utils'), "description" => wp_kses_data( __("Top offset (padding) from background image to video block (in percent). For example: 3%", 'trx_utils') ), "group" => esc_html__('Background', 'trx_utils'), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "bg_bottom", "heading" => esc_html__("Bottom offset", 'trx_utils'), "description" => wp_kses_data( __("Bottom offset (padding) from background image to video block (in percent). For example: 3%", 'trx_utils') ), "group" => esc_html__('Background', 'trx_utils'), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "bg_left", "heading" => esc_html__("Left offset", 'trx_utils'), "description" => wp_kses_data( __("Left offset (padding) from background image to video block (in percent). For example: 20%", 'trx_utils') ), "group" => esc_html__('Background', 'trx_utils'), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "bg_right", "heading" => esc_html__("Right offset", 'trx_utils'), "description" => wp_kses_data( __("Right offset (padding) from background image to video block (in percent). For example: 12%", 'trx_utils') ), "group" => esc_html__('Background', 'trx_utils'), "class" => "", "value" => "", "type" => "textfield" ), charity_is_hope_get_vc_param('id'), charity_is_hope_get_vc_param('class'), charity_is_hope_get_vc_param('animation'), charity_is_hope_get_vc_param('css'), charity_is_hope_vc_width(), charity_is_hope_vc_height(), charity_is_hope_get_vc_param('margin_top'), charity_is_hope_get_vc_param('margin_bottom'), charity_is_hope_get_vc_param('margin_left'), charity_is_hope_get_vc_param('margin_right') ) ) ); class WPBakeryShortCode_Trx_Video extends Charity_Is_Hope_VC_ShortCodeSingle {} } } ?>
Save
cmd:
run