Arashtad.com for more details and professional products and services. Version: 1.2 Author: Amin Shahrokhi Author URI: https://arashtad.com/ License: GPL2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Copyright: (c) 2011 - 2015 Arashtad Ltd. All Rights Reserved. Arashtad Testimonials Slider is commercial software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. BUT YOU CAN NOT SELL OR PROVIDE IT ANYWHERE. Arashtad Testimonials Slider is distributed in the hope that it will be useful, WITH FULL SUPPORT BY THE AUTHOR. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Arashtad Testimonials Slider. If not, see http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. Include these is the head: http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css arashtad-testimonials/scripts/master.js */ // Restricting direct access defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); // Localize for translation load_plugin_textdomain( 'artestimonials', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); // Creating the widget class artestimonials_widget extends WP_Widget { function __construct() { if (get_locale() == 'fa_IR') { parent::__construct( // Base ID of your widget 'artestimonials_widget', // Widget name will appear in UI __( 'گواهی ها', $text_domain), // Widget description array( 'description' => __( 'افزونه واکنشگرای نمایش گفته های مشتریان. کاری از Arashtad.com', $text_domain ), ) ); } else { parent::__construct( // Base ID of your widget 'artestimonials_widget', // Widget name will appear in UI __('Arashtad Testimonials Slider', $text_domain), // Widget description array( 'description' => __( 'Responsive testimonials slider by Arashtad.com', $text_domain ), ) ); } } // Creating widget front-end // This is where the action happens public function widget( $args, $instance ) { //$widget_id = $widget_class[ count($widget_class) - 1]; $widget_id = $args['widget_id']; $widget_exploded = explode('-', $widget_id); $widget_id_num = array_slice($widget_exploded, -1); $widget_num = implode($widget_id_num); $title = apply_filters( 'widget_title', $instance['title'] ); $animation_duration = apply_filters( 'widget_text', $instance['animation_duration'] ); $display_duration = apply_filters( 'widget_text', $instance['display_duration'] ); $effect = apply_filters( 'widget_text', $instance['effect'] ); $style = apply_filters( 'widget_text', $instance['style'] ); $header_text = apply_filters( 'widget_text', $instance['header_text'] ); $footer_text = apply_filters( 'widget_text', $instance['footer_text'] ); $fixed_width = apply_filters( 'widget_text', $instance['fixed_width'] ); $fixed_height = apply_filters( 'widget_text', $instance['fixed_height'] ); $margin = apply_filters( 'widget_text', $instance['margin'] ); $padding = apply_filters( 'widget_text', $instance['padding'] ); $link_text = apply_filters( 'widget_text', $instance['link_text'] ); $link_url = apply_filters( 'widget_text', $instance['link_url'] ); $link_target = apply_filters( 'widget_text', $instance['link_target'] ); if($link_target == 'true') { $target = 'target="_blank"'; } else { $target = 'target="_self"'; } $testimonial_1 = apply_filters( 'widget_text', $instance['testimonial_1'] ); $name_1 = apply_filters( 'widget_text', $instance['name_1'] ); $name_link_1 = apply_filters( 'widget_text', $instance['name_link_1'] ); $company_1 = apply_filters( 'widget_text', $instance['company_1'] ); $stars_1 = apply_filters( 'widget_text', $instance['stars_1'] ); $testimonial_2 = apply_filters( 'widget_text', $instance['testimonial_2'] ); $name_2 = apply_filters( 'widget_text', $instance['name_2'] ); $name_link_2 = apply_filters( 'widget_text', $instance['name_link_2'] ); $company_2 = apply_filters( 'widget_text', $instance['company_2'] ); $stars_2 = apply_filters( 'widget_text', $instance['stars_2'] ); $testimonial_3 = apply_filters( 'widget_text', $instance['testimonial_3'] ); $name_3 = apply_filters( 'widget_text', $instance['name_3'] ); $name_link_3 = apply_filters( 'widget_text', $instance['name_link_3'] ); $company_3 = apply_filters( 'widget_text', $instance['company_3'] ); $stars_3 = apply_filters( 'widget_text', $instance['stars_3'] ); $testimonial_4 = apply_filters( 'widget_text', $instance['testimonial_4'] ); $name_4 = apply_filters( 'widget_text', $instance['name_4'] ); $name_link_4 = apply_filters( 'widget_text', $instance['name_link_4'] ); $company_4 = apply_filters( 'widget_text', $instance['company_4'] ); $stars_4 = apply_filters( 'widget_text', $instance['stars_4'] ); $testimonial_5 = apply_filters( 'widget_text', $instance['testimonial_5'] ); $name_5 = apply_filters( 'widget_text', $instance['name_5'] ); $name_link_5 = apply_filters( 'widget_text', $instance['name_link_5'] ); $company_5 = apply_filters( 'widget_text', $instance['company_5'] ); $stars_5 = apply_filters( 'widget_text', $instance['stars_5'] ); $testimonial_6 = apply_filters( 'widget_text', $instance['testimonial_6'] ); $name_6 = apply_filters( 'widget_text', $instance['name_6'] ); $name_link_6 = apply_filters( 'widget_text', $instance['name_link_6'] ); $company_6 = apply_filters( 'widget_text', $instance['company_6'] ); $stars_6 = apply_filters( 'widget_text', $instance['stars_6'] ); $testimonial_7 = apply_filters( 'widget_text', $instance['testimonial_7'] ); $name_7 = apply_filters( 'widget_text', $instance['name_7'] ); $name_link_7 = apply_filters( 'widget_text', $instance['name_link_7'] ); $company_7 = apply_filters( 'widget_text', $instance['company_7'] ); $stars_7 = apply_filters( 'widget_text', $instance['stars_7'] ); $testimonial_8 = apply_filters( 'widget_text', $instance['testimonial_8'] ); $name_8 = apply_filters( 'widget_text', $instance['name_8'] ); $name_link_8 = apply_filters( 'widget_text', $instance['name_link_8'] ); $company_8 = apply_filters( 'widget_text', $instance['company_8'] ); $stars_8 = apply_filters( 'widget_text', $instance['stars_8'] ); $testimonial_9 = apply_filters( 'widget_text', $instance['testimonial_9'] ); $name_9 = apply_filters( 'widget_text', $instance['name_9'] ); $name_link_9 = apply_filters( 'widget_text', $instance['name_link_9'] ); $company_9 = apply_filters( 'widget_text', $instance['company_9'] ); $stars_9 = apply_filters( 'widget_text', $instance['stars_9'] ); $testimonial_10 = apply_filters( 'widget_text', $instance['testimonial_10'] ); $name_10 = apply_filters( 'widget_text', $instance['name_10'] ); $name_link_10 = apply_filters( 'widget_text', $instance['name_link_10'] ); $company_10 = apply_filters( 'widget_text', $instance['company_10'] ); $stars_10 = apply_filters( 'widget_text', $instance['stars_10'] ); $testimonial_11 = apply_filters( 'widget_text', $instance['testimonial_11'] ); $name_11 = apply_filters( 'widget_text', $instance['name_11'] ); $name_link_11 = apply_filters( 'widget_text', $instance['name_link_11'] ); $company_11 = apply_filters( 'widget_text', $instance['company_11'] ); $stars_11 = apply_filters( 'widget_text', $instance['stars_11'] ); $testimonial_12 = apply_filters( 'widget_text', $instance['testimonial_12'] ); $name_12 = apply_filters( 'widget_text', $instance['name_12'] ); $name_link_12 = apply_filters( 'widget_text', $instance['name_link_12'] ); $company_12 = apply_filters( 'widget_text', $instance['company_12'] ); $stars_12 = apply_filters( 'widget_text', $instance['stars_12'] ); $testimonial_13 = apply_filters( 'widget_text', $instance['testimonial_13'] ); $name_13 = apply_filters( 'widget_text', $instance['name_13'] ); $name_link_13 = apply_filters( 'widget_text', $instance['name_link_13'] ); $company_13 = apply_filters( 'widget_text', $instance['company_13'] ); $stars_13 = apply_filters( 'widget_text', $instance['stars_13'] ); $testimonial_14 = apply_filters( 'widget_text', $instance['testimonial_14'] ); $name_14 = apply_filters( 'widget_text', $instance['name_14'] ); $name_link_14 = apply_filters( 'widget_text', $instance['name_link_14'] ); $company_14 = apply_filters( 'widget_text', $instance['company_14'] ); $stars_14 = apply_filters( 'widget_text', $instance['stars_14'] ); $testimonial_15 = apply_filters( 'widget_text', $instance['testimonial_15'] ); $name_15 = apply_filters( 'widget_text', $instance['name_15'] ); $name_link_15 = apply_filters( 'widget_text', $instance['name_link_15'] ); $company_15 = apply_filters( 'widget_text', $instance['company_15'] ); $stars_15 = apply_filters( 'widget_text', $instance['stars_15'] ); $testimonial_16 = apply_filters( 'widget_text', $instance['testimonial_16'] ); $name_16 = apply_filters( 'widget_text', $instance['name_16'] ); $name_link_16 = apply_filters( 'widget_text', $instance['name_link_16'] ); $company_16 = apply_filters( 'widget_text', $instance['company_16'] ); $stars_16 = apply_filters( 'widget_text', $instance['stars_16'] ); $testimonial_17 = apply_filters( 'widget_text', $instance['testimonial_17'] ); $name_17 = apply_filters( 'widget_text', $instance['name_17'] ); $name_link_17 = apply_filters( 'widget_text', $instance['name_link_17'] ); $company_17 = apply_filters( 'widget_text', $instance['company_17'] ); $stars_17 = apply_filters( 'widget_text', $instance['stars_17'] ); $testimonial_18 = apply_filters( 'widget_text', $instance['testimonial_18'] ); $name_18 = apply_filters( 'widget_text', $instance['name_18'] ); $name_link_18 = apply_filters( 'widget_text', $instance['name_link_18'] ); $company_18 = apply_filters( 'widget_text', $instance['company_18'] ); $stars_18 = apply_filters( 'widget_text', $instance['stars_18'] ); $testimonial_19 = apply_filters( 'widget_text', $instance['testimonial_19'] ); $name_19 = apply_filters( 'widget_text', $instance['name_19'] ); $name_link_19 = apply_filters( 'widget_text', $instance['name_link_19'] ); $company_19 = apply_filters( 'widget_text', $instance['company_19'] ); $stars_19 = apply_filters( 'widget_text', $instance['stars_19'] ); $testimonial_20 = apply_filters( 'widget_text', $instance['testimonial_20'] ); $name_20 = apply_filters( 'widget_text', $instance['name_20'] ); $name_link_20 = apply_filters( 'widget_text', $instance['name_link_20'] ); $company_20 = apply_filters( 'widget_text', $instance['company_20'] ); $stars_20 = apply_filters( 'widget_text', $instance['stars_20'] ); // before and after widget arguments are defined by themes echo $args['before_widget']; if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; // This is where you run the code and display the output echo __( 'Arashtad Testimonials Sldier', $text_domain ); ?> '; echo ' #testimonials' . $widget_num . ' {'; if($fixed_height) { echo 'height: ' . $fixed_height . '; '; } if($fixed_width) { echo 'width: ' . $fixed_width . '; '; } if($margin) { echo 'margin: ' . $margin . '; '; } if($padding) { echo 'padding: ' . $padding . '; '; } echo '}'; echo ' '; } ?> ' . $header_text . '

'; } ?>
>

' . $name_1 . ''; } else { echo $name_1; } if($company_1) { echo '
' . $company_1 . '
'; } if($stars_1) { echo '
'; } ?>

' . $name_2 . ''; } else { echo $name_2; } if($company_2) { echo '
' . $company_2 . '
'; } if($stars_2) { echo '
'; } ?>

' . $name_3 . ''; } else { echo $name_3; } if($company_3) { echo '
' . $company_3 . '
'; } if($stars_3) { echo '
'; } ?>

' . $name_4 . ''; } else { echo $name_4; } if($company_4) { echo '
' . $company_4 . '
'; } if($stars_4) { echo '
'; } ?>

' . $name_5 . ''; } else { echo $name_5; } if($company_5) { echo '
' . $company_5 . '
'; } if($stars_5) { echo '
'; } ?>

' . $name_6 . ''; } else { echo $name_6; } if($company_6) { echo '
' . $company_6 . '
'; } if($stars_6) { echo '
'; } ?>

' . $name_7 . ''; } else { echo $name_7; } if($company_7) { echo '
' . $company_7 . '
'; } if($stars_7) { echo '
'; } ?>

' . $name_8 . ''; } else { echo $name_8; } if($company_8) { echo '
' . $company_8 . '
'; } if($stars_8) { echo '
'; } ?>

' . $name_9 . ''; } else { echo $name_9; } if($company_9) { echo '
' . $company_9 . '
'; } if($stars_9) { echo '
'; } ?>

' . $name_10 . ''; } else { echo $name_10; } if($company_10) { echo '
' . $company_10 . '
'; } if($stars_10) { echo '
'; } ?>

' . $name_11 . ''; } else { echo $name_11; } if($company_11) { echo '
' . $company_11 . '
'; } if($stars_11) { echo '
'; } ?>

' . $name_12 . ''; } else { echo $name_12; } if($company_12) { echo '
' . $company_12 . '
'; } if($stars_12) { echo '
'; } ?>

' . $name_13 . ''; } else { echo $name_13; } if($company_13) { echo '
' . $company_13 . '
'; } if($stars_13) { echo '
'; } ?>

' . $name_14 . ''; } else { echo $name_14; } if($company_14) { echo '
' . $company_14 . '
'; } if($stars_14) { echo '
'; } ?>

' . $name_15 . ''; } else { echo $name_15; } if($company_15) { echo '
' . $company_15 . '
'; } if($stars_15) { echo '
'; } ?>

' . $name_16 . ''; } else { echo $name_16; } if($company_16) { echo '
' . $company_16 . '
'; } if($stars_16) { echo '
'; } ?>

' . $name_17 . ''; } else { echo $name_17; } if($company_17) { echo '
' . $company_17 . '
'; } if($stars_17) { echo '
'; } ?>

' . $name_18 . ''; } else { echo $name_18; } if($company_18) { echo '
' . $company_18 . '
'; } if($stars_18) { echo '
'; } ?>

' . $name_19 . ''; } else { echo $name_19; } if($company_19) { echo '
' . $company_19 . '
'; } if($stars_19) { echo '
'; } ?>

' . $name_20 . ''; } else { echo $name_20; } if($company_20) { echo '
aaa' . $company_20 . '
'; } if($stars_20) { echo '
'; } ?>
' . $footer_text . '

'; } ?> '; echo '' . $link_text . ''; echo '

'; } ?>

  value="false" /> value="true" />