This commit is contained in:
2023-09-19 22:53:12 +02:00
parent 3361a7f053
commit 269d85ce11

View File

@@ -6,13 +6,13 @@ if(!function_exists('cyber_case_study_sections')):
function cyber_case_study_sections(){ function cyber_case_study_sections(){
if(function_exists('kc_add_map')): if(function_exists('kc_add_map')):
kc_add_map( kc_add_map(
array( array(
'cyber_case_study' => array( 'cyber_case_study' => array(
'name' => esc_html__('EM Case Study Section', 'cyber'), 'name' => esc_html__('EM Case Study Section', 'cyber'),
'description' => esc_html__('Display Blog Style', 'cyber'), 'description' => esc_html__('Display Blog Style', 'cyber'),
'icon' => 'kc-icon-blog-posts', 'icon' => 'kc-icon-blog-posts',
@@ -20,7 +20,7 @@ if(!function_exists('cyber_case_study_sections')):
'params' => array( 'params' => array(
'General' => array( 'General' => array(
array( array(
'name' => 'items', 'name' => 'items',
'label' => __( 'Items Limit', 'cyber' ), 'label' => __( 'Items Limit', 'cyber' ),
@@ -42,7 +42,7 @@ if(!function_exists('cyber_case_study_sections')):
'DESC' => __( 'Descending', 'cyber' ), 'DESC' => __( 'Descending', 'cyber' ),
'ASC' => __( 'Ascending', 'cyber' ) 'ASC' => __( 'Ascending', 'cyber' )
) )
), ),
array( array(
'type' => 'radio_image', 'type' => 'radio_image',
'label' => __( 'Select blog Style', 'cyber' ), 'label' => __( 'Select blog Style', 'cyber' ),
@@ -54,7 +54,7 @@ if(!function_exists('cyber_case_study_sections')):
), ),
'description' => __( 'When select style 2 that time, set column and set gutter not work', 'cyber' ), 'description' => __( 'When select style 2 that time, set column and set gutter not work', 'cyber' ),
'value' => '1' 'value' => '1'
), ),
array( array(
'type' => 'select', 'type' => 'select',
'label' => __( 'Set Column', 'cyber' ), 'label' => __( 'Set Column', 'cyber' ),
@@ -74,7 +74,7 @@ if(!function_exists('cyber_case_study_sections')):
'type' => 'toggle', 'type' => 'toggle',
'value' => 'no', 'value' => 'no',
'description' => __( 'Remove column Spacing', 'cyber' ), 'description' => __( 'Remove column Spacing', 'cyber' ),
), ),
array( array(
'name' => 'show_content', 'name' => 'show_content',
'label' => __( 'Display Pragraph', 'cyber' ), 'label' => __( 'Display Pragraph', 'cyber' ),
@@ -91,14 +91,14 @@ if(!function_exists('cyber_case_study_sections')):
'type' => 'text', 'type' => 'text',
'label' => __( 'Button Text', 'cyber' ), 'label' => __( 'Button Text', 'cyber' ),
'name' => 'btn_text', 'name' => 'btn_text',
'value' => 'Read More', 'value' => 'Read More',
'description' => __( 'Enter Button Text', 'cyber' ), 'description' => __( 'Enter Button Text', 'cyber' ),
'relation' => array( 'relation' => array(
'parent' => 'show_button', 'parent' => 'show_button',
'show_when' => 'yes', 'show_when' => 'yes',
) )
), ),
array( array(
'type' => 'text', 'type' => 'text',
'label' => __( 'Custom class', 'cyber' ), 'label' => __( 'Custom class', 'cyber' ),
@@ -156,7 +156,7 @@ if(!function_exists('cyber_case_study_sections')):
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.em-case-study-button a'), array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.em-case-study-button a'),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.em-case-study-button a'), array('property' => 'margin', 'label' => 'Margin', 'selector' => '.em-case-study-button a'),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.em-case-study-button a'), array('property' => 'padding', 'label' => 'Padding', 'selector' => '.em-case-study-button a'),
), ),
'Content' => array( 'Content' => array(
array('property' => 'background', 'label' => 'BG Color', 'selector' => '.em-cases-study-content '), array('property' => 'background', 'label' => 'BG Color', 'selector' => '.em-cases-study-content '),
array('property' => 'color', 'label' => 'Color', 'selector' => '.em-cases-study-content '), array('property' => 'color', 'label' => 'Color', 'selector' => '.em-cases-study-content '),
@@ -167,7 +167,7 @@ if(!function_exists('cyber_case_study_sections')):
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.em-cases-study-content '), array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.em-cases-study-content '),
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.em-cases-study-content '), array('property' => 'padding', 'label' => 'Padding', 'selector' => '.em-cases-study-content '),
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.em-cases-study-content '), array('property' => 'margin', 'label' => 'Margin', 'selector' => '.em-cases-study-content '),
), ),
'Box' => array( 'Box' => array(
array('property' => 'background'), array('property' => 'background'),
array('property' => 'background-color', 'label' => 'BG Color', 'selector' => '+ .cyber-single-cases-study'), array('property' => 'background-color', 'label' => 'BG Color', 'selector' => '+ .cyber-single-cases-study'),
@@ -182,8 +182,8 @@ if(!function_exists('cyber_case_study_sections')):
array('property' => 'margin', 'label' => 'Margin'), array('property' => 'margin', 'label' => 'Margin'),
array('property' => 'padding', 'label' => 'Padding'), array('property' => 'padding', 'label' => 'Padding'),
array('property' => 'margin', 'label' => 'Position Hover', 'selector' => '+.cyber-single-cases-study:hover') array('property' => 'margin', 'label' => 'Position Hover', 'selector' => '+.cyber-single-cases-study:hover')
) )
) )
) )
) )
@@ -193,8 +193,8 @@ if(!function_exists('cyber_case_study_sections')):
'name' => 'animate', 'name' => 'animate',
'type' => 'animate' 'type' => 'animate'
) )
), ),
)// Params )// Params
@@ -239,28 +239,28 @@ if(!function_exists('cyber_case_study_area')){
'btn_text' => '', 'btn_text' => '',
'custom_css' => '', 'custom_css' => '',
'custom_class' => '', 'custom_class' => '',
),$atts); ),$atts);
extract( $em_blog_box ); extract( $em_blog_box );
//custom class
//custom class
$wrap_class = apply_filters( 'kc-el-class', $atts ); $wrap_class = apply_filters( 'kc-el-class', $atts );
if( !empty( $custom_class ) ): if( !empty( $custom_class ) ):
$wrap_class[] = $custom_class; $wrap_class[] = $custom_class;
endif; endif;
$extra_class = implode( ' ', $wrap_class ); $extra_class = implode( ' ', $wrap_class );
$page = ( get_query_var( 'page' ) ? get_query_var( 'page' ) : 1 ); $page = ( get_query_var( 'page' ) ? get_query_var( 'page' ) : 1 );
$paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page ); $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
$args = array( $args = array(
'post_type' => 'em_case_study', 'post_type' => 'em_case_study',
'posts_per_page' => intval( $items ), 'posts_per_page' => intval( $items ),
'order' => $order , 'order' => $order ,
'paged' => $paged, 'paged' => $paged,
'page' => $paged 'page' => $paged
); );
@@ -271,171 +271,176 @@ $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
if( $the_query->have_posts() ) { if( $the_query->have_posts() ) {
switch ( $layout ) { switch ( $layout ) {
case '2': case '2':
?> ?>
<div class=" blog_style_adn_2"> <div class=" blog_style_adn_2">
<div class="blog_wrap case_study_carousel owl-carousel curosel-style"> <div class="blog_wrap case_study_carousel owl-carousel curosel-style">
<?php while ($the_query->have_posts()) : $the_query->the_post(); <?php while ($the_query->have_posts()) : $the_query->the_post();
?> ?>
<!-- single blog --> <!-- single blog -->
<div class=" <?php if( $gutter == 'yes' ){echo 'blog_nospace_adn';}?> col-md-12 col-xs-12 col-sm-12 " > <div class=" <?php if( $gutter == 'yes' ){echo 'blog_nospace_adn';}?> col-md-12 col-xs-12 col-sm-12 " >
<div class="single_case_study <?php echo esc_attr( $extra_class ); ?>"> <div class="single_case_study <?php echo esc_attr( $extra_class ); ?>">
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="cyber-single-cases-study "> <div class="cyber-single-cases-study ">
<!-- BLOG THUMB --> <!-- BLOG THUMB -->
<?php if(has_post_thumbnail()){?> <?php if(has_post_thumbnail()){?>
<div class="case-study-thumb "> <div class="case-study-thumb ">
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?>
</a> </a>
</div> </div>
<?php } ?> <?php } ?>
<div class="em-cases-study-content "> <div class="em-cases-study-content ">
<!-- BLOG TITLE --> <!-- BLOG TITLE -->
<div class="em-cases-study-title "> <div class="em-cases-study-title ">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div> </div>
<div class="case_category"> <div class="case_category">
<?php <?php
switch(get_the_title()){ switch(get_the_title()){
case 'Nokia': case 'Nokia':
{ {
echo '<span>Finland</span>'; echo '<span>Finland</span>';
break; break;
} }
case 'SoftServe': case 'SoftServe':
{ {
echo '<span>Ukraine / USA</span>'; echo '<span>Ukraine / USA</span>';
break; break;
} }
case 'Microsoft Corporation': case 'Microsoft Corporation':
{ {
echo '<span>USA</span>'; echo '<span>USA</span>';
break; break;
} }
case 'Mynavi Corporation': case 'Mynavi Corporation':
{ {
echo '<span>Japan</span>'; echo '<span>Japan</span>';
break; break;
} }
case 'Striped Giraffe': case 'Striped Giraffe':
{ {
echo '<span>Germany</span>'; echo '<span>Germany</span>';
break; break;
} }
case 'DPDGroup IT Solutions': case 'DPDGroup IT Solutions':
{ {
echo '<span>France</span>'; echo '<span>France</span>';
break; break;
} }
case 'Atlassian': case 'Atlassian':
{ {
echo '<span>Australia</span>'; echo '<span>Australia</span>';
break; break;
} }
case 'ICEYE': case 'ICEYE':
{ {
echo '<span>Poland / Finland</span>'; echo '<span>Poland / Finland</span>';
break; break;
} }
case 'TomTom': case 'TomTom':
{ {
echo '<span>The Netherlands</span>'; echo '<span>The Netherlands</span>';
break; break;
} }
case 'Equinix, Inc.': case 'Equinix, Inc.':
{ {
echo '<span>USA</span>'; echo '<span>USA</span>';
break; break;
} }
case 'Kitopi': case 'Kitopi':
{ {
echo '<span>UAE</span>'; echo '<span>UAE</span>';
break; break;
} }
} case 'Intetics':
{
echo '<span>USA</span>';
break;
}
}
?> ?>
</div> </div>
<!-- Blog Description --> <!-- Blog Description -->
<?php if($show_content=='yes'){?> <?php if($show_content=='yes'){?>
<!-- BLOG TITLE AND CONTENT --> <!-- BLOG TITLE AND CONTENT -->
<div class="em-cases-study-inner "> <div class="em-cases-study-inner ">
<div class="cases-study-content "> <div class="cases-study-content ">
<p><?php echo wp_trim_words( get_the_content(), 19, ' ' ); ?></p> <p><?php echo wp_trim_words( get_the_content(), 19, ' ' ); ?></p>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<!-- Blog Read More Button --> <!-- Blog Read More Button -->
<?php if($show_button=='yes'){?> <?php if($show_button=='yes'){?>
<div class="em-case-study-button"> <div class="em-case-study-button">
<?php if($btn_text){?> <?php if($btn_text){?>
<a href="<?php the_permalink(); ?>" class="learn_btn"><?php echo $btn_text;?></a> <a href="<?php the_permalink(); ?>" class="learn_btn"><?php echo $btn_text;?></a>
<i class="fa fa-long-arrow-right btn_icon"></i> <i class="fa fa-long-arrow-right btn_icon"></i>
<?php } ?> <?php } ?>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
</div> <!-- END SINGLE BLOG --> </div> <!-- END SINGLE BLOG -->
</div> </div>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
<?php wp_reset_query(); ?> <?php wp_reset_query(); ?>
</div> </div>
</div> </div>
<?php <?php
break; break;
default: default:
?> ?>
<div class=" blog_style_adn_2"> <div class=" blog_style_adn_2">
<div class="blog_wrap case_study_carousel_main owl-carousel curosel-style style-one"> <div class="blog_wrap case_study_carousel_main owl-carousel curosel-style style-one">
<?php while ($the_query->have_posts()) : $the_query->the_post(); <?php while ($the_query->have_posts()) : $the_query->the_post();
?> ?>
<!-- single blog --> <!-- single blog -->
<div class=" <?php if( $gutter == 'yes' ){echo 'blog_nospace_adn';}?> col-md-12 col-xs-12 col-sm-12 " > <div class=" <?php if( $gutter == 'yes' ){echo 'blog_nospace_adn';}?> col-md-12 col-xs-12 col-sm-12 " >
<div class="single_case_study <?php echo esc_attr( $extra_class ); ?>"> <div class="single_case_study <?php echo esc_attr( $extra_class ); ?>">
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="cyber-single-cases-study "> <div class="cyber-single-cases-study ">
<!-- BLOG THUMB --> <!-- BLOG THUMB -->
<?php if(has_post_thumbnail()){?> <?php if(has_post_thumbnail()){?>
<div class="case-study-thumb "> <div class="case-study-thumb ">
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?>
</a> </a>
</div> </div>
<?php } ?> <?php } ?>
<div class="em-cases-study-content "> <div class="em-cases-study-content ">
<!-- BLOG TITLE --> <!-- BLOG TITLE -->
<div class="em-cases-study-title "> <div class="em-cases-study-title ">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div> </div>
<div class="case_category"> <div class="case_category">
<span>Marketing /</span> <span>Marketing /</span>
@@ -444,50 +449,50 @@ $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
<!-- Blog Description --> <!-- Blog Description -->
<?php if($show_content=='yes'){?> <?php if($show_content=='yes'){?>
<!-- BLOG TITLE AND CONTENT --> <!-- BLOG TITLE AND CONTENT -->
<div class="em-cases-study-inner "> <div class="em-cases-study-inner ">
<div class="cases-study-content "> <div class="cases-study-content ">
<p><?php echo wp_trim_words( get_the_content(), 19, ' ' ); ?></p> <p><?php echo wp_trim_words( get_the_content(), 19, ' ' ); ?></p>
</div> </div>
</div> </div>
<?php } ?> <?php } ?>
<!-- Blog Read More Button --> <!-- Blog Read More Button -->
<?php if($show_button=='yes'){?> <?php if($show_button=='yes'){?>
<div class="em-case-study-button"> <div class="em-case-study-button">
<?php if($btn_text){?> <?php if($btn_text){?>
<a href="<?php the_permalink(); ?>" class="learn_btn"><?php echo $btn_text;?></a> <a href="<?php the_permalink(); ?>" class="learn_btn"><?php echo $btn_text;?></a>
<i class="fa fa-long-arrow-right btn_icon"></i> <i class="fa fa-long-arrow-right btn_icon"></i>
<?php } ?> <?php } ?>
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
</div> <!-- END SINGLE BLOG --> </div> <!-- END SINGLE BLOG -->
</div> </div>
</div> </div>
<?php endwhile; ?> <?php endwhile; ?>
<?php wp_reset_query(); ?> <?php wp_reset_query(); ?>
</div> </div>
</div> </div>
<?php <?php
break; break;
} }
} //end have } //end have
return ob_get_clean(); return ob_get_clean();
} }
} }