/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/trx_utils/widgets
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/trx_utils/widgets/socials.php (13544B)
'widget_socials', 'description' => esc_html__('Show site logo and social links', 'trx_utils') );
parent::__construct( 'charity_is_hope_widget_socials', esc_html__('Charity Is Hope - Show logo and social links', 'trx_utils'), $widget_ops );
}
// Show widget
function widget( $args, $instance ) {
extract( $args );
$title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '' );
$text = isset($instance['text']) ? charity_is_hope_do_shortcode($instance['text']) : '';
$logo_image = isset($instance['logo_image']) ? $instance['logo_image'] : '';
$logo_text = isset($instance['logo_text']) ? $instance['logo_text'] : '';
$logo_slogan = isset($instance['logo_slogan']) ? $instance['logo_slogan'] : '';
$show_logo = isset($instance['show_logo']) ? (int) $instance['show_logo'] : 1;
$show_icons = isset($instance['show_icons']) ? (int) $instance['show_icons'] : 1;
// Before widget (defined by themes)
charity_is_hope_show_layout($before_widget);
// Display the widget title if one was input (before and after defined by themes)
if ($title) charity_is_hope_show_layout($title, $before_title, $after_title);
// Display widget body
?>
'',
'text' => '',
'logo_image' => '',
'logo_text' => '',
'logo_slogan' => '',
'show_logo' => '1',
'show_icons' => '1'
)
);
$title = $instance['title'];
$text = $instance['text'];
$logo_image = $instance['logo_image'];
$logo_text = $instance['logo_text'];
$logo_slogan = $instance['logo_slogan'];
$show_logo = (int) $instance['show_logo'];
$show_icons = (int) $instance['show_icons'];
?>
get_field_id( 'logo_media' ), array('type'=>'mediamanager', 'media_field_id'=>$this->get_field_id( 'logo_image' )), null));
if ($logo_image) {
?>
/>
/>
/>
/>
"",
"text" => "",
"logo_image" => "",
"logo_text" => "",
"logo_slogan" => "",
"show_logo" => 1,
"show_icons" => 1,
// Common params
"id" => "",
"class" => "",
"css" => ""
), $atts));
if ($atts['show_logo']=='') $atts['show_logo'] = 0;
if ($atts['show_icons']=='') $atts['show_icons'] = 0;
extract($atts);
$type = 'charity_is_hope_widget_socials';
$output = '';
global $wp_widget_factory;
if ( is_object( $wp_widget_factory ) && isset( $wp_widget_factory->widgets, $wp_widget_factory->widgets[ $type ] ) ) {
$output = '
';
ob_start();
the_widget( $type, $atts, charity_is_hope_prepare_widgets_args(charity_is_hope_storage_get('widgets_args'), $id ? $id.'_widget' : 'widget_socials', 'widget_socials') );
$output .= ob_get_contents();
ob_end_clean();
$output .= '
';
}
return apply_filters('charity_is_hope_shortcode_output', $output, 'trx_widget_socials', $atts, $content);
}
add_shortcode("trx_widget_socials", "charity_is_hope_sc_widget_socials");
}
// Add [trx_widget_socials] in the VC shortcodes list
if (!function_exists('charity_is_hope_widget_socials_reg_shortcodes_vc')) {
function charity_is_hope_widget_socials_reg_shortcodes_vc() {
vc_map( array(
"base" => "trx_widget_socials",
"name" => esc_html__("Widget Socials", 'trx_utils'),
"description" => wp_kses_data( __("Insert site logo, description and/or socials list", 'trx_utils') ),
"category" => esc_html__('Content', 'trx_utils'),
"icon" => 'icon_trx_widget_socials',
"class" => "trx_widget_socials",
"content_element" => true,
"is_container" => false,
"show_settings_on_create" => true,
"params" => array(
array(
"param_name" => "title",
"heading" => esc_html__("Widget title", 'trx_utils'),
"description" => wp_kses_data( __("Title of the widget", 'trx_utils') ),
"admin_label" => true,
"class" => "",
"value" => "",
"type" => "textfield"
),
array(
"param_name" => "text",
"heading" => esc_html__("Widget text", 'trx_utils'),
"description" => wp_kses_data( __("Any description", 'trx_utils') ),
"class" => "",
"value" => "",
"type" => "textarea"
),
array(
"param_name" => "show_logo",
"heading" => esc_html__("Show logo", 'trx_utils'),
"description" => wp_kses_data( __("Do you want display logo image?", 'trx_utils') ),
"class" => "",
"std" => 1,
"value" => array("Show logo" => "1" ),
"type" => "checkbox"
),
array(
"param_name" => "show_icons",
"heading" => esc_html__("Show social icons", 'trx_utils'),
"description" => wp_kses_data( __("Do you want display social icons?", 'trx_utils') ),
"class" => "",
"std" => 1,
"value" => array("Show icons" => "1" ),
"type" => "checkbox"
),
array(
"param_name" => "logo_image",
"heading" => esc_html__("Logo image", 'trx_utils'),
"description" => wp_kses_data( __("Select or upload image or write URL from other site for the logo (leave empty if you want use default site logo)", 'trx_utils') ),
'dependency' => array(
'element' => 'show_logo',
'not_empty' => true
),
"class" => "",
"value" => "",
"type" => "attach_image"
),
array(
"param_name" => "logo_text",
"heading" => esc_html__("Logo text", 'trx_utils'),
"description" => wp_kses_data( __("Site name for the logo(leave empty if you want use default site text)", 'trx_utils') ),
"admin_label" => true,
'dependency' => array(
'element' => 'show_logo',
'not_empty' => true
),
"class" => "",
"value" => "",
"type" => "textfield"
),
array(
"param_name" => "logo_slogan",
"heading" => esc_html__("Logo slogan", 'trx_utils'),
"description" => wp_kses_data( __("Site slogan for the logo(leave empty if you want use default site tagline)", 'trx_utils') ),
'dependency' => array(
'element' => 'show_logo',
'not_empty' => true
),
"class" => "",
"value" => "",
"type" => "textfield"
),
charity_is_hope_get_vc_param('id'),
charity_is_hope_get_vc_param('class'),
charity_is_hope_get_vc_param('css')
)
) );
class WPBakeryShortCode_Trx_Widget_Socials extends WPBakeryShortCode {}
}
}
?>