update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* =======================================================
|
||||
*/
|
||||
|
||||
add_action('init', 'em_counter');
|
||||
add_action('init', 'em_counter');
|
||||
if(!function_exists('em_counter')):
|
||||
function em_counter(){
|
||||
if(function_exists('kc_add_map')):
|
||||
@@ -39,9 +39,9 @@ if(!function_exists('em_counter')):
|
||||
),
|
||||
'description' => __( 'select your style', 'cyber' ),
|
||||
'value' => '1'
|
||||
),
|
||||
),
|
||||
array(
|
||||
'name' => 'title_icon',
|
||||
'name' => 'title_icon',
|
||||
'type' => 'toggle',
|
||||
'label' => esc_html__( 'Set Icon', 'cyber' ),
|
||||
'value' => 'no',
|
||||
@@ -58,7 +58,7 @@ if(!function_exists('em_counter')):
|
||||
'show_when' => 'yes'
|
||||
)
|
||||
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'name' => 'number',
|
||||
@@ -72,7 +72,7 @@ if(!function_exists('em_counter')):
|
||||
'label' => __( 'Symbol', 'cyber' ),
|
||||
'value' => '+',
|
||||
'admin_label' => true
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'name' => 'title',
|
||||
@@ -88,8 +88,8 @@ if(!function_exists('em_counter')):
|
||||
'description' => __( 'Enter extra custom class', 'cyber' )
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
'styling' => array(
|
||||
array(
|
||||
'name' => 'css_custom',
|
||||
@@ -104,18 +104,18 @@ if(!function_exists('em_counter')):
|
||||
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.counter_title h4'),
|
||||
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.counter_title h4'),
|
||||
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.counter_title h4'),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.countr_text > h1'),
|
||||
),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.countr_text > h2'),
|
||||
),
|
||||
'Number' => array(
|
||||
array('property' => 'color', 'label' => 'Color', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.countr_text > h1'),
|
||||
array('property' => 'color', 'label' => 'Color', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'font-weight', 'label' => 'Font Weight', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.countr_text > h2'),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.countr_text > h2'),
|
||||
),
|
||||
'Symbol' => array(
|
||||
array('property' => 'color', 'label' => 'Color', 'selector' => '.countr_text > h3'),
|
||||
@@ -126,14 +126,14 @@ if(!function_exists('em_counter')):
|
||||
array('property' => 'text-transform', 'label' => 'Text Transform', 'selector' => '.countr_text > h3'),
|
||||
array('property' => 'margin', 'label' => 'Margin', 'selector' => '.countr_text > h3'),
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.countr_text > h3'),
|
||||
),
|
||||
),
|
||||
'Icon' => array(
|
||||
array('property' => 'color', 'label' => 'Color', 'selector' => '.counter_icon i'),
|
||||
array('property' => 'color', 'label' => 'Color Hover', 'selector' => '.counter_icon i:hover'),
|
||||
array('property' => 'background-color', 'label' => 'BG Color', 'selector' => '.counter_icon i'),
|
||||
array('property' => 'background-color', 'label' => 'BG Color Hover', 'selector' => '.counter_icon i:hover'),
|
||||
array('property' => 'border-color', 'label' => 'Border Color', 'selector' => '.counter_icon i'),
|
||||
array('property' => 'border-color', 'label' => 'Border Color Hover', 'selector' => '.counter_icon i:hover'),
|
||||
array('property' => 'border-color', 'label' => 'Border Color', 'selector' => '.counter_icon i'),
|
||||
array('property' => 'border-color', 'label' => 'Border Color Hover', 'selector' => '.counter_icon i:hover'),
|
||||
array('property' => 'font-family', 'label' => 'Font Family', 'selector' => '.counter_icon i'),
|
||||
array('property' => 'font-size', 'label' => 'Font Size', 'selector' => '.counter_icon i'),
|
||||
array('property' => 'line-height', 'label' => 'Line Height', 'selector' => '.counter_icon i'),
|
||||
@@ -142,13 +142,13 @@ if(!function_exists('em_counter')):
|
||||
array('property' => 'padding', 'label' => 'Padding', 'selector' => '.counter_icon i'),
|
||||
),
|
||||
'Circle Bg' => array(
|
||||
array('property' => 'background-color', 'label' => 'BG Color', 'selector' => '.countr_text > h1::after'),
|
||||
array('property' => 'background-color', 'label' => 'BG Color', 'selector' => '.countr_text > h2::after'),
|
||||
),
|
||||
|
||||
|
||||
'Dot Bg' => array(
|
||||
array('property' => 'border-color', 'label' => 'Border Color', 'selector' => '.counter_icon::before'),
|
||||
),
|
||||
|
||||
|
||||
'Box' => array(
|
||||
array('property' => 'background'),
|
||||
array('property' => 'background-color', 'label' => 'BG Color Hover', 'selector' => '+:hover'),
|
||||
@@ -162,7 +162,7 @@ if(!function_exists('em_counter')):
|
||||
array('property' => 'margin', 'label' => 'Margin'),
|
||||
array('property' => 'padding', 'label' => 'Padding'),
|
||||
array('property' => 'margin', 'label' => 'Position Hover', 'selector' => '+.em-feature:hover')
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -176,9 +176,9 @@ if(!function_exists('em_counter')):
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)// first array
|
||||
); // End add map
|
||||
endif;
|
||||
@@ -192,29 +192,29 @@ endif;
|
||||
* =======================================================
|
||||
* Register Shortcode team section
|
||||
* =======================================================
|
||||
*/
|
||||
*/
|
||||
// [em_counter title="" desc="" icon=""]
|
||||
|
||||
|
||||
|
||||
if(!function_exists('em_counter_shortcode')){
|
||||
|
||||
|
||||
|
||||
|
||||
function em_counter_shortcode($atts,$content){
|
||||
ob_start();
|
||||
|
||||
|
||||
$em_counter = shortcode_atts(array(
|
||||
'layout' => '1',
|
||||
'layout' => '1',
|
||||
'title' => '',
|
||||
'title_icon' => '',
|
||||
'icon' => '',
|
||||
'title_icon' => '',
|
||||
'icon' => '',
|
||||
'number' => '',
|
||||
'sing' => '',
|
||||
'custom_css' => '',
|
||||
'custom_class' => '',
|
||||
),$atts);
|
||||
extract( $em_counter );
|
||||
//custom class
|
||||
),$atts);
|
||||
extract( $em_counter );
|
||||
//custom class
|
||||
$wrap_class = apply_filters( 'kc-el-class', $atts );
|
||||
if( !empty( $custom_class ) ):
|
||||
$wrap_class[] = $custom_class;
|
||||
@@ -223,82 +223,82 @@ if(!function_exists('em_counter_shortcode')){
|
||||
|
||||
|
||||
switch ( $layout ) {
|
||||
case '2':
|
||||
|
||||
case '2':
|
||||
|
||||
?>
|
||||
<div class="single_counter single_counter2 <?php echo esc_attr( $extra_class ); ?>">
|
||||
<div class="single_counter_inner">
|
||||
|
||||
|
||||
<?php if( $title_icon == 'yes' && !empty( $icon ) ){ ?>
|
||||
<div class="counter_icon counter_icon2">
|
||||
<i class="<?php echo esc_attr( $icon ); ?>"></i>
|
||||
<div class="counter_icon counter_icon2">
|
||||
<i class="<?php echo esc_attr( $icon ); ?>"></i>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div class="countr_text countr_text2">
|
||||
<?php if( !empty( $number ) ){ ?>
|
||||
<h1><?php echo esc_attr( $number ); ?></h1>
|
||||
<h2><?php echo esc_attr( $number ); ?></h2>
|
||||
<?php } ?>
|
||||
<?php if( !empty( $sing ) ){ ?>
|
||||
<?php if( !empty( $sing ) ){ ?>
|
||||
<h3><?php echo esc_attr( $sing ); ?></h3>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="counter_title counter_title2">
|
||||
<?php if ( !empty( $title ) ) {?>
|
||||
<h4>
|
||||
<?php echo $title; ?>
|
||||
</h4>
|
||||
</h4>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
default:
|
||||
?>
|
||||
<div class="single_counter default_style <?php echo esc_attr( $extra_class ); ?>">
|
||||
<div class="single_counter_inner">
|
||||
|
||||
<div class="single_counter_inner">
|
||||
|
||||
<?php if( $title_icon == 'yes' && !empty( $icon ) ){ ?>
|
||||
<div class="counter_icon">
|
||||
<i class="<?php echo esc_attr( $icon ); ?>"></i>
|
||||
<div class="counter_icon">
|
||||
<i class="<?php echo esc_attr( $icon ); ?>"></i>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="countr_text">
|
||||
<?php if( !empty( $number ) ){ ?>
|
||||
<h1><?php echo esc_attr( $number ); ?></h1>
|
||||
<h2><?php echo esc_attr( $number ); ?></h2>
|
||||
<?php } ?>
|
||||
<?php if( !empty( $sing ) ){ ?>
|
||||
<?php if( !empty( $sing ) ){ ?>
|
||||
<h3><?php echo esc_attr( $sing ); ?></h3>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="counter_title">
|
||||
<?php if ( !empty( $title ) ) {?>
|
||||
<h4>
|
||||
<?php echo $title; ?>
|
||||
</h4>
|
||||
</h4>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
add_shortcode('em_counter','em_counter_shortcode');
|
||||
|
||||
}
|
||||
add_shortcode('em_counter','em_counter_shortcode');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user