Save
This commit is contained in:
BIN
wp-content/plugins/em-helper-plugin/includes/.DS_Store
vendored
Normal file
BIN
wp-content/plugins/em-helper-plugin/includes/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -45,6 +45,7 @@ include_once(EM_DIR. '/shortcodes/em_button.php');
|
||||
include_once(EM_DIR. '/shortcodes/em_service_curosel.php');
|
||||
include_once(EM_DIR. '/shortcodes/em_screenshot_slider.php');
|
||||
include_once(EM_DIR. '/shortcodes/em_screenshot_slide.php');
|
||||
include_once(EM_DIR. '/shortcodes/em_case_study_custom.php');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
|
||||
switch ( $layout ) {
|
||||
case '2':
|
||||
?>
|
||||
<div class=" blog_style_adn_2">
|
||||
<div class=" blog_style_adn_2 _1">
|
||||
<div class="blog_wrap case_study_carousel owl-carousel curosel-style">
|
||||
|
||||
<?php while ($the_query->have_posts()) : $the_query->the_post();
|
||||
@@ -413,7 +413,7 @@ $paged = ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : $page );
|
||||
break;
|
||||
default:
|
||||
?>
|
||||
<div class=" blog_style_adn_2">
|
||||
<div class=" blog_style_adn_2 _2">
|
||||
<div class="blog_wrap case_study_carousel_main owl-carousel curosel-style style-one">
|
||||
|
||||
<?php while ($the_query->have_posts()) : $the_query->the_post();
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
<?php
|
||||
|
||||
add_action('init', 'cyber_case_study_custom_sections');
|
||||
|
||||
function cyber_case_study_custom_sections()
|
||||
{
|
||||
|
||||
if (function_exists('kc_add_map')) {
|
||||
|
||||
kc_add_map(
|
||||
array(
|
||||
'cyber_case_study_custom' => array(
|
||||
'name' => esc_html__('EM Case Study Custom', 'cyber'),
|
||||
'description' => esc_html__('Custom Case Study', 'cyber'),
|
||||
'icon' => 'kc-icon-blog-posts',
|
||||
'category' => 'cyber',
|
||||
|
||||
'params' => array(
|
||||
|
||||
'General' => array(
|
||||
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => __('Post IDs', 'cyber'),
|
||||
'name' => 'post_ids',
|
||||
'description' => __('Example: 12,45,88', 'cyber')
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => 'items',
|
||||
'label' => __('Items Limit', 'cyber'),
|
||||
'type' => 'number_slider',
|
||||
'value' => '3',
|
||||
'options' => array(
|
||||
'min' => 1,
|
||||
'max' => 20
|
||||
)
|
||||
),
|
||||
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => __('Order', 'cyber'),
|
||||
'name' => 'order',
|
||||
'options' => array(
|
||||
'DESC' => 'Descending',
|
||||
'ASC' => 'Ascending'
|
||||
)
|
||||
),
|
||||
|
||||
array(
|
||||
'name' => 'show_button',
|
||||
'label' => __('Show Button', 'cyber'),
|
||||
'type' => 'toggle',
|
||||
'value' => 'no'
|
||||
),
|
||||
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => __('Button Text', 'cyber'),
|
||||
'name' => 'btn_text',
|
||||
'value' => 'See more Success Stories',
|
||||
'relation' => array(
|
||||
'parent' => 'show_button',
|
||||
'show_when' => 'yes'
|
||||
)
|
||||
),
|
||||
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => __('Button Link', 'cyber'),
|
||||
'name' => 'btn_link',
|
||||
'value' => '#',
|
||||
'relation' => array(
|
||||
'parent' => 'show_button',
|
||||
'show_when' => 'yes'
|
||||
)
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
function cyber_case_study_custom_area($atts)
|
||||
{
|
||||
|
||||
$atts = shortcode_atts(array(
|
||||
'post_ids' => '',
|
||||
'items' => 3,
|
||||
'order' => 'DESC',
|
||||
'show_button' => 'no',
|
||||
'btn_text' => 'See more Success Stories',
|
||||
'btn_link' => '#'
|
||||
), $atts);
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'em_case_study',
|
||||
'posts_per_page' => $atts['items'],
|
||||
'order' => $atts['order']
|
||||
);
|
||||
|
||||
if (!empty($atts['post_ids'])) {
|
||||
|
||||
$ids = array_map('intval', array_map('trim', explode(',', $atts['post_ids'])));
|
||||
|
||||
$args['post__in'] = $ids;
|
||||
$args['orderby'] = 'post__in';
|
||||
$args['order'] = 'ASC';
|
||||
}
|
||||
|
||||
$query = new WP_Query($args);
|
||||
|
||||
ob_start();
|
||||
|
||||
if ($query->have_posts()) {
|
||||
|
||||
echo '<div class="custom-case-studies">';
|
||||
|
||||
while ($query->have_posts()) {
|
||||
$query->the_post();
|
||||
?>
|
||||
|
||||
<div class="case-item">
|
||||
<div class="single_case_study">
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="cyber-single-cases-study ">
|
||||
|
||||
<!-- BLOG THUMB -->
|
||||
<?php if(has_post_thumbnail()){?>
|
||||
<div class="case-study-thumb">
|
||||
<a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(); ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="em-cases-study-content">
|
||||
<a href="<?php the_permalink(); ?>" class="em-cases-study-content-link"></a>
|
||||
|
||||
<!-- BLOG TITLE -->
|
||||
<div class="em-cases-study-title ">
|
||||
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
</div>
|
||||
|
||||
<div class="case_category">
|
||||
<?php
|
||||
switch(get_the_title()){
|
||||
case 'Nokia':
|
||||
{
|
||||
echo '<span>Finland</span>';
|
||||
break;
|
||||
}
|
||||
case 'SoftServe':
|
||||
{
|
||||
echo '<span>Ukraine / USA</span>';
|
||||
break;
|
||||
}
|
||||
case 'Microsoft Corporation':
|
||||
{
|
||||
echo '<span>USA</span>';
|
||||
break;
|
||||
}
|
||||
case 'Mynavi Corporation':
|
||||
{
|
||||
echo '<span>Japan</span>';
|
||||
break;
|
||||
}
|
||||
case 'Striped Giraffe':
|
||||
{
|
||||
echo '<span>Germany</span>';
|
||||
break;
|
||||
}
|
||||
case 'DPDGroup IT Solutions':
|
||||
{
|
||||
echo '<span>France</span>';
|
||||
break;
|
||||
}
|
||||
case 'Atlassian':
|
||||
{
|
||||
echo '<span>Australia</span>';
|
||||
break;
|
||||
}
|
||||
case 'ICEYE':
|
||||
{
|
||||
echo '<span>Poland / Finland</span>';
|
||||
break;
|
||||
}
|
||||
case 'TomTom':
|
||||
{
|
||||
echo '<span>The Netherlands</span>';
|
||||
break;
|
||||
}
|
||||
case 'Equinix, Inc.':
|
||||
{
|
||||
echo '<span>USA</span>';
|
||||
break;
|
||||
}
|
||||
case 'Kitopi':
|
||||
{
|
||||
echo '<span>UAE</span>';
|
||||
break;
|
||||
}
|
||||
case 'Intetics':
|
||||
{
|
||||
echo '<span>USA</span>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
if($atts['show_button'] == 'yes'){
|
||||
?>
|
||||
<div class="case-study-more-button">
|
||||
<a href="<?php echo esc_url($atts['btn_link']); ?>" class="case-study-btn">
|
||||
<?php echo esc_html($atts['btn_text']); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
add_shortcode('cyber_case_study_custom', 'cyber_case_study_custom_area');
|
||||
Reference in New Issue
Block a user