Skip to content

Commit

Permalink
Merge pull request #3 from themeum/dev
Browse files Browse the repository at this point in the history
UPDATE: Marge dev branch
  • Loading branch information
sazedul-haque authored Jul 28, 2022
2 parents 4be9207 + 74d30d6 commit f5ba98f
Show file tree
Hide file tree
Showing 53 changed files with 5,620 additions and 922 deletions.
4 changes: 2 additions & 2 deletions addons/accordion/accordion.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public function render($data = null){
}
}
if( get_wppb_array_value_by_key($value, 'title') ){
$output .= '<span class="wppb-accordion-title-content">'.$value['title'].'</span>';
$output .= '<span class="wppb-accordion-title-content">' . esc_html( $value['title'] ).'</span>';
}
if(get_wppb_array_value_by_key($value, 'icon_position') == "right" ) {
if(! empty($value['icon_list'])){
Expand All @@ -478,7 +478,7 @@ public function render($data = null){

$panelStyle = (($key != 0 || $openitem == "hide") && $openitem != "show") ? "display: none;" : "";
$output .= '<div class="wppb-panel-collapse" style="'.$panelStyle.'">';
$output .= '<div class="wppb-accordion-content">'.$value['content'].'</div>';
$output .= '<div class="wppb-accordion-content">' . wp_kses_post( $value['content'] ) . '</div>';
$output .= '</div>';//wppb-panel-collapse
$output .= '</div>';
}
Expand Down
10 changes: 5 additions & 5 deletions addons/alert/alert.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,19 @@ public function get_settings() {
// Alert Render HTML
public function render($data = null){
$settings = $data['settings'];
$alert_title = isset($settings['alert_title']) ? $settings['alert_title'] : '';
$alert_description = isset($settings['alert_description']) ? $settings['alert_description'] : '';
$alert_title = isset($settings['alert_title']) ? sanitize_text_field( $settings['alert_title'] ) : '';
$alert_description = isset($settings['alert_description']) ? sanitize_text_field( $settings['alert_description'] ) : '';
$alert_close = (bool) isset($settings['alert_close']) ? $settings['alert_close'] : false;
$alert_style = isset($settings['alert_style']) ? $settings['alert_style'] : 'info';
$alert_style = isset($settings['alert_style']) ? sanitize_text_field( $settings['alert_style'] ) : 'info';
$output = '';

$output .= '<div class="wppb-alert-addon">';
$output .= '<div class="wppb-alert-addon-content wppb-alert-'.esc_attr($alert_style).'">';
if ($alert_title) {
$output .= '<span class="wppb-alert-title">' . esc_attr($alert_title) .'</span>';
$output .= '<span class="wppb-alert-title">' . esc_html( $alert_title ) .'</span>';
}
if ($alert_description) {
$output .= '<span class="wppb-alert-desc">' . esc_attr($alert_description) . '</span>';
$output .= '<span class="wppb-alert-desc">' . wp_kses_post( $alert_description ) . '</span>';
}
if ($alert_close == 1) {
$output .= '<button type="button" class="wppb-close-alert" data-dismiss="wppb-alert"><span aria-hidden="true">&times;</span></button>';
Expand Down
10 changes: 5 additions & 5 deletions addons/animated_number/animated_number.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,14 @@ public function get_settings() {
// Animated Render HTML
public function render($data = null){
$settings = $data['settings'];
$title = isset($settings['counter_title']) ? $settings['counter_title'] : '';
$title = isset($settings['counter_title']) ? sanitize_text_field( $settings['counter_title'] ) : '';
$duration = (int) isset($settings['duration']) ? $settings['duration'] : 1000;
$digit = (int) isset($settings['digit']) ? $settings['digit'] : 500;
$animated_layout = isset($settings['animated_layout']) ? $settings['animated_layout'] : 'one';
$animated_layout = isset($settings['animated_layout']) ? sanitize_text_field( $settings['animated_layout'] ) : 'one';
$digit_animation = (bool) isset($settings['digit_animation']) ? $settings['digit_animation'] : false;
$title_animation = isset($settings['title_animation']) ? $settings['title_animation'] : '';
$additional = isset($settings['additional']) ? $settings['additional'] : '';
$prefix_text = isset($settings['prefix_text']) ? $settings['prefix_text'] : '';
$title_animation = isset($settings['title_animation']) ? sanitize_text_field( $settings['title_animation'] ) : '';
$additional = isset($settings['additional']) ? sanitize_text_field( $settings['additional'] ) : '';
$prefix_text = isset($settings['prefix_text']) ? sanitize_text_field( $settings['prefix_text'] ) : '';

$output = '';

Expand Down
22 changes: 11 additions & 11 deletions addons/blocknumber/blocknumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,26 +207,26 @@ public function get_settings() {
}

// Block Number Render HTML
public function render($data = null){
$settings = $data['settings'];
public function render( $data = null ) {
$settings = $data['settings'];

$number_title = isset($settings['number_title']) ? $settings['number_title'] : '';
$number_description = isset($settings['number_description']) ? $settings['number_description'] : '';
$number = isset($settings['number']) ? $settings['number'] : '';
$number_title = isset( $settings['number_title'] ) ? sanitize_text_field( $settings['number_title'] ) : '';
$number_description = isset( $settings['number_description'] ) ? sanitize_textarea_field( $settings['number_description'] ) : '';
$number = isset( $settings['number'] ) ? (int) $settings['number'] : '';

$output = '';
$output .= '<div class="wppb-blocknumber-addon">';
$output .= '<div class="wppb-blocknumber-addon-content">';
$output .= '<div class="wppb-blocknumber-media">';
if($number){
$output .= '<div class="wppb-blocknumber-number"><span>'.esc_attr($number).'</span></div>';
if ( $number ) {
$output .= '<div class="wppb-blocknumber-number"><span>' . esc_html( $number ) . '</span></div>';
}
$output .= '<div class="wppb-blocknumber-body">';
if($number_title){
$output .= '<h5 class="wppb-blocknumber-title">'.esc_attr($number_title).'</h5>';
if ( $number_title ) {
$output .= '<h5 class="wppb-blocknumber-title">' . esc_html( $number_title ) . '</h5>';
}
if($number_description){
$output .= '<div class="wppb-blocknumber-desc">'.esc_attr($number_description).'</div>';
if ( $number_description ) {
$output .= '<div class="wppb-blocknumber-desc">' . esc_html( $number_description ) . '</div>';
}
$output .= '</div>';//wppb-blocknumber-body
$output .= '</div>';//wppb-blocknumber-media
Expand Down
38 changes: 19 additions & 19 deletions addons/button/button.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,36 +237,36 @@ public function get_settings() {
// Button Render HTML
public function render($data = null){
$settings = $data['settings'];
$button_text = isset($settings["button_text"]) ? $settings["button_text"] : '';
$button_link = isset($settings['button_link']) ? $settings['button_link'] : array();
$fullwidth_button = isset($settings["fullwidth_button"]) ? $settings["fullwidth_button"] : '';
$icon_list = isset($settings["icon_list"]) ? $settings["icon_list"] : '';
$icon_position = isset($settings["icon_position"]) ? $settings["icon_position"] : '';
$style = isset($settings["style"]) ? $settings["style"] : '';
$btn_size = isset($settings["btn_size"]) ? $settings["btn_size"] : '';
$shape = isset($settings["shape"]) ? $settings["shape"] : '';
$button_text = isset( $settings["button_text"] ) ? sanitize_text_field( $settings["button_text"] ) : '';
$button_link = isset( $settings['button_link'] ) ? $settings['button_link'] : array();
$fullwidth_button = isset( $settings["fullwidth_button"] ) ? sanitize_text_field( $settings["fullwidth_button"] ) : '';
$icon_list = isset( $settings["icon_list"] ) ? sanitize_text_field( $settings["icon_list"] ) : '';
$icon_position = isset( $settings["icon_position"] ) ? sanitize_text_field( $settings["icon_position"] ) : '';
$style = isset( $settings["style"] ) ? sanitize_text_field( $settings["style"] ) : '';
$btn_size = isset( $settings["btn_size"] ) ? sanitize_text_field( $settings["btn_size"] ) : '';
$shape = isset( $settings["shape"] ) ? sanitize_text_field( $settings["shape"] ) : '';
//$appearance = isset($settings["appearance"]) ? $settings["appearance"] : '';

$output = $button = $classlist = '' ;

$target = ( isset( $button_link['window']) && $button_link['window'] ) ? 'target=_blank' : 'target=_self';
$nofolow = ( isset( $button_link['nofolow']) && $button_link['nofolow'] ) ? 'rel=nofolow' : "";
$target = ( isset( $button_link['window'] ) && $button_link['window'] ) ? 'target=_blank' : 'target=_self';
$nofolow = ( isset( $button_link['nofolow'] ) && $button_link['nofolow'] ) ? 'rel=nofolow' : "";

//$classlist .= (isset($appearance) && $appearance) ? ' wppb-btn-' . $appearance : '';
$classlist .= (isset($style) && $style) ? ' wppb-btn-' . $style : '';
$classlist .= (isset($shape) && $shape) ? ' wppb-btn-' . $shape : '';
$classlist .= (isset($btn_size) && $btn_size) ? ' wppb-btn-' . $btn_size : '';
$classlist .= (isset($fullwidth_button) && $fullwidth_button) ? ' wppb-btn-' . $fullwidth_button : '';
$classlist .= ( isset( $style ) && $style ) ? ' wppb-btn-' . $style : '';
$classlist .= ( isset( $shape ) && $shape ) ? ' wppb-btn-' . $shape : '';
$classlist .= ( isset( $btn_size ) && $btn_size ) ? ' wppb-btn-' . $btn_size : '';
$classlist .= ( isset( $fullwidth_button ) && $fullwidth_button ) ? ' wppb-btn-' . $fullwidth_button : '';

if($icon_position == 'left') {
$button = (esc_attr($icon_list)) ? '<i class="' . esc_attr($icon_list) . '"></i> ' . esc_attr($button_text) : esc_attr($button_text);
if ( $icon_position == 'left' ) {
$button = ( esc_attr( $icon_list ) ) ? '<i class="' . esc_attr( $icon_list ) . '"></i> ' . esc_attr( $button_text ) : esc_attr( $button_text );
} else {
$button = (esc_attr($icon_list)) ? esc_attr($button_text) . ' <i class="' . esc_attr($icon_list) . '"></i>' : esc_attr($button_text);
$button = ( esc_attr( $icon_list ) ) ? esc_attr( $button_text ) . ' <i class="' . esc_attr( $icon_list ) . '"></i>' : esc_attr( $button_text );
}
if( $button_link['link'] ){
if ( $button_link['link'] ) {
$output .= '<div class="wppb-addon wppb-button-addon">';
$output .= '<div class="wppb-button-addon-content">';
$output .= '<a '.esc_attr($nofolow).' href="'.esc_url($button_link['link']).'" '.esc_attr($target).' class="wppb-btn-addons '.esc_attr($classlist).'">' . $button . '</a>';
$output .= '<a ' . esc_attr( $nofolow ).' href="' . esc_url( $button_link['link'] ) . '" '. esc_attr( $target ) . ' class="wppb-btn-addons ' . esc_attr( $classlist ) . '">' . $button . '</a>';
$output .= '</div>';
$output .= '</div>';
}
Expand Down
18 changes: 9 additions & 9 deletions addons/carousel/carousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ public function render($data = null){
?>
<div class="wppb-carousel-addon">
<div class="wppb-carousel-addon-content">
<div class="wppb-carousel stick-dots" data-addon-id="<?php echo $data['id'];?>" data-settings="<?php echo esc_attr(json_encode($attrSettings)); ?>" >
<div class="wppb-carousel stick-dots" data-addon-id="<?php echo esc_attr( $data['id'] ); ?>" data-settings="<?php echo esc_attr(json_encode($attrSettings)); ?>" >

<?php foreach ( $items as $key => $value ) {

Expand Down Expand Up @@ -1182,29 +1182,29 @@ public function render($data = null){
if ( get_wppb_array_value_by_key( $value, 'media_type' ) == "media_video" ) {
if ( $video_url ) {
$ImageMedia .= '<div class="wppb-video-slide">';
$ImageMedia .= '<iframe height="280" width:="100%" class="wppb-embed-responsive-item" src="' . $videosrc . '" allowFullScreen></iframe>';
$ImageMedia .= '<iframe height="280" width:="100%" class="wppb-embed-responsive-item" src="' . esc_url( $videosrc ) . '" allowFullScreen></iframe>';
$ImageMedia .= '</div>';
} else {
if ( ! empty($value['imageupload']['url'])){
$ImageMedia .= '<img src="'.$value['imageupload']['url'].'" class="animated" '.$ImageAnimation.' alt="image" />';
$ImageMedia .= '<img src="' . esc_url( $value['imageupload']['url'] ) . '" class="animated" '.$ImageAnimation.' alt="image" />';
}
}
} else {
if ( ! empty($value['imageupload']['url'])){
$ImageMedia .= '<img src="'.$value['imageupload']['url'].'" class="animated" '.$ImageAnimation.' alt="image" />';
$ImageMedia .= '<img src="' . esc_url( $value['imageupload']['url'] ) . '" class="animated" '.$ImageAnimation.' alt="image" />';
}
}

// button 1
$button1 = '';
if ( ! empty( get_wppb_array_value_by_key( $value, 'button_link' )['link'] ) ) {
$button1 .= '<a ' . esc_attr( $nofolow ) . ' href="' . esc_url( $value['button_link']['link'] ) . '" ' . esc_attr( $target ) . ' class="animated wppb-carousel-btn wppb-btn-carousel1" '.$Button1Animation.'>' . get_wppb_array_value_by_key( $value, 'button_text' ) . '</a>';
$button1 .= '<a ' . esc_attr( $nofolow ) . ' href="' . esc_url( $value['button_link']['link'] ) . '" ' . esc_attr( $target ) . ' class="animated wppb-carousel-btn wppb-btn-carousel1" '.$Button1Animation.'>' . esc_html( get_wppb_array_value_by_key( $value, 'button_text' ) ) . '</a>';
}

//button 2
$button2 = '';
if ( ! empty( get_wppb_array_value_by_key( $value, 'button_link2' )['link'] ) ) {
$button2 .= '<a ' . esc_attr( $nofolow2 ) . ' href="' . esc_url( $value['button_link2']['link'] ) . '" ' . esc_attr( $target2 ) . ' class="animated wppb-carousel-btn wppb-btn-carousel2" '.$Button2Animation.'>' . get_wppb_array_value_by_key( $value, 'button_text2' ) . '</a>';
$button2 .= '<a ' . esc_attr( $nofolow2 ) . ' href="' . esc_url( $value['button_link2']['link'] ) . '" ' . esc_attr( $target2 ) . ' class="animated wppb-carousel-btn wppb-btn-carousel2" '.$Button2Animation.'>' . esc_html( get_wppb_array_value_by_key( $value, 'button_text2' ) ) . '</a>';
}

?>
Expand All @@ -1225,9 +1225,9 @@ public function render($data = null){
<?php } else { ?>
<div class="wppb-carousel-content-in">
<?php } ?>
<?php echo '<' . esc_attr( $selector ) . ' class="animated wppb-carousel-title" '.$titleAnimation.'>' . get_wppb_array_value_by_key( $value, 'title' ) . '</' . esc_attr( $selector ) . '>';?>
<?php echo '<' . esc_attr( $subselector ) . ' class="animated wppb-carousel-subtitle" '.$SubtitleAnimation.'>' . get_wppb_array_value_by_key( $value, 'subtitle' ) . '</' . esc_attr( $subselector ) . '>';?>
<?php echo '<div class="animated wppb-carousel-content" '.$SubtitleAnimation.'>' . get_wppb_array_value_by_key( $value, 'content' ) . '</div>';?>
<?php echo '<' . esc_attr( $selector ) . ' class="animated wppb-carousel-title" '.$titleAnimation.'>' . esc_html( get_wppb_array_value_by_key( $value, 'title' ) ) . '</' . esc_attr( $selector ) . '>';?>
<?php echo '<' . esc_attr( $subselector ) . ' class="animated wppb-carousel-subtitle" '.$SubtitleAnimation.'>' . esc_html( get_wppb_array_value_by_key( $value, 'subtitle' ) ) . '</' . esc_attr( $subselector ) . '>';?>
<?php echo '<div class="animated wppb-carousel-content" '.$SubtitleAnimation.'>' . wp_kses_post( get_wppb_array_value_by_key( $value, 'content' ) ) . '</div>';?>
<?php echo $button1; ?>
<?php echo $button2; ?>
</div> <!--/.wppb-carousel-content-in-->
Expand Down
Loading

0 comments on commit f5ba98f

Please sign in to comment.