$count){ $data_len=strlen($data)-$count; $data= substr($data, 0, -$data_len); } return $data; } //get url function acfw30_get_url() { $url = @(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"]; $url .= ( $_SERVER["SERVER_PORT"] != 80 ) ? ":".$_SERVER["SERVER_PORT"] : ""; $url .= $_SERVER["REQUEST_URI"]; return $url; } //Get list contact icons function acfw30_get_contact_icons(){ $sp_separator =''; $sp_icon_list =' '; echo $sp_separator; do_action('acfw30_add_contact_icons', $sp_icon_list); echo $sp_icon_list; } //Get icon's symbol function acfw30_get_icons_symbol($icon_name){ $icons_symbol_array = array( array('NAME'=>'fa-whatsapp', 'ICON' => ''), array('NAME'=>'fa-phone-square', 'ICON' => ''), array('NAME'=>'fa-phone', 'ICON' => ''), array('NAME'=>'fa-mobile', 'ICON' => ''), array('NAME'=>'fa-envelope', 'ICON' => ''), array('NAME'=>'fa-envelope-o', 'ICON' => ''), array('NAME'=>'fa-comment', 'ICON' => ''), array('NAME'=>'fa-comments-o', 'ICON' => ''), array('NAME'=>'fa-commenting', 'ICON' => ''), array('NAME'=>'fa-commenting-o', 'ICON' => ''), array('NAME'=>'fa-pencil', 'ICON' => ''), array('NAME'=>'fa-pencil-square', 'ICON' => ''), array('NAME'=>'fa-pencil-square-o', 'ICON' => ''), array('NAME'=>'fa-question', 'ICON' => ''), array('NAME'=>'fa-question-circle', 'ICON' => ''), array('NAME'=>'fa-question-circle-o', 'ICON' => ''), ); foreach ($icons_symbol_array as $icons_symbol) { if($icons_symbol['NAME'] == $icon_name) return $icons_symbol['ICON']; } } //get animation class function acfw30_get_animation_class($acfw30_animation_button) { $acfw30_animation_button = strtolower($acfw30_animation_button); if($acfw30_animation_button == 'none'){$animation_class = ' ';} if($acfw30_animation_button == 'rotate'){$animation_class = 'ak86_rotate';} if($acfw30_animation_button == 'tada'){$animation_class = 'ak86_tada';} if($acfw30_animation_button == 'swing'){$animation_class = 'ak86_swing';} if($acfw30_animation_button == 'grow'){$animation_class = 'ak86_grow';} if($acfw30_animation_button == 'shrink'){$animation_class = 'ak86_shrink';} if($acfw30_animation_button == 'buzz'){$animation_class = 'ak86_buzz';} if($acfw30_animation_button == 'forward'){$animation_class = 'ak86_forward';} if($acfw30_animation_button == 'backward'){$animation_class = 'ak86_backward';} return $animation_class; } add_shortcode('acfw30_title', 'acfw30_title'); function acfw30_title($atts, $content = null) { extract( shortcode_atts(array( 'text' => 'Title', ), $atts ) ); $result = '
'.$text.'
'; return $result; } add_shortcode('acfw30_subtitle', 'acfw30_subtitle'); function acfw30_subtitle($atts, $content = null) { extract( shortcode_atts(array( 'text' => 'Subtitle', ), $atts ) ); $result = '
'.$text.'
'; return $result; } add_shortcode('acfw30_input_text', 'acfw30_input_text'); function acfw30_input_text($atts, $content = null) { extract( shortcode_atts(array( 'name' => 'acfw30_name', 'required' => 'y', 'minlength' => '2', 'maxlength' => '10', ), $atts ) ); $result = ' 'acfw30_number', 'required' => 'y', 'minlength' => '2', 'maxlength' => '10', ), $atts ) ); $result = ' 'acfw30_email', 'required' => 'y', ), $atts ) ); $result = ' 'acfw30_phone', 'required' => 'y', 'mask' => '+7(999)999-9999' ), $atts ) ); $result = ''; return $result; } add_shortcode('acfw30_textarea', 'acfw30_textarea'); function acfw30_textarea($atts, $content = null) { extract( shortcode_atts(array( 'name' => 'acfw30_textarea', 'required' => 'y', 'minlength' => '2', 'maxlength' => '300', ), $atts ) ); $result = '