예제 #1
0
 function shortcode_wpgeo_map_link($atts = null, $content = null)
 {
     // Validate Args
     $atts = wp_parse_args($atts, array('target' => '_self'));
     $atts['echo'] = 0;
     if (!$content) {
         $content = esc_html__('View Larger Map', 'wp-geo');
     }
     return sprintf('<a href="%s" target="%s">%s</a>', esc_attr(wpgeo_map_link($atts)), esc_attr($atts['target']), do_shortcode($content));
 }
예제 #2
0
 function shortcode_wpgeo_map_link($atts = null, $content = null)
 {
     $defaults = array('target' => '_self');
     // Validate Args
     $r = wp_parse_args($atts, $defaults);
     $atts['echo'] = 0;
     $url = wpgeo_map_link($atts);
     if (!$content) {
         $content = __('View Larger Map', 'wp-geo');
     }
     return '<a href="' . $url . '" target="' . $r['target'] . '">' . do_shortcode($content) . '</a>';
 }