/
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/twitter.php
(19109B)
<?php /* Theme setup section -------------------------------------------------------------------- */ if (!function_exists('charity_is_hope_sc_twitter_theme_setup')) { add_action( 'charity_is_hope_action_before_init_theme', 'charity_is_hope_sc_twitter_theme_setup' ); function charity_is_hope_sc_twitter_theme_setup() { add_action('charity_is_hope_action_shortcodes_list', 'charity_is_hope_sc_twitter_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_twitter_reg_shortcodes_vc'); } } /* Shortcode implementation -------------------------------------------------------------------- */ /* [trx_twitter id="unique_id" user="username" consumer_key="" consumer_secret="" token_key="" token_secret=""] */ if (!function_exists('charity_is_hope_sc_twitter')) { function charity_is_hope_sc_twitter($atts, $content=null){ if (charity_is_hope_in_shortcode_blogger()) return ''; extract(charity_is_hope_html_decode(shortcode_atts(array( // Individual params "user" => "", "consumer_key" => "", "consumer_secret" => "", "token_key" => "", "token_secret" => "", "count" => "3", "controls" => "yes", "interval" => "", "autoheight" => "no", "align" => "", "scheme" => "", "bg_color" => "", "bg_image" => "", "bg_overlay" => "", "bg_texture" => "", // Common params "id" => "", "class" => "", "animation" => "", "css" => "", "width" => "", "height" => "", "top" => "", "bottom" => "", "left" => "", "right" => "" ), $atts))); $twitter_username = $user ? $user : charity_is_hope_get_theme_option('twitter_username'); $twitter_consumer_key = $consumer_key ? $consumer_key : charity_is_hope_get_theme_option('twitter_consumer_key'); $twitter_consumer_secret = $consumer_secret ? $consumer_secret : charity_is_hope_get_theme_option('twitter_consumer_secret'); $twitter_token_key = $token_key ? $token_key : charity_is_hope_get_theme_option('twitter_token_key'); $twitter_token_secret = $token_secret ? $token_secret : charity_is_hope_get_theme_option('twitter_token_secret'); $twitter_count = max(1, $count ? $count : intval(charity_is_hope_get_theme_option('twitter_count'))); if (empty($id)) $id = "sc_testimonials_".str_replace('.', '', mt_rand()); if (empty($width)) $width = "100%"; if (!empty($height) && charity_is_hope_param_is_on($autoheight)) $autoheight = "no"; if (empty($interval)) $interval = mt_rand(5000, 10000); 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_overlay > 0) { if ($bg_color=='') $bg_color = charity_is_hope_get_scheme_color('bg'); $rgb = charity_is_hope_hex2rgb($bg_color); } $class .= ($class ? ' ' : '') . charity_is_hope_get_css_position_as_classes($top, $right, $bottom, $left); $ws = charity_is_hope_get_css_dimensions_from_values($width); $hs = charity_is_hope_get_css_dimensions_from_values('', $height); $css .= ($hs) . ($ws); $output = ''; if (!empty($twitter_consumer_key) && !empty($twitter_consumer_secret) && !empty($twitter_token_key) && !empty($twitter_token_secret)) { $data = charity_is_hope_get_twitter_data(array( 'mode' => 'user_timeline', 'consumer_key' => $twitter_consumer_key, 'consumer_secret' => $twitter_consumer_secret, 'token' => $twitter_token_key, 'secret' => $twitter_token_secret ) ); if ($data && isset($data[0]['text'])) { charity_is_hope_enqueue_slider('swiper'); $output = ($bg_color!='' || $bg_image!='' || $bg_overlay>0 || $bg_texture>0 || charity_is_hope_strlen($bg_texture)>2 || ($scheme && !charity_is_hope_param_is_off($scheme) && !charity_is_hope_param_is_inherit($scheme)) ? '<div class="sc_twitter_wrap sc_section' . ($scheme && !charity_is_hope_param_is_off($scheme) && !charity_is_hope_param_is_inherit($scheme) ? ' scheme_'.esc_attr($scheme) : '') . ($align && $align!='none' && !charity_is_hope_param_is_inherit($align) ? ' align' . esc_attr($align) : '') . '"' .' style="' . ($bg_color !== '' && $bg_overlay==0 ? 'background-color:' . esc_attr($bg_color) . ';' : '') . ($bg_image !== '' ? 'background-image:url('.esc_url($bg_image).');' : '') . '"' . (!charity_is_hope_param_is_off($animation) ? ' data-animation="'.esc_attr(charity_is_hope_get_animation_classes($animation)).'"' : '') . '>' . '<div class="sc_section_overlay'.($bg_texture>0 ? ' texture_bg_'.esc_attr($bg_texture) : '') . '"' . ' style="' . ($bg_overlay>0 ? 'background-color:rgba('.(int)$rgb['r'].','.(int)$rgb['g'].','.(int)$rgb['b'].','.min(1, max(0, $bg_overlay)).');' : '') . (charity_is_hope_strlen($bg_texture)>2 ? 'background-image:url('.esc_url($bg_texture).');' : '') . '"' . ($bg_overlay > 0 ? ' data-overlay="'.esc_attr($bg_overlay).'" data-bg_color="'.esc_attr($bg_color).'"' : '') . '>' : '') . '<div class="sc_twitter' . (!empty($class) ? ' '.esc_attr($class) : '') . ($bg_color=='' && $bg_image=='' && $bg_overlay==0 && ($bg_texture=='' || $bg_texture=='0') && $align && $align!='none' && !charity_is_hope_param_is_inherit($align) ? ' align' . esc_attr($align) : '') . '"' . ($bg_color=='' && $bg_image=='' && $bg_overlay==0 && ($bg_texture=='' || $bg_texture=='0') && !charity_is_hope_param_is_off($animation) ? ' data-animation="'.esc_attr(charity_is_hope_get_animation_classes($animation)).'"' : '') . ($css!='' ? ' style="'.esc_attr($css).'"' : '') . '>' . '<div class="sc_slider_swiper sc_slider_nopagination swiper-slider-container' . (charity_is_hope_param_is_on($controls) ? ' sc_slider_controls' : ' sc_slider_nocontrols') . (charity_is_hope_param_is_on($autoheight) ? ' sc_slider_height_auto' : '') . ($hs ? ' sc_slider_height_fixed' : '') . '"' . (!empty($width) && charity_is_hope_strpos($width, '%')===false ? ' data-old-width="' . esc_attr($width) . '"' : '') . (!empty($height) && charity_is_hope_strpos($height, '%')===false ? ' data-old-height="' . esc_attr($height) . '"' : '') . ((int) $interval > 0 ? ' data-interval="'.esc_attr($interval).'"' : '') . '>' . '<div class="slides swiper-wrapper">'; $cnt = 0; if (is_array($data) && count($data) > 0) { foreach ($data as $tweet) { if (charity_is_hope_substr($tweet['text'], 0, 1)=='@') continue; $output .= '<div class="swiper-slide" data-style="'.esc_attr(($ws).($hs)).'" style="'.esc_attr(($ws).($hs)).'">' . '<div class="sc_twitter_item">' . '<span class="sc_twitter_icon icon-twitter"></span>' . '<div class="sc_twitter_content">' . '<a href="' . esc_url('https://twitter.com/'.($twitter_username)).'" class="sc_twitter_author" target="_blank">@' . esc_html($tweet['user']['screen_name']) . '</a> ' . force_balance_tags(charity_is_hope_prepare_twitter_text($tweet)) . '</div>' . '</div>' . '</div>'; if (++$cnt >= $twitter_count) break; } } $output .= '</div>' . '<div class="sc_slider_controls_wrap"><a class="sc_slider_prev" href="#"></a><a class="sc_slider_next" href="#"></a></div>' . '</div>' . '</div>' . ($bg_color!='' || $bg_image!='' || $bg_overlay>0 || $bg_texture>0 || charity_is_hope_strlen($bg_texture)>2 ? '</div></div>' : ''); } } return apply_filters('charity_is_hope_shortcode_output', $output, 'trx_twitter', $atts, $content); } add_shortcode('trx_twitter', 'charity_is_hope_sc_twitter'); } /* Register shortcode in the internal SC Builder -------------------------------------------------------------------- */ if ( !function_exists( 'charity_is_hope_sc_twitter_reg_shortcodes' ) ) { //add_action('charity_is_hope_action_shortcodes_list', 'charity_is_hope_sc_twitter_reg_shortcodes'); function charity_is_hope_sc_twitter_reg_shortcodes() { charity_is_hope_sc_map("trx_twitter", array( "title" => esc_html__("Twitter", 'trx_utils'), "desc" => wp_kses_data( __("Insert twitter feed into post (page)", 'trx_utils') ), "decorate" => false, "container" => false, "params" => array( "user" => array( "title" => esc_html__("Twitter Username", 'trx_utils'), "desc" => wp_kses_data( __("Your username in the twitter account. If empty - get it from Theme Options.", 'trx_utils') ), "value" => "", "type" => "text" ), "consumer_key" => array( "title" => esc_html__("Consumer Key", 'trx_utils'), "desc" => wp_kses_data( __("Consumer Key from the twitter account", 'trx_utils') ), "value" => "", "type" => "text" ), "consumer_secret" => array( "title" => esc_html__("Consumer Secret", 'trx_utils'), "desc" => wp_kses_data( __("Consumer Secret from the twitter account", 'trx_utils') ), "value" => "", "type" => "text" ), "token_key" => array( "title" => esc_html__("Token Key", 'trx_utils'), "desc" => wp_kses_data( __("Token Key from the twitter account", 'trx_utils') ), "value" => "", "type" => "text" ), "token_secret" => array( "title" => esc_html__("Token Secret", 'trx_utils'), "desc" => wp_kses_data( __("Token Secret from the twitter account", 'trx_utils') ), "value" => "", "type" => "text" ), "count" => array( "title" => esc_html__("Tweets number", 'trx_utils'), "desc" => wp_kses_data( __("Tweets number to show", 'trx_utils') ), "divider" => true, "value" => 3, "max" => 20, "min" => 1, "type" => "spinner" ), "controls" => array( "title" => esc_html__("Show arrows", 'trx_utils'), "desc" => wp_kses_data( __("Show control buttons", 'trx_utils') ), "value" => "yes", "type" => "switch", "options" => charity_is_hope_get_sc_param('yes_no') ), "interval" => array( "title" => esc_html__("Tweets change interval", 'trx_utils'), "desc" => wp_kses_data( __("Tweets change interval (in milliseconds: 1000ms = 1s)", 'trx_utils') ), "value" => 7000, "step" => 500, "min" => 0, "type" => "spinner" ), "align" => array( "title" => esc_html__("Alignment", 'trx_utils'), "desc" => wp_kses_data( __("Alignment of the tweets block", 'trx_utils') ), "divider" => true, "value" => "", "type" => "checklist", "dir" => "horizontal", "options" => charity_is_hope_get_sc_param('align') ), "autoheight" => array( "title" => esc_html__("Autoheight", 'trx_utils'), "desc" => wp_kses_data( __("Change whole slider's height (make it equal current slide's height)", 'trx_utils') ), "value" => "yes", "type" => "switch", "options" => charity_is_hope_get_sc_param('yes_no') ), "scheme" => array( "title" => esc_html__("Color scheme", 'trx_utils'), "desc" => wp_kses_data( __("Select color scheme for this block", 'trx_utils') ), "value" => "", "type" => "checklist", "options" => charity_is_hope_get_sc_param('schemes') ), "bg_color" => array( "title" => esc_html__("Background color", 'trx_utils'), "desc" => wp_kses_data( __("Any background color for this section", 'trx_utils') ), "value" => "", "type" => "color" ), "bg_image" => array( "title" => esc_html__("Background image URL", 'trx_utils'), "desc" => wp_kses_data( __("Select or upload image or write URL from other site for the background", 'trx_utils') ), "readonly" => false, "value" => "", "type" => "media" ), "bg_overlay" => array( "title" => esc_html__("Overlay", 'trx_utils'), "desc" => wp_kses_data( __("Overlay color opacity (from 0.0 to 1.0)", 'trx_utils') ), "min" => "0", "max" => "1", "step" => "0.1", "value" => "0", "type" => "spinner" ), "bg_texture" => array( "title" => esc_html__("Texture", 'trx_utils'), "desc" => wp_kses_data( __("Predefined texture style from 1 to 11. 0 - without texture.", 'trx_utils') ), "min" => "0", "max" => "11", "step" => "1", "value" => "0", "type" => "spinner" ), "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_twitter_reg_shortcodes_vc' ) ) { //add_action('charity_is_hope_action_shortcodes_list_vc', 'charity_is_hope_sc_twitter_reg_shortcodes_vc'); function charity_is_hope_sc_twitter_reg_shortcodes_vc() { vc_map( array( "base" => "trx_twitter", "name" => esc_html__("Twitter", 'trx_utils'), "description" => wp_kses_data( __("Insert twitter feed into post (page)", 'trx_utils') ), "category" => esc_html__('Content', 'trx_utils'), 'icon' => 'icon_trx_twitter', "class" => "trx_sc_single trx_sc_twitter", "content_element" => true, "is_container" => false, "show_settings_on_create" => true, "params" => array( array( "param_name" => "user", "heading" => esc_html__("Twitter Username", 'trx_utils'), "description" => wp_kses_data( __("Your username in the twitter account. If empty - get it from Theme Options.", 'trx_utils') ), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "consumer_key", "heading" => esc_html__("Consumer Key", 'trx_utils'), "description" => wp_kses_data( __("Consumer Key from the twitter account", 'trx_utils') ), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "consumer_secret", "heading" => esc_html__("Consumer Secret", 'trx_utils'), "description" => wp_kses_data( __("Consumer Secret from the twitter account", 'trx_utils') ), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "token_key", "heading" => esc_html__("Token Key", 'trx_utils'), "description" => wp_kses_data( __("Token Key from the twitter account", 'trx_utils') ), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "token_secret", "heading" => esc_html__("Token Secret", 'trx_utils'), "description" => wp_kses_data( __("Token Secret from the twitter account", 'trx_utils') ), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "count", "heading" => esc_html__("Tweets number", 'trx_utils'), "description" => wp_kses_data( __("Number tweets to show", 'trx_utils') ), "class" => "", "divider" => true, "value" => 3, "type" => "textfield" ), array( "param_name" => "controls", "heading" => esc_html__("Show arrows", 'trx_utils'), "description" => wp_kses_data( __("Show control buttons", 'trx_utils') ), "admin_label" => true, "class" => "", "value" => array_flip(charity_is_hope_get_sc_param('yes_no')), "type" => "dropdown" ), array( "param_name" => "interval", "heading" => esc_html__("Tweets change interval", 'trx_utils'), "description" => wp_kses_data( __("Tweets change interval (in milliseconds: 1000ms = 1s)", 'trx_utils') ), "class" => "", "value" => "7000", "type" => "textfield" ), array( "param_name" => "align", "heading" => esc_html__("Alignment", 'trx_utils'), "description" => wp_kses_data( __("Alignment of the tweets block", 'trx_utils') ), "class" => "", "value" => array_flip(charity_is_hope_get_sc_param('align')), "type" => "dropdown" ), array( "param_name" => "autoheight", "heading" => esc_html__("Autoheight", 'trx_utils'), "description" => wp_kses_data( __("Change whole slider's height (make it equal current slide's height)", 'trx_utils') ), "class" => "", "value" => array("Autoheight" => "yes" ), "type" => "checkbox" ), array( "param_name" => "scheme", "heading" => esc_html__("Color scheme", 'trx_utils'), "description" => wp_kses_data( __("Select color scheme for this block", 'trx_utils') ), "group" => esc_html__('Colors and Images', 'trx_utils'), "class" => "", "value" => array_flip(charity_is_hope_get_sc_param('schemes')), "type" => "dropdown" ), array( "param_name" => "bg_color", "heading" => esc_html__("Background color", 'trx_utils'), "description" => wp_kses_data( __("Any background color for this section", 'trx_utils') ), "group" => esc_html__('Colors and Images', 'trx_utils'), "class" => "", "value" => "", "type" => "colorpicker" ), array( "param_name" => "bg_image", "heading" => esc_html__("Background image URL", 'trx_utils'), "description" => wp_kses_data( __("Select background image from library for this section", 'trx_utils') ), "group" => esc_html__('Colors and Images', 'trx_utils'), "class" => "", "value" => "", "type" => "attach_image" ), array( "param_name" => "bg_overlay", "heading" => esc_html__("Overlay", 'trx_utils'), "description" => wp_kses_data( __("Overlay color opacity (from 0.0 to 1.0)", 'trx_utils') ), "group" => esc_html__('Colors and Images', 'trx_utils'), "class" => "", "value" => "", "type" => "textfield" ), array( "param_name" => "bg_texture", "heading" => esc_html__("Texture", 'trx_utils'), "description" => wp_kses_data( __("Texture style from 1 to 11. Empty or 0 - without texture.", 'trx_utils') ), "group" => esc_html__('Colors and Images', '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_Twitter extends Charity_Is_Hope_VC_ShortCodeSingle {} } } ?>
Save
cmd:
run