Header.php (2695B)
1 <?php 2 namespace Welbim\Helper\Elementor\Settings; 3 4 use Elementor\Utils; 5 6 class Header { 7 8 9 10 11 12 public static function welbim_get_wow_animation_control( $obj, $animationClass = 'fadeInLeft', $animationDuration = '1500ms', $animationDelay = '500ms' ) { 13 $obj->add_control( 14 'animation_class', 15 array( 16 'label' => __( 'Animation', 'welbim-core' ), 17 'separator' => 'before', 18 'type' => \Elementor\Controls_Manager::ANIMATION, 19 'default' => $animationClass, 20 'options' => \welbim\Helper\Elementor\Settings\Animation::welbim_get_animation_name(), 21 ) 22 ); 23 24 $obj->add_control( 25 'duration_time', 26 array( 27 'label' => __( 'Duration Time', 'welbim-core' ), 28 'type' => \Elementor\Controls_Manager::TEXT, 29 'default' => $animationDuration, 30 'placeholder' => esc_html__( 'Animation duration value ex:200s.', 'welbim-core' ), 31 ) 32 ); 33 34 $obj->add_control( 35 'delay_time', 36 array( 37 'label' => __( 'Delay Time', 'welbim-core' ), 38 'type' => \Elementor\Controls_Manager::TEXT, 39 'default' => $animationDelay, 40 'placeholder' => esc_html__( 'Animation duration value ex:200s.', 'welbim-core' ), 41 ) 42 ); 43 } 44 45 public static function welbim_coloumn( $obj, $settings ) { 46 $number_of_coloumns = $settings['number_of_coloumns']; 47 return $number_of_coloumns; 48 } 49 50 51 public static function welbim_coloumn_control( $obj, $max = 3, $min = 1 ) { 52 $option = array(); 53 54 for ( $i = $min; $i <= $max; $i++ ) { 55 switch ( $i ) { 56 case 1: 57 $option['col-lg-12'] = __( '1', 'welbim-core' ); 58 break; 59 case 2: 60 $option['col-lg-6'] = __( '2', 'welbim-core' ); 61 break; 62 case 3: 63 $option['col-lg-4'] = __( '3', 'welbim-core' ); 64 break; 65 case 4: 66 $option['col-lg-3'] = __( '4', 'welbim-core' ); 67 break; 68 case 6: 69 $option['col-lg-2'] = __( '6', 'welbim-core' ); 70 break; 71 case 12: 72 $option['col-lg-1'] = __( '12', 'welbim-core' ); 73 break; 74 } 75 } 76 77 $obj->add_control( 78 'number_of_coloumns', 79 array( 80 'label' => __( 'Number Of Coloumns', 'welbim-core' ), 81 'separator' => 'before', 82 'type' => \Elementor\Controls_Manager::SELECT, 83 'options' => $option, 84 'default' => 'col-lg-4', 85 86 ) 87 ); 88 } 89 90 public static function getContactForm7Posts() { 91 $args = array( 92 'post_type' => 'wpcf7_contact_form', 93 'posts_per_page' => -1, 94 ); 95 $catlist = array(); 96 if ( $categories = get_posts( $args ) ) { 97 foreach ( $categories as $category ) { 98 (int) $catlist[ $category->ID ] = $category->post_title; 99 } 100 } else { 101 (int) $catlist['0'] = esc_html__( 'No contect From 7 form found', 'welbim-core' ); 102 } 103 return $catlist; 104 } 105 }