get_bloginfo('admin_email'), ), $atts)); $content = trim($content); if(!empty($content)) $success = do_shortcode($content); if(empty($success)) $success = __('Your message was successfully sent. Thank You!', 'wpv'); $name_str = __('Name *', 'wpv'); $email_str = __('Email *', 'wpv'); $submit_str = __('Submit', 'wpv'); $include_path = WPV_INCLUDES; ob_start(); include WPV_SHORTCODE_TEMPLATES . 'contactform.php'; return ob_get_clean(); } add_shortcode('contactform', 'wpv_shortcode_contactform'); function wpv_shortcode_twitter($atts) { extract(shortcode_atts(array( 'username' => '', 'count' => 3, 'query' => 'null', 'avatarsize' => 'null', ), $atts)); $user_array = explode(', ',$username); foreach($user_array as $key => $user) $user_array[$key] = '"'.$user.'"'; $id = rand(1,1000); $seconds_ago_text = __('about %d seconds ago', 'wpv'); $a_minutes_ago_text = __('about a minute ago', 'wpv'); $minutes_ago_text = __('about %d minutes ago', 'wpv'); $a_hours_ago_text = __('about an hour ago', 'wpv'); $hours_ago_text = __('about %d hours ago', 'wpv'); $a_day_ago_text = __('about a day ago', 'wpv'); $days_ago_text = __('about %d days ago', 'wpv'); $view_text = __('view tweet on twitter', 'wpv'); if (!empty($user_array) || $query!='null') { $username = implode(',',$user_array); if($query != "null") $query = '"'.html_entity_decode($query).'"'; $with_avatar = ($avatarsize != 'null')?' with_avatar':''; $template = wpv_get_option('twitter-template'); return <<
[/raw] HTML; } return ''; } add_shortcode('twitter', 'wpv_shortcode_twitter'); function wpv_shortcode_flickr($atts) { extract(shortcode_atts(array( 'id' => '', 'type' => 'user', 'count' => 4, 'display' => 'latest'//lastest or random ), $atts)); return << [/raw] HTML; } add_shortcode('flickr', 'wpv_shortcode_flickr'); function wpv_shortcode_contact_info($atts) { extract(shortcode_atts(array( 'color' => '', 'phone' => '', 'cellphone' => '', 'email' => '', 'address' => '', 'city' => '', 'state' => '', 'zip' => '', 'name' => '', ), $atts)); if(!empty($city) && !empty($state)) $city = $city.', '.$state; elseif(!empty($state)) $city = $state; ob_start(); include WPV_SHORTCODE_TEMPLATES . 'contact_info.php'; return ob_get_clean(); } add_shortcode('contact_info', 'wpv_shortcode_contact_info');