__( 'AT Testimonials', 'aakanksha'),
'size' => 'span12',
);
//create the block
parent::__construct('as_Testimonial_Block', $block_options);
}
function form($instance) {
$defaults = array(
'quantity' => '2',
'margin_top' => 10,
'margin_bottom' => 10,
'animation' => 'None',
'duration' => '900',
'delay' => '0',
'slide_speed' => '800',
'pagination_speed' => '800',
'auto_play' => 'true',
'navigation' => 'true',
'pagination' => 'false',
'pagination_numbers' => 'false',
'items' => '4',
'items_desktop' => '3',
'items_desktop_small' => '3',
'items_tablet' => '2',
'items_mobile' => '1'
);
$instance = wp_parse_args($instance, $defaults);
extract($instance);
$auto_play_type = array(
'true' => 'True',
'false' => 'False',
);
$navigation_type = array(
'true' => 'True',
'false' => 'False',
);
$pagination_type = array(
'true' => 'True',
'false' => 'False',
);
$pagination_numbers_type = array(
'true' => 'True',
'false' => 'False',
);
global $include_animation ;
?>
-
-
-
'testimonial',
'posts_per_page' => $quantity,
));
global $post;
$contents = array();
if($query->have_posts()){
echo '';
while($query->have_posts()){
$query->the_post();
$contents[] = array ( 'content' => get_the_content() , 'title' => get_the_title() );
// $animation_effect ='';
// $duration_effect ='';
// if($animation) $animation_effect = 'animated '.$animation.'';
// if($duration != '' && $animation != '') $duration_effect = 'style="-webkit-animation-duration: '.$duration.'ms; -moz-animation-duration: '.$duration.'ms; -o-animation-duration: '.$duration.'ms;animation-duration: '.$duration.'ms; animation-delay:'.$delay * $i.'ms; -webkit-animation-delay:'.$delay * $i.'ms; -moz-animation-delay:'.$delay * $i.'ms;-o-animation-delay:'.$delay * $i.'ms;"';
?>
';
echo '
';
echo '
';
foreach ($contents as $value) {
?>
';
}
wp_reset_query();
}
function before_block($instance) {
extract($instance);
echo '
';
}
function after_block($instance) {
extract($instance);
echo '
';
}
}
as_register_block( 'as_Testimonial_Block' );
endif;