/** * Output the HTML for this widget. * * @param array $args An array of standard parameters for widgets in this theme. * @param array $instance An array of settings for this widget instance. */ public function widget($args, $instance) { $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $text = empty($instance['text']) ? '' : $instance['text']; $order = empty($instance['order']) ? array() : explode(' ', $instance['order']); echo $args['before_widget']; if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; } ?> <div class="text"><?php echo wpautop($text); ?> </div> <?php $items = $this->get_social_net_items(); $icons = array('email' => 'fa-envelope-o', 'facebook' => 'fa-facebook', 'twitter' => 'fa-twitter', 'google_plus' => 'fa-google-plus', 'youtube' => 'fa-youtube', 'vimeo' => 'fa-vimeo-square', 'instagram' => 'fa-instagram', 'pinterest' => 'fa-pinterest', 'vk' => 'fa-vk'); echo '<ul class="links">'; foreach ($order as $item) { if (!empty($items[$item])) { $item_name = $items[$item]; if (empty($instance[$item])) { continue; } $href = 'email' == $item ? 'mailto:' . esc_attr(antispambot($instance[$item])) : esc_url($instance[$item]); $icon_name = isset($icons[$item]) ? $icons[$item] : ''; echo '<li><a href="' . $href . '" title="' . $item_name . '" target="_blank"><i class="fa ' . $icon_name . '"></i></a></li>'; } } echo '</ul>'; echo $args['after_widget']; }
/** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $street = $instance['street']; $city = $instance['city']; $postCode = $instance['postCode']; $phone = $instance['phone']; $email = $instance['email']; echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $address = ''; if ('' != $street || '' != $phone || '' != $email) { $address .= '<div class="site-info vcard">'; if ('' != $street || '' != $city || '' != $postcode) { $address .= '<p class="adr">'; $address .= '<span class="street-address">' . esc_html($street) . '</span>'; $address .= '<span class="region">' . esc_html($city) . '</span>'; $address .= '<span class="postal-code">' . esc_html($postCode) . '</span>'; $address .= '</p>'; } if ('' != $phone) { $address .= '<span class="tel">' . esc_html($phone) . '</span>'; } if ('' != $email) { $address .= '<span class="email"><a href="mailto:' . antispambot(esc_html($email)) . '" target="_blank">' . antispambot(esc_html($email)) . '</a></span>'; } $address .= '<div>'; } echo $address; echo $after_widget; }
function bigblank_hide_email($atts, $content = null) { if (!is_email($content)) { return; } return '<a href="mailto:' . antispambot($content) . '">' . antispambot($content) . '</a>'; }
function seventeen_hide_email_shortcode($atts, $content = null) { if (!is_email($content)) { return; } return '<a href="mailto:' . antispambot($content) . '">' . antispambot($content) . '</a>'; }
function ground_emailbot($atts, $content = null) { if (!is_email($content)) { return; } return '<a href="mailto:' . antispambot($content) . '" class="mail" >' . antispambot($content) . '</a>'; }
function scd_secure_mail($atts) { extract(shortcode_atts(array("mailto" => '', "txt" => ''), $atts)); $mailto = antispambot($mailto); $txt = antispambot($txt); return '<a href="mailto:' . $mailto . '">' . $txt . '</a>'; }
function emailbot_ssc($attr) { extract(shortcode_atts(array('address' => ''), $attr)); $email = '<a class="email_link" href="mailto:' . antispambot($attr['address']) . '" title="Send Us An Email" target="_blank">'; $email .= antispambot($attr['address']); $email .= '</a>'; return $email; }
function Grafik_Shortcode_BlurEmail_Callback($atts) { global $GRAFIK_ID; $a = shortcode_atts(array('mailbox' => '', 'link' => 'true', 'text' => '', 'class' => '', 'id' => ''), $atts); if (empty($a['mailbox'])) { return null; } return '<span class="theme-bluremail' . (empty($a['class']) ? null : ' ' . $a['class']) . '"' . (empty($a['id']) ? null : ' id="' . $a['id'] . '"') . '>' . ($a['link'] == 'true' ? '<a href="' . antispambot('mailto://' . $a['mailbox']) . '">' : null) . antispambot(empty($a['text']) ? $a['mailbox'] : $a['text']) . ($a['link'] == 'true' ? '</a>' : null) . '</span>'; }
/** * * Experts media contact shortcode * * Puts the contact details for media inquiries on the experts pages. * Means that if updated needed, just happens here and will automatically update each expert page. * */ function media_contact_shortcode_func($atts) { $output = "<div itemscope itemtype=\"http://schema.org/Person\">"; $output .= "\t<h3 itemprop=\"name\">Judy Augsburger</h3>"; $output .= "<p><a itemprop=\"email\" href=\"" . antispambot("mailto:judy_augsburger@hmc.edu") . "\">" . antispambot("*****@*****.**") . "</a><br /><a itemprop=\"telephone\" href=\"tel:+19096070713\">909.607.0713</a></p>\n"; $output .= "</div>"; return $output; // Send it out }
function antispambot_shortcode_handler($atts, $content = '') { extract(shortcode_atts(array('link' => '1'), $atts)); if ($link) { return '<a href="mailto:' . antispambot($content, 1) . '" title="mail to ' . antispambot($content, 0) . '">' . antispambot($content, 0) . '</a>'; } else { return antispambot($content, 0); } }
function msdlab_mailto_function($atts, $content) { extract(shortcode_atts(array('email' => ''), $atts)); $content = trim($content); if ($email == '' && preg_match('|[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}|i', $content, $matches)) { $email = $matches[0]; } $email = antispambot($email); return '<a href="mailto:' . $email . '">' . $content . '</a>'; }
/** * * Email encode shortcode * * Encodes email addresses using antispambot() WP function * * Usage: Enclose text email address with tags: [email]example@hmc.edu[/email] * * */ function email_encode_function($atts, $content) { extract(shortcode_atts(array('ownline' => 'false'), $atts)); if ($ownline == 'true') { $output = '<p><a href="' . antispambot("mailto:" . $content) . '">' . antispambot($content) . '</a></p>'; } else { $output = '<a href="' . antispambot("mailto:" . $content) . '">' . antispambot($content) . '</a>'; } return $output; }
function mk_header_toolbar_contact() { global $mk_options; if (!empty($mk_options['header_toolbar_phone'])) { echo '<span class="header-toolbar-contact"><i class="mk-moon-phone-3"></i>' . stripslashes($mk_options['header_toolbar_phone']) . '</span>'; } if (!empty($mk_options['header_toolbar_email'])) { echo '<span class="header-toolbar-contact"><i class="mk-moon-envelop"></i><a href="mailto:' . antispambot($mk_options['header_toolbar_email']) . '">' . antispambot($mk_options['header_toolbar_email']) . '</a></span>'; } }
function my_social_media_icons() { $social_sites = my_customizer_social_media_array(); foreach ($social_sites as $social_site) { if (strlen(get_theme_mod($social_site)) > 0) { $active_sites[] = $social_site; } } if (!empty($active_sites)) { echo "<ul class='social-icons'>"; foreach ($active_sites as $active_site) { $class = 'fa fa-' . $active_site; if ($active_site == 'email') { ?> <li> <a class="email" target="_blank" href="mailto:<?php echo antispambot(is_email(get_theme_mod($active_site))); ?> "> <span class="fa fa-envelope" title="<?php _e('email icon', 'text-domain'); ?> "></span> </a> </li> <?php } else { ?> <li> <a class="<?php echo $active_site; ?> " target="_blank" href="<?php echo esc_url(get_theme_mod($active_site)); ?> "> <span class="<?php echo esc_attr($class); ?> " title="<?php printf(__('%s icon', 'text-domain'), $active_site); ?> "></span> </a> </li> <?php } } echo "</ul>"; } }
function my_social_media_icons() { $social_sites = my_customizer_social_media_array(); /* any inputs that aren't empty are stored in $active_sites array */ foreach ($social_sites as $social_site) { if (strlen(get_theme_mod($social_site)) > 0) { $active_sites[] = $social_site; } } /* for each active social site, add it as a list item */ if (!empty($active_sites)) { echo "<ul class='social-media-icons'>"; foreach ($active_sites as $active_site) { /* setup the class */ $class = 'fa fa-' . $active_site; if ($active_site == 'email') { ?> <li> <a class="email" target="_blank" href="mailto:<?php echo antispambot(is_email(get_theme_mod($active_site))); ?> "> <i class="fa fa-envelope" title="<?php _e('email icon', 'text-domain'); ?> "></i> </a> </li> <?php } else { ?> <li> <a class="<?php echo $active_site; ?> " target="_blank" href="<?php echo esc_url(get_theme_mod($active_site)); ?> "> <i class="<?php echo esc_attr($class); ?> " title="<?php printf(__('%s icon', 'text-domain'), $active_site); ?> "></i> </a> </li> <?php } } echo "</ul>"; } }
function usv_email_cloaking_shortcode($atts) { $code = shortcode_atts(array('email' => '', 'display' => '0'), $atts); if (!is_email($code['email'])) { return; } if ($code['display'] == '0') { $code['display'] = $code['email']; } $mailto = '<a href="mailto:' . antispambot($code['email']) . '">' . $code['display'] . '</a>'; return $mailto; }
/** * * * @since 1.0.0 * @access public * @param * @return void */ public function email($email) { if ($email) { $html = '<a href="mailto:'; $html .= antispambot($email); $html .= '">'; $html .= antispambot($email); $html .= '</a>'; return $html; } return; }
function clea_patrice_storefront_header_content() { ?> <div class="clea-adresse"> <p>Vous avez une question ? </p> <p><em>Contactez-moi (Patrice Poiraud) :</em></p> <p> <strong>06 84 32 51 31</strong> ou <strong><?php echo antispambot('*****@*****.**'); ?> </strong></p> </div> <?php }
public static function _shortcode($attributes) { if (!isset($attributes['type'])) { return; } if ($data = get_option('contact_details')) { if ($attributes['type'] == 'email_address') { return antispambot($data[$attributes['type']]); } else { return $data[$attributes['type']]; } } }
function get_partners($taxonomies, $children = true, $operator = "IN") { if (isset($taxonomies)) { $tax_var = array('taxonomy' => 'partnership', 'field' => 'slug', 'terms' => $taxonomies, 'include_children' => $children, 'operator' => $operator); } $args = array('post_type' => 'partners', 'posts_per_page' => 1000, 'orderby' => 'menu_order', 'order' => 'ASC', 'tax_query' => array($tax_var)); $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $partnerships = get_the_terms(get_the_id(), 'partnership'); $output[] = array('id' => get_the_id(), 'title' => the_title('', '', 0), 'coordinates' => get_field('coordinates'), 'infowindow' => get_field('contact_name') ? get_field('contact_name') . ' - ' . antispambot(get_field('contact_email')) : get_field('specific_location'), 'partnership' => reset($partnerships)->slug); } } return $output; }
/** * Front-end display of widget. * * @see WP_Widget::widget() * @since 1.0.0 * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ function widget($args, $instance) { // Extract args extract($args, EXTR_SKIP); $label = $instance['label']; $hotline = $instance['hotline']; $open_hour = $instance['open_hour']; $email = $instance['email']; echo $before_widget; // We're good to go, let's build the menu $out = '<ul class="quick-contact">'; $out .= '<li class="hotline">' . $label . '<span>' . $hotline . '</span></li>'; $out .= '<li class="open-hour">' . $open_hour . '</li>'; $out .= '<li class="email"><a href="mailto:' . antispambot($email) . '">' . antispambot($email) . '</a></li>'; $out .= '</ul>'; echo $out; echo $after_widget; return $instance; }
/** @see WP_Widget::widget this function is where the widget is rendered*/ function widget($args, $instance) { extract($args); //get the variables, cleaning where needed $title = apply_filters('widget_title', $instance['title']); $fullname = $instance['fullname']; $email = $instance['contact-email']; $phone = nl2br($instance['phone']); $hours = nl2br($instance['office-hours']); $location = nl2br($instance['office-location']); //start actual rendering of widget data echo $before_widget; // if they specify a title, give a title, if not we set it for them if ($title) { echo $before_title . $title . $after_title; } else { echo $before_title . "Contact Information" . $after_title; } //name of the person if ($fullname != "") { echo "<p><strong>{$fullname}</strong></p>"; } //email address, making sure that it's obfuscated if ($email != "") { $email = antispambot($email); echo "<p><strong>Email:</strong><br/>"; echo "<a href=\"mailto:{$email}\">{$email}</a></p>"; } //phone number if ($phone != "") { echo "<p><strong>Phone:</strong><br/>{$phone}</p>"; } //Office Location if ($location != "") { echo "<p><strong>Address:</strong><br/>{$location}</p>"; } //Office Hours if ($hours != "") { echo "<p><strong>Office Hours:</strong><br/>{$hours}</p>"; } //WP after widget cleanup echo $after_widget; }
/** * Front-end display of widget. * * @see WP_Widget::widget() * @since 1.0.0 * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ function widget($args, $instance) { // Extract args extract($args, EXTR_SKIP); $address = $instance['address']; $telephone = $instance['telephone']; $fax = $instance['fax']; $email = $instance['email']; $title = apply_filters('widget_title', empty($instance['title']) ? __('Office address:', 'wpsp') : $instance['title'], $instance, $this->id_base); echo $before_widget; echo $before_title . $title . $after_title; // We're good to go, let's build the menu $out = '<ul class="quick-contact">'; $out .= '<li class="address"><span>' . $address . '</span></li>'; $out .= '<li class="telephone">' . $telephone . '</li>'; $out .= '<li class="fax">' . $fax . '</li>'; $out .= '<li class="email"><a href="mailto:' . antispambot($email) . '">' . antispambot($email) . '</a></li>'; $out .= '</ul>'; echo $out; echo $after_widget; return $instance; }
function widget($args, $instance) { extract($args); $title = isset($instance['title']) ? apply_filters('PhoenixTeam_Widget_GetInTouch', $instance['title']) : null; $address = isset($instance['address']) ? $instance['address'] : null; $phone = isset($instance['phone']) ? $instance['phone'] : null; $fax = isset($instance['fax']) ? $instance['fax'] : null; $skype = isset($instance['skype']) ? $instance['skype'] : null; $email = isset($instance['email']) ? $instance['email'] : null; $weekend = isset($instance['weekend']) ? $instance['weekend'] : null; echo $args['before_widget']; if ($title) { echo $args['before_title']; echo esc_html($title); echo $args['after_title']; } echo '<ul class="contact-footer contact-composer">'; if ($address) { echo '<li><i class="icon-map-pin"></i> <span>' . esc_html($address) . '</span></li>'; } if ($phone) { echo '<li><i class="icon-phone"></i> <span>' . esc_html($phone) . '</span></li>'; } if ($fax) { echo '<li><i class="icon-printer"></i> <span>' . esc_html($fax) . '</span></li>'; } if ($skype) { echo '<li><i class="icon-megaphone"></i> <span>' . esc_html($skype) . '</span></li>'; } if ($email) { echo '<li><i class="icon-envelope"></i> <span>' . antispambot($email) . '</span></li>'; } if ($weekend) { echo '<li><i class="icon-key"></i> <span>' . esc_html($weekend) . '</span></li>'; } echo '</ul>'; echo $args['after_widget']; }
public function widget($args, $instance) { $title = apply_filters('widget_title', empty($instance['title']) ? __('Contacts', 'prodo') : $instance['title'], $instance, $this->id_base); $text = apply_filters('widget_text', empty($instance['text']) ? '' : $instance['text'], $instance); $phone = apply_filters('widget_text', empty($instance['phone']) ? '' : $instance['phone'], $instance); $location = apply_filters('widget_text', empty($instance['location']) ? '' : $instance['location'], $instance); $email = apply_filters('widget_text', empty($instance['email']) ? '' : $instance['email'], $instance); $location_url = 'https://www.google.com/maps/preview?q=' . urlencode($location); $location_as_url = isset($instance['location_as_url']); $email_as_url = isset($instance['email_as_url']); echo $args['before_widget']; echo $args['before_title'] . $title . $args['after_title']; if (!empty($text)) { echo wpautop($text); } echo ' <ul class="fa-ul"> ' . (!empty($phone) ? '<li><i class="fa-li fa fa-phone"></i>' . esc_html($phone) . '</li>' : '') . ' ' . (!empty($location) ? '<li><i class="fa-li fa fa-map-marker"></i>' . ($location_as_url ? '<a href="' . esc_url($location_url) . '" target="_blank" class="normal">' : '') . esc_html($location) . ($location_as_url ? '</a>' : '') . '</li>' : '') . ' ' . (!empty($email) ? '<li><i class="fa-li fa fa-envelope"></i>' . ($email_as_url ? '<a href="mailto:' . esc_attr(antispambot($email)) . '" class="normal">' : '') . esc_html(antispambot($email)) . ($email_as_url ? '</a>' : '') . '</li>' : '') . ' </ul>'; echo $args['after_widget']; }
function ct_apex_social_icons_output($source) { // get social sites array $social_sites = ct_apex_social_array(); // store the site name and url foreach ($social_sites as $social_site => $profile) { if ($source == 'header') { if (strlen(get_theme_mod($social_site)) > 0) { $active_sites[$social_site] = $social_site; } } elseif ($source == 'author') { if (strlen(get_the_author_meta($profile)) > 0) { $active_sites[$profile] = $social_site; } } } // for each active social site, add it as a list item if (!empty($active_sites)) { echo "<ul class='social-media-icons'>"; foreach ($active_sites as $key => $active_site) { if ($active_site == 'email') { ?> <li> <a class="email" target="_blank" href="mailto:<?php echo antispambot(is_email(ct_apex_get_social_url($source, $key))); ?> "> <i class="fa fa-envelope" title="<?php _e('email icon', 'apex'); ?> "></i> </a> </li> <?php } else { ?> <li> <a class="<?php echo $active_site; ?> " target="_blank" href="<?php echo esc_url(ct_apex_get_social_url($source, $key)); ?> "> <i class="fa fa-<?php echo esc_attr($active_site); ?> " title="<?php printf(__('%s icon', 'apex'), $active_site); ?> "></i> </a> </li> <?php } } echo "</ul>"; } }
return true; } } function lmm_is_plugin_active_for_network($plugin) { if (!is_multisite()) { return false; } $plugins = get_site_option('active_sitewide_plugins'); if (isset($plugins[$plugin])) { return true; } return false; } if (!lmm_is_plugin_active('leaflet-maps-marker-pro/leaflet-maps-marker.php')) { echo sprintf(__('The plugin "Maps Marker Pro" is inactive on this site and therefore this API link is not working.<br/><br/>Please contact the site owner (%1s) who can activate this plugin again.', 'lmm'), antispambot(get_bloginfo('admin_email'))); } else { global $wpdb; $table_name_markers = $wpdb->prefix . 'leafletmapsmarker_markers'; $table_name_layers = $wpdb->prefix . 'leafletmapsmarker_layers'; $lmm_options = get_option('leafletmapsmarker_options'); $sql = 'SELECT m.id as mid, m.createdon as mcreatedon, m.updatedon as mupdatedon FROM `' . $table_name_markers . '` AS m'; $markers = $wpdb->get_results($sql, ARRAY_A); $sql2 = 'SELECT l.id as lid, l.createdon as lcreatedon, l.updatedon as lupdatedon FROM `' . $table_name_layers . '` AS l WHERE l.id != 0'; $layers = $wpdb->get_results($sql2, ARRAY_A); header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-Type:text/xml; charset=utf-8'); echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL; echo '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . PHP_EOL; foreach ($markers as $marker) {
function sf_email_encode_function($atts, $content) { return '<a href="' . antispambot("mailto:" . $content) . '">' . antispambot($content) . '</a>'; }
<?php if (!empty($testiurl)) { ?> <a class="testi-url" href="<?php echo $testiurl; ?> " target="_blank"><?php echo $testiurl; ?> </a><br> <?php } ?> <?php if (!empty($testiemail) && is_email($testiemail)) { echo '<a class="testi-email" href="mailto:' . antispambot($testiemail, 1) . '">' . antispambot($testiemail) . ' </a>'; } ?> </small> </div> </blockquote> </article> <?php } } else { ?> <div class="no-results"> <?php echo '<p><strong>' . theme_locals("there_has") . '</strong></p>'; ?> <p><?php
function comment_author_email_link($linktext = '', $before = '', $after = '') { global $comment; $email = $comment->comment_author_email; if (!empty($email) && $email != '@') { $display = $linktext != '' ? $linktext : antispambot(stripslashes($email)); echo $before; echo '<a href="mailto:' . antispambot(stripslashes($email)) . '">' . $display . '</a>'; echo $after; } }